Created
June 10, 2011 23:16
-
-
Save anonymous/1019997 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Perl6/Actions.pm b/src/Perl6/Actions.pm | |
index 263b69a..44fff2e 100644 | |
--- a/src/Perl6/Actions.pm | |
+++ b/src/Perl6/Actions.pm | |
@@ -116,7 +116,7 @@ class Perl6::Actions is HLL::Actions { | |
# compilation unit that is using this one will then replace it | |
# with its view later (or be in a position to restore it). | |
$unit.loadinit().push(PAST::Op.new( | |
- :pasttype('bind'), | |
+ :pasttype('bind_6model'), | |
PAST::Var.new( :name('GLOBAL'), :namespace([]), :scope('package') ), | |
$*ST.get_slot_past_for_object($*GLOBALish) | |
)); | |
@@ -623,7 +623,7 @@ class Perl6::Actions is HLL::Actions { | |
)); | |
# Otherwise, put a failure into $!. | |
- $past.push(PAST::Op.new( :pasttype('bind'), | |
+ $past.push(PAST::Op.new( :pasttype('bind_6model'), | |
PAST::Var.new( :name('$!'), :scope('lexical') ), | |
PAST::Op.new( :pasttype('call'), :name('!FAIL') ) | |
)); | |
@@ -1262,7 +1262,7 @@ class Perl6::Actions is HLL::Actions { | |
} | |
elsif $*SCOPE eq 'our' { | |
@PACKAGE[0].block.loadinit.push(PAST::Op.new( | |
- :pasttype('bind'), | |
+ :pasttype('bind_6model'), | |
PAST::Var.new( :name('&' ~ $name), :scope('package') ), | |
$installed | |
)); | |
@@ -1470,7 +1470,7 @@ class Perl6::Actions is HLL::Actions { | |
if $*SCOPE eq '' || $*SCOPE eq 'our' { | |
# Goes in the package. | |
@PACKAGE[0].block.loadinit.push(PAST::Op.new( | |
- :pasttype('bind'), | |
+ :pasttype('bind_6model'), | |
PAST::Var.new( :name($name), :scope('package') ), | |
$cons_past | |
)); | |
@@ -2012,7 +2012,7 @@ class Perl6::Actions is HLL::Actions { | |
if $_.isa(PAST::Op) && $_.name() eq '&prefix:<|>' { | |
my $reg_name := $past.unique('flatten_tmp_'); | |
my $steps := PAST::Stmts.new( | |
- PAST::Op.new( :pasttype('bind'), | |
+ PAST::Op.new( :pasttype('bind_6model'), | |
PAST::Var.new( :name($reg_name), :scope('register'), :isdecl(1) ), | |
$_ | |
), | |
@@ -2241,7 +2241,7 @@ class Perl6::Actions is HLL::Actions { | |
# could well be a tap. | |
$_ := PAST::Stmts.new( | |
PAST::Op.new( | |
- :pasttype('bind'), | |
+ :pasttype('bind_6model'), | |
PAST::Var.new( :scope('register'), :name('tmp'), :isdecl(1) ), | |
PAST::Op.new( :pasttype('call'), $result ) | |
), | |
@@ -2271,20 +2271,20 @@ class Perl6::Actions is HLL::Actions { | |
:pasttype('stmts'), | |
# Stash original $_. | |
- PAST::Op.new( :pasttype('bind'), | |
+ PAST::Op.new( :pasttype('bind_6model'), | |
PAST::Var.new( :name($old_topic_var), :scope('register'), :isdecl(1) ), | |
PAST::Var.new( :name('$_'), :scope('lexical') ) | |
), | |
# Evaluate LHS and bind it to $_. | |
- PAST::Op.new( :pasttype('bind'), | |
+ PAST::Op.new( :pasttype('bind_6model'), | |
PAST::Var.new( :name('$_'), :scope('lexical') ), | |
$lhs | |
), | |
# Evaluate RHS and call ACCEPTS on it, passing in $_. Bind the | |
# return value to a result variable. | |
- PAST::Op.new( :pasttype('bind'), | |
+ PAST::Op.new( :pasttype('bind_6model'), | |
PAST::Var.new( :name($result_var), :scope('lexical'), :isdecl(1) ), | |
PAST::Op.new( :pasttype('call'), :name('&coerce-smartmatch-result'), | |
PAST::Op.new( :pasttype('callmethod'), :name('ACCEPTS'), | |
@@ -2296,7 +2296,7 @@ class Perl6::Actions is HLL::Actions { | |
), | |
# Re-instate original $_. | |
- PAST::Op.new( :pasttype('bind'), | |
+ PAST::Op.new( :pasttype('bind_6model'), | |
PAST::Var.new( :name('$_'), :scope('lexical') ), | |
PAST::Var.new( :name($old_topic_var), :scope('register') ) | |
), | |
@@ -2348,7 +2348,7 @@ class Perl6::Actions is HLL::Actions { | |
} | |
# Finally, just need to make a bind. | |
- make PAST::Op.new( :pasttype('bind'), $target, $source ); | |
+ make PAST::Op.new( :pasttype('bind_6model'), $target, $source ); | |
} | |
# XXX Several more cases to do... | |
else { | |
@@ -2362,7 +2362,7 @@ class Perl6::Actions is HLL::Actions { | |
unless %*METAOPGEN{$opsub} { | |
my $base_op := '&prefix:<' ~ $<OPER>.Str ~ '>'; | |
$*UNITPAST.loadinit.push(PAST::Op.new( | |
- :pasttype('bind'), | |
+ :pasttype('bind_6model'), | |
PAST::Var.new( :name($opsub), :scope('package') ), | |
PAST::Op.new( | |
:pasttype('callmethod'), :name('assuming'), | |
@@ -2413,7 +2413,7 @@ class Perl6::Actions is HLL::Actions { | |
} | |
$*UNITPAST.loadinit.push( | |
- PAST::Op.new( :pasttype('bind'), | |
+ PAST::Op.new( :pasttype('bind_6model'), | |
PAST::Var.new( :name($opsub), :scope('package') ), | |
PAST::Op.new( :pasttype('callmethod'), | |
:name('assuming'), | |
@@ -2437,7 +2437,7 @@ class Perl6::Actions is HLL::Actions { | |
unless %*METAOPGEN{$opsub} { | |
my $base_op := '&infix:<' ~ $<op><OPER>.Str ~ '>'; | |
$*UNITPAST.loadinit.push(PAST::Op.new( | |
- :pasttype('bind'), | |
+ :pasttype('bind_6model'), | |
PAST::Var.new( :name($opsub), :scope('package') ), | |
PAST::Op.new( | |
:pasttype('callmethod'), :name('assuming'), | |
@@ -2469,7 +2469,7 @@ class Perl6::Actions is HLL::Actions { | |
my $dwim_lhs := $<opening> eq '<<' || $<opening> eq '«'; | |
my $dwim_rhs := $<closing> eq '>>' || $<closing> eq '»'; | |
$*UNITPAST.loadinit.push(PAST::Op.new( | |
- :pasttype('bind'), | |
+ :pasttype('bind_6model'), | |
PAST::Var.new( :name($opsub), :scope('package') ), | |
PAST::Op.new( | |
:pasttype('callmethod'), :name('assuming'), | |
@@ -2507,7 +2507,7 @@ class Perl6::Actions is HLL::Actions { | |
unless %*METAOPGEN{$opsub} { | |
my $base_op := '&postfix:<' ~ $<OPER>.Str ~ '>'; | |
$*UNITPAST.loadinit.push(PAST::Op.new( | |
- :pasttype('bind'), | |
+ :pasttype('bind_6model'), | |
PAST::Var.new( :name($opsub), :scope('package') ), | |
PAST::Op.new( | |
:pasttype('callmethod'), :name('assuming'), | |
@@ -3067,7 +3067,7 @@ class Perl6::Actions is HLL::Actions { | |
$handler := PAST::Block.new( | |
:blocktype('declaration'), | |
PAST::Var.new( :scope('parameter'), :name('$_') ), | |
- PAST::Op.new( :pasttype('bind'), | |
+ PAST::Op.new( :pasttype('bind_6model'), | |
PAST::Var.new( :scope('lexical'), :name('$_') ), | |
PAST::Op.new( | |
:pasttype('callmethod'), | |
@@ -3080,7 +3080,7 @@ class Perl6::Actions is HLL::Actions { | |
PAST::Var.new( :scope('lexical'), :name('$_') ), | |
), | |
), | |
- PAST::Op.new( :pasttype('bind'), | |
+ PAST::Op.new( :pasttype('bind_6model'), | |
PAST::Var.new( :scope('lexical'), :name('$!'), :isdecl(1) ), | |
PAST::Var.new( :scope('lexical'), :name('$_') ), | |
), | |
@@ -3097,7 +3097,7 @@ class Perl6::Actions is HLL::Actions { | |
), | |
# XXX Rakudo needs to set this when $! is inspected | |
# We just cheat for now. Call .rethrow() if you want it rethrown. | |
- PAST::Op.new( :pasttype('bind'), | |
+ PAST::Op.new( :pasttype('bind_6model'), | |
PAST::Var.new( :scope('keyed'), | |
PAST::Var.new( :scope('register'), :name('exception')), | |
'handled' | |
@@ -3428,7 +3428,7 @@ class Perl6::RegexActions is Regex::P6Regex::Actions { | |
:name('MATCH'), | |
:pasttype('callmethod') | |
), | |
- :pasttype('bind') | |
+ :pasttype('bind_6model') | |
), | |
$block | |
); | |
diff --git a/src/Perl6/SymbolTable.pm b/src/Perl6/SymbolTable.pm | |
index 8bfb4ec..32c7571 100644 | |
--- a/src/Perl6/SymbolTable.pm | |
+++ b/src/Perl6/SymbolTable.pm | |
@@ -265,7 +265,7 @@ class Perl6::SymbolTable is HLL::Compiler::SerializationContextBuilder { | |
$path := PAST::Op.new(:pirop('perl6_get_package_through_who PPs'), $path, ~$_); | |
} | |
self.add_event(:deserialize_past(PAST::Op.new( | |
- :pasttype('bind'), | |
+ :pasttype('bind_6model'), | |
PAST::Var.new( | |
:scope('keyed'), | |
PAST::Op.new( :pirop('get_who PP'), $path ), | |
@@ -518,7 +518,7 @@ class Perl6::SymbolTable is HLL::Compiler::SerializationContextBuilder { | |
# be a PAST tree. | |
method set_attribute($obj, $class, $name, $value_past) { | |
PAST::Op.new( | |
- :pasttype('bind'), | |
+ :pasttype('bind_6model'), | |
PAST::Var.new( | |
:name($name), :scope('attribute_6model'), | |
self.get_object_sc_ref_past($obj), | |
@@ -532,7 +532,7 @@ class Perl6::SymbolTable is HLL::Compiler::SerializationContextBuilder { | |
# be a PAST tree. | |
method set_attribute_typed($obj, $class, $name, $value_past, $type) { | |
PAST::Op.new( | |
- :pasttype('bind'), | |
+ :pasttype('bind_6model'), | |
PAST::Var.new( | |
:name($name), :scope('attribute_6model'), :type($type), | |
self.get_object_sc_ref_past($obj), | |
@@ -930,7 +930,7 @@ class Perl6::SymbolTable is HLL::Compiler::SerializationContextBuilder { | |
PAST::Op.new( :pirop('get_class Ps'), 'Perl6LexPad' ) | |
), | |
PAST::Op.new( | |
- :pasttype('bind'), | |
+ :pasttype('bind_6model'), | |
PAST::Var.new( :name('cur_sc'), :scope('register'), :isdecl(1) ), | |
PAST::Op.new( :pirop('nqp_create_sc Ps'), self.handle() ) | |
), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment