Skip to content

Commit

Permalink
Fix up usage of variables in BEGIN; should deal with the issue tadzik…
Browse files Browse the repository at this point in the history
…++ ran into recently.
  • Loading branch information
jnthn committed Jul 30, 2011
1 parent 4655200 commit 28424c4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Perl6/SymbolTable.pm
Original file line number Diff line number Diff line change
Expand Up @@ -799,7 +799,8 @@ class Perl6::SymbolTable is HLL::Compiler::SerializationContextBuilder {
# Fix up Code object associations (including nested blocks).
# We un-stub any code objects for already-compiled inner blocks
# to avoid wasting re-compiling them, and also to help make
# parametric role outer chain work out.
# parametric role outer chain work out. Also set up their static
# lexpads, if they have any.
my $num_subs := nqp::elems($precomp);
my $i := 0;
while $i < $num_subs {
Expand All @@ -809,6 +810,9 @@ class Perl6::SymbolTable is HLL::Compiler::SerializationContextBuilder {
%!sub_id_to_code_object{$subid});
nqp::bindattr(%!sub_id_to_code_object{$subid}, $code_type, '$!do', $precomp[$i]);
}
if pir::exists(%!sub_id_to_static_lexpad, $subid) {
$precomp[$i].get_lexinfo.set_static_lexpad(%!sub_id_to_static_lexpad{$subid});
}
$i := $i + 1;
}

Expand Down

0 comments on commit 28424c4

Please sign in to comment.