Skip to content
Permalink
Browse files

Import symbols into BEGIN time EVAL'ed code in a predictable order

This will make builds a bit more reproducible
  • Loading branch information...
niner committed Apr 26, 2019
1 parent 35423a6 commit e1f1eb007f8d29df6c87d7e7ac2aa8d23a330c5d
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/Perl6/World.nqp
@@ -2767,15 +2767,14 @@ class Perl6::World is HLL::World {
my $cur_block := $past;
while $cur_block {
my %symbols := $cur_block.symtable();
for %symbols {
my str $name := $_.key;
for sorted_keys(%symbols) -> str $name {
# For now, EVALed code run during precomp will not get the
# outer lexical context's symbols as those may contain or
# reference unserializable objects leading to compilation
# failures. Needs a smarter approach as noted above.
unless self.is_nested() || %seen{$name} {
# Add symbol.
my %sym := $_.value;
my %sym := %symbols{$name};
my $value := nqp::existskey(%sym, 'value') || nqp::existskey(%sym, 'lazy_value_from')
?? self.force_value(%sym, $name, 0)
!! $mu;

0 comments on commit e1f1eb0

Please sign in to comment.
You can’t perform that action at this time.