diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-18 00:57:34 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-18 01:21:46 +0200 |
commit | eade591251f3f3deaa3502d73b6803206fc69d2d (patch) | |
tree | b1a76333c82eab3304c6cb4c6180a857b21e0ecf | |
parent | e7212b465a8d40ae4e5bff112887e3e8c210019f (diff) |
MLKLLVMCompiler: Add -eval:.
-rw-r--r-- | MLKLLVMCompiler.h | 2 | ||||
-rw-r--r-- | MLKLLVMCompiler.mm | 7 |
2 files changed, 8 insertions, 1 deletions
diff --git a/MLKLLVMCompiler.h b/MLKLLVMCompiler.h index 379d791..cf2823b 100644 --- a/MLKLLVMCompiler.h +++ b/MLKLLVMCompiler.h @@ -37,6 +37,8 @@ using namespace llvm; +(id) compile:(id)object inContext:(MLKLexicalContext *)context; ++(id) eval:(id)object; + +(void) processTopLevelForm:(id)object; +(void) processTopLevelForm:(id)object inMode:(enum MLKProcessingMode)mode; diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index 1fe4f4b..337caf6 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -152,7 +152,12 @@ static Constant //FIXME // If PROGN, do this... If EVAL-WHEN, do that... - +} + ++(id) eval:(id)object +{ + return [self compile:object + inContext:[MLKLexicalContext globalContext]]; } +(Value *) processForm:(MLKForm *)form |