mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-19 05:37:30 +09:00
No Issue - Ensure more OsiSpace
ensureOsiSpace(); was very much under-used. This adds more instances where it makes sense to ensure Osi space before placing masm calls.
This commit is contained in:
parent
481069044d
commit
82a2a67f07
2 changed files with 7 additions and 1 deletions
|
|
@ -3757,6 +3757,7 @@ CodeGenerator::visitCallNative(LCallNative* call)
|
||||||
if (jitInfo && jitInfo->type() == JSJitInfo::IgnoresReturnValueNative)
|
if (jitInfo && jitInfo->type() == JSJitInfo::IgnoresReturnValueNative)
|
||||||
native = jitInfo->ignoresReturnValueMethod;
|
native = jitInfo->ignoresReturnValueMethod;
|
||||||
}
|
}
|
||||||
|
ensureOsiSpace();
|
||||||
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, native));
|
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, native));
|
||||||
|
|
||||||
emitTracelogStopEvent(TraceLogger_Call);
|
emitTracelogStopEvent(TraceLogger_Call);
|
||||||
|
|
@ -3881,6 +3882,7 @@ CodeGenerator::visitCallDOMNative(LCallDOMNative* call)
|
||||||
masm.passABIArg(argObj);
|
masm.passABIArg(argObj);
|
||||||
masm.passABIArg(argPrivate);
|
masm.passABIArg(argPrivate);
|
||||||
masm.passABIArg(argArgs);
|
masm.passABIArg(argArgs);
|
||||||
|
ensureOsiSpace();
|
||||||
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, target->jitInfo()->method));
|
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, target->jitInfo()->method));
|
||||||
|
|
||||||
if (target->jitInfo()->isInfallible) {
|
if (target->jitInfo()->isInfallible) {
|
||||||
|
|
@ -4006,6 +4008,7 @@ CodeGenerator::visitCallGeneric(LCallGeneric* call)
|
||||||
|
|
||||||
// Finally call the function in objreg.
|
// Finally call the function in objreg.
|
||||||
masm.bind(&makeCall);
|
masm.bind(&makeCall);
|
||||||
|
ensureOsiSpace();
|
||||||
uint32_t callOffset = masm.callJit(objreg);
|
uint32_t callOffset = masm.callJit(objreg);
|
||||||
markSafepointAt(callOffset, call);
|
markSafepointAt(callOffset, call);
|
||||||
|
|
||||||
|
|
@ -4104,6 +4107,7 @@ CodeGenerator::visitCallKnown(LCallKnown* call)
|
||||||
masm.Push(Imm32(descriptor));
|
masm.Push(Imm32(descriptor));
|
||||||
|
|
||||||
// Finally call the function in objreg.
|
// Finally call the function in objreg.
|
||||||
|
ensureOsiSpace();
|
||||||
uint32_t callOffset = masm.callJit(objreg);
|
uint32_t callOffset = masm.callJit(objreg);
|
||||||
markSafepointAt(callOffset, call);
|
markSafepointAt(callOffset, call);
|
||||||
|
|
||||||
|
|
@ -4436,6 +4440,7 @@ CodeGenerator::emitApplyGeneric(T* apply)
|
||||||
masm.bind(&rejoin);
|
masm.bind(&rejoin);
|
||||||
|
|
||||||
// Finally call the function in objreg, as assigned by one of the paths above.
|
// Finally call the function in objreg, as assigned by one of the paths above.
|
||||||
|
ensureOsiSpace();
|
||||||
uint32_t callOffset = masm.callJit(objreg);
|
uint32_t callOffset = masm.callJit(objreg);
|
||||||
markSafepointAt(callOffset, apply);
|
markSafepointAt(callOffset, apply);
|
||||||
|
|
||||||
|
|
@ -11244,6 +11249,7 @@ CodeGenerator::visitGetDOMProperty(LGetDOMProperty* ins)
|
||||||
masm.passABIArg(ObjectReg);
|
masm.passABIArg(ObjectReg);
|
||||||
masm.passABIArg(PrivateReg);
|
masm.passABIArg(PrivateReg);
|
||||||
masm.passABIArg(ValueReg);
|
masm.passABIArg(ValueReg);
|
||||||
|
ensureOsiSpace();
|
||||||
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, ins->mir()->fun()));
|
masm.callWithABI(JS_FUNC_TO_DATA_PTR(void*, ins->mir()->fun()));
|
||||||
|
|
||||||
if (ins->mir()->isInfallible()) {
|
if (ins->mir()->isInfallible()) {
|
||||||
|
|
|
||||||
|
|
@ -1112,7 +1112,6 @@ CodeGeneratorShared::ensureOsiSpace()
|
||||||
}
|
}
|
||||||
MOZ_ASSERT_IF(!masm.oom(),
|
MOZ_ASSERT_IF(!masm.oom(),
|
||||||
masm.currentOffset() - lastOsiPointOffset_ >= Assembler::PatchWrite_NearCallSize());
|
masm.currentOffset() - lastOsiPointOffset_ >= Assembler::PatchWrite_NearCallSize());
|
||||||
lastOsiPointOffset_ = masm.currentOffset();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t
|
||||||
|
|
@ -1124,6 +1123,7 @@ CodeGeneratorShared::markOsiPoint(LOsiPoint* ins)
|
||||||
uint32_t offset = masm.currentOffset();
|
uint32_t offset = masm.currentOffset();
|
||||||
SnapshotOffset so = ins->snapshot()->snapshotOffset();
|
SnapshotOffset so = ins->snapshot()->snapshotOffset();
|
||||||
masm.propagateOOM(osiIndices_.append(OsiIndex(offset, so)));
|
masm.propagateOOM(osiIndices_.append(OsiIndex(offset, so)));
|
||||||
|
lastOsiPointOffset_ = offset;
|
||||||
|
|
||||||
return offset;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue