Skip to content

Commit

Permalink
Bug 1838587 - Use loadArgumentDynamicSlot in tryAttachBoundFunction. …
Browse files Browse the repository at this point in the history
…r=iain, a=dmeehan

Differential Revision: https://phabricator.services.mozilla.com/D181389
  • Loading branch information
jandem committed Jun 20, 2023
1 parent 4825259 commit a50bb34
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions js/src/jit/CacheIR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11284,7 +11284,7 @@ AttachDecision CallIRGenerator::tryAttachBoundFunction(

// Load the callee and ensure it's a bound function.
ValOperandId calleeValId =
writer.loadArgumentFixedSlot(ArgumentKind::Callee, argc_, flags);
writer.loadArgumentDynamicSlot(ArgumentKind::Callee, argcId, flags);
ObjOperandId calleeObjId = writer.guardToObject(calleeValId);
writer.guardClass(calleeObjId, GuardClassKind::BoundFunction);

Expand All @@ -11296,7 +11296,7 @@ AttachDecision CallIRGenerator::tryAttachBoundFunction(
// Guard newTarget == callee. We depend on this in CallBoundScriptedFunction
// and in emitCallScriptedGuards by using boundTarget as newTarget.
ValOperandId newTargetValId =
writer.loadArgumentFixedSlot(ArgumentKind::NewTarget, argc_, flags);
writer.loadArgumentDynamicSlot(ArgumentKind::NewTarget, argcId, flags);
ObjOperandId newTargetObjId = writer.guardToObject(newTargetValId);
writer.guardObjectIdentity(newTargetObjId, calleeObjId);
}
Expand Down

0 comments on commit a50bb34

Please sign in to comment.