From eade591251f3f3deaa3502d73b6803206fc69d2d Mon Sep 17 00:00:00 2001 From: Matthias Andreas Benkard Date: Mon, 18 Aug 2008 00:57:34 +0200 Subject: MLKLLVMCompiler: Add -eval:. --- MLKLLVMCompiler.h | 2 ++ MLKLLVMCompiler.mm | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3