summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-18 00:57:34 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-18 01:21:46 +0200
commiteade591251f3f3deaa3502d73b6803206fc69d2d (patch)
treeb1a76333c82eab3304c6cb4c6180a857b21e0ecf
parente7212b465a8d40ae4e5bff112887e3e8c210019f (diff)
MLKLLVMCompiler: Add -eval:.
-rw-r--r--MLKLLVMCompiler.h2
-rw-r--r--MLKLLVMCompiler.mm7
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