|
From: Tim R. <ti...@su...> - 2004-03-29 00:13:26
|
It's 3.7 beta time and thus time to make another release ofVMMaker. Since I've made a bunch of changes I thought I'd mention some of the details and ask if they cause any problems for people. The b1 version added to 3.6:- Add ClassRefsBrowsingForPlugins ( extends image support for classrefs) Add InterpreterSimulator-primitiveGetAttribute (support Simulator) Add InterpreterSimulator-sqGrowMemoryBy (ditto) Add primYield.1.cs - adds primitive for ProcessorScheduler>yield Add primCopy.1.cs - adds a prim to copy Objects, revised from ar original to make numbered (168) Add SlightlyFasterActivate-JMM.8.cs Add ImageStartupFix-JMM.1.cs - consider doing the object counting for real? Add bytecodePrimPoint-internal-tpr.1.cs - variant of MakePrimPointXInternal-JMM.1.cs Add InterpreterPlugin-halt.st Add isArray stuff - update Cross/vm/sqVirtualMachine.[ch] - IsArrayVM.1.cs - which changes core VM code to use isArray: - IsArrayVMProxy.1.cs- which add isArray to the proxy for simulation - IsArrayPlugins.2.cs - which uses isArray in some plugin code This version adds:- fixes for the object-as-methods prims New mechanism for requiring the CCodeGen to retain methods even if they appear unused. This spreads the responsibility around to class methods named #requiredMethodNames, called as part of CCodeGenerator>addClass: New primitive calling; instead of a case statement we have a table of function pointers and jump directly. To support this a macro and typedef are added to Cross/sq.h The cumbersome timing of primitives is removed from primitiveResponse since most internal numbered prims are quick. Those that are not use #forceInterruptCheck to require an ASAP checkForInterrupts. fIC is essentially idempotent and can be called several times in a prim without harm. I use this instead of simply setting the interruptCheckCounter to 0 because that seems to mess up the feedback mechanism. The external call prim now has the primitive timing code since many named prims are quite long operations; I'm still looking for a nice way to improve that. Maybe changing the codegen to do something clever. I guess the ffi prim ought to do something similar. Note that this change could be backed out if the latter two points cause a problem for anyone. Allowing plugin code to call forceInterruptCheck requires a step in sqVirtualMachine - but then Andreas' isArray code had already caused that. Internal code like ioGetNextEvent(), ioShowDisplay() etc that takes a long time can freely call fIC if it seems warranted. The evidence so far is that the timer change is very worthwhile on RISC OS and mildly beneficial on other platforms. It also allows the more direct usage of function pointers in the prim table which will have other uses later. :-) Misc. commenting, reformatting and tidying. tim -- Tim Rowledge, ti...@su..., http://sumeru.stanford.edu/tim Strange OpCodes: SSD: Scramble Segment Directory |