@@ -2513,7 +2513,7 @@ inline bool ArrayDecay(InterpState &S, CodePtr OpPC) {
25132513}
25142514
25152515inline bool CallVar (InterpState &S, CodePtr OpPC, const Function *Func,
2516- uint32_t VarArgSize) {
2516+ uint32_t VarArgSize, const Expr *CE ) {
25172517 if (Func->hasThisPointer ()) {
25182518 size_t ArgSize = Func->getArgSize () + VarArgSize;
25192519 size_t ThisOffset = ArgSize - (Func->hasRVO () ? primSize (PT_Ptr) : 0 );
@@ -2540,7 +2540,7 @@ inline bool CallVar(InterpState &S, CodePtr OpPC, const Function *Func,
25402540 if (!CheckCallDepth (S, OpPC))
25412541 return false ;
25422542
2543- auto NewFrame = std::make_unique<InterpFrame>(S, Func, OpPC, VarArgSize);
2543+ auto NewFrame = std::make_unique<InterpFrame>(S, Func, OpPC, CE, VarArgSize);
25442544 InterpFrame *FrameBefore = S.Current ;
25452545 S.Current = NewFrame.get ();
25462546
@@ -2563,7 +2563,7 @@ inline bool CallVar(InterpState &S, CodePtr OpPC, const Function *Func,
25632563}
25642564
25652565inline bool Call (InterpState &S, CodePtr OpPC, const Function *Func,
2566- uint32_t VarArgSize) {
2566+ uint32_t VarArgSize, const Expr *CE ) {
25672567 if (Func->hasThisPointer ()) {
25682568 size_t ArgSize = Func->getArgSize () + VarArgSize;
25692569 size_t ThisOffset = ArgSize - (Func->hasRVO () ? primSize (PT_Ptr) : 0 );
@@ -2591,7 +2591,7 @@ inline bool Call(InterpState &S, CodePtr OpPC, const Function *Func,
25912591 if (!CheckCallDepth (S, OpPC))
25922592 return false ;
25932593
2594- auto NewFrame = std::make_unique<InterpFrame>(S, Func, OpPC, VarArgSize);
2594+ auto NewFrame = std::make_unique<InterpFrame>(S, Func, OpPC, CE, VarArgSize);
25952595 InterpFrame *FrameBefore = S.Current ;
25962596 S.Current = NewFrame.get ();
25972597
@@ -2612,7 +2612,7 @@ inline bool Call(InterpState &S, CodePtr OpPC, const Function *Func,
26122612}
26132613
26142614inline bool CallVirt (InterpState &S, CodePtr OpPC, const Function *Func,
2615- uint32_t VarArgSize) {
2615+ uint32_t VarArgSize, const Expr *CE ) {
26162616 assert (Func->hasThisPointer ());
26172617 assert (Func->isVirtual ());
26182618 size_t ArgSize = Func->getArgSize () + VarArgSize;
@@ -2659,7 +2659,7 @@ inline bool CallVirt(InterpState &S, CodePtr OpPC, const Function *Func,
26592659 }
26602660 }
26612661
2662- if (!Call (S, OpPC, Func, VarArgSize))
2662+ if (!Call (S, OpPC, Func, VarArgSize, CE ))
26632663 return false ;
26642664
26652665 // Covariant return types. The return type of Overrider is a pointer
@@ -2686,7 +2686,7 @@ inline bool CallVirt(InterpState &S, CodePtr OpPC, const Function *Func,
26862686
26872687inline bool CallBI (InterpState &S, CodePtr &PC, const Function *Func,
26882688 const CallExpr *CE) {
2689- auto NewFrame = std::make_unique<InterpFrame>(S, Func, PC);
2689+ auto NewFrame = std::make_unique<InterpFrame>(S, Func, PC, CE );
26902690
26912691 InterpFrame *FrameBefore = S.Current ;
26922692 S.Current = NewFrame.get ();
@@ -2737,9 +2737,9 @@ inline bool CallPtr(InterpState &S, CodePtr OpPC, uint32_t ArgSize,
27372737 VarArgSize -= align (primSize (PT_Ptr));
27382738
27392739 if (F->isVirtual ())
2740- return CallVirt (S, OpPC, F, VarArgSize);
2740+ return CallVirt (S, OpPC, F, VarArgSize, CE );
27412741
2742- return Call (S, OpPC, F, VarArgSize);
2742+ return Call (S, OpPC, F, VarArgSize, CE );
27432743}
27442744
27452745inline bool GetFnPtr (InterpState &S, CodePtr OpPC, const Function *Func) {
0 commit comments