Changeset 331


Ignore:
Timestamp:
May 2, 2008, 8:13:05 PM (17 years ago)
Author:
cinc
Message:

Fixed ticket #20. Not a perfect solution, though...

Location:
trunk
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/nom/Makefile.kmk

    r327 r331  
    3535        src/nomid.c \
    3636        src/nomgc.c \
     37        src/thunk.c \
    3738        class_c/nomobj.c \
    3839        class_c/nomclassmanager.c \
  • trunk/nom/src/nombuildclass.c

    r329 r331  
    5959#include <nomclassmanager.h>
    6060
     61#include <thunk.h>
     62
    6163/* Define if you want to have messages from nomBuildClass() and friends */
    6264//#define DEBUG_NOMBUILDCLASS
     
    98100/******************* somBuildClass **********************/
    99101
     102#if 0
    100103/*
    101104  Thunking code to get the instance var address from an object pointer pushed
     
    115118 */
    116119static gulong mThunkCode[]={0x04244c8b, 0xff00518b, 0x0000aca2 , 0x16000000};
    117 
     120#endif
    118121
    119122/***********************************************************************************/
  • trunk/nom/src/nombuildnomobj.c

    r326 r331  
    4848#include <nomtk.h>
    4949#include <nomobj.h>
     50#include <thunk.h>
    5051
    5152/********************************************************/
     
    6061extern PNOM_ENV pGlobalNomEnv;
    6162
     63
     64/********************************************************/
     65
     66
    6267/*
    63   Thunking code to get the instance var address from an object pointer pushed
    64   on the stack. The following translates into this assembler code:
    65 
    66   MOV EAX,DWORD PTR [ESP+4] ;Move object ptr into EAX
    67   ADD EAX, +4
    68   RET
    69 */
    70 
    71 static gulong thunk[]={0x0424448b, 0x00000405, 0x0000c300};
    72 
    73 /*
    74 MOV ECX,DWORD PTR [ESP+4] : move object pointer from stack in ECX
    75 MOV EDX,DWORD PTR [ECX]   : move [ECX] in EDX -> mtab in EDX
    76 JMP DWORD PTR [EDX+0ACh]  : JMP to address pointing to by EDX+0ACh
    77  */
    78 static gulong mThunkCode[]={0x04244c8b, 0xff00518b, 0x0000aca2 , 0x16000000};
    79 
    80 /********************************************************/
    81 
    82 
    83 /*
    84   Create the SOMClassPriv structure *only* for SOMObject and fill it with info
     68  Create the NOMClassPriv structure *only* for NOMObject and fill it with info
    8569  from the sci.
    8670
  • trunk/tests/c/test-nom.c

    r326 r331  
    253253  /* Init NOM */
    254254  NOMClassMgrObject=nomEnvironmentNew();
    255 
     255 
    256256  g_message("\n");
    257257  g_message("================================================================");
Note: See TracChangeset for help on using the changeset viewer.