This file documents, in very terse fashion, the opcode sequences emitted by the MOO compiler and accepted by the MOO decompiler. It is an invaluable reference while reading the code in either `code_gen.c' or `decompile.c'. NOTE: Since MOO database files contain suspended tasks, and since the file representation of those tasks includes both source code and a current PC for each frame on the stack, IT IS CRITICALLY IMPORTANT that these code sequences not change between releases of the server. Otherwise, when the code for a frame was recompiled at server start-up, its associated saved PC value might no longer be valid, leading to almost certain catastrophe. If the database file format were at some point changed to contain the bytecodes (and not the source code) for suspended task frames, then this restriction could (at least one release later) be relaxed. stmt: {[ELSE]IF ( expr ) stmts}+ [ELSE stmts] ENDIF ; Once for each arm IF / EIF next ; ; JUMP done ; next: ; ; If there's an ELSE part done: | FOR id IN ( expr ) stmts ENDFOR NUM 1 top: FOR_LIST id done JUMP top done: | FOR id IN [ expr1 .. expr2 ] stmts ENDFOR top: FOR_RANGE id done JUMP top done: | WHILE [id] ( expr ) stmts ENDWHILE top: WHILE done ; if there is no ID WHILE_ID id done ; if there is an ID JUMP top done: | FORK [id] ( expr ) stmts ENDFORK FORK / FORK_WITH_ID vector [id] {vector: } | expr ; POP | RETURN ; RETURN0 | RETURN expr ; RETURN | TRY stmts_b {EXCEPT [id_i] ( codes_i ) stmts_i}+ ENDTRY PUSH_LABEL handler_1 ... PUSH_LABEL handler_N TRY_EXCEPT N END_EXCEPT done ... handler_i: PUT id_i ; if is supplied POP JUMP done ; all but last handler ... done: | TRY stmts_b FINALLY stmts_h ENDTRY TRY_FINALLY handler END_FINALLY handler: CONTINUE | BREAK [id]; | CONTINUE [id]; EXIT