From a8a3de11ce7219d9567fb5d341276325f8df04be Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Wed, 13 Aug 2008 11:04:55 +0200 Subject: Add COMPILE. --- MLKRoot.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'MLKRoot.m') diff --git a/MLKRoot.m b/MLKRoot.m index 940181c..a003912 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,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 -- cgit v1.2.3