Skip to content

Commit

Permalink
Add NULL and NEED_CONTINUATION definisions
Browse files Browse the repository at this point in the history
  • Loading branch information
bacek committed May 2, 2011
1 parent d57dac0 commit a805ebc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions compilers/opsc/src/Ops/JIT.pm
Expand Up @@ -280,6 +280,15 @@ method _create_jitted_function (%jit_context, $start) {

%jit_context<variables><PMCNULL> := $!module.get_global(:name<PMCNULL>);

# NULL isn't variable. But treat it as variable simplify life.
%jit_context<variables><NULL> := LLVM::Constant::null(LLVM::Type::pointer(LLVM::Type::void()));

# It's actually macro, but Preprocessor supports only "function" macros.
%jit_context<variables><NEED_CONTINUATION> := LLVM::Constant::int_to_ptr(
LLVM::Constant::integer(1),
LLVM::Type::PMC_PTR(),
);

# Create default return.
$!debug && say("# default leave");
$!builder.set_position($leave);
Expand Down

0 comments on commit a805ebc

Please sign in to comment.