Documentation

Constants

All the public Constants, Enums and Unions in LanguageKitCodeGen

Constants

Default

NSString* MsgSendSmallIntFilename

Description forthcoming.
namespace etoile

This class implements a streaming code generation interface designed to be called directly from an AST.

Returns a constant C string using Str as an initialiser.

Creates a generic constant. This will be defined in the module load function by sending a message to the specified class.

Creates a global value containing a pointer to a class.

Finishes IR generation and prepares the module for code generation.

Returns the debug info node for an Objective-C type encoding.

Returns an array of debug types representing the type encodings in a string.

Returns the code generator for the current scope

Initialise for the specified module.

Start generating code for a class.

End a class.

Start generating code for a category.

Finish generating a category.

Start a function method.

Ends a function.

Start a class method.

Start a method.

End the current method.

Begin a BlockClosure.

End the current block. Returns a pointer to the block object.

Store the class variable for the current class.

Stores the instance variable for the current class.

Stores a variable in the specified local value.

Load the class variable for the current class.

Loads the instance variable from the current class.

Loads a variable in the specified local value.

Set the (local) return value for a block.

Create an integer constant. Either a SmallInt or a BigInt, depending on the size.

Creates a floating point constant.

Create a symbol (selector) constant.

Create a string (object) constant.

Get the module which provides static definitions of small int messages.

Compile and load this module.

Write the module as a bitcode file. If isAsm is true then this writes LLVM 'assembly language' instead of bitcode.

Debugging macro: dumps the object if the debug flag is set

Debugging macro: dumps the object's type if the debug flag is set

Debugging macro: logs an error message to stderr if the debug flag is set.

namespace llvm
Description forthcoming.
int DEBUG_DUMP_MODULES

Debug flag used to set whether excessive amounts of debugging info should be spammed to stderr.

namespace etoile
Description forthcoming.
namespace etoile

ABI Information provider.

LLVM void type.

Type used for object pointers.

Pointer to something.

Type used for pointers to object pointers.

Type used for selectors.

LLVM type for C char.

LLVM type for C short.

LLVM type for C int.

LLVM type for C long.

LLVM type for C long long.

Type of pointer-sized integers.

Type for pointer subtraction results.

The type for a byref structure.

Some zeros to reuse.

Returns a function type for the specified Objective-C type encoding.

Returns a type encoding for the first value in the specified type encoding. For example, @:@ will return the type encoding for @ (id ), not a function type.

Indicates that the current value is a block. If we pass it to a function or a method, or store it on the heap or in a global, then we need to call objc_retainBlock() .

namespace llvm
Description forthcoming.
namespace etoile

LLVM context

Metadata kind used to indicate message sends.

Looks up the IMP for a specific method and the type encoding.

Calls an Objective-C method via its pointer.

namespace llvm
Description forthcoming.
int( default

Description forthcoming.
namespace etoile

Description forthcoming.
const unsigned int MAX_FLOATS_IN_REGISTERS
Description forthcoming.
const unsigned int MAX_INTS_IN_REGISTERS
Description forthcoming.
const bool PASS_STRUCTS_AS_POINTER
Description forthcoming.
const bool SMALL_FLOAT_STRUCTS_ON_STACK
Description forthcoming.
namespace etoile

Intialises a Function object to be used as a Smalltalk method or block function.

Maps a selector to a SmallInt function name.

Constructs a Smalltalk object from the specified Objective-C type.

Constructs a C primitive from a Smalltalk object.

Construct C primitives from Smalltalk objects in an argument list. Skips the two implicit arguments in the type encoding if skipImplicit is true (the argument list is then assumed to be a list of message arguments, rather than function arguments).

Loads a value from a byref structure.

Creates an on-stack byref structure pointing to an LKObject value.

Creates and initializes a new local variable with the specified value, or with zero if there is no specified value.

Preform a real message send. Receiver must be a real object, not a SmallInt. Assumes that there is only one possible type for the selector.

Preform a real message send. Receiver must be a real object, not a SmallInt. Tries all of the possible types.

Send a message to something that may be a SmallInt or an Objective-C object.

Send a message with no arguments to something that is either a SmallInt or an Objective-C object.

Cleans up a variable at the end of a method.

Debugging function - emits a printf statement with the string and the extra argument.

/ /** * Returns the block's object.

Ends the current lexical scope.

Load an argument at the specified index.

Send a message to the superclass.

Send a message to an Objective-C object.

Send a message to a Smalltalk object.

Call a C function.

Set the return value for this method / block.

Load the value of self in the current context.

Get a pointer to the class object for a specified name.

Load a class variable.

Store a value in a class variable.

Load an instance variable.

Store an instance value.

Stores a value in a local variable.

Returns the value in the named variable.

Clean up after a block.

Create a symbol object.

Create a floating point constant.

Create an integer constant.

Returns the parent lexical scope.

Compare two pointers for equality.

Creates a new basic block with the specified name and returns a pointer to the block.

Returns the current basic block.

Moves the insert point to the specified basic block.

Ends the current basic block with an unconditional jump to the specified basic block and sets the insert point to that block.

Ends the current basic block with a conditional branch, to FalseBB if condition is the SmallInt value corresponding to the Objective-C 'NO' or to TrueBB if it is any other value.

Split code flow depending on whether an object is a real object or a small integer. Sets the insert point for aBuilder to the new basic block for the object cast, and sets the insert point for smallIntBuilder to the basic block for the small integer case.

Combines two basic blocks, one for an object case and one for a small int case. If anObject is not NULL, then a PHI node will be created in the basic block combining the two cases and will be set to the object / small int.

This function sets the insert point of the object builder to the start of the continuation block, after the PHI nodes.

namespace llvm
Description forthcoming.
namespace etoile

Returns the method family for a given selector.

Returns the method family for a given method.

Returns whether a method returns a retained object.

Class used to generate read and write barriers for objects.

The module that this class will manipulate.

Cached types.

Constructor. Should not be called directly - get a concrete subclass via the Create() function.

Computes the address of an ivar from the object address and an offset.

Creates a new assignment helper. Pass true as the first argument to enable garbage collection.

Stores a value in the specified global.

Loads a value from a global. Note that this is not required for classes or constant strings.

Stores a value in an instance variable.

Loads a value from an instance variable.

Stores a value into a local variable. In ARC mode, we always perform retain values stored in locals, and then let the optimiser clean them up.

Loads a value from a local.

Disposes of a local. This should be called for each retained local in the cleanup section.

Retains and then autoreleases a return value.

Retains the result of a method return. This lets us always retain autoreleased return values, and free them in the cleanup. The ARC optimiser will then remove a balanced retain / release later.

Releases a temporary value.

Retains a temporary value.

Casts a block to an object, so that it can be used with the normal memory management strategies.

namespace llvm
Description forthcoming.
namespace etoile

Class responsible for emitting blocks. The outer scope is responsible for generating any block byref structures for bound arguments, this will generate the types for the block and

The type of this block's structure.

A pointer to the block object, in its own scope.

A pointer to the block object, in the parent's scope.

Emits the descriptor for this block. The descriptor contains the block type encoding, along with the functions required to copy and dispose of the block.

Returns the block's object.

Begins generating a block. The arguments and locals contain an array of LKSymbol objects representing the local and argument values in this block. Bound variables are passed in when the block is created.

Creates an on-stack instance of the block, with all of the bound variables attached.

namespace llvm
Description forthcoming.
namespace etoile

This function can be used to determine the function return type.

Quick shim to generate attribute lists to apply to functions. retTy specifies the intended rather than the ABI-mandated return type of the function.