Skip to content

Commit 85fe7e8

Browse files
committed
Bug 1703469: Inline script-guarded getters and setters r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D251759
1 parent 485efc1 commit 85fe7e8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

js/src/jit/TrialInlining.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,15 @@ Maybe<InlinableGetterData> FindInlinableGetterData(ICCacheIRStub* stub) {
335335
}
336336
break;
337337
}
338+
case CacheOp::GuardFunctionScript: {
339+
MOZ_ASSERT(data.isNothing());
340+
maybeCalleeOperand = reader.objOperandId();
341+
uint32_t targetOffset = reader.stubOffset();
342+
uintptr_t rawScript = stubInfo->getStubRawWord(stubData, targetOffset);
343+
targetScript = reinterpret_cast<JSScript*>(rawScript);
344+
(void)reader.stubOffset(); // nargsAndFlags
345+
break;
346+
}
338347
case CacheOp::CallScriptedGetterResult: {
339348
ValOperandId receiverOperand = reader.valOperandId();
340349
ObjOperandId calleeOperand = reader.objOperandId();
@@ -418,6 +427,15 @@ Maybe<InlinableSetterData> FindInlinableSetterData(ICCacheIRStub* stub) {
418427
}
419428
break;
420429
}
430+
case CacheOp::GuardFunctionScript: {
431+
MOZ_ASSERT(data.isNothing());
432+
maybeCalleeOperand = reader.objOperandId();
433+
uint32_t targetOffset = reader.stubOffset();
434+
uintptr_t rawScript = stubInfo->getStubRawWord(stubData, targetOffset);
435+
targetScript = reinterpret_cast<JSScript*>(rawScript);
436+
(void)reader.stubOffset(); // nargsAndFlags
437+
break;
438+
}
421439
case CacheOp::CallScriptedSetter: {
422440
ObjOperandId receiverOperand = reader.objOperandId();
423441
ObjOperandId calleeOperand = reader.objOperandId();

0 commit comments

Comments
 (0)