VMMaker-sig.70 Exupery-sig.262
- removed numerous xxxxAddress methods from Interpreter, ExuperyPlugin, MachineX86.
- added 4 new methods to Interpreter: exuperyPrimitiveGlobalPtrCount -- returns number of pointers stored in table
exuperyPrimitiveGlobalPtrByName -- by giving a name of pointer (string or symbol) returns an array (pointer name proto) , or nil if not found exuperyPrimitiveGlobalPtrByIndex -- same as above but uses index as parameter exuperyGetGlobalPtrInfo: -- helper function to generate Array (pointer name proto)
To see all VM global pointers use Exupery vmGlobalPtrs will return dictionary name -> info. where info is array of 4 elements: - pointer value - name - prototype for functions or '<var>' for variables a function prototype can be useful to see argument types and names e.t.c., so, it can be parsed in smalltalk to generate a cdecl callout to it. - index in global table ( left for later use , when i add support for replacing pointer in table :) )
also, note, the function names are stored as smalltalk selectors, not their corresponding C equivalents. so, you have names like 'commonVariableInternal:at:cacheIndex:' instead of 'commonVariableInternalatcacheIndex' in table so its easier to get to its implementation in Interpreter class.
To see, how globals table generated look at CCodeGenerator>>emitGlobalTablesOn:methodList:
i'm using struct instead of array, to preserve function names and type info. so later i can substitute calls like: foo(bar) with VMPointers->foo(bar) and then be able to replace given function with anything i want.
All tests is passed fine except 3 cases, simply because i don't have following classes in image:
GraphVizBaseTests CommandShell FloatMathPluginTests
i don't think something will change if they will be. :)