@@ -1095,23 +1095,14 @@ class QAST::Compiler is HLL::Compiler {
1095
1095
}
1096
1096
1097
1097
method post_children ($ node ) {
1098
- if $ * PIRT {
1099
- my $ posts := PIRT::Ops. new ();
1100
- my @ results ;
1101
- for @ ($ node ) {
1102
- my $ sval := self . as_post(QAST ::SVal. new ( : value(~ $ _ ) ));
1103
- $ posts . push ($ sval );
1104
- nqp :: push (@ results , $ sval . result);
1105
- }
1106
- [$ posts , @ results ]
1107
- }
1108
- else {
1109
- Q : PIR {
1110
- $P0 = find_dynamic_lex '$*PASTCOMPILER'
1111
- $P1 = find_lex '$node'
1112
- (%r : slurpy) = $ P0 . ' post_children' ($ P1 )
1113
- }
1098
+ my $ posts := PIRT::Ops. new ();
1099
+ my @ results ;
1100
+ for @ ($ node ) {
1101
+ my $ sval := self . as_post(QAST ::SVal. new ( : value(~ $ _ ) ));
1102
+ $ posts . push ($ sval );
1103
+ nqp :: push (@ results , $ sval . result);
1114
1104
}
1105
+ [$ posts , @ results ]
1115
1106
}
1116
1107
1117
1108
method children ($ node ) {
@@ -1126,25 +1117,12 @@ class QAST::Compiler is HLL::Compiler {
1126
1117
}
1127
1118
1128
1119
method regex_post ($ node ) {
1129
- return $ * PASTCOMPILER . as_post($ node ) if $ node ~~ PAST::Node;
1130
1120
my $ rxtype := $ node . rxtype() || ' concat' ;
1131
1121
self . " $ rxtype" ($ node );
1132
1122
}
1133
1123
1134
1124
method post_new ($ type , * @ args , * % options ) {
1135
- if $ * PIRT {
1136
- (PIRT. WHO ){$ type }. new (| @ args , | % options )
1137
- }
1138
- else {
1139
- Q : PIR {
1140
- $P0 = find_lex '$type'
1141
- $S0 = $P0
1142
- $P0 = get_root_global ['parrot';'POST'], $S0
1143
- $P1 = find_lex '@args'
1144
- $P2 = find_lex '%options'
1145
- %r = $P0.'new'($P1 : flat, $ P2 : flat : named)
1146
- }
1147
- }
1125
+ (PIRT. WHO ){$ type }. new (| @ args , | % options )
1148
1126
}
1149
1127
1150
1128
method alt ($ node ) {
@@ -1567,16 +1545,7 @@ class QAST::Compiler is HLL::Compiler {
1567
1545
}
1568
1546
1569
1547
multi method as_post ($ unknown ) {
1570
- # XXX pir::typeof for now to catch accidental PAST nodes while we
1571
- # transition stuff to 6model fully.
1572
- if $ unknown ~~ PAST::Op {
1573
- nqp ::die(" Unknown QAST node type " ~ pir::typeof__SP($ unknown ) ~
1574
- " (name = '" ~ $ unknown . name () ~
1575
- " ', pirop = '" ~ $ unknown . pirop ~ " ')" );
1576
- }
1577
- else {
1578
- nqp ::die(" Unknown QAST node type " ~ pir::typeof__SP($ unknown ));
1579
- }
1548
+ nqp ::die(" Unknown QAST node type " ~ $ unknown . HOW . name ($ unknown ));
1580
1549
}
1581
1550
1582
1551
method operations () { QAST ::Operations }
0 commit comments