[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pnet-developers] ILCoder abstraction broken
From: |
Miroslaw Dobrzanski-Neumann |
Subject: |
[Pnet-developers] ILCoder abstraction broken |
Date: |
Thu, 30 Oct 2003 16:58:51 +0100 |
User-agent: |
Mutt/1.4i |
Hi,
Looking at "include/il_coder.h" I guess the particular ILCoder implementation
should be hidden to the outer world and only be accessible through the
ILCoderClass Methods.
This abstraction is currently broken in
_ILCVMStartUnrollBlock () in engine/cvmc.c
which makes assumptions what the coder is
or
_ILCVMUnrollMethod () in engine/unroll.c
which calls the _ILCVMStartUnrollBlock() function
This way CVMC Coder is hardwired to the unroller
To break the dependency an extra *virtual* method should be added to
ILCoderClass
il_coder.h:
struct _tagILCoderClass
{
...
int (* startUnrollBlock) (ILCoder *coder, int align, ILCachePosn *posn);
...
}
...
#define ILCoderStartUnrollBlock (coder, align, posn) \
((*((coder)->classInfo->startUnrollBlock))((coder), (align), (posn)))
...
or even better
static inline int ILCoderStartUnrollBlock (ILCoder *coder, int align
ILCachePosn *posn)
{
return (* coder->classInfo->startUnrollBlock) (coder, align, posn);
}
the _ILCVMUnrollMethod () woould than call the virtual method
...
if (! ILCoderStartUnrollBlock (coder, 32, &posn))
{
...
Could you fix it
Regards,
--
Mirosław Dobrzański-Neumann
E-mail: address@hidden
This message is utf-8 encoded
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pnet-developers] ILCoder abstraction broken,
Miroslaw Dobrzanski-Neumann <=