@@ -55,7 +55,7 @@ class QAST::Operations {
55
55
56
56
# Adds a HLL op handler.
57
57
method add_hll_op ($ hll , $ op , $ handler , : $ inlinable = 0 ) {
58
- % hll_ops {$ hll } := {} unless % hll_ops { $ hll } ;
58
+ % hll_ops {$ hll } := {} unless nqp ::existskey( % hll_ops , $ hll ) ;
59
59
% hll_ops {$ hll }{$ op } := $ handler ;
60
60
self . set_hll_op_inlinability($ hll , $ op , $ inlinable );
61
61
}
@@ -73,7 +73,7 @@ class QAST::Operations {
73
73
# Adds a HLL op that maps to a PIR op.
74
74
method add_hll_pirop_mapping ($ hll , $ op , $ pirop , $ sig , : $ inlinable = 0 ) {
75
75
my $ pirop_mapper := pirop_mapper($ pirop , $ sig );
76
- % hll_ops {$ hll } := {} unless % hll_ops { $ hll } ;
76
+ % hll_ops {$ hll } := {} unless nqp ::existskey( % hll_ops , $ hll ) ;
77
77
% hll_ops {$ hll }{$ op } := -> $ qastcomp , $ op {
78
78
$ pirop_mapper ($ qastcomp , $ op . op, $ op . list)
79
79
};
@@ -89,7 +89,7 @@ class QAST::Operations {
89
89
# Sets op inlinability at a HLL level. (Can override at HLL level whether
90
90
# or not the HLL overrides the op itself.)
91
91
method set_hll_op_inlinability ($ hll , $ op , $ inlinable ) {
92
- % hll_inlinability {$ hll } := {} unless % hll_inlinability { $ hll } ;
92
+ % hll_inlinability {$ hll } := {} unless nqp ::existskey( % hll_inlinability , $ hll ) ;
93
93
% hll_inlinability {$ hll }{$ op } := $ inlinable ;
94
94
}
95
95
@@ -119,7 +119,7 @@ class QAST::Operations {
119
119
# Sets op inlinability at a HLL level. (Can override at HLL level whether
120
120
# or not the HLL overrides the op itself.)
121
121
method set_hll_op_result_type ($ hll , $ op , $ type_char ) {
122
- % hll_result_type {$ hll } := {} unless % hll_result_type { $ hll } ;
122
+ % hll_result_type {$ hll } := {} unless nqp ::existskey( % hll_result_type , $ hll ) ;
123
123
if $ type_char eq ' I' {
124
124
% hll_result_type {$ hll }{$ op } := int ;
125
125
}
@@ -150,7 +150,7 @@ class QAST::Operations {
150
150
unless $ type eq ' i' || $ type eq ' n' || $ type eq ' s' {
151
151
nqp ::die(" Unknown box type '$ type '" );
152
152
}
153
- % hll_box {$ hll } := {} unless % hll_box { $ hll } ;
153
+ % hll_box {$ hll } := {} unless nqp ::existskey( % hll_box , $ hll ) ;
154
154
% hll_box {$ hll }{$ type } := $ handler ;
155
155
}
156
156
@@ -159,7 +159,7 @@ class QAST::Operations {
159
159
unless $ type eq ' i' || $ type eq ' n' || $ type eq ' s' {
160
160
nqp ::die(" Unknown unbox type '$ type '" );
161
161
}
162
- % hll_unbox {$ hll } := {} unless % hll_unbox { $ hll } ;
162
+ % hll_unbox {$ hll } := {} unless nqp ::existskey( % hll_unbox , $ hll ) ;
163
163
% hll_unbox {$ hll }{$ type } := $ handler ;
164
164
}
165
165
0 commit comments