- Argument slots: holds the actual arguments passed to the current frame.
- Local slots: holds the local variables used by the current code.
- Expression slots: holds the temporary space that you need to calculate expressions on a stack. For example, in
(a + b) + cyou would push a, then push b, then add, then push c, then add, which requires a maximum depth of two expression slots.
There are also some slots reserved for dedicated functionality, holding values like
this and the callee / return value.
There is always a "Top of Stack" (TOS) that corresponds to the latest value pushed onto the expression stack. All bytecodes implicitly operate in terms of this location.
All opcodes are annotated with a [-popcount, +pushcount] to represent the overall stack-effects their execution.
Bytecode listing was moved to SpiderMonkey Internals: Bytecode Descriptions page.