Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Eliminate a bunch more PAST references.
  • Loading branch information
jnthn committed Sep 8, 2012
1 parent 1ff9f02 commit 718a3fc
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 12 deletions.
6 changes: 3 additions & 3 deletions src/HLL/World.pm
Expand Up @@ -30,16 +30,16 @@ class HLL::World {
# The number of code refs we've added to the code refs root so far.
has $!num_code_refs;

# List of PAST blocks that map to the code refs table, for use in
# List of QAST blocks that map to the code refs table, for use in
# building deserialization code.
has $!code_ref_blocks;

# List of PAST nodes specifying dependency loading related tasks. These
# List of QAST nodes specifying dependency loading related tasks. These
# are done before the deserialization of the current context, or if in
# immediate run mode before any of the other fixup tasks.
has @!load_dependency_tasks;

# List of PAST nodes specifying fixup tasks, either after deserialization
# List of QAST nodes specifying fixup tasks, either after deserialization
# or between compile time and run time.
has @!fixup_tasks;

Expand Down
3 changes: 1 addition & 2 deletions src/ModuleLoader.pm
Expand Up @@ -100,8 +100,7 @@ knowhow ModuleLoader {
try {
my $source_mo := $_.value.HOW;
$source_is_stub := $source_mo.WHAT.HOW.name($source_mo) eq $stub_how &&
!nqp::isnull(nqp::who($_.value)) && nqp::who($_.value) &&
$_.value.HOW.name($_.value) ne 'PAST';
!nqp::isnull(nqp::who($_.value)) && nqp::who($_.value);
}
if $source_is_stub {
my $source := $_.value;
Expand Down
5 changes: 2 additions & 3 deletions src/NQP/Actions.pm
Expand Up @@ -506,7 +506,6 @@ class NQP::Actions is HLL::Actions {
);
}
elsif $<twigil>[0] eq '!' {
# Construct PAST.
my $name := ~@name.pop;
my $ch;
if $*PKGDECL eq 'role' {
Expand Down Expand Up @@ -872,7 +871,7 @@ class NQP::Actions is HLL::Actions {

method method_def($/) {
# If it's just got * as a body, make a multi-dispatch enterer.
# Otherwise, build method block PAST.
# Otherwise, build method block QAST.
my $past;
if $<onlystar> {
$past := only_star_block();
Expand Down Expand Up @@ -1387,7 +1386,7 @@ class NQP::Actions is HLL::Actions {
}

# Takes a multi-part name that we know is in a package and generates
# PAST to look it up using NQP package semantics.
# QAST to look it up using NQP package semantics.
sub lexical_package_lookup(@name, $/) {
# Catch empty names and die helpfully.
if +@name == 0 { $/.CURSOR.panic("Cannot compile empty name"); }
Expand Down
3 changes: 0 additions & 3 deletions src/NQP/World.pm
Expand Up @@ -263,9 +263,6 @@ class NQP::World is HLL::World {
%!code_stub_sc_idx{$past.cuid()} := $code_ref_idx;
$past<compile_time_dummy> := $dummy;

# Attach PAST as a property to the stub code.
pir::setprop__vPsP($dummy, 'PAST', $past);

# Things with code objects may be methods in roles or multi-dispatch
# routines. We need to handle their cloning and maintain the fixup
# list.
Expand Down
1 change: 0 additions & 1 deletion src/QRegex/P5Regex/Grammar.nqp
@@ -1,7 +1,6 @@
use QRegex;
use NQPHLL;
use QAST;
use PASTRegex;

grammar QRegex::P5Regex::Grammar is HLL::Grammar {
token TOP {
Expand Down

0 comments on commit 718a3fc

Please sign in to comment.