diff options
author | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-12 19:18:52 +0200 |
---|---|---|
committer | Matthias Andreas Benkard <matthias@benkard.de> | 2008-08-12 19:18:52 +0200 |
commit | 428aa889649c3688240a14a4f291b8a2be1e2ae8 (patch) | |
tree | 46674240dee89c93632274d6329b84b00e1f5b42 /MLKLLVMCompiler.mm | |
parent | d9a4288c6b7acfbcb7e819841a291f3063daa00c (diff) |
MLKLexicalContext: Add management of user-defined function and variable properties.
Diffstat (limited to 'MLKLLVMCompiler.mm')
-rw-r--r-- | MLKLLVMCompiler.mm | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/MLKLLVMCompiler.mm b/MLKLLVMCompiler.mm index 3c37eca..f09e03f 100644 --- a/MLKLLVMCompiler.mm +++ b/MLKLLVMCompiler.mm @@ -100,7 +100,7 @@ static Constant builder.CreateRet (v); function->dump(); verifyFunction (*function); - fpm->run (*function); + //fpm->run (*function); // JIT-compile. fn = (id (*)()) execution_engine->getPointerToFunction (function); @@ -297,7 +297,7 @@ static Constant { Value *value; - if ([_context isHeapVariable:self]) + if ([_context variableHeapAllocationForSymbol:_form]) { Value *binding = builder.CreateLoad ([_context bindingForSymbol:_form]); value = [_compiler insertMethodCall:@"value" onObject:binding]; @@ -449,8 +449,9 @@ static Constant function->dump(); NSLog (@"Verify..."); verifyFunction (*function); - NSLog (@"FPM..."); - fpm->run (*function); + // NSLog (@"FPM..."); + // fpm->run (*function); + NSLog (@"Done."); builder.SetInsertPoint (outerBlock); @@ -458,13 +459,16 @@ static Constant argv[0] = function; argv.push_back (closure_data); + argv.push_back (builder.CreateIntToPtr (ConstantInt::get(Type::Int64Ty, + 0, + false), + PointerTy)); Value *mlkcompiledclosure = [_compiler insertClassLookup:@"MLKCompiledClosure"]; Value *closure = - [_compiler insertMethodCall:@"closureWithCode:data:" + [_compiler insertMethodCall:@"closureWithCode:data:length:" onObject:mlkcompiledclosure withArgumentVector:&argv]; - outerBlock->dump(); return closure; } |