...and add OutputLog.dll stubs.
The calling convention no longer has HLL functions reaching into the
stack. The previous implementation didn't even work since the return
value could overwrite an argument that needed to be freed.
HLL libraries are compiled into the executable rather than dynamically
loaded as in early versions of System 4. These days AliceSoft does the
same thing.
All array instructions supported by the SDK compiler, anyway. There are
a few instructions that were added in later versions, like A_FIND and
A_REVERSE.
Local pages need to be reference counted like any other page. It is
possible to create references to local variables which escape the extent
of their function call, so using a stack doesn't work.
Caching is implemented for small page sizes to avoid invoking
malloc/free on every function call.
Implement CALLMETHOD, SH_STRUCTREF and PUSHSTRUCTPAGE instructions.
Constructors are a bit tricky since SH_LOCALCREATE has to implicitly
call an arbitrary number of functions before it returns (just changing
the instruction pointer only allows for calling a single function).
To get around this, there is now a vm_call() function which is used to
call a function synchronously, before returning from the current
instruction.
Methods are implemented as functions, except that they get a struct page
as local variable -1.
Destructors are still not implemented.