From Second Life Wiki
Revision as of 11:06, 23 November 2007 by JON Lehman (Talk | contribs)

Jump to: navigation, search

The compiled form of LSL scripts - a mostly stack-based language with a reference-counted heap and a very odd function calling convention in which the caller allocates storage for the callee's local variables. All the gory details can be found at, including some opcodes that are implemented in the interpreter but never outputted by the compiler (such as the handy DUP family of instructions for Forth-style programming, and PUSHIP/POPIP for implementing custom function calls/function pointers, jumptable-based switch statements and the like).

It's actually a reasonably powerful instruction set in some ways, but the compiler doesn't make use of it very well. Of course, with the planned switch to Mono, it's probably really not sensible to do anything with it. Besides, rumor has it that script compilation will move server-side in the near future.