summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <matthias@benkard.de>2008-08-18 00:58:40 +0200
committerMatthias Andreas Benkard <matthias@benkard.de>2008-08-18 01:21:53 +0200
commit81d52b3cc5a93f031f24e228f87ee47ac4d8299b (patch)
tree37e128db826e0acceb6ef5efaf8ed02a5ea812c1
parentfc68a5a5c6b2b8d9b1a841d45b65701d30b4c612 (diff)
LLVM compiler: Implement IN-PACKAGE.
-rw-r--r--MLKLLVMCompiler.mm18
1 files changed, 18 insertions, 0 deletions
diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm
index 1d6d471..ae0c083 100644
--- a/MLKLLVMCompiler.mm
+++ b/MLKLLVMCompiler.mm
@@ -751,3 +751,21 @@ static Constant
return value;
}
@end
+
+
+@implementation MLKInPackageForm (MLKLLVMCompilation)
+-(Value *) processForLLVM
+{
+ id package = [MLKPackage findPackage:stringify(_packageDesignator)];
+
+ [[MLKDynamicContext currentContext]
+ setValue:package
+ forSymbol:[[MLKPackage findPackage:@"COMMON-LISP"]
+ intern:@"*PACKAGE*"]];
+
+ return builder.CreateIntToPtr (ConstantInt::get(Type::Int64Ty,
+ (uint64_t)package,
+ false),
+ PointerTy);
+}
+@end