Skip to content
kdabwl edited this page Jan 25, 2024 · 5 revisions

Welcome to the SmallObjects wiki!

C·lang has made good progress recently, and time came for prototyping an Interpreter which runs "in" the native machine stack, no extras (by SISD CPUs) address- or index registers for "spilling".

Within C·lang´s capabilities, a new OO calling-convention was designed for parting-up: message sends (+primitive dispatch) and -returns, separated into subfunctions, by callee and call site: a receiver is pushed (tos), then maybe (arity) arguments, before invocation; then upon return the callee cleans (arity) arguments and the CPU holds the result (oop, tagged pointer); with the tos unchanged until now, bytecodes either pop the tos (statement.) or assign the result (value) to the tos position, otherwise the current statement is just doing cascade and the tos (receiver) is the same for another message.

The Interpreter maintains stack-frames in the same way as C·lang does it, here based on stdcall. And 1× few (define) macros were needed for teaching C·lang how messages are sent (+primitives dispatched), and how methods execute.

+It was clear from the outset, that ContextPart/-s (receiver & message & activated method) have to expand their explorative scope, and for that, 1× _Thread_local oop holds tlsMemory (sole instance of ObjectMemory).

Clone this wiki locally