summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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