Core Help Root: Objects: Bytecode Docs


This is my (probably pathetic) attempt to document the ColdC bytecodes as returned by $root.method_bytecode(method). They are returned in a list of miscelaneous data and operations represented by symbols. Here is a list of what I've managed to figure out so far:
'COMMENT, "<comment text>"
Obvious. Tells the driver to ignore "<comment text>". I wonder if data types other than strings could be put in there somehow.
'GET_LOCAL, '<name>
Pushes the value of a local variable.
'EQ
Pushes true if the last two stacked items (when I say last two I mean the two most recently pushed) are equal, false otherwise.
'IN
Pushes the index of the second to last stacked item in the last stacked item or 0.
'CALL_METHOD, '<name>
Calls a method on the last stacked item and pushes the return value.
'AND, <expression>
If the last stacked item is true then 'AND will evaluate the expression and push it's value.
'SET_LOCAL, '<name>
Sets the value of a local variable to the last stacked item.
'CRITICAL, <foo>, 'CRITICAL_END
Catches and returns any errors in <foo>. Is what (| <foo> |) would compile to.
'START_ARGS
I think that this makes pushes between it and the next function or method call place data on the arguments for the call instead of on the stack. But I'm just guessing.


Colors | Trie | List Library | has_text | mutex | Heap | Weather System | Math Library | Integer | Data Lib | Object Lib | Help Node | Code Lib | Generic Map | Scrabble | World Time | Time | Robot | Native Function Reference | Complex Number Library | Bytecode Docs | motd | Mail List | Float | Collective | libraries | social_ui


the Cold Dark