-
Notifications
You must be signed in to change notification settings - Fork 1
VmStacks
Four stacks exist.
This is the main stack in a system. Most of operations either work on top of this stack or involve it in some other way. Contains object references only. Each end every method works with own object stack. On method call a new object stack instance is created. Call arguments are passed from callers stack to called method stack. Number of call arguments is passed on integer stack, as described in detail below. On return from method its object stack is discarded, and the topmost object on stack is returned back to caller (pushed on its object stack). If called method’s object stack is empty on return, null object will be pushed on calling method’s stack.
Term “stack” is usually corresponds to object stack, if other stack is not specified explicitly.
Integer stack is used to do integer math in a fast way. On method call a new integer stack is created and number of passed (on object stack) arguments is pushed on integer stack. On return integer stack is discarded. No value is returned on integer stack. Integer stack can and will be used to process values of other binary data types, such as float, double, boolean, etc.
Each method is executed with own catchers stack. See push catcher and pop catcher operations below.
Used for return and exception unwind purposes. This stack’s element has all the current executing method stuff: object, integer and exception stacks, ‘this’ object pointer, return address.
:: Home :: RoadMap :: History :: ChangeLog :: ScreenShots :: Phantom Developer's Guide