зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1446061 - Follow-up changes from unused parameter removal review. r=tcampbell
This commit is contained in:
Родитель
2ba1e92974
Коммит
c22fbf595e
|
@ -627,11 +627,11 @@ IsPrologueBailout(const SnapshotIterator& iter, const ExceptionBailoutInfo* excI
|
|||
// +===============+
|
||||
//
|
||||
static bool
|
||||
InitFromBailout(JSContext* cx, jsbytecode* callerPC,
|
||||
InitFromBailout(JSContext* cx, size_t frameNo,
|
||||
HandleFunction fun, HandleScript script,
|
||||
SnapshotIterator& iter, bool invalidate, BaselineStackBuilder& builder,
|
||||
MutableHandle<GCVector<Value>> startFrameFormals, MutableHandleFunction nextCallee,
|
||||
jsbytecode** callPC, const ExceptionBailoutInfo* excInfo)
|
||||
const ExceptionBailoutInfo* excInfo)
|
||||
{
|
||||
// The Baseline frames we will reconstruct on the heap are not rooted, so GC
|
||||
// must be suppressed here.
|
||||
|
@ -827,7 +827,7 @@ InitFromBailout(JSContext* cx, jsbytecode* callerPC,
|
|||
JitSpew(JitSpew_BaselineBailouts, " frame slots %u, nargs %zu, nfixed %zu",
|
||||
iter.numAllocations(), fun->nargs(), script->nfixed());
|
||||
|
||||
if (!callerPC) {
|
||||
if (frameNo == 0) {
|
||||
// This is the first frame. Store the formals in a Vector until we
|
||||
// are done. Due to UCE and phi elimination, we could store an
|
||||
// UndefinedValue() here for formals we think are unused, but
|
||||
|
@ -842,7 +842,7 @@ InitFromBailout(JSContext* cx, jsbytecode* callerPC,
|
|||
Value arg = iter.read();
|
||||
JitSpew(JitSpew_BaselineBailouts, " arg %d = %016" PRIx64,
|
||||
(int) i, *((uint64_t*) &arg));
|
||||
if (callerPC) {
|
||||
if (frameNo > 0) {
|
||||
size_t argOffset = builder.framePushed() + JitFrameLayout::offsetOfActualArg(i);
|
||||
builder.valuePointerAtStackOffset(argOffset).set(arg);
|
||||
} else {
|
||||
|
@ -1077,9 +1077,6 @@ InitFromBailout(JSContext* cx, jsbytecode* callerPC,
|
|||
// If this was the last inline frame, or we are bailing out to a catch or
|
||||
// finally block in this frame, then unpacking is almost done.
|
||||
if (!iter.moreFrames() || catchingException) {
|
||||
// Last frame, so PC for call to next frame is set to nullptr.
|
||||
*callPC = nullptr;
|
||||
|
||||
// If the bailout was a resumeAfter, and the opcode is monitored,
|
||||
// then the bailed out state should be in a position to enter
|
||||
// into the ICTypeMonitor chain for the op.
|
||||
|
@ -1258,8 +1255,6 @@ InitFromBailout(JSContext* cx, jsbytecode* callerPC,
|
|||
return true;
|
||||
}
|
||||
|
||||
*callPC = pc;
|
||||
|
||||
// Write out descriptor of BaselineJS frame.
|
||||
size_t baselineFrameDescr = MakeFrameDescriptor((uint32_t) builder.framePushed(),
|
||||
JitFrame_BaselineJS,
|
||||
|
@ -1633,8 +1628,6 @@ jit::BailoutIonToBaseline(JSContext* cx, JitActivation* activation,
|
|||
size_t frameNo = 0;
|
||||
|
||||
// Reconstruct baseline frames using the builder.
|
||||
RootedScript caller(cx);
|
||||
jsbytecode* callerPC = nullptr;
|
||||
RootedFunction fun(cx, callee);
|
||||
Rooted<GCVector<Value>> startFrameFormals(cx, GCVector<Value>(cx));
|
||||
|
||||
|
@ -1663,17 +1656,16 @@ jit::BailoutIonToBaseline(JSContext* cx, JitActivation* activation,
|
|||
// debug mode.
|
||||
bool passExcInfo = handleException || propagatingExceptionForDebugMode;
|
||||
|
||||
jsbytecode* callPC = nullptr;
|
||||
RootedFunction nextCallee(cx, nullptr);
|
||||
if (!InitFromBailout(cx, callerPC, fun, scr,
|
||||
if (!InitFromBailout(cx, frameNo, fun, scr,
|
||||
snapIter, invalidate, builder, &startFrameFormals,
|
||||
&nextCallee, &callPC, passExcInfo ? excInfo : nullptr))
|
||||
&nextCallee, passExcInfo ? excInfo : nullptr))
|
||||
{
|
||||
return BAILOUT_RETURN_FATAL_ERROR;
|
||||
}
|
||||
|
||||
if (!snapIter.moreFrames()) {
|
||||
MOZ_ASSERT(!callPC);
|
||||
MOZ_ASSERT(!nextCallee);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1681,9 +1673,6 @@ jit::BailoutIonToBaseline(JSContext* cx, JitActivation* activation,
|
|||
break;
|
||||
|
||||
MOZ_ASSERT(nextCallee);
|
||||
MOZ_ASSERT(callPC);
|
||||
caller = scr;
|
||||
callerPC = callPC;
|
||||
fun = nextCallee;
|
||||
scr = fun->existingScript();
|
||||
|
||||
|
|
|
@ -772,6 +772,9 @@ AddCacheIRGlobalGetter(ICCacheIR_Monitored* stub, bool innerized,
|
|||
// <GuardShape holderId>
|
||||
// CallNativeGetterResult globalId
|
||||
|
||||
if (innerized)
|
||||
return false;
|
||||
|
||||
CacheIRReader reader(stub->stubInfo());
|
||||
|
||||
ObjOperandId objId = ObjOperandId(0);
|
||||
|
|
|
@ -10454,7 +10454,7 @@ CodeGenerator::link(JSContext* cx, CompilerConstraintList* constraints)
|
|||
if (runtimeData_.length())
|
||||
ionScript->copyRuntimeData(&runtimeData_[0]);
|
||||
if (icList_.length())
|
||||
ionScript->copyICEntries(&icList_[0], masm);
|
||||
ionScript->copyICEntries(&icList_[0]);
|
||||
|
||||
for (size_t i = 0; i < icInfo_.length(); i++) {
|
||||
IonIC& ic = ionScript->getICFromIndex(i);
|
||||
|
|
|
@ -1147,7 +1147,7 @@ IonScript::copyRuntimeData(const uint8_t* data)
|
|||
}
|
||||
|
||||
void
|
||||
IonScript::copyICEntries(const uint32_t* icEntries, MacroAssembler& masm)
|
||||
IonScript::copyICEntries(const uint32_t* icEntries)
|
||||
{
|
||||
memcpy(icIndex(), icEntries, numICs() * sizeof(uint32_t));
|
||||
|
||||
|
@ -1155,7 +1155,7 @@ IonScript::copyICEntries(const uint32_t* icEntries, MacroAssembler& masm)
|
|||
// code, not the absolute positions of the jumps. Update according to the
|
||||
// final code address now.
|
||||
for (size_t i = 0; i < numICs(); i++)
|
||||
getICFromIndex(i).updateBaseAddress(method_, masm);
|
||||
getICFromIndex(i).updateBaseAddress(method_);
|
||||
}
|
||||
|
||||
const SafepointIndex*
|
||||
|
|
|
@ -525,7 +525,7 @@ struct IonScript
|
|||
void copySafepointIndices(const SafepointIndex* firstSafepointIndex);
|
||||
void copyOsiIndices(const OsiIndex* firstOsiIndex);
|
||||
void copyRuntimeData(const uint8_t* data);
|
||||
void copyICEntries(const uint32_t* caches, MacroAssembler& masm);
|
||||
void copyICEntries(const uint32_t* caches);
|
||||
void copySafepoints(const SafepointWriter* writer);
|
||||
void copyPatchableBackedges(JSContext* cx, JitCode* code,
|
||||
PatchableBackedgeInfo* backedges,
|
||||
|
|
|
@ -16,10 +16,10 @@ using namespace js;
|
|||
using namespace js::jit;
|
||||
|
||||
void
|
||||
IonIC::updateBaseAddress(JitCode* code, MacroAssembler& masm)
|
||||
IonIC::updateBaseAddress(JitCode* code)
|
||||
{
|
||||
fallbackLabel_.repoint(code, &masm);
|
||||
rejoinLabel_.repoint(code, &masm);
|
||||
fallbackLabel_.repoint(code);
|
||||
rejoinLabel_.repoint(code);
|
||||
|
||||
codeRaw_ = fallbackLabel_.raw();
|
||||
}
|
||||
|
|
|
@ -173,7 +173,7 @@ class IonIC
|
|||
return (IonInstanceOfIC*)this;
|
||||
}
|
||||
|
||||
void updateBaseAddress(JitCode* code, MacroAssembler& masm);
|
||||
void updateBaseAddress(JitCode* code);
|
||||
|
||||
// Returns the Register to use as scratch when entering IC stubs. This
|
||||
// should either be an output register or a temp.
|
||||
|
|
|
@ -35,16 +35,10 @@ CodeLocationJump::repoint(JitCode* code, MacroAssembler* masm)
|
|||
}
|
||||
|
||||
void
|
||||
CodeLocationLabel::repoint(JitCode* code, MacroAssembler* masm)
|
||||
CodeLocationLabel::repoint(JitCode* code)
|
||||
{
|
||||
MOZ_ASSERT(state_ == Relative);
|
||||
size_t new_off = (size_t)raw_;
|
||||
if (masm != nullptr) {
|
||||
#ifdef JS_CODEGEN_X64
|
||||
MOZ_ASSERT((uint64_t)raw_ <= UINT32_MAX);
|
||||
#endif
|
||||
new_off = (uintptr_t)raw_;
|
||||
}
|
||||
uintptr_t new_off = uintptr_t(raw_);
|
||||
MOZ_ASSERT(new_off < code->instructionsSize());
|
||||
|
||||
raw_ = code->raw() + new_off;
|
||||
|
|
|
@ -749,7 +749,7 @@ class CodeLocationLabel
|
|||
return raw_ - other.raw_;
|
||||
}
|
||||
|
||||
void repoint(JitCode* code, MacroAssembler* masm = nullptr);
|
||||
void repoint(JitCode* code);
|
||||
|
||||
#ifdef DEBUG
|
||||
bool isSet() const {
|
||||
|
|
Загрузка…
Ссылка в новой задаче