Skip to content

Commit

Permalink
Revert "Workarounds to allow running anything with --setting=NULL."
Browse files Browse the repository at this point in the history
This reverts commit 1a79284.
  • Loading branch information
pmurias committed Aug 16, 2017
1 parent 8c888ad commit 104059c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 24 deletions.
8 changes: 2 additions & 6 deletions src/Perl6/Actions.nqp
Expand Up @@ -982,7 +982,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
:is_nested($*W.is_nested()),
:repo_conflict_resolver(QAST::Op.new(
:op('callmethod'), :name('resolve_repossession_conflicts'),
$*W.is_null_setting ?? QAST::Op.new(:op<null>) !! QAST::WVal.new( :value($*W.find_symbol(['CompUnit', 'RepositoryRegistry'])) )
QAST::WVal.new( :value($*W.find_symbol(['CompUnit', 'RepositoryRegistry'])) )
)),

# If this unit is loaded as a module, we want it to automatically
Expand Down Expand Up @@ -6126,11 +6126,7 @@ class Perl6::Actions is HLL::Actions does STDActions {
}

method arglist($/) {
my class LackingPairClass {}
my $Pair := LackingPairClass;
try {
$Pair := $*W.find_symbol(['Pair']);
};
my $Pair := $*W.find_symbol(['Pair']);
my $past := QAST::Op.new( :op('call'), :node($/) );
my @names;
if $<EXPR> {
Expand Down
4 changes: 1 addition & 3 deletions src/Perl6/Optimizer.nqp
Expand Up @@ -176,9 +176,7 @@ my class Symbols {
return self.force_value(%sym, $name, 1);
}
}
nqp::say("//Optimizer: No lexical $name found");
my class NoSuch {}
return NoSuch;
nqp::die("Optimizer: No lexical $name found");
}

method find_lexical_symbol($name) {
Expand Down
21 changes: 6 additions & 15 deletions src/Perl6/World.nqp
Expand Up @@ -652,17 +652,12 @@ class Perl6::World is HLL::World {
method mop_up_and_check($/) {

# Install POD-related variables.
if $*W.is_null_setting {
$*POD_PAST := QAST::Op.new(:op<null>);
}
else {
$*POD_PAST := self.add_constant(
'Array', 'type_new', :nocache, |$*POD_BLOCKS
);
self.install_lexical_symbol(
$*UNIT, '$=pod', $*POD_PAST.compile_time_value
);
}
$*POD_PAST := self.add_constant(
'Array', 'type_new', :nocache, |$*POD_BLOCKS
);
self.install_lexical_symbol(
$*UNIT, '$=pod', $*POD_PAST.compile_time_value
);

# Tag UNIT with a magical lexical. Also if we're compiling CORE,
# give it such a tag too.
Expand Down Expand Up @@ -3833,10 +3828,6 @@ class Perl6::World is HLL::World {
}
}

method is_null_setting() {
%*COMPILING<%?OPTIONS><setting> eq 'NULL';
}

# Finds a symbol that has a known value at compile time from the
# perspective of the current scope. Checks for lexicals, then if
# that fails tries package lookup.
Expand Down

0 comments on commit 104059c

Please sign in to comment.