@@ -108,7 +108,7 @@ class QAST::Operations {
108
108
elsif $ ret_type eq ' N' { $ ret_meth := " fresh_n" ; }
109
109
110
110
-> $ qastcomp , $ op_name , @ op_args {
111
- my $ ops := $ qastcomp . post_new( ' Ops ' );
111
+ my $ ops := PIRT::Ops . new ( );
112
112
113
113
# If we need a result register, create it and make it the
114
114
# first argument.
@@ -174,7 +174,7 @@ class QAST::Operations {
174
174
QAST ::Operations. add_core_op(' list' , -> $ qastcomp , $ op {
175
175
# Create register for the resulting list and make an empty one.
176
176
my $ list_reg := $ * REGALLOC . fresh_p();
177
- my $ ops := $ qastcomp . post_new( ' Ops ' , : result($ list_reg ));
177
+ my $ ops := PIRT::Ops . new ( : result($ list_reg ));
178
178
$ ops . push_pirop(' new' , $ list_reg , " 'ResizablePMCArray'" );
179
179
180
180
# Push all the things.
@@ -190,7 +190,7 @@ QAST::Operations.add_core_op('list', -> $qastcomp, $op {
190
190
QAST ::Operations. add_core_op(' qlist' , -> $ qastcomp , $ op {
191
191
# Create register for the resulting list and make an empty one.
192
192
my $ list_reg := $ * REGALLOC . fresh_p();
193
- my $ ops := $ qastcomp . post_new( ' Ops ' , : result($ list_reg ));
193
+ my $ ops := PIRT::Ops . new ( : result($ list_reg ));
194
194
$ ops . push_pirop(' new' , $ list_reg , " 'QRPA'" );
195
195
196
196
# Push all the things.
@@ -206,7 +206,7 @@ QAST::Operations.add_core_op('qlist', -> $qastcomp, $op {
206
206
QAST ::Operations. add_core_op(' list_i' , -> $ qastcomp , $ op {
207
207
# Create register for the resulting list and make an empty one.
208
208
my $ list_reg := $ * REGALLOC . fresh_p();
209
- my $ ops := $ qastcomp . post_new( ' Ops ' , : result($ list_reg ));
209
+ my $ ops := PIRT::Ops . new ( : result($ list_reg ));
210
210
$ ops . push_pirop(' new' , $ list_reg , " 'ResizableIntegerArray'" );
211
211
212
212
# Push all the things.
@@ -222,7 +222,7 @@ QAST::Operations.add_core_op('list_i', -> $qastcomp, $op {
222
222
QAST ::Operations. add_core_op(' list_s' , -> $ qastcomp , $ op {
223
223
# Create register for the resulting list and make an empty one.
224
224
my $ list_reg := $ * REGALLOC . fresh_p();
225
- my $ ops := $ qastcomp . post_new( ' Ops ' , : result($ list_reg ));
225
+ my $ ops := PIRT::Ops . new ( : result($ list_reg ));
226
226
$ ops . push_pirop(' new' , $ list_reg , " 'ResizableStringArray'" );
227
227
228
228
# Push all the things.
@@ -238,7 +238,7 @@ QAST::Operations.add_core_op('list_s', -> $qastcomp, $op {
238
238
QAST ::Operations. add_core_op(' list_b' , -> $ qastcomp , $ op {
239
239
# Create register for the resulting list and make an empty one.
240
240
my $ list_reg := $ * REGALLOC . fresh_p();
241
- my $ ops := $ qastcomp . post_new( ' Ops ' , : result($ list_reg ));
241
+ my $ ops := PIRT::Ops . new ( : result($ list_reg ));
242
242
$ ops . push_pirop(' new' , $ list_reg , " 'ResizablePMCArray'" );
243
243
244
244
# Push all the things.
@@ -255,7 +255,7 @@ QAST::Operations.add_core_op('list_b', -> $qastcomp, $op {
255
255
QAST ::Operations. add_core_op(' hash' , -> $ qastcomp , $ op {
256
256
# Create register for the resulting hash and make an empty one.
257
257
my $ hash_reg := $ * REGALLOC . fresh_p();
258
- my $ ops := $ qastcomp . post_new( ' Ops ' , : result($ hash_reg ));
258
+ my $ ops := PIRT::Ops . new ( : result($ hash_reg ));
259
259
$ ops . push_pirop(' new' , $ hash_reg , " 'Hash'" );
260
260
261
261
# Set all the values by key on the hash.
@@ -286,9 +286,8 @@ QAST::Operations.add_core_op('chain', -> $qastcomp, $op {
286
286
$ cpast := $ cpast [0 ];
287
287
}
288
288
289
- my $ ops := $ qastcomp . post_new(' Ops' , : result($ * REGALLOC . fresh_p()));
290
- my $ endlabel := $ qastcomp . post_new(' Label' ,
291
- : name($ qastcomp . unique (' chain_end_' )));
289
+ my $ ops := PIRT::Ops. new (: result($ * REGALLOC . fresh_p()));
290
+ my $ endlabel := PIRT::Label. new (: name($ qastcomp . unique (' chain_end_' )));
292
291
293
292
$ cpast := nqp :: pop (@ clist );
294
293
my $ apast := $ cpast [0 ];
@@ -328,8 +327,8 @@ for <if unless> -> $op_name {
328
327
329
328
# Create labels.
330
329
my $ if_id := $ qastcomp . unique ($ op_name );
331
- my $ else_lbl := $ qastcomp . post_new( ' Label ' , : name($ if_id ~ ' _else' ));
332
- my $ end_lbl := $ qastcomp . post_new( ' Label ' , : name($ if_id ~ ' _end' ));
330
+ my $ else_lbl := PIRT::Label . new ( : name($ if_id ~ ' _else' ));
331
+ my $ end_lbl := PIRT::Label . new ( : name($ if_id ~ ' _end' ));
333
332
334
333
# Compile each of the children; we'll need to look at the result
335
334
# types and pick an overall result type if in non-void context.
@@ -357,7 +356,7 @@ for <if unless> -> $op_name {
357
356
my $ res_reg := $ * REGALLOC . " fresh_$ res_type" ();
358
357
359
358
# Evaluate the condition first; store result if needed.
360
- my $ ops := $ qastcomp . post_new( ' Ops ' );
359
+ my $ ops := PIRT::Ops . new ( );
361
360
my $ cond_result ;
362
361
if $ operands == 2 {
363
362
my $ coerced := $ qastcomp . coerce(@ comp_ops [0 ], $ res_type );
@@ -410,10 +409,9 @@ QAST::Operations.add_core_op('ifnull', -> $qastcomp, $op {
410
409
my $ exprpost := $ qastcomp . as_post($ op [0 ]);
411
410
my $ vivipost := $ qastcomp . coerce($ qastcomp . as_post($ op [1 ]),
412
411
$ qastcomp . infer_type($ exprpost ));
413
- my $ vivlabel := $ qastcomp . post_new(' Label' ,
414
- : name($ qastcomp . unique (' vivi_' )));
412
+ my $ vivlabel := PIRT::Label. new (: name($ qastcomp . unique (' vivi_' )));
415
413
416
- my $ ops := $ qastcomp . post_new( ' Ops ' );
414
+ my $ ops := PIRT::Ops . new ( );
417
415
$ ops . push ($ exprpost );
418
416
$ ops . push_pirop(' unless_null' , $ exprpost , $ vivlabel );
419
417
$ ops . push ($ vivipost );
@@ -434,11 +432,11 @@ for ('', 'repeat_') -> $repness {
434
432
435
433
# Create labels.
436
434
my $ while_id := $ qastcomp . unique ($ op_name );
437
- my $ test_lbl := $ qastcomp . post_new( ' Label ' , : name($ while_id ~ ' _test' ));
438
- my $ next_lbl := $ qastcomp . post_new( ' Label ' , : name($ while_id ~ ' _next' ));
439
- my $ redo_lbl := $ qastcomp . post_new( ' Label ' , : name($ while_id ~ ' _redo' ));
440
- my $ hand_lbl := $ qastcomp . post_new( ' Label ' , : name($ while_id ~ ' _handlers' ));
441
- my $ done_lbl := $ qastcomp . post_new( ' Label ' , : name($ while_id ~ ' _done' ));
435
+ my $ test_lbl := PIRT::Label . new ( : name($ while_id ~ ' _test' ));
436
+ my $ next_lbl := PIRT::Label . new ( : name($ while_id ~ ' _next' ));
437
+ my $ redo_lbl := PIRT::Label . new ( : name($ while_id ~ ' _redo' ));
438
+ my $ hand_lbl := PIRT::Label . new ( : name($ while_id ~ ' _handlers' ));
439
+ my $ done_lbl := PIRT::Label . new ( : name($ while_id ~ ' _done' ));
442
440
443
441
# Compile each of the children; we'll need to look at the result
444
442
# types and pick an overall result type if in non-void context.
@@ -458,7 +456,7 @@ for ('', 'repeat_') -> $repness {
458
456
my $ res_reg := $ * REGALLOC . " fresh_$ res_type" ();
459
457
460
458
# Emit the prelude.
461
- my $ ops := $ qastcomp . post_new( ' Ops ' );
459
+ my $ ops := PIRT::Ops . new ( );
462
460
$ ops . result($ res_reg );
463
461
my $ exc_reg := $ * REGALLOC . fresh_p();
464
462
$ ops . push_pirop(' new' , $ exc_reg , " 'ExceptionHandler'" ,
@@ -534,7 +532,7 @@ QAST::Operations.add_core_op('for', -> $qastcomp, $op {
534
532
my $ res := $ * REGALLOC . fresh_p();
535
533
my $ curval := $ * REGALLOC . fresh_p();
536
534
my $ iter := $ * REGALLOC . fresh_p();
537
- my $ ops := $ qastcomp . post_new( ' Ops ' );
535
+ my $ ops := PIRT::Ops . new ( );
538
536
my $ listpost := $ qastcomp . coerce($ qastcomp . as_post($ op [0 ]), " P" );
539
537
my $ blockpost := $ qastcomp . coerce($ qastcomp . as_post($ op [1 ]), " P" );
540
538
$ ops . push ($ listpost );
@@ -543,8 +541,8 @@ QAST::Operations.add_core_op('for', -> $qastcomp, $op {
543
541
$ ops . push_pirop(' iter' , $ iter , $ listpost );
544
542
545
543
# Loop while we still have values.
546
- my $ lbl_loop := $ qastcomp . post_new( ' Label ' , : name(' for_start' ));
547
- my $ lbl_end := $ qastcomp . post_new( ' Label ' , : name(' for_end' ));
544
+ my $ lbl_loop := PIRT::Label . new ( : name(' for_start' ));
545
+ my $ lbl_end := PIRT::Label . new ( : name(' for_end' ));
548
546
$ ops . push ($ lbl_loop );
549
547
$ ops . push_pirop(' unless' , $ iter , $ lbl_end );
550
548
@@ -574,8 +572,8 @@ QAST::Operations.add_core_op('defor', -> $qastcomp, $op {
574
572
if + $ op . list != 2 {
575
573
nqp ::die(" Operation 'defor' needs 2 operands" );
576
574
}
577
- my $ ops := $ qastcomp . post_new( ' Ops ' );
578
- my $ lbl := $ qastcomp . post_new( ' Label ' , : name(' defor' ));
575
+ my $ ops := PIRT::Ops . new ( );
576
+ my $ lbl := PIRT::Label . new ( : name(' defor' ));
579
577
my $ dreg := $ * REGALLOC . fresh_i();
580
578
my $ rreg := $ * REGALLOC . fresh_p();
581
579
my $ test := $ qastcomp . coerce($ qastcomp . as_post($ op [0 ]), ' P' );
@@ -592,11 +590,11 @@ QAST::Operations.add_core_op('defor', -> $qastcomp, $op {
592
590
});
593
591
594
592
QAST ::Operations. add_core_op(' xor' , -> $ qastcomp , $ op {
595
- my $ ops := $ qastcomp . post_new( ' Ops ' );
593
+ my $ ops := PIRT::Ops . new ( );
596
594
$ ops . result($ * REGALLOC . fresh_p());
597
595
598
- my $ falselabel := $ qastcomp . post_new( ' Label ' , : name(' xor_false' ));
599
- my $ endlabel := $ qastcomp . post_new( ' Label ' , : name(' xor_end' ));
596
+ my $ falselabel := PIRT::Label . new ( : name(' xor_false' ));
597
+ my $ endlabel := PIRT::Label . new ( : name(' xor_end' ));
600
598
601
599
my @ childlist ;
602
600
my $ fpast ;
@@ -629,7 +627,7 @@ QAST::Operations.add_core_op('xor', -> $qastcomp, $op {
629
627
$ ops . push_pirop(' and' , $ i , $ t , $ u );
630
628
$ ops . push_pirop(' if' , $ i , $ falselabel );
631
629
if @ childlist {
632
- my $ truelabel := $ qastcomp . post_new( ' Label ' , : name(' xor_true' ));
630
+ my $ truelabel := PIRT::Label . new ( : name(' xor_true' ));
633
631
$ ops . push_pirop(' if' , $ t , $ truelabel );
634
632
$ ops . push_pirop(' set' , $ ops , $ bpost );
635
633
$ ops . push_pirop(' set' , $ t , $ u );
@@ -706,7 +704,7 @@ QAST::Operations.add_core_op('call', -> $qastcomp, $op {
706
704
my $ callee ;
707
705
my @ args := nqp :: clone ($ op . list);
708
706
if $ op . name {
709
- $ callee := $ qastcomp . post_new( ' Ops ' , : result($ qastcomp . escape($ op . name )));
707
+ $ callee := PIRT::Ops . new ( : result($ qastcomp . escape($ op . name )));
710
708
}
711
709
elsif + @ args {
712
710
$ callee := $ qastcomp . as_post(@ args . shift ());
@@ -716,7 +714,7 @@ QAST::Operations.add_core_op('call', -> $qastcomp, $op {
716
714
}
717
715
718
716
# Process arguments.
719
- my $ ops := $ qastcomp . post_new( ' Ops ' );
717
+ my $ ops := PIRT::Ops . new ( );
720
718
$ ops . node($ op . node) if $ op . node;
721
719
my @ pos_arg_results ;
722
720
my @ named_arg_results ;
@@ -746,7 +744,7 @@ QAST::Operations.add_core_op('callmethod', -> $qastcomp, $op {
746
744
# Where is the name coming from?
747
745
my $ name ;
748
746
if $ op . name {
749
- $ name := $ qastcomp . post_new( ' Ops ' , : result($ qastcomp . escape($ op . name )));
747
+ $ name := PIRT::Ops . new ( : result($ qastcomp . escape($ op . name )));
750
748
}
751
749
elsif + @ args >= 2 {
752
750
my $ invocant := @ args . shift ();
@@ -758,7 +756,7 @@ QAST::Operations.add_core_op('callmethod', -> $qastcomp, $op {
758
756
}
759
757
760
758
# Process arguments.
761
- my $ ops := $ qastcomp . post_new( ' Ops ' );
759
+ my $ ops := PIRT::Ops . new ( );
762
760
$ ops . node($ op . node) if $ op . node;
763
761
my @ pos_arg_results ;
764
762
my @ named_arg_results ;
@@ -787,11 +785,11 @@ QAST::Operations.add_core_op('callmethod', -> $qastcomp, $op {
787
785
});
788
786
789
787
QAST ::Operations. add_core_op(' lexotic' , -> $ qastcomp , $ op {
790
- my $ label1 := $ qastcomp . post_new( ' Label ' , : name(' lexotic_' ));
791
- my $ label2 := $ qastcomp . post_new( ' Label ' , : name(' lexotic_' ));
788
+ my $ label1 := PIRT::Label . new ( : name(' lexotic_' ));
789
+ my $ label2 := PIRT::Label . new ( : name(' lexotic_' ));
792
790
my $ lexname := $ qastcomp . escape($ op . name );
793
791
794
- my $ ops := $ qastcomp . post_new( ' Ops ' );
792
+ my $ ops := PIRT::Ops . new ( );
795
793
my $ handler := $ * BLOCK . fresh_lex_p();
796
794
$ ops . push_pirop(' root_new' , $ handler , " ['parrot';'Continuation']" );
797
795
$ ops . push_pirop(' set_label' , $ handler , $ label1 );
@@ -812,15 +810,15 @@ QAST::Operations.add_core_op('lexotic', -> $qastcomp, $op {
812
810
# Context introspection
813
811
QAST ::Operations. add_core_op(' curlexpad' , -> $ qastcomp , $ op {
814
812
my $ reg := $ * REGALLOC . fresh_p();
815
- my $ ops := $ qastcomp . post_new( ' Ops ' );
813
+ my $ ops := PIRT::Ops . new ( );
816
814
$ ops . push_pirop(' getinterp' , $ reg );
817
815
$ ops . push_pirop(' set' , $ reg , $ reg ~ " ['lexpad']" );
818
816
$ ops . result($ reg );
819
817
$ ops
820
818
});
821
819
QAST ::Operations. add_core_op(' curcode' , -> $ qastcomp , $ op {
822
820
my $ reg := $ * REGALLOC . fresh_p();
823
- my $ ops := $ qastcomp . post_new( ' Ops ' );
821
+ my $ ops := PIRT::Ops . new ( );
824
822
$ ops . push_pirop(' getinterp' , $ reg );
825
823
$ ops . push_pirop(' set' , $ reg , $ reg ~ " ['sub']" );
826
824
$ ops . result($ reg );
@@ -885,22 +883,19 @@ QAST::Operations.add_core_op('handle', -> $qastcomp, $op {
885
883
my $ control_label ;
886
884
my $ other_label ;
887
885
my $ num_pops := 0 ;
888
- my $ skip_handler_label := $ qastcomp . post_new(' Label' ,
889
- : name($ qastcomp . unique (' skip_handler_' )));
890
- my $ ops := $ qastcomp . post_new(' Ops' );
886
+ my $ skip_handler_label := PIRT::Label. new (: name($ qastcomp . unique (' skip_handler_' )));
887
+ my $ ops := PIRT::Ops. new ();
891
888
my $ reg := $ * REGALLOC . fresh_p();
892
889
if $ catch {
893
- $ catch_label := $ qastcomp . post_new(' Label' ,
894
- : name($ qastcomp . unique (' catch_handler_' )));
890
+ $ catch_label := PIRT::Label. new (: name($ qastcomp . unique (' catch_handler_' )));
895
891
$ ops . push_pirop(' new' , $ reg , " 'ExceptionHandler'" );
896
892
$ ops . push_pirop(' set_label' , $ reg , $ catch_label );
897
893
$ ops . push_pirop(' callmethod' , " 'handle_types_except'" , $ reg , " .CONTROL_ALL" );
898
894
$ ops . push_pirop(' push_eh' , $ reg );
899
895
$ num_pops := $ num_pops + 1 ;
900
896
}
901
897
if $ control {
902
- $ control_label := $ qastcomp . post_new(' Label' ,
903
- : name($ qastcomp . unique (' catch_handler_' )));
898
+ $ control_label := PIRT::Label. new (: name($ qastcomp . unique (' catch_handler_' )));
904
899
$ ops . push_pirop(' new' , $ reg , " 'ExceptionHandler'" , " [.CONTROL_ALL]" );
905
900
$ ops . push_pirop(' set_label' , $ reg , $ control_label );
906
901
$ ops . push_pirop(' push_eh' , $ reg );
@@ -909,8 +904,7 @@ QAST::Operations.add_core_op('handle', -> $qastcomp, $op {
909
904
if @ other {
910
905
my @ hnames ;
911
906
for @ other { nqp :: push (@ hnames , % handler_names {$ _ }); }
912
- $ other_label := $ qastcomp . post_new(' Label' ,
913
- : name($ qastcomp . unique (' catch_handler_' )));
907
+ $ other_label := PIRT::Label. new (: name($ qastcomp . unique (' catch_handler_' )));
914
908
$ ops . push_pirop(' new' , $ reg , " 'ExceptionHandler'" ,
915
909
" [" ~ nqp :: join (" , " , @ hnames ) ~ " ]" );
916
910
$ ops . push_pirop(' set_label' , $ reg , $ other_label );
@@ -954,8 +948,7 @@ QAST::Operations.add_core_op('handle', -> $qastcomp, $op {
954
948
my % type_labels ;
955
949
$ ops . push_pirop(' set' , $ type_reg , $ reg ~ ' ["type"]' );
956
950
for @ other {
957
- my $ lbl := $ qastcomp . post_new(' Label' ,
958
- : name($ qastcomp . unique (' handle_type_' )));
951
+ my $ lbl := PIRT::Label. new (: name($ qastcomp . unique (' handle_type_' )));
959
952
$ ops . push_pirop(' eq' , $ type_reg , % handler_names {$ _ }, $ lbl );
960
953
% type_labels {$ _ } := $ lbl ;
961
954
}
@@ -984,7 +977,7 @@ QAST::Operations.add_core_op('exception', -> $qastcomp, $op {
984
977
unless $ exc_reg {
985
978
nqp ::die(" Can only use 'exception' op in the context of an exception handler" );
986
979
}
987
- my $ ops := $ qastcomp . post_new( ' Ops ' );
980
+ my $ ops := PIRT::Ops . new ( );
988
981
$ ops . result($ exc_reg );
989
982
$ ops
990
983
});
@@ -994,7 +987,7 @@ QAST::Operations.add_core_op('getpayload', -> $qastcomp, $op {
994
987
}
995
988
my $ exc := $ qastcomp . coerce($ qastcomp . as_post($ op [0 ]), ' P' );
996
989
my $ reg := $ * REGALLOC . fresh_p();
997
- my $ ops := $ qastcomp . post_new( ' Ops ' );
990
+ my $ ops := PIRT::Ops . new ( );
998
991
$ ops . push ($ exc );
999
992
$ ops . push_pirop(' getattribute' , $ reg , $ exc . result, ' "payload"' );
1000
993
$ ops . result($ reg );
@@ -1006,7 +999,7 @@ QAST::Operations.add_core_op('setpayload', -> $qastcomp, $op {
1006
999
}
1007
1000
my $ exc := $ qastcomp . coerce($ qastcomp . as_post($ op [0 ]), ' P' );
1008
1001
my $ payload := $ qastcomp . coerce($ qastcomp . as_post($ op [1 ]), ' P' );
1009
- my $ ops := $ qastcomp . post_new( ' Ops ' );
1002
+ my $ ops := PIRT::Ops . new ( );
1010
1003
$ ops . push_pirop(' setattribute' , $ exc , ' "payload"' , $ payload );
1011
1004
$ ops . result($ payload . result);
1012
1005
$ ops
@@ -1018,7 +1011,7 @@ QAST::Operations.add_core_op('getmessage', -> $qastcomp, $op {
1018
1011
my $ exc := $ qastcomp . coerce($ qastcomp . as_post($ op [0 ]), ' P' );
1019
1012
my $ pmc := $ * REGALLOC . fresh_p();
1020
1013
my $ reg := $ * REGALLOC . fresh_s();
1021
- my $ ops := $ qastcomp . post_new( ' Ops ' );
1014
+ my $ ops := PIRT::Ops . new ( );
1022
1015
$ ops . push ($ exc );
1023
1016
$ ops . push_pirop(' getattribute' , $ pmc , $ exc . result, ' "message"' );
1024
1017
$ ops . push_pirop(' set' , $ reg , $ pmc );
@@ -1032,7 +1025,7 @@ QAST::Operations.add_core_op('setmessage', -> $qastcomp, $op {
1032
1025
my $ exc := $ qastcomp . coerce($ qastcomp . as_post($ op [0 ]), ' P' );
1033
1026
my $ message := $ qastcomp . coerce($ qastcomp . as_post($ op [1 ]), ' S' );
1034
1027
my $ pmc := $ * REGALLOC . fresh_p();
1035
- my $ ops := $ qastcomp . post_new( ' Ops ' );
1028
+ my $ ops := PIRT::Ops . new ( );
1036
1029
$ ops . push ($ exc );
1037
1030
$ ops . push ($ message );
1038
1031
$ ops . push_pirop(' box' , $ pmc , $ message );
@@ -1045,7 +1038,7 @@ QAST::Operations.add_core_op('newexception', -> $qastcomp, $op {
1045
1038
nqp ::die(" The 'newexception' op expects no children" );
1046
1039
}
1047
1040
my $ reg := $ * REGALLOC . fresh_p();
1048
- my $ ops := $ qastcomp . post_new( ' Ops ' );
1041
+ my $ ops := PIRT::Ops . new ( );
1049
1042
$ ops . push_pirop(' new' , $ reg , ' ["Exception"]' );
1050
1043
$ ops . result($ reg );
1051
1044
$ ops
@@ -1059,7 +1052,7 @@ QAST::Operations.add_core_pirop_mapping('rethrow', 'rethrow', '0P');
1059
1052
for <i n s > {
1060
1053
QAST ::Operations. add_hll_box(' nqp' , $ _ , -> $ qastcomp , $ post {
1061
1054
my $ reg := $ * REGALLOC . fresh_p();
1062
- my $ ops := $ qastcomp . post_new( ' Ops ' );
1055
+ my $ ops := PIRT::Ops . new ( );
1063
1056
$ ops . push ($ post );
1064
1057
$ ops . push_pirop(' box' , $ reg , $ post );
1065
1058
$ ops . result($ reg );
@@ -1068,23 +1061,23 @@ for <i n s> {
1068
1061
}
1069
1062
QAST ::Operations. add_hll_unbox(' nqp' , ' i' , -> $ qastcomp , $ post {
1070
1063
my $ reg := $ * REGALLOC . fresh_i();
1071
- my $ ops := $ qastcomp . post_new( ' Ops ' );
1064
+ my $ ops := PIRT::Ops . new ( );
1072
1065
$ ops . push ($ post );
1073
1066
$ ops . push_pirop(' set' , $ reg , $ post );
1074
1067
$ ops . result($ reg );
1075
1068
$ ops
1076
1069
});
1077
1070
QAST ::Operations. add_hll_unbox(' nqp' , ' n' , -> $ qastcomp , $ post {
1078
1071
my $ reg := $ * REGALLOC . fresh_n();
1079
- my $ ops := $ qastcomp . post_new( ' Ops ' );
1072
+ my $ ops := PIRT::Ops . new ( );
1080
1073
$ ops . push ($ post );
1081
1074
$ ops . push_pirop(' set' , $ reg , $ post );
1082
1075
$ ops . result($ reg );
1083
1076
$ ops
1084
1077
});
1085
1078
QAST ::Operations. add_hll_unbox(' nqp' , ' s' , -> $ qastcomp , $ post {
1086
1079
my $ reg := $ * REGALLOC . fresh_s();
1087
- my $ ops := $ qastcomp . post_new( ' Ops ' );
1080
+ my $ ops := PIRT::Ops . new ( );
1088
1081
$ ops . push ($ post );
1089
1082
$ ops . push_pirop(' set' , $ reg , $ post );
1090
1083
$ ops . result($ reg );
0 commit comments