mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 04:09:50 +00:00
Bug 1781242 part 8 - Remove allocator from JitContext. r=iain
Depends on D152848 Differential Revision: https://phabricator.services.mozilla.com/D152849
This commit is contained in:
parent
c72a9f5100
commit
ef28bd860c
@ -477,7 +477,7 @@ enum class AssembleResult {
|
||||
: NativeRegExpMacroAssembler::UC16;
|
||||
// If we are compiling native code, we need a macroassembler,
|
||||
// which needs a jit context.
|
||||
jctx.emplace(cx, temp);
|
||||
jctx.emplace(cx);
|
||||
stack_masm.emplace(temp);
|
||||
#ifdef DEBUG
|
||||
// It would be much preferable to use `class AutoCreatedBy` here, but we
|
||||
|
@ -52,9 +52,10 @@ BaseValueIndex CacheRegisterAllocator::addressOf(MacroAssembler& masm,
|
||||
|
||||
// BaselineCacheIRCompiler compiles CacheIR to BaselineIC native code.
|
||||
BaselineCacheIRCompiler::BaselineCacheIRCompiler(JSContext* cx,
|
||||
TempAllocator& alloc,
|
||||
const CacheIRWriter& writer,
|
||||
uint32_t stubDataOffset)
|
||||
: CacheIRCompiler(cx, writer, stubDataOffset, Mode::Baseline,
|
||||
: CacheIRCompiler(cx, alloc, writer, stubDataOffset, Mode::Baseline,
|
||||
StubFieldPolicy::Address),
|
||||
makesGCCalls_(false) {}
|
||||
|
||||
@ -2139,8 +2140,8 @@ ICAttachResult js::jit::AttachBaselineCacheIRStub(
|
||||
if (!code) {
|
||||
// We have to generate stub code.
|
||||
TempAllocator temp(&cx->tempLifoAlloc());
|
||||
JitContext jctx(cx, temp);
|
||||
BaselineCacheIRCompiler comp(cx, writer, stubDataOffset);
|
||||
JitContext jctx(cx);
|
||||
BaselineCacheIRCompiler comp(cx, temp, writer, stubDataOffset);
|
||||
if (!comp.init(kind)) {
|
||||
return ICAttachResult::OOM;
|
||||
}
|
||||
|
@ -109,8 +109,8 @@ class MOZ_RAII BaselineCacheIRCompiler : public CacheIRCompiler {
|
||||
public:
|
||||
friend class AutoStubFrame;
|
||||
|
||||
BaselineCacheIRCompiler(JSContext* cx, const CacheIRWriter& writer,
|
||||
uint32_t stubDataOffset);
|
||||
BaselineCacheIRCompiler(JSContext* cx, TempAllocator& alloc,
|
||||
const CacheIRWriter& writer, uint32_t stubDataOffset);
|
||||
|
||||
[[nodiscard]] bool init(CacheKind kind);
|
||||
|
||||
|
@ -85,23 +85,25 @@ BaselineInterpreterHandler::BaselineInterpreterHandler(JSContext* cx,
|
||||
|
||||
template <typename Handler>
|
||||
template <typename... HandlerArgs>
|
||||
BaselineCodeGen<Handler>::BaselineCodeGen(JSContext* cx, HandlerArgs&&... args)
|
||||
BaselineCodeGen<Handler>::BaselineCodeGen(JSContext* cx, TempAllocator& alloc,
|
||||
HandlerArgs&&... args)
|
||||
: handler(cx, masm, std::forward<HandlerArgs>(args)...),
|
||||
cx(cx),
|
||||
masm(GetJitContext()->temp),
|
||||
masm(alloc),
|
||||
frame(handler.frame()) {}
|
||||
|
||||
BaselineCompiler::BaselineCompiler(JSContext* cx, TempAllocator& alloc,
|
||||
JSScript* script)
|
||||
: BaselineCodeGen(cx, /* HandlerArgs = */ alloc, script),
|
||||
: BaselineCodeGen(cx, alloc, /* HandlerArgs = */ alloc, script),
|
||||
profilerPushToggleOffset_() {
|
||||
#ifdef JS_CODEGEN_NONE
|
||||
MOZ_CRASH();
|
||||
#endif
|
||||
}
|
||||
|
||||
BaselineInterpreterGenerator::BaselineInterpreterGenerator(JSContext* cx)
|
||||
: BaselineCodeGen(cx /* no handlerArgs */) {}
|
||||
BaselineInterpreterGenerator::BaselineInterpreterGenerator(JSContext* cx,
|
||||
TempAllocator& alloc)
|
||||
: BaselineCodeGen(cx, alloc /* no handlerArgs */) {}
|
||||
|
||||
bool BaselineCompilerHandler::init(JSContext* cx) {
|
||||
if (!analysis_.init(alloc_)) {
|
||||
@ -6676,7 +6678,8 @@ bool BaselineInterpreterGenerator::generate(BaselineInterpreter& interpreter) {
|
||||
|
||||
JitCode* JitRuntime::generateDebugTrapHandler(JSContext* cx,
|
||||
DebugTrapHandlerKind kind) {
|
||||
StackMacroAssembler masm(GetJitContext()->temp);
|
||||
TempAllocator temp(&cx->tempLifoAlloc());
|
||||
StackMacroAssembler masm(temp);
|
||||
AutoCreatedBy acb(masm, "JitRuntime::generateDebugTrapHandler");
|
||||
|
||||
AllocatableGeneralRegisterSet regs(GeneralRegisterSet::All());
|
||||
|
@ -66,7 +66,8 @@ class BaselineCodeGen {
|
||||
#endif
|
||||
|
||||
template <typename... HandlerArgs>
|
||||
explicit BaselineCodeGen(JSContext* cx, HandlerArgs&&... args);
|
||||
explicit BaselineCodeGen(JSContext* cx, TempAllocator& alloc,
|
||||
HandlerArgs&&... args);
|
||||
|
||||
template <typename T>
|
||||
void pushArg(const T& t) {
|
||||
@ -506,7 +507,7 @@ class BaselineInterpreterGenerator final : private BaselineInterpreterCodeGen {
|
||||
uint32_t debugTrapHandlerOffset_ = 0;
|
||||
|
||||
public:
|
||||
explicit BaselineInterpreterGenerator(JSContext* cx);
|
||||
explicit BaselineInterpreterGenerator(JSContext* cx, TempAllocator& alloc);
|
||||
|
||||
[[nodiscard]] bool generate(BaselineInterpreter& interpreter);
|
||||
|
||||
|
@ -2445,7 +2445,8 @@ bool FallbackICCodeCompiler::emit_CloseIter() {
|
||||
}
|
||||
|
||||
bool JitRuntime::generateBaselineICFallbackCode(JSContext* cx) {
|
||||
StackMacroAssembler masm(GetJitContext()->temp);
|
||||
TempAllocator temp(&cx->tempLifoAlloc());
|
||||
StackMacroAssembler masm(temp);
|
||||
AutoCreatedBy acb(masm, "JitRuntime::generateBaselineICFallbackCode");
|
||||
|
||||
BaselineICFallbackCode& fallbackCode = baselineICFallbackCode_.ref();
|
||||
|
@ -215,7 +215,7 @@ MethodStatus jit::BaselineCompile(JSContext* cx, JSScript* script,
|
||||
JS::ProfilingCategoryPair::JS_BaselineCompilation);
|
||||
|
||||
TempAllocator temp(&cx->tempLifoAlloc());
|
||||
JitContext jctx(cx, temp);
|
||||
JitContext jctx(cx);
|
||||
|
||||
BaselineCompiler compiler(cx, temp, script);
|
||||
if (!compiler.init()) {
|
||||
@ -946,10 +946,9 @@ uint8_t* BaselineInterpreter::retAddrForIC(JSOp op) const {
|
||||
|
||||
bool jit::GenerateBaselineInterpreter(JSContext* cx,
|
||||
BaselineInterpreter& interpreter) {
|
||||
// Temporary IsBaselineInterpreterEnabled check to not generate the
|
||||
// interpreter code (until it's enabled by default).
|
||||
if (IsBaselineInterpreterEnabled()) {
|
||||
BaselineInterpreterGenerator generator(cx);
|
||||
TempAllocator temp(&cx->tempLifoAlloc());
|
||||
BaselineInterpreterGenerator generator(cx, temp);
|
||||
return generator.generate(interpreter);
|
||||
}
|
||||
|
||||
|
@ -774,12 +774,13 @@ class MOZ_RAII CacheIRCompiler {
|
||||
|
||||
StubFieldPolicy stubFieldPolicy_;
|
||||
|
||||
CacheIRCompiler(JSContext* cx, const CacheIRWriter& writer,
|
||||
uint32_t stubDataOffset, Mode mode, StubFieldPolicy policy)
|
||||
CacheIRCompiler(JSContext* cx, TempAllocator& alloc,
|
||||
const CacheIRWriter& writer, uint32_t stubDataOffset,
|
||||
Mode mode, StubFieldPolicy policy)
|
||||
: enteredStubFrame_(false),
|
||||
cx_(cx),
|
||||
writer_(writer),
|
||||
masm(GetJitContext()->temp),
|
||||
masm(alloc),
|
||||
allocator(writer_),
|
||||
liveFloatRegs_(FloatRegisterSet::All()),
|
||||
mode_(mode),
|
||||
|
@ -2551,7 +2551,7 @@ JitCode* JitRealm::generateRegExpMatcherStub(JSContext* cx) {
|
||||
gc::GetGCKindSlots(templateObj.getAllocKind()));
|
||||
|
||||
TempAllocator temp(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, temp);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(temp);
|
||||
AutoCreatedBy acb(masm, "JitRealm::generateRegExpMatcherStub");
|
||||
|
||||
@ -2932,7 +2932,7 @@ JitCode* JitRealm::generateRegExpSearcherStub(JSContext* cx) {
|
||||
Register temp3 = regs.takeAny();
|
||||
|
||||
TempAllocator temp(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, temp);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(temp);
|
||||
AutoCreatedBy acb(masm, "JitRealm::generateRegExpSearcherStub");
|
||||
|
||||
@ -3107,7 +3107,7 @@ JitCode* JitRealm::generateRegExpTesterStub(JSContext* cx) {
|
||||
Register result = ReturnReg;
|
||||
|
||||
TempAllocator temp(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, temp);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(temp);
|
||||
AutoCreatedBy acb(masm, "JitRealm::generateRegExpTesterStub");
|
||||
|
||||
@ -10520,7 +10520,7 @@ JitCode* JitRealm::generateStringConcatStub(JSContext* cx) {
|
||||
JitSpew(JitSpew_Codegen, "# Emitting StringConcat stub");
|
||||
|
||||
TempAllocator temp(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, temp);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(temp);
|
||||
AutoCreatedBy acb(masm, "JitRealm::generateStringConcatStub");
|
||||
|
||||
|
@ -105,9 +105,7 @@ bool JitRuntime::initialize(JSContext* cx) {
|
||||
MOZ_ASSERT(CurrentThreadCanAccessRuntime(cx->runtime()));
|
||||
|
||||
AutoAllocInAtomsZone az(cx);
|
||||
|
||||
TempAllocator temp(&cx->tempLifoAlloc());
|
||||
JitContext jctx(cx, temp);
|
||||
JitContext jctx(cx);
|
||||
|
||||
if (!generateTrampolines(cx)) {
|
||||
return false;
|
||||
@ -135,7 +133,8 @@ bool JitRuntime::initialize(JSContext* cx) {
|
||||
}
|
||||
|
||||
bool JitRuntime::generateTrampolines(JSContext* cx) {
|
||||
StackMacroAssembler masm(GetJitContext()->temp);
|
||||
TempAllocator temp(&cx->tempLifoAlloc());
|
||||
StackMacroAssembler masm(temp);
|
||||
|
||||
Label bailoutTail;
|
||||
JitSpew(JitSpew_Codegen, "# Emitting bailout tail stub");
|
||||
@ -317,7 +316,7 @@ static bool LinkBackgroundCodeGen(JSContext* cx, IonCompileTask* task) {
|
||||
return false;
|
||||
}
|
||||
|
||||
JitContext jctx(cx, task->alloc());
|
||||
JitContext jctx(cx);
|
||||
RootedScript script(cx, task->script());
|
||||
return LinkCodeGen(cx, codegen, script, task->snapshot());
|
||||
}
|
||||
@ -1639,7 +1638,7 @@ static AbortReason IonCompile(JSContext* cx, HandleScript script,
|
||||
bool succeeded = false;
|
||||
{
|
||||
gc::AutoSuppressGC suppressGC(cx);
|
||||
JitContext jctx(cx, *temp);
|
||||
JitContext jctx(cx);
|
||||
UniquePtr<CodeGenerator> codegen(CompileBackEnd(mirGen, snapshot));
|
||||
if (!codegen) {
|
||||
JitSpew(JitSpew_IonAbort, "Failed during back-end compilation.");
|
||||
|
@ -42,11 +42,11 @@ namespace js {
|
||||
namespace jit {
|
||||
|
||||
// IonCacheIRCompiler compiles CacheIR to IonIC native code.
|
||||
IonCacheIRCompiler::IonCacheIRCompiler(JSContext* cx,
|
||||
IonCacheIRCompiler::IonCacheIRCompiler(JSContext* cx, TempAllocator& alloc,
|
||||
const CacheIRWriter& writer, IonIC* ic,
|
||||
IonScript* ionScript,
|
||||
uint32_t stubDataOffset)
|
||||
: CacheIRCompiler(cx, writer, stubDataOffset, Mode::Ion,
|
||||
: CacheIRCompiler(cx, alloc, writer, stubDataOffset, Mode::Ion,
|
||||
StubFieldPolicy::Constant),
|
||||
writer_(writer),
|
||||
ic_(ic),
|
||||
@ -1879,8 +1879,9 @@ void IonIC::attachCacheIRStub(JSContext* cx, const CacheIRWriter& writer,
|
||||
writer.copyStubData(newStub->stubDataStart());
|
||||
|
||||
TempAllocator temp(&cx->tempLifoAlloc());
|
||||
JitContext jctx(cx, temp);
|
||||
IonCacheIRCompiler compiler(cx, writer, this, ionScript, stubDataOffset);
|
||||
JitContext jctx(cx);
|
||||
IonCacheIRCompiler compiler(cx, temp, writer, this, ionScript,
|
||||
stubDataOffset);
|
||||
if (!compiler.init()) {
|
||||
return;
|
||||
}
|
||||
|
@ -41,7 +41,8 @@ class MOZ_RAII IonCacheIRCompiler : public CacheIRCompiler {
|
||||
friend class AutoSaveLiveRegisters;
|
||||
friend class AutoCallVM;
|
||||
|
||||
IonCacheIRCompiler(JSContext* cx, const CacheIRWriter& writer, IonIC* ic,
|
||||
IonCacheIRCompiler(JSContext* cx, TempAllocator& alloc,
|
||||
const CacheIRWriter& writer, IonIC* ic,
|
||||
IonScript* ionScript, uint32_t stubDataOffset);
|
||||
|
||||
[[nodiscard]] bool init();
|
||||
|
@ -47,7 +47,7 @@ void IonCompileTask::runHelperThreadTask(AutoLockHelperThreadState& locked) {
|
||||
void IonCompileTask::runTask() {
|
||||
// This is the entry point when ion compiles are run offthread.
|
||||
|
||||
jit::JitContext jctx(mirGen_.realm->runtime(), mirGen_.realm, alloc());
|
||||
jit::JitContext jctx(mirGen_.realm->runtime(), mirGen_.realm);
|
||||
setBackgroundCodegen(jit::CompileBackEnd(&mirGen_, snapshot_));
|
||||
}
|
||||
|
||||
|
@ -61,23 +61,21 @@ JitContext* jit::GetJitContext() {
|
||||
|
||||
JitContext* jit::MaybeGetJitContext() { return CurrentJitContext(); }
|
||||
|
||||
JitContext::JitContext(CompileRuntime* rt, CompileRealm* realm,
|
||||
TempAllocator& temp)
|
||||
: realm_(realm), temp(temp), runtime(rt) {
|
||||
JitContext::JitContext(CompileRuntime* rt, CompileRealm* realm)
|
||||
: realm_(realm), runtime(rt) {
|
||||
MOZ_ASSERT(rt);
|
||||
MOZ_ASSERT(realm);
|
||||
SetJitContext(this);
|
||||
}
|
||||
|
||||
JitContext::JitContext(JSContext* cx, TempAllocator& temp)
|
||||
JitContext::JitContext(JSContext* cx)
|
||||
: realm_(CompileRealm::get(cx->realm())),
|
||||
cx(cx),
|
||||
temp(temp),
|
||||
runtime(CompileRuntime::get(cx->runtime())) {
|
||||
SetJitContext(this);
|
||||
}
|
||||
|
||||
JitContext::JitContext(TempAllocator& temp) : temp(temp) {
|
||||
JitContext::JitContext() {
|
||||
#ifdef DEBUG
|
||||
isCompilingWasm_ = true;
|
||||
#endif
|
||||
|
@ -96,21 +96,18 @@ class JitContext {
|
||||
// off-thread compilation.
|
||||
JSContext* cx = nullptr;
|
||||
|
||||
// Allocator for temporary memory during compilation.
|
||||
TempAllocator& temp;
|
||||
|
||||
// Wrappers with information about the current runtime/realm for use
|
||||
// during compilation.
|
||||
CompileRuntime* runtime = nullptr;
|
||||
|
||||
// Constructor for compilations happening on the main thread.
|
||||
JitContext(JSContext* cx, TempAllocator& temp);
|
||||
explicit JitContext(JSContext* cx);
|
||||
|
||||
// Constructor for off-thread Ion compilations.
|
||||
JitContext(CompileRuntime* rt, CompileRealm* realm, TempAllocator& temp);
|
||||
JitContext(CompileRuntime* rt, CompileRealm* realm);
|
||||
|
||||
// Constructor for Wasm compilation.
|
||||
explicit JitContext(TempAllocator& temp);
|
||||
JitContext();
|
||||
|
||||
~JitContext();
|
||||
|
||||
|
@ -36,18 +36,19 @@ using mozilla::DebugOnly;
|
||||
namespace js {
|
||||
namespace jit {
|
||||
|
||||
MacroAssembler& CodeGeneratorShared::ensureMasm(MacroAssembler* masmArg) {
|
||||
MacroAssembler& CodeGeneratorShared::ensureMasm(MacroAssembler* masmArg,
|
||||
TempAllocator& alloc) {
|
||||
if (masmArg) {
|
||||
return *masmArg;
|
||||
}
|
||||
maybeMasm_.emplace(GetJitContext()->temp);
|
||||
maybeMasm_.emplace(alloc);
|
||||
return *maybeMasm_;
|
||||
}
|
||||
|
||||
CodeGeneratorShared::CodeGeneratorShared(MIRGenerator* gen, LIRGraph* graph,
|
||||
MacroAssembler* masmArg)
|
||||
: maybeMasm_(),
|
||||
masm(ensureMasm(masmArg)),
|
||||
masm(ensureMasm(masmArg, gen->alloc())),
|
||||
gen(gen),
|
||||
graph(*graph),
|
||||
current(nullptr),
|
||||
|
@ -39,7 +39,7 @@ struct ReciprocalMulConstants {
|
||||
class CodeGeneratorShared : public LElementVisitor {
|
||||
js::Vector<OutOfLineCode*, 0, SystemAllocPolicy> outOfLineCode_;
|
||||
|
||||
MacroAssembler& ensureMasm(MacroAssembler* masm);
|
||||
MacroAssembler& ensureMasm(MacroAssembler* masm, TempAllocator& alloc);
|
||||
mozilla::Maybe<IonHeapMacroAssembler> maybeMasm_;
|
||||
|
||||
public:
|
||||
|
@ -523,7 +523,7 @@ BEGIN_TEST(testAssemblerBuffer_ARM64) {
|
||||
|
||||
js::LifoAlloc lifo(4096);
|
||||
TempAllocator alloc(&lifo);
|
||||
JitContext jc(cx, alloc);
|
||||
JitContext jc(cx);
|
||||
StackMacroAssembler masm(alloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
|
||||
|
@ -637,7 +637,7 @@ class JitABICall final : public JSAPITest, public DefineCheckArgs<Sig> {
|
||||
this->set_instance(this, &result);
|
||||
|
||||
TempAllocator temp(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, temp);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(temp);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
PrepareJit(masm);
|
||||
|
@ -28,7 +28,7 @@ using mozilla::PositiveInfinity;
|
||||
|
||||
BEGIN_TEST(testJitMacroAssembler_flexibleDivMod) {
|
||||
TempAllocator tempAlloc(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, tempAlloc);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(tempAlloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
|
||||
@ -87,7 +87,7 @@ END_TEST(testJitMacroAssembler_flexibleDivMod)
|
||||
|
||||
BEGIN_TEST(testJitMacroAssembler_flexibleRemainder) {
|
||||
TempAllocator tempAlloc(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, tempAlloc);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(tempAlloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
|
||||
@ -137,7 +137,7 @@ END_TEST(testJitMacroAssembler_flexibleRemainder)
|
||||
|
||||
BEGIN_TEST(testJitMacroAssembler_flexibleQuotient) {
|
||||
TempAllocator tempAlloc(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, tempAlloc);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(tempAlloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
|
||||
@ -194,7 +194,7 @@ bool shiftTest(JSContext* cx, const char* name,
|
||||
const uintptr_t* lhsInput, const uintptr_t* rhsInput,
|
||||
const uintptr_t* result) {
|
||||
TempAllocator tempAlloc(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, tempAlloc);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(tempAlloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
|
||||
@ -390,7 +390,7 @@ END_TEST(testJitMacroAssembler_flexibleLshift)
|
||||
|
||||
BEGIN_TEST(testJitMacroAssembler_truncateDoubleToInt64) {
|
||||
TempAllocator tempAlloc(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, tempAlloc);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(tempAlloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
|
||||
@ -439,7 +439,7 @@ END_TEST(testJitMacroAssembler_truncateDoubleToInt64)
|
||||
|
||||
BEGIN_TEST(testJitMacroAssembler_truncateDoubleToUInt64) {
|
||||
TempAllocator tempAlloc(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, tempAlloc);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(tempAlloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
|
||||
@ -493,7 +493,7 @@ END_TEST(testJitMacroAssembler_truncateDoubleToUInt64)
|
||||
|
||||
BEGIN_TEST(testJitMacroAssembler_branchDoubleNotInInt64Range) {
|
||||
TempAllocator tempAlloc(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, tempAlloc);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(tempAlloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
|
||||
@ -548,7 +548,7 @@ END_TEST(testJitMacroAssembler_branchDoubleNotInInt64Range)
|
||||
|
||||
BEGIN_TEST(testJitMacroAssembler_branchDoubleNotInUInt64Range) {
|
||||
TempAllocator tempAlloc(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, tempAlloc);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(tempAlloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
|
||||
@ -606,7 +606,7 @@ END_TEST(testJitMacroAssembler_branchDoubleNotInUInt64Range)
|
||||
|
||||
BEGIN_TEST(testJitMacroAssembler_lshift64) {
|
||||
TempAllocator tempAlloc(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, tempAlloc);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(tempAlloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
|
||||
@ -676,7 +676,7 @@ END_TEST(testJitMacroAssembler_lshift64)
|
||||
|
||||
BEGIN_TEST(testJitMacroAssembler_rshift64Arithmetic) {
|
||||
TempAllocator tempAlloc(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, tempAlloc);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(tempAlloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
|
||||
@ -746,7 +746,7 @@ END_TEST(testJitMacroAssembler_rshift64Arithmetic)
|
||||
|
||||
BEGIN_TEST(testJitMacroAssembler_rshift64) {
|
||||
TempAllocator tempAlloc(&cx->tempLifoAlloc());
|
||||
JitContext jcx(cx, tempAlloc);
|
||||
JitContext jcx(cx);
|
||||
StackMacroAssembler masm(tempAlloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
|
||||
|
@ -69,7 +69,7 @@ BEGIN_TEST(testJitMoveEmitterCycles_simple) {
|
||||
using namespace js::jit;
|
||||
LifoAlloc lifo(LIFO_ALLOC_PRIMARY_CHUNK_SIZE);
|
||||
TempAllocator alloc(&lifo);
|
||||
JitContext jc(cx, alloc);
|
||||
JitContext jc(cx);
|
||||
StackMacroAssembler masm(alloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
MoveEmitter mover(masm);
|
||||
@ -117,7 +117,7 @@ BEGIN_TEST(testJitMoveEmitterCycles_autogen) {
|
||||
using namespace js::jit;
|
||||
LifoAlloc lifo(LIFO_ALLOC_PRIMARY_CHUNK_SIZE);
|
||||
TempAllocator alloc(&lifo);
|
||||
JitContext jc(cx, alloc);
|
||||
JitContext jc(cx);
|
||||
StackMacroAssembler masm(alloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
MoveEmitter mover(masm);
|
||||
@ -243,7 +243,7 @@ BEGIN_TEST(testJitMoveEmitterCycles_autogen2) {
|
||||
using namespace js::jit;
|
||||
LifoAlloc lifo(LIFO_ALLOC_PRIMARY_CHUNK_SIZE);
|
||||
TempAllocator alloc(&lifo);
|
||||
JitContext jc(cx, alloc);
|
||||
JitContext jc(cx);
|
||||
StackMacroAssembler masm(alloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
MoveEmitter mover(masm);
|
||||
@ -386,7 +386,7 @@ BEGIN_TEST(testJitMoveEmitterCycles_autogen3) {
|
||||
using namespace js::jit;
|
||||
LifoAlloc lifo(LIFO_ALLOC_PRIMARY_CHUNK_SIZE);
|
||||
TempAllocator alloc(&lifo);
|
||||
JitContext jc(cx, alloc);
|
||||
JitContext jc(cx);
|
||||
StackMacroAssembler masm(alloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
MoveEmitter mover(masm);
|
||||
@ -528,7 +528,7 @@ BEGIN_TEST(testJitMoveEmitterCycles_bug1299147_1) {
|
||||
using namespace js::jit;
|
||||
LifoAlloc lifo(LIFO_ALLOC_PRIMARY_CHUNK_SIZE);
|
||||
TempAllocator alloc(&lifo);
|
||||
JitContext jc(cx, alloc);
|
||||
JitContext jc(cx);
|
||||
StackMacroAssembler masm(alloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
MoveEmitter mover(masm);
|
||||
@ -579,7 +579,7 @@ BEGIN_TEST(testJitMoveEmitterCycles_bug1299147) {
|
||||
using namespace js::jit;
|
||||
LifoAlloc lifo(LIFO_ALLOC_PRIMARY_CHUNK_SIZE);
|
||||
TempAllocator alloc(&lifo);
|
||||
JitContext jc(cx, alloc);
|
||||
JitContext jc(cx);
|
||||
StackMacroAssembler masm(alloc);
|
||||
AutoCreatedBy acb(masm, __func__);
|
||||
MoveEmitter mover(masm);
|
||||
|
@ -10452,7 +10452,7 @@ bool js::wasm::BaselineCompileFunctions(const ModuleEnvironment& moduleEnv,
|
||||
// The MacroAssembler will sometimes access the jitContext.
|
||||
|
||||
TempAllocator alloc(&lifo);
|
||||
JitContext jitContext(alloc);
|
||||
JitContext jitContext;
|
||||
MOZ_ASSERT(IsCompilingWasm());
|
||||
WasmMacroAssembler masm(alloc, moduleEnv);
|
||||
|
||||
|
@ -1714,7 +1714,7 @@ bool wasm::EnsureBuiltinThunksInitialized() {
|
||||
#ifdef DEBUG
|
||||
// We need to allow this machine code to bake in a C++ code pointer, so we
|
||||
// disable the wasm restrictions while generating this stub.
|
||||
JitContext jitContext(tempAlloc);
|
||||
JitContext jitContext;
|
||||
bool oldFlag = jitContext.setIsCompilingWasm(false);
|
||||
#endif
|
||||
|
||||
|
@ -505,7 +505,7 @@ bool LazyStubTier::createManyEntryStubs(const Uint32Vector& funcExportIndices,
|
||||
|
||||
LifoAlloc lifo(LAZY_STUB_LIFO_DEFAULT_CHUNK_SIZE);
|
||||
TempAllocator alloc(&lifo);
|
||||
JitContext jitContext(alloc);
|
||||
JitContext jitContext;
|
||||
WasmMacroAssembler masm(alloc);
|
||||
|
||||
if (funcExportIndices.length() == 1) {
|
||||
|
@ -613,7 +613,7 @@ static bool AppendForEach(Vec* dstVec, const Vec& srcVec, MutateOp mutateOp) {
|
||||
|
||||
bool ModuleGenerator::linkCompiledCode(CompiledCode& code) {
|
||||
AutoCreatedBy acb(masm_, "ModuleGenerator::linkCompiledCode");
|
||||
JitContext jcx(masmAlloc_);
|
||||
JitContext jcx;
|
||||
|
||||
// Before merging in new code, if calls in a prior code range might go out of
|
||||
// range, insert far jumps to extend the range.
|
||||
|
@ -6825,7 +6825,7 @@ bool wasm::IonCompileFunctions(const ModuleEnvironment& moduleEnv,
|
||||
MOZ_ASSERT(compilerEnv.optimizedBackend() == OptimizedBackend::Ion);
|
||||
|
||||
TempAllocator alloc(&lifo);
|
||||
JitContext jitContext(alloc);
|
||||
JitContext jitContext;
|
||||
MOZ_ASSERT(IsCompilingWasm());
|
||||
WasmMacroAssembler masm(alloc, moduleEnv);
|
||||
#if defined(JS_CODEGEN_ARM64)
|
||||
|
@ -3035,7 +3035,7 @@ bool wasm::GenerateStubs(const ModuleEnvironment& env,
|
||||
const FuncExportVector& exports, CompiledCode* code) {
|
||||
LifoAlloc lifo(STUBS_LIFO_DEFAULT_CHUNK_SIZE);
|
||||
TempAllocator alloc(&lifo);
|
||||
JitContext jcx(alloc);
|
||||
JitContext jcx;
|
||||
WasmMacroAssembler masm(alloc, env);
|
||||
AutoCreatedBy acb(masm, "wasm::GenerateStubs");
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user