Skip to content

Commit

Permalink
RakuAST: fix lookup of GLOBAL when using the new frontend
Browse files Browse the repository at this point in the history
Need to bind the GLOBAL hll sym at the start of compilation as that's
what GLOBAL is looked up from.
  • Loading branch information
niner committed Nov 13, 2022
1 parent 88d3702 commit 06b7d39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Raku/Actions.nqp
Expand Up @@ -113,7 +113,9 @@ class Raku::Actions is HLL::Actions does Raku::CommonActions {
$*CU := self.r('CompUnit').new(:$comp-unit-name, :$setting-name,
:global-package-how($package-how), :$precompilation-mode,
:$export-package);
$*R.set-global($*CU.generated-global);
my $global := $*CU.generated-global;
$*R.set-global($global);
nqp::bindhllsym('Raku', 'GLOBAL', $global);
}

# Set up the literals builder, so we can produce and intern literal
Expand Down

0 comments on commit 06b7d39

Please sign in to comment.