diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-23 16:34:08 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-23 16:34:08 +0200 |
commit | ad05662ae05336aa5db20f9d34d5c1d5bba9d6c2 (patch) | |
tree | 14c0f6321acb8532a3a3d92a957404dfa1f66ee8 /MLKRoot.m | |
parent | 13dc1ca7ca1d785313517b9f8d78e63414cb43df (diff) |
Make compilers pluggable at runtime.
Diffstat (limited to 'MLKRoot.m')
-rw-r--r-- | MLKRoot.m | 11 |
1 files changed, 7 insertions, 4 deletions
@@ -32,6 +32,7 @@ #import "MLKSingleFloat.h" #import "MLKDoubleFloat.h" #import "NSObject-MLKPrinting.h" +#import "globals.h" #import "runtime-compatibility.h" #import "util.h" @@ -708,17 +709,19 @@ as provided by method %@ of object %@", with:nil]]); } -#ifdef USE_LLVM +(NSArray *) compile:(NSArray *)args { + if (!MLKDefaultCompiler) + [NSException raise:@"MLKNotImplementedException" + format:@"It seems as though there is no compiler here."]; + //NSLog (@"Compiling lambda form."); - id thing = [MLKLLVMCompiler compile:denullify([args objectAtIndex:0]) - inContext:[MLKLexicalContext globalContext]]; + id thing = [MLKDefaultCompiler compile:denullify([args objectAtIndex:0]) + inContext:[MLKLexicalContext globalContext]]; //NSLog (@"Compilation done."); //NSLog (@"Compiled: %@", thing); RETURN_VALUE (thing); } -#endif +(NSArray *) fset:(NSArray *)args { |