Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use variable if we have it anyway
  • Loading branch information
lizmat committed Oct 8, 2015
1 parent 0a39e0b commit c1e9ede
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/Perl6/World.nqp
Expand Up @@ -411,7 +411,7 @@ class Perl6::World is HLL::World {

# Tag UNIT with a magical lexical. Also if we're compiling CORE,
# give it such a tag too.
my $name := %*COMPILING<%?OPTIONS><setting> eq 'NULL'
my $name := $*COMPILING_CORE_SETTING
?? '!CORE_MARKER'
!! '!UNIT_MARKER';
my $marker := self.pkg_create_mo($/, %*HOW<package>, :$name);
Expand Down Expand Up @@ -3195,11 +3195,7 @@ class Perl6::World is HLL::World {
for $longname<colonpair> {
if $_<coloncircumfix> && !$_<identifier> {
my $cp_str;
if %*COMPILING<%?OPTIONS><setting> ne 'NULL' {
# Safe to evaluate it directly; no bootstrap issues.
$cp_str := ':<' ~ ~self.compile_time_evaluate($_, $_.ast) ~ '>';
}
else {
if $*COMPILING_CORE_SETTING {
my $ast := $_.ast;

# XXX hackish for dealing with <longname> stuff, which
Expand All @@ -3213,6 +3209,11 @@ class Perl6::World is HLL::World {
?? ':<' ~ $ast[2].value ~ '>'
!! ~$_;
}

# Safe to evaluate it directly; no bootstrap issues.
else {
$cp_str := ':<' ~ ~self.compile_time_evaluate($_, $_.ast) ~ '>';
}
@components[+@components - 1] := @components[+@components - 1] ~ $cp_str;
}
else {
Expand Down

0 comments on commit c1e9ede

Please sign in to comment.