dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnet/engine engine.h,1.61,1.62 internal.c,1.3


From: Gopal.V <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnet/engine engine.h,1.61,1.62 internal.c,1.35,1.36 process.c,1.38,1.39
Date: Sun, 17 Nov 2002 13:11:36 -0500

Update of /cvsroot/dotgnu-pnet/pnet/engine
In directory subversions:/tmp/cvs-serv21336/engine

Modified Files:
        engine.h internal.c process.c 
Log Message:
multiple internal call table attached


Index: engine.h
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/engine.h,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -r1.61 -r1.62
*** engine.h    16 Nov 2002 19:00:39 -0000      1.61
--- engine.h    17 Nov 2002 18:11:31 -0000      1.62
***************
*** 139,144 ****
  
        /* The custom internal call table which is runtime settable */
!       ILEngineInternalClassInfo* internalClassTable;
!       int                     internalClassCount;
  
  #ifdef IL_CONFIG_DEBUG_LINES
--- 139,143 ----
  
        /* The custom internal call table which is runtime settable */
!       ILEngineInternalClassList* internalClassTable;
  
  #ifdef IL_CONFIG_DEBUG_LINES

Index: internal.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/internal.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -C2 -r1.35 -r1.36
*** internal.c  16 Nov 2002 19:00:39 -0000      1.35
--- internal.c  17 Nov 2002 18:11:31 -0000      1.36
***************
*** 94,97 ****
--- 94,98 ----
        int left, right, middle;
        const ILMethodTableEntry *entry;
+       ILEngineInternalClassList* internalClassList;
        ILType *signature;
        int isCtor;
***************
*** 173,231 ****
        }
        
!       /* Search for the local internalcall table */
!       left = 0;
!       right = process->internalClassCount - 1;
!       while(left <= right)
        {
!               middle = (left + right) / 2;
!               cmp = strcmp(name, process->internalClassTable[middle].name);
!               if(!cmp)
!               {
!                       if(!strcmp(namespace, 
!                                                       
process->internalClassTable[middle].namespace))
                        {
!                               /* Search for the method within the class's 
table */
!                               entry = 
process->internalClassTable[middle].entry;
!                               name = ILMethod_Name(method);
!                               signature = ILMethod_Signature(method);
!                               while(entry->methodName != 0)
                                {
!                                       if(!strcmp(entry->methodName, name) &&
!                                          entry->signature != 0 &&
!                                          _ILLookupTypeMatch(signature, 
entry->signature))
                                        {
!                                               if(ctorAlloc && 
entry[1].methodName &&
!                                                  !(entry[1].signature))
!                                               {
!                                                       info->func = 
entry[1].func;
!                                               #if defined(HAVE_LIBFFI)
!                                                       info->marshal = 0;
!                                               #else
!                                                       info->marshal = 
entry[1].marshal;
!                                               #endif
!                                               }
!                                               else
                                                {
!                                                       info->func = 
entry->func;
!                                               #if defined(HAVE_LIBFFI)
!                                                       info->marshal = 0;
!                                               #else
!                                                       info->marshal = 
entry->marshal;
!                                               #endif
                                                }
!                                               return 1;
                                        }
-                                       ++entry;
                                }
                        }
-                       return 0;
-               }
-               else if(cmp < 0)
-               {
-                       right = middle - 1;
-               }
-               else
-               {
-                       left = middle + 1;
                }
        }
--- 174,236 ----
        }
        
!       
for(internalClassList=process->internalClassTable;internalClassList!=NULL;
!                                       
internalClassList=internalClassList->next)
        {
!               /* Search for the local internalcall table */
!               left = 0;
!               right = internalClassList->size - 1;
!               while(left <= right)
!               {
!                       middle = (left + right) / 2;
!                       cmp = strcmp(name, 
internalClassList->list[middle].name);
!                       if(!cmp)
                        {
!                               if(!strcmp(namespace, 
!                                                               
internalClassList->list[middle].namespace))
                                {
!                                       /* Search for the method within the 
class's table */
!                                       entry = 
internalClassList->list[middle].entry;
!                                       name = ILMethod_Name(method);
!                                       signature = ILMethod_Signature(method);
!                                       while(entry->methodName != 0)
                                        {
!                                               if(!strcmp(entry->methodName, 
name) &&
!                                                  entry->signature != 0 &&
!                                                  
_ILLookupTypeMatch(signature, entry->signature))
                                                {
!                                                       if(ctorAlloc && 
entry[1].methodName &&
!                                                          
!(entry[1].signature))
!                                                       {
!                                                               info->func = 
entry[1].func;
!                                                       #if defined(HAVE_LIBFFI)
!                                                               info->marshal = 
0;
!                                                       #else
!                                                               info->marshal = 
entry[1].marshal;
!                                                       #endif
!                                                       }
!                                                       else
!                                                       {
!                                                               info->func = 
entry->func;
!                                                       #if defined(HAVE_LIBFFI)
!                                                               info->marshal = 
0;
!                                                       #else
!                                                               info->marshal = 
entry->marshal;
!                                                       #endif
!                                                       }
!                                                       return 1;
                                                }
!                                               ++entry;
                                        }
                                }
+                               return 0;
+                       }
+                       else if(cmp < 0)
+                       {
+                               right = middle - 1;
+                       }
+                       else
+                       {
+                               left = middle + 1;
                        }
                }
        }

Index: process.c
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnet/engine/process.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -r1.38 -r1.39
*** process.c   16 Nov 2002 19:00:39 -0000      1.38
--- process.c   17 Nov 2002 18:11:31 -0000      1.39
***************
*** 69,73 ****
        process->entryImage = 0;
        process->internalClassTable = 0;
-       process->internalClassCount = 0;
  #ifdef IL_CONFIG_DEBUG_LINES
        process->debugHookFunc = 0;
--- 69,72 ----
***************
*** 468,478 ****
  }
  
! int ILExecProcessSetInternalCallTable(ILExecProcess* process, 
!                                       ILEngineInternalClassInfo* 
internalClassTable,
!                                       int internalClassCount)
! {
!       if(internalClassCount<=0)return 0;
!       process->internalClassTable=internalClassTable;
!       process->internalClassCount=internalClassCount;
        return 1;
  }
--- 467,493 ----
  }
  
! int ILExecProcessAddInternalCallTable(ILExecProcess* process, 
!                                       const ILEngineInternalClassInfo* 
internalClassTable,
!                                       int tableSize)
! {
!       ILEngineInternalClassList* tmp;
!       if((!internalClassTable) || (tableSize<=0))return 0;
! 
!       if(!(process->internalClassTable))
!       {
!               
process->internalClassTable=(ILEngineInternalClassList*)ILMalloc(
!                                                                       
sizeof(ILEngineInternalClassList));
!               process->internalClassTable->size=tableSize;
!               process->internalClassTable->list=internalClassTable;
!               process->internalClassTable->next=NULL;
!               return 1;
!       }
!       for(tmp=process->internalClassTable;tmp->next!=NULL;tmp=tmp->next);
!       tmp->next=(ILEngineInternalClassList*)ILMalloc(
!                                                               
sizeof(ILEngineInternalClassList));
!       tmp=tmp->next; /* advance */
!       tmp->size=tableSize;
!       tmp->list=internalClassTable;
!       tmp->next=NULL;
        return 1;
  }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]