diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-13 11:04:55 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-13 11:04:55 +0200 |
commit | a8a3de11ce7219d9567fb5d341276325f8df04be (patch) | |
tree | eca8a81f6d410ac3eac148463b41a955ae935a3e /MLKRoot.m | |
parent | 1d741f977203814b9c5b0b5d524af25eff27a3c1 (diff) |
Add COMPILE.
Diffstat (limited to 'MLKRoot.m')
-rw-r--r-- | MLKRoot.m | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -22,6 +22,7 @@ #import "MLKDynamicContext.h" #import "MLKInterpretedClosure.h" #import "MLKInterpreter.h" +#import "MLKLLVMCompiler.h" #import "MLKNumber.h" #import "MLKPackage.h" #import "MLKRoot.h" @@ -702,4 +703,15 @@ as provided by method %@ of object %@", cons:forms with:nil]]); } + + ++(NSArray *) compile:(NSArray *)args +{ + NSLog (@"Compiling lambda form."); + id thing = [MLKLLVMCompiler compile:denullify([args objectAtIndex:0]) + inContext:[MLKLexicalContext globalContext]]; + NSLog (@"Compilation done."); + NSLog (@"Compiled: %@", thing); + RETURN_VALUE (thing); +} @end |