@@ -525,8 +525,7 @@ enum class IncDecOp {
525
525
526
526
template <typename T, IncDecOp Op, PushVal DoPush>
527
527
bool IncDecHelper (InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
528
- if (Ptr.isDummy ())
529
- return false ;
528
+ assert (!Ptr.isDummy ());
530
529
531
530
if constexpr (std::is_same_v<T, Boolean>) {
532
531
if (!S.getLangOpts ().CPlusPlus14 )
@@ -585,7 +584,7 @@ bool IncDecHelper(InterpState &S, CodePtr OpPC, const Pointer &Ptr) {
585
584
template <PrimType Name, class T = typename PrimConv<Name>::T>
586
585
bool Inc (InterpState &S, CodePtr OpPC) {
587
586
const Pointer &Ptr = S.Stk .pop <Pointer>();
588
- if (Ptr. isDummy ( ))
587
+ if (! CheckDummy (S, OpPC, Ptr ))
589
588
return false ;
590
589
if (!CheckInitialized (S, OpPC, Ptr, AK_Increment))
591
590
return false ;
@@ -599,7 +598,7 @@ bool Inc(InterpState &S, CodePtr OpPC) {
599
598
template <PrimType Name, class T = typename PrimConv<Name>::T>
600
599
bool IncPop (InterpState &S, CodePtr OpPC) {
601
600
const Pointer &Ptr = S.Stk .pop <Pointer>();
602
- if (Ptr. isDummy ( ))
601
+ if (! CheckDummy (S, OpPC, Ptr ))
603
602
return false ;
604
603
if (!CheckInitialized (S, OpPC, Ptr, AK_Increment))
605
604
return false ;
@@ -614,7 +613,7 @@ bool IncPop(InterpState &S, CodePtr OpPC) {
614
613
template <PrimType Name, class T = typename PrimConv<Name>::T>
615
614
bool Dec (InterpState &S, CodePtr OpPC) {
616
615
const Pointer &Ptr = S.Stk .pop <Pointer>();
617
- if (Ptr. isDummy ( ))
616
+ if (! CheckDummy (S, OpPC, Ptr ))
618
617
return false ;
619
618
if (!CheckInitialized (S, OpPC, Ptr, AK_Decrement))
620
619
return false ;
@@ -628,7 +627,7 @@ bool Dec(InterpState &S, CodePtr OpPC) {
628
627
template <PrimType Name, class T = typename PrimConv<Name>::T>
629
628
bool DecPop (InterpState &S, CodePtr OpPC) {
630
629
const Pointer &Ptr = S.Stk .pop <Pointer>();
631
- if (Ptr. isDummy ( ))
630
+ if (! CheckDummy (S, OpPC, Ptr ))
632
631
return false ;
633
632
if (!CheckInitialized (S, OpPC, Ptr, AK_Decrement))
634
633
return false ;
0 commit comments