@@ -9,7 +9,7 @@ class PIRT::CallResult {
9
9
method new (: $ result ! ) {
10
10
my $ obj := nqp ::create(self );
11
11
nqp ::bindattr_s($ obj , PIRT::CallResult, ' $!result' ,
12
- $ result ~~ PIRT::Node ?? $ result . result !! $ result );
12
+ nqp ::istype( $ result , PIRT::Node) ?? $ result . result !! $ result );
13
13
$ obj
14
14
}
15
15
@@ -70,10 +70,10 @@ class PIRT::Node {
70
70
my $ result ;
71
71
while $ i < $ c {
72
72
$ arg := $ _ [$ i ];
73
- if $ arg ~~ PIRT::Node {
73
+ if nqp ::istype( $ arg , PIRT::Node) {
74
74
nqp :: push (@ op_args , $ arg . result);
75
75
}
76
- elsif $ arg ~~ PIRT::CallResult {
76
+ elsif nqp ::istype( $ arg , PIRT::CallResult) {
77
77
$ result := $ arg . result;
78
78
$ * HAS_RESULT := 1 ;
79
79
}
@@ -92,10 +92,10 @@ class PIRT::Node {
92
92
nqp :: push (@ parts , ' ' ~ $ op_name ~ ' ' ~ nqp :: join (" , " , @ op_args ));
93
93
}
94
94
}
95
- elsif $ _ ~~ PIRT::Sub {
95
+ elsif nqp ::istype( $ _ , PIRT::Sub) {
96
96
nqp :: push (@ * PIRT_BLOCKS , $ _ );
97
97
}
98
- elsif $ _ ~~ PIRT::Node {
98
+ elsif nqp ::istype( $ _ , PIRT::Node) {
99
99
my $ pir := $ _ . pir;
100
100
nqp :: push (@ parts , $ pir ) unless $ pir eq ' ' ;
101
101
}
@@ -252,7 +252,7 @@ class PIRT::Ops is PIRT::Node {
252
252
my $ obj := nqp ::create(self );
253
253
nqp ::bindattr($ obj , PIRT::Ops, ' @!children' , nqp ::list());
254
254
nqp ::bindattr_s($ obj , PIRT::Ops, ' $!result' ,
255
- $ result ~~ PIRT::Node ?? $ result . result !! $ result );
255
+ nqp ::istype( $ result , PIRT::Node) ?? $ result . result !! $ result );
256
256
$ obj
257
257
}
258
258
@@ -269,7 +269,7 @@ class PIRT::Ops is PIRT::Node {
269
269
270
270
method result (* @ value ) is parrot_vtable(' get_string' ) {
271
271
if @ value {
272
- $ ! result := @ value [0 ] ~~ PIRT::Node ?? @ value [0 ]. result !! @ value [0 ];
272
+ $ ! result := nqp ::istype( @ value [0 ], PIRT::Node) ?? @ value [0 ]. result !! @ value [0 ];
273
273
}
274
274
else {
275
275
$ ! result
0 commit comments