The Objective C runtime allows runtime introspection, call and creation of ObjC classes and methods.
http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/Reference/reference.html
JSCocoa uses
- class_getInstanceVariable, class_addIvar, object_getInstanceVariable to manage the internal Javascript hash set on derived classes, used to store Javascript values
- class_getInstanceMethod, class_getClassMethod, class_addMethod to overload methods
- method_getTypeEncoding, method_getImplementation, to get the MethodEncoding of a method and an adress to pass to libffi
- class_copyMethodList to find a matching method for a SplitCall