@@ -2611,13 +2611,15 @@ sub add_bindattr_op($nqpop, $hintedop, $namedop, $want) {
2611
2611
my $ regalloc := $ * REGALLOC ;
2612
2612
my $ val_mast := $ qastcomp . as_mast( : $ want , $ op [3 ] );
2613
2613
my $ obj_mast := $ qastcomp . as_mast( : want($ MVM_reg_obj ), $ op [0 ] );
2614
- my $ type_mast := $ qastcomp . as_mast( : want($ MVM_reg_obj ), $ op [1 ] );
2614
+ my $ type_mast := $ qastcomp . as_mast( : want($ MVM_reg_obj ),
2615
+ nqp ::istype($ op [1 ], QAST ::WVal) && ! nqp ::isconcrete($ op [1 ])
2616
+ ?? $ op [1 ]
2617
+ !! QAST ::Op. new ( : op(' decont' ), $ op [1 ] ));
2615
2618
my int $ hint := -1 ;
2616
2619
my @ ins ;
2617
2620
push_ilist(@ ins , $ val_mast );
2618
2621
push_ilist(@ ins , $ obj_mast );
2619
2622
push_ilist(@ ins , $ type_mast );
2620
- push_op(@ ins , ' decont' , $ type_mast . result_reg, $ type_mast . result_reg);
2621
2623
my $ name := $ op [2 ];
2622
2624
$ name := $ name [2 ] if nqp ::istype($ name , QAST ::Want) && $ name [1 ] eq ' Ss' ;
2623
2625
if nqp ::istype($ name , QAST ::SVal) {
@@ -2649,13 +2651,15 @@ sub add_getattr_op($nqpop, $hintedop, $namedop, $want) {
2649
2651
QAST ::MASTOperations. add_core_op($ nqpop , -> $ qastcomp , $ op {
2650
2652
my $ regalloc := $ * REGALLOC ;
2651
2653
my $ obj_mast := $ qastcomp . as_mast( : want($ MVM_reg_obj ), $ op [0 ] );
2652
- my $ type_mast := $ qastcomp . as_mast( : want($ MVM_reg_obj ), $ op [1 ] );
2654
+ my $ type_mast := $ qastcomp . as_mast( : want($ MVM_reg_obj ),
2655
+ nqp ::istype($ op [1 ], QAST ::WVal) && ! nqp ::isconcrete($ op [1 ])
2656
+ ?? $ op [1 ]
2657
+ !! QAST ::Op. new ( : op(' decont' ), $ op [1 ] ));
2653
2658
my int $ hint := -1 ;
2654
2659
my @ ins ;
2655
2660
push_ilist(@ ins , $ obj_mast );
2656
2661
push_ilist(@ ins , $ type_mast );
2657
2662
my $ res_reg := $ regalloc . fresh_register($ want );
2658
- push_op(@ ins , ' decont' , $ type_mast . result_reg, $ type_mast . result_reg);
2659
2663
my $ name := $ op [2 ];
2660
2664
$ name := $ name [2 ] if nqp ::istype($ name , QAST ::Want) && $ name [1 ] eq ' Ss' ;
2661
2665
if nqp ::istype($ name , QAST ::SVal) {
0 commit comments