Documentation

Functions

All the public Functions in LanguageKit

Functions

Default

struct objc_slot* objc_get_slot(Class cls, SEL selector)
Description forthcoming.
    struct objc_slot* objc_method_type_fixup(Class cls, SEL selector, struct objc_slot* result)
    Description forthcoming.
      id <LKCodeGenerator> defaultJIT()

      Returns the default code generator for JIT compilation.

      Deprecated. Use [LKCodeGenLoader defaultJIT] in new code.

        id <LKCodeGenerator> defaultStaticCompilterWithFile(NSString * )

        Returns the default code generator for static compilation, outputting to the file specified in the argument.

        Deprecated. Use [LKCodeGenLoader defaultStaticCompilerWithFile:] in new code.

          int LKCountObjCTypes(const char* objctype)
          Description forthcoming.
            void LKNextType(const char** typestr)
            Description forthcoming.
              void LKSkipQualifiers(const char** typestr)

              Functions for working with Objective-C type strings

                LKMethod * LKASTForMethod(Class cls, NSString * selectorName)
                Description forthcoming.
                  NSString * NSStringFromRuntimeString(const char* cString)

                  Creates an NSString from a string returned by the runtime. These strings are guaranteed to persist for the duration of the program, so there's no need to copy the data.

                    id LKCallFunction(NSString * functionName, NSString * types, unsigned int argc, const id* args)

                    Calls the named function, with the specified type encoding.

                      id LKGetIvar(id receiver, NSString * name)

                      Gets the value of an instance variable, boxing it as necessary.

                        IMP LKInterpreterMakeIMP(Class cls, const char* objctype)

                        Creates and returns a "trampoline" Objective-C method implementation for a method with the given type string. When invoked, this method implementation will call ASTForMethod() which will look up the method's AST node using the slector and receiver's class, and finally interpret the AST node using -[LKMethod executeWithReciever:arguments:count:] .

                        Note that the method IMPs returned by LKInterpreterMakeIMP can never be freed (because they might be cached).

                          id LKSendMessage(NSString * className, id receiver, NSString * selName, unsigned int argc, const id* args)

                          These functions allow the interpreter to interact with the Objective-C runtime.

                          Send a message to an object. receiverClass is the class to start looking for the method implementation in; normally receiver's class, but if it is a super message send it should be the appropriate superclass of receiver.

                          Arguments are unboxed to the correct type, and the returned value is boxed to an object.

                          Throws an exception if any of the arguments can't be unboxed to the required type for the message send.

                            BOOL LKSetIvar(id receiver, NSString * name, id value)

                            Sets the value of an instance variable, unboxing it as necessary. For object typed ivars, the existing value is released and the new value is retained.