From 104059c2a6c380e9a44fc58e6fde23d8e7546a83 Mon Sep 17 00:00:00 2001 From: pmurias Date: Wed, 16 Aug 2017 17:03:12 +0200 Subject: [PATCH] Revert "Workarounds to allow running anything with --setting=NULL." This reverts commit 1a79284ab2eee69a67521a338ae18850a62c662c. --- src/Perl6/Actions.nqp | 8 ++------ src/Perl6/Optimizer.nqp | 4 +--- src/Perl6/World.nqp | 21 ++++++--------------- 3 files changed, 9 insertions(+), 24 deletions(-) diff --git a/src/Perl6/Actions.nqp b/src/Perl6/Actions.nqp index 1af0c813012..d7da60edffd 100644 --- a/src/Perl6/Actions.nqp +++ b/src/Perl6/Actions.nqp @@ -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) !! 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 @@ -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 $ { diff --git a/src/Perl6/Optimizer.nqp b/src/Perl6/Optimizer.nqp index 62291850e77..dfe3a82fb68 100644 --- a/src/Perl6/Optimizer.nqp +++ b/src/Perl6/Optimizer.nqp @@ -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) { diff --git a/src/Perl6/World.nqp b/src/Perl6/World.nqp index c0cef6de37b..630c35eb4a0 100644 --- a/src/Perl6/World.nqp +++ b/src/Perl6/World.nqp @@ -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); - } - 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. @@ -3833,10 +3828,6 @@ class Perl6::World is HLL::World { } } - method is_null_setting() { - %*COMPILING<%?OPTIONS> 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.