Skip to content

Commit

Permalink
Provide basic support for CORE:: namespace for the core itself
Browse files Browse the repository at this point in the history
Normally CORE:: is handled by PseudoStash. But the core itself may not
have the luxury of relying on the class because it may not be available
yet.
  • Loading branch information
vrurg committed May 20, 2021
1 parent face292 commit ea92934
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Perl6/World.nqp
Expand Up @@ -5127,6 +5127,12 @@ class Perl6::World is HLL::World {
QAST::SVal.new( :value('GLOBAL') ) );
}

if $*COMPILING_CORE_SETTING && +@name > 1 && @name[0] eq 'CORE' {
# PseudoStash is likely to be unavailable while CORE is compiled. Here we provide very basic support for
# CORE:: namespace for the core code itself.
return QAST::WVal.new( :value(self.find_symbol_in_setting(@name)) )
}

# Handle things starting with pseudo-package.
if self.is_pseudo_package(@name[0]) && @name[0] ne 'GLOBAL' && @name[0] ne 'PROCESS' {
my $lookup;
Expand Down

0 comments on commit ea92934

Please sign in to comment.