- Declared in:
- LKCodeGen.h
Class used to instantiate the default code generators. Lazily loads the code generator components the first time it receives a message.
Returns the default code generator for JIT compilation.
Returns the default code generator for static compilation, outputting to the file specified in the argument.
- Declared in:
- LKCodeGen.h
- Conforms to:
- NSObject
Code generator protocol. Each AST node calls methods in a class conforming to this protocol. Methods which return a value return a pointer to a generator-specific type, which can then be passed in to the generator later when it expects a value.
Returns the basic block associated with the specified label.
Begin generating a block expression with the specified number of arguments and locals. The bound variables are pointers to variables declared outside the block's scope.
Begin a class method with the specified type encoding and number of local variables. Local variables and arguments are indexed by number, the symbol table information is just for debugging.
Begins compiling a free-standing function.
Begin an instance method with the specified type encoding and number of local variables. Local variables and arguments are indexed by number, the symbol table information is just for debugging.
Specify the return value for a block. For Smalltalk, this is the result of the last statement in a block.
Compares aCondition to the SmallInt
value for NO
(1) and executes the
first block if it matches, the second if it
doesn't.
Calls a C function, with the specified type encoding.
Create a new category with the specified name on the named class.
Create a new class, with the specified superclass. The symbol table should define all of the new instance and class variables.
End the current block. Subsequent calls will insert instructions into the containing scope (the method, or another block).
Return a constant representing the passed string.
Generates a constant symbol (a boxed selector).
Ends the current basic block with an unconditional jump to the specified basic block
Ends the current basic block with an unconditional jump to the basic block that has been associated with the specified label.
Returns a constant representing the string as an integer (either a SmallInt or a BigInt).
Returns the block object for the current closure. Calling this when not in a block has undefined behaviour.
Load the value of the specified local variable.
Sets the current insert point to the specified basic block.
Sends a message to a receiver which may be a SmallInt (a boxed Smalltalk integer contained within an object pointer).
Sends a message to an object. Similar to sendMessage:type:to:withargs:count: but requires that receiver be an Objective-C object, not a small integer.
Sends a message to the superclass.
Associate a basic block with the specified label for later retrieval.
Starts a new basic block and returns a pointer to the basic block.
Begin generating a module. A module is a set of classes and categories which are compiled and optimised at once.
Stores a value in the specified variable.
Return a constant representing the passed string.
- Declared in:
- LKCodeGen.h
- Conforms to:
- LKCodeGenerator
Protocol for static code generators.
Initializes the code generator with the specified file.
Returns the default code generator for JIT compilation.
Deprecated. Use [LKCodeGenLoader defaultJIT] in new code.
Returns the default code generator for static compilation, outputting to the file specified in the argument.
Deprecated. Use [LKCodeGenLoader defaultStaticCompilerWithFile:] in new code.