summaryrefslogtreecommitdiff
path: root/MLKRoot.m
diff options
context:
space:
mode:
authorMatthias Benkard <mulk@minimulk.mst-plus>2008-08-16 22:51:22 +0200
committerMatthias Benkard <mulk@minimulk.mst-plus>2008-08-16 22:51:22 +0200
commit5cd4de577c08637cb5d78d1c3376b1ff80e74065 (patch)
treec9e0e279f0c95b5f7fc5c691821344cb2e5d3ce4 /MLKRoot.m
parentd858e84c0778dc1851b3a0e324caaf0bef05f274 (diff)
parent3f11cb6b3ddd03d3211dd355cbac23884fa5a6e3 (diff)
Merge branch 'master' of http://matthias.benkard.de/code/mulklisp
Diffstat (limited to 'MLKRoot.m')
-rw-r--r--MLKRoot.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/MLKRoot.m b/MLKRoot.m
index 940181c..b051dd3 100644
--- a/MLKRoot.m
+++ b/MLKRoot.m
@@ -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,16 @@ as provided by method %@ of object %@",
cons:forms
with:nil]]);
}
+
+#ifdef USE_LLVM
++(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);
+}
+#endif
@end