From 3397fa4d20f989dde15a0aabff75f19d7b19edaf Mon Sep 17 00:00:00 2001 From: Benjamin Bouvier Date: Wed, 2 Nov 2016 18:22:37 +0100 Subject: [PATCH] Bug 1304672: Renamings outside asmjs/ and jit/; r=luke MozReview-Commit-ID: 1LGFJMlHaz2 --HG-- extra : rebase_source : 3ee8b822a6097260c9b9c0487b91a63e6ff1e575 --- js/public/ProfilingFrameIterator.h | 12 ++++++------ js/src/asmjs/AsmJS.cpp | 2 +- js/src/asmjs/WasmJS.cpp | 2 +- js/src/builtin/TestingFunctions.cpp | 6 +++--- js/src/jsapi.cpp | 2 +- js/src/jscompartment.cpp | 2 +- js/src/jscompartment.h | 22 +++++++++++----------- js/src/jsfun.cpp | 4 ++-- js/src/jsfun.h | 12 ++++++------ js/src/jsopcode.cpp | 2 +- js/src/jsscript.cpp | 6 +++--- js/src/vm/Debugger.cpp | 12 ++++++------ js/src/vm/HelperThreads.cpp | 4 ++-- js/src/vm/HelperThreads.h | 2 +- js/src/vm/Runtime.cpp | 2 +- js/src/vm/Runtime.h | 4 ++-- js/src/vm/SPSProfiler.h | 2 +- js/src/vm/SavedStacks.cpp | 2 +- js/src/vm/SavedStacks.h | 2 +- js/src/vm/Stack.cpp | 18 +++++++++--------- js/src/vm/Stack.h | 6 +++--- tools/profiler/core/GeckoSampler.cpp | 6 +++--- 22 files changed, 66 insertions(+), 66 deletions(-) diff --git a/js/public/ProfilingFrameIterator.h b/js/public/ProfilingFrameIterator.h index cbb0925332ae..d082213d8197 100644 --- a/js/public/ProfilingFrameIterator.h +++ b/js/public/ProfilingFrameIterator.h @@ -59,14 +59,14 @@ class JS_PUBLIC_API(ProfilingFrameIterator) static const unsigned StorageSpace = 8 * sizeof(void*); mozilla::AlignedStorage storage_; - js::wasm::ProfilingFrameIterator& asmJSIter() { + js::wasm::ProfilingFrameIterator& wasmIter() { MOZ_ASSERT(!done()); - MOZ_ASSERT(isAsmJS()); + MOZ_ASSERT(isWasm()); return *reinterpret_cast(storage_.addr()); } - const js::wasm::ProfilingFrameIterator& asmJSIter() const { + const js::wasm::ProfilingFrameIterator& wasmIter() const { MOZ_ASSERT(!done()); - MOZ_ASSERT(isAsmJS()); + MOZ_ASSERT(isWasm()); return *reinterpret_cast(storage_.addr()); } @@ -114,7 +114,7 @@ class JS_PUBLIC_API(ProfilingFrameIterator) { Frame_Baseline, Frame_Ion, - Frame_AsmJS + Frame_Wasm }; struct Frame @@ -126,7 +126,7 @@ class JS_PUBLIC_API(ProfilingFrameIterator) UniqueChars label; }; - bool isAsmJS() const; + bool isWasm() const; bool isJit() const; uint32_t extractStack(Frame* frames, uint32_t offset, uint32_t end) const; diff --git a/js/src/asmjs/AsmJS.cpp b/js/src/asmjs/AsmJS.cpp index f78e43a4c275..2ec7581f5b80 100644 --- a/js/src/asmjs/AsmJS.cpp +++ b/js/src/asmjs/AsmJS.cpp @@ -8152,7 +8152,7 @@ NewAsmJSModuleFunction(ExclusiveContext* cx, JSFunction* origFun, HandleObject m RootedAtom name(cx, origFun->name()); JSFunction::Flags flags = origFun->isLambda() ? JSFunction::ASMJS_LAMBDA_CTOR - : JSFunction::ASMJS_CTOR; + : JSFunction::WASM_CTOR; JSFunction* moduleFun = NewNativeConstructor(cx, InstantiateAsmJS, origFun->nargs(), name, gc::AllocKind::FUNCTION_EXTENDED, TenuredObject, diff --git a/js/src/asmjs/WasmJS.cpp b/js/src/asmjs/WasmJS.cpp index 1c06eb5983ba..6af0f078b65e 100644 --- a/js/src/asmjs/WasmJS.cpp +++ b/js/src/asmjs/WasmJS.cpp @@ -773,7 +773,7 @@ WasmInstanceObject::getExportedFunction(JSContext* cx, HandleWasmInstanceObject unsigned numArgs = instance.metadata().lookupFuncDefExport(funcDefIndex).sig().args().length(); fun.set(NewNativeConstructor(cx, WasmCall, numArgs, name, gc::AllocKind::FUNCTION_EXTENDED, - SingletonObject, JSFunction::ASMJS_CTOR)); + SingletonObject, JSFunction::WASM_CTOR)); if (!fun) return false; diff --git a/js/src/builtin/TestingFunctions.cpp b/js/src/builtin/TestingFunctions.cpp index 93e9f5e2d3d0..afae28b53e35 100644 --- a/js/src/builtin/TestingFunctions.cpp +++ b/js/src/builtin/TestingFunctions.cpp @@ -1768,8 +1768,8 @@ ReadSPSProfilingStack(JSContext* cx, unsigned argc, Value* vp) case JS::ProfilingFrameIterator::Frame_Ion: frameKindStr = "ion"; break; - case JS::ProfilingFrameIterator::Frame_AsmJS: - frameKindStr = "asmjs"; + case JS::ProfilingFrameIterator::Frame_Wasm: + frameKindStr = "wasm"; break; default: frameKindStr = "unknown"; @@ -4427,7 +4427,7 @@ gc::ZealModeHelpText), "setIonCheckGraphCoherency(bool)", " Set whether Ion should perform graph consistency (DEBUG-only) assertions. These assertions\n" " are valuable and should be generally enabled, however they can be very expensive for large\n" -" (asm.js) programs."), +" (wasm) programs."), JS_FN_HELP("serialize", Serialize, 1, 0, "serialize(data, [transferables, [policy]])", diff --git a/js/src/jsapi.cpp b/js/src/jsapi.cpp index f728f86a5d2a..52f6c937cefe 100644 --- a/js/src/jsapi.cpp +++ b/js/src/jsapi.cpp @@ -3876,7 +3876,7 @@ JS::CompileOptions::CompileOptions(JSContext* cx, JSVersion version) werrorOption = cx->options().werror(); if (!cx->options().asmJS()) asmJSOption = AsmJSOption::Disabled; - else if (cx->compartment()->debuggerObservesAsmJS()) + else if (cx->compartment()->debuggerObservesWasm()) asmJSOption = AsmJSOption::DisabledByDebugger; else asmJSOption = AsmJSOption::Enabled; diff --git a/js/src/jscompartment.cpp b/js/src/jscompartment.cpp index 5a3bc9eb2d35..35a66108d92b 100644 --- a/js/src/jscompartment.cpp +++ b/js/src/jscompartment.cpp @@ -1088,7 +1088,7 @@ JSCompartment::updateDebuggerObservesFlag(unsigned flag) MOZ_ASSERT(isDebuggee()); MOZ_ASSERT(flag == DebuggerObservesAllExecution || flag == DebuggerObservesCoverage || - flag == DebuggerObservesAsmJS); + flag == DebuggerObservesWasm); GlobalObject* global = zone()->runtimeFromMainThread()->gc.isForegroundSweeping() ? unsafeUnbarrieredMaybeGlobal() diff --git a/js/src/jscompartment.h b/js/src/jscompartment.h index cf0d3229bb45..049b740984b7 100644 --- a/js/src/jscompartment.h +++ b/js/src/jscompartment.h @@ -556,7 +556,7 @@ struct JSCompartment enum { IsDebuggee = 1 << 0, DebuggerObservesAllExecution = 1 << 1, - DebuggerObservesAsmJS = 1 << 2, + DebuggerObservesWasm = 1 << 2, DebuggerObservesCoverage = 1 << 3, DebuggerNeedsDelazification = 1 << 4 }; @@ -567,7 +567,7 @@ struct JSCompartment static const unsigned DebuggerObservesMask = IsDebuggee | DebuggerObservesAllExecution | DebuggerObservesCoverage | - DebuggerObservesAsmJS; + DebuggerObservesWasm; void updateDebuggerObservesFlag(unsigned flag); @@ -708,8 +708,8 @@ struct JSCompartment // 1. When a compartment's isDebuggee() == true, relazification and lazy // parsing are disabled. // - // Whether AOT asm.js is disabled is togglable by the Debugger API. By - // default it is disabled. See debuggerObservesAsmJS below. + // Whether AOT wasm is disabled is togglable by the Debugger API. By + // default it is disabled. See debuggerObservesWasm below. // // 2. When a compartment's debuggerObservesAllExecution() == true, all of // the compartment's scripts are considered debuggee scripts. @@ -755,15 +755,15 @@ struct JSCompartment // True if this compartment's global is a debuggee of some Debugger object // whose allowUnobservedAsmJS flag is false. // - // Note that since AOT asm.js functions cannot bail out, this flag really - // means "observe asm.js from this point forward". We cannot make - // already-compiled asm.js code observable to Debugger. - bool debuggerObservesAsmJS() const { - static const unsigned Mask = IsDebuggee | DebuggerObservesAsmJS; + // Note that since AOT wasm functions cannot bail out, this flag really + // means "observe wasm from this point forward". We cannot make + // already-compiled wasm code observable to Debugger. + bool debuggerObservesWasm() const { + static const unsigned Mask = IsDebuggee | DebuggerObservesWasm; return (debugModeBits & Mask) == Mask; } - void updateDebuggerObservesAsmJS() { - updateDebuggerObservesFlag(DebuggerObservesAsmJS); + void updateDebuggerObservesWasm() { + updateDebuggerObservesFlag(DebuggerObservesWasm); } // True if this compartment's global is a debuggee of some Debugger object diff --git a/js/src/jsfun.cpp b/js/src/jsfun.cpp index 1dfa54a8a5c8..2c849c29c5b3 100644 --- a/js/src/jsfun.cpp +++ b/js/src/jsfun.cpp @@ -378,7 +378,7 @@ static const JSPropertySpec function_properties[] = { static bool ResolveInterpretedFunctionPrototype(JSContext* cx, HandleFunction fun, HandleId id) { - MOZ_ASSERT(fun->isInterpreted() || fun->isAsmJSNative()); + MOZ_ASSERT(fun->isInterpreted() || fun->isWasmNative()); MOZ_ASSERT(id == NameToId(cx->names().prototype)); // Assert that fun is not a compiler-created function object, which @@ -919,7 +919,7 @@ js::FindBody(JSContext* cx, HandleFunction fun, HandleLinearString src, size_t* CompileOptions options(cx); options.setFileAndLine("internal-findBody", 0); - // For asm.js modules, there's no script. + // For asm.js/wasm modules, there's no script. if (fun->hasScript()) options.setVersion(fun->nonLazyScript()->getVersion()); diff --git a/js/src/jsfun.h b/js/src/jsfun.h index 1229b42c84e5..16748d40a03a 100644 --- a/js/src/jsfun.h +++ b/js/src/jsfun.h @@ -40,7 +40,7 @@ class JSFunction : public js::NativeObject ClassConstructor, Getter, Setter, - AsmJS, /* function is an asm.js module or exported function */ + Wasm, /* function is wasm module or exported function */ FunctionKindLimit }; @@ -66,7 +66,7 @@ class JSFunction : public js::NativeObject FUNCTION_KIND_SHIFT = 13, FUNCTION_KIND_MASK = 0x7 << FUNCTION_KIND_SHIFT, - ASMJS_KIND = AsmJS << FUNCTION_KIND_SHIFT, + WASM_KIND = Wasm << FUNCTION_KIND_SHIFT, ARROW_KIND = Arrow << FUNCTION_KIND_SHIFT, METHOD_KIND = Method << FUNCTION_KIND_SHIFT, CLASSCONSTRUCTOR_KIND = ClassConstructor << FUNCTION_KIND_SHIFT, @@ -77,8 +77,8 @@ class JSFunction : public js::NativeObject NATIVE_FUN = 0, NATIVE_CTOR = NATIVE_FUN | CONSTRUCTOR, NATIVE_CLASS_CTOR = NATIVE_FUN | CONSTRUCTOR | CLASSCONSTRUCTOR_KIND, - ASMJS_CTOR = ASMJS_KIND | NATIVE_CTOR, - ASMJS_LAMBDA_CTOR = ASMJS_KIND | NATIVE_CTOR | LAMBDA, + WASM_CTOR = WASM_KIND | NATIVE_CTOR, + ASMJS_LAMBDA_CTOR = WASM_KIND | NATIVE_CTOR | LAMBDA, INTERPRETED_METHOD = INTERPRETED | METHOD_KIND, INTERPRETED_METHOD_GENERATOR = INTERPRETED | METHOD_KIND, INTERPRETED_CLASS_CONSTRUCTOR = INTERPRETED | CLASSCONSTRUCTOR_KIND | CONSTRUCTOR, @@ -173,7 +173,7 @@ class JSFunction : public js::NativeObject bool isConstructor() const { return flags() & CONSTRUCTOR; } /* Possible attributes of a native function: */ - bool isAsmJSNative() const { return kind() == AsmJS; } + bool isWasmNative() const { return kind() == Wasm; } /* Possible attributes of an interpreted function: */ bool isExprBody() const { return flags() & EXPR_BODY; } @@ -215,7 +215,7 @@ class JSFunction : public js::NativeObject /* Compound attributes: */ bool isBuiltin() const { - return (isNative() && !isAsmJSNative()) || isSelfHostedBuiltin(); + return (isNative() && !isWasmNative()) || isSelfHostedBuiltin(); } bool isNamedLambda() const { diff --git a/js/src/jsopcode.cpp b/js/src/jsopcode.cpp index 14ddabaa8f0e..fa5d3dfade6f 100644 --- a/js/src/jsopcode.cpp +++ b/js/src/jsopcode.cpp @@ -2160,7 +2160,7 @@ GenerateLcovInfo(JSContext* cx, JSCompartment* comp, GenericPrinter& out) continue; JSFunction& fun = obj->as(); - // Let's skip asm.js for now. + // Let's skip wasm for now. if (!fun.isInterpreted()) continue; diff --git a/js/src/jsscript.cpp b/js/src/jsscript.cpp index 3313979522ab..9156da66753b 100644 --- a/js/src/jsscript.cpp +++ b/js/src/jsscript.cpp @@ -791,7 +791,7 @@ js::XDRScript(XDRState* xdr, HandleScope scriptEnclosingScope, HandleScrip } else if (function->isInterpreted()) { funEnclosingScope = function->nonLazyScript()->enclosingScope(); } else { - MOZ_ASSERT(function->isAsmJSNative()); + MOZ_ASSERT(function->isWasmNative()); return xdr->fail(JS::TranscodeResult_Failure_AsmJSNotSupported); } @@ -3084,7 +3084,7 @@ js::DescribeScriptedCallerForCompilation(JSContext* cx, MutableHandleScript mayb *mutedErrors = iter.mutedErrors(); // These values are only used for introducer fields which are debugging - // information and can be safely left null for asm.js frames. + // information and can be safely left null for wasm frames. if (iter.hasScript()) { maybeScript.set(iter.script()); *pcOffset = iter.pc() - maybeScript->code(); @@ -3210,7 +3210,7 @@ js::detail::CopyScript(JSContext* cx, HandleScript src, HandleScript dst, RootedFunction innerFun(cx, &obj->as()); if (innerFun->isNative()) { if (cx->compartment() != innerFun->compartment()) { - MOZ_ASSERT(innerFun->isAsmJSNative()); + MOZ_ASSERT(innerFun->isWasmNative()); JS_ReportErrorASCII(cx, "AsmJS modules do not yet support cloning."); return false; } diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp index e67672c789c4..495344396e41 100644 --- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -2783,10 +2783,10 @@ Debugger::updateObservesAsmJSOnDebuggees(IsObserving observing) GlobalObject* global = r.front(); JSCompartment* comp = global->compartment(); - if (comp->debuggerObservesAsmJS() == observing) + if (comp->debuggerObservesWasm() == observing) continue; - comp->updateDebuggerObservesAsmJS(); + comp->updateDebuggerObservesWasm(); } } @@ -3479,7 +3479,7 @@ Debugger::setAllowUnobservedAsmJS(JSContext* cx, unsigned argc, Value* vp) for (WeakGlobalObjectSet::Range r = dbg->debuggees.all(); !r.empty(); r.popFront()) { GlobalObject* global = r.front(); JSCompartment* comp = global->compartment(); - comp->updateDebuggerObservesAsmJS(); + comp->updateDebuggerObservesWasm(); } args.rval().setUndefined(); @@ -3931,7 +3931,7 @@ Debugger::addDebuggeeGlobal(JSContext* cx, Handle global) // (6) AutoRestoreCompartmentDebugMode debugModeGuard(debuggeeCompartment); debuggeeCompartment->setIsDebuggee(); - debuggeeCompartment->updateDebuggerObservesAsmJS(); + debuggeeCompartment->updateDebuggerObservesWasm(); debuggeeCompartment->updateDebuggerObservesCoverage(); if (observesAllExecution() && !ensureExecutionObservabilityOfCompartment(cx, debuggeeCompartment)) return false; @@ -4047,7 +4047,7 @@ Debugger::removeDebuggeeGlobal(FreeOp* fop, GlobalObject* global, global->compartment()->unsetIsDebuggee(); } else { global->compartment()->updateDebuggerObservesAllExecution(); - global->compartment()->updateDebuggerObservesAsmJS(); + global->compartment()->updateDebuggerObservesWasm(); global->compartment()->updateDebuggerObservesCoverage(); } } @@ -5626,7 +5626,7 @@ DebuggerScript_getChildScripts(JSContext* cx, unsigned argc, Value* vp) obj = objects->vector[i]; if (obj->is()) { fun = &obj->as(); - // The inner function could be an asm.js native. + // The inner function could be a wasm native. if (fun->isNative()) continue; funScript = GetOrCreateFunctionScript(cx, fun); diff --git a/js/src/vm/HelperThreads.cpp b/js/src/vm/HelperThreads.cpp index dd1f1ddde0d5..674d22fc7f84 100644 --- a/js/src/vm/HelperThreads.cpp +++ b/js/src/vm/HelperThreads.cpp @@ -881,9 +881,9 @@ GlobalHelperThreadState::maxParseThreads() const return 1; // Don't allow simultaneous off thread parses, to reduce contention on the - // atoms table. Note that asm.js compilation depends on this to avoid + // atoms table. Note that wasm compilation depends on this to avoid // stalling the helper thread, as off thread parse tasks can trigger and - // block on other off thread asm.js compilation tasks. + // block on other off thread wasm compilation tasks. return 1; } diff --git a/js/src/vm/HelperThreads.h b/js/src/vm/HelperThreads.h index 9aab5bdbe8c3..eda7feb116f2 100644 --- a/js/src/vm/HelperThreads.h +++ b/js/src/vm/HelperThreads.h @@ -87,7 +87,7 @@ class GlobalHelperThreadState wasm::IonCompileTaskPtrVector wasmWorklist_, wasmFinishedList_; public: - // For now, only allow a single parallel asm.js compilation to happen at a + // For now, only allow a single parallel wasm compilation to happen at a // time. This avoids race conditions on wasmWorklist/wasmFinishedList/etc. mozilla::Atomic wasmCompilationInProgress; diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index 265c86016a74..da9ffc5bd58e 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -383,7 +383,7 @@ JSRuntime::destroyRuntime() /* * Cancel any pending, in progress or completed Ion compilations and - * parse tasks. Waiting for AsmJS and compression tasks is done + * parse tasks. Waiting for wasm and compression tasks is done * synchronously (on the main thread or during parse tasks), so no * explicit canceling is needed for these. */ diff --git a/js/src/vm/Runtime.h b/js/src/vm/Runtime.h index 82f2bb8773d1..f83b07758e0e 100644 --- a/js/src/vm/Runtime.h +++ b/js/src/vm/Runtime.h @@ -616,11 +616,11 @@ struct JSRuntime : public JS::shadow::Runtime, return &interrupt_; } - // Set when handling a segfault in the asm.js signal handler. + // Set when handling a segfault in the wasm signal handler. bool handlingSegFault; private: - // Set when we're handling an interrupt of JIT/asm.js code in + // Set when we're handling an interrupt of JIT/wasm code in // InterruptRunningJitCode. mozilla::Atomic handlingJitInterrupt_; diff --git a/js/src/vm/SPSProfiler.h b/js/src/vm/SPSProfiler.h index 3ecf54be9cd8..b3d00a6d8b61 100644 --- a/js/src/vm/SPSProfiler.h +++ b/js/src/vm/SPSProfiler.h @@ -187,7 +187,7 @@ class SPSProfiler } } - /* Enter asm.js code */ + /* Enter wasm code */ void beginPseudoJS(const char* string, void* sp); void endPseudoJS() { pop(); } diff --git a/js/src/vm/SavedStacks.cpp b/js/src/vm/SavedStacks.cpp index 08f51c9916a6..033536892785 100644 --- a/js/src/vm/SavedStacks.cpp +++ b/js/src/vm/SavedStacks.cpp @@ -1512,7 +1512,7 @@ SavedStacks::getLocation(JSContext* cx, const FrameIter& iter, // When we have a |JSScript| for this frame, use a potentially memoized // location from our PCLocationMap and copy it into |locationp|. When we do - // not have a |JSScript| for this frame (asm.js frames), we take a slow path + // not have a |JSScript| for this frame (wasm frames), we take a slow path // that doesn't employ memoization, and update |locationp|'s slots directly. if (!iter.hasScript()) { diff --git a/js/src/vm/SavedStacks.h b/js/src/vm/SavedStacks.h index 6abe88a5a934..57b56081bfb4 100644 --- a/js/src/vm/SavedStacks.h +++ b/js/src/vm/SavedStacks.h @@ -301,7 +301,7 @@ class SavedStacks { }; // We eagerly Atomize the script source stored in LocationValue because - // asm.js does not always have a JSScript and the source might not be + // wasm does not always have a JSScript and the source might not be // available when we need it later. However, since the JSScript does not // actually hold this atom, we have to trace it strongly to keep it alive. // Thus, it takes two GC passes to fully clean up this table: the first GC diff --git a/js/src/vm/Stack.cpp b/js/src/vm/Stack.cpp index 4a01170aeba9..f96b43fce9e0 100644 --- a/js/src/vm/Stack.cpp +++ b/js/src/vm/Stack.cpp @@ -1763,7 +1763,7 @@ JS::ProfilingFrameIterator::operator++() MOZ_ASSERT(activation_->isWasm() || activation_->isJit()); if (activation_->isWasm()) { - ++asmJSIter(); + ++wasmIter(); settle(); return; } @@ -1829,7 +1829,7 @@ JS::ProfilingFrameIterator::iteratorDestroy() MOZ_ASSERT(activation_->isWasm() || activation_->isJit()); if (activation_->isWasm()) { - asmJSIter().~ProfilingFrameIterator(); + wasmIter().~ProfilingFrameIterator(); return; } @@ -1845,7 +1845,7 @@ JS::ProfilingFrameIterator::iteratorDone() MOZ_ASSERT(activation_->isWasm() || activation_->isJit()); if (activation_->isWasm()) - return asmJSIter().done(); + return wasmIter().done(); return jitIter().done(); } @@ -1857,7 +1857,7 @@ JS::ProfilingFrameIterator::stackAddress() const MOZ_ASSERT(activation_->isWasm() || activation_->isJit()); if (activation_->isWasm()) - return asmJSIter().stackAddress(); + return wasmIter().stackAddress(); return jitIter().stackAddress(); } @@ -1867,9 +1867,9 @@ JS::ProfilingFrameIterator::getPhysicalFrameAndEntry(jit::JitcodeGlobalEntry* en { void* stackAddr = stackAddress(); - if (isAsmJS()) { + if (isWasm()) { Frame frame; - frame.kind = Frame_AsmJS; + frame.kind = Frame_Wasm; frame.stackAddress = stackAddr; frame.returnAddress = nullptr; frame.activation = activation_; @@ -1913,9 +1913,9 @@ JS::ProfilingFrameIterator::extractStack(Frame* frames, uint32_t offset, uint32_ if (physicalFrame.isNothing()) return 0; - if (isAsmJS()) { + if (isWasm()) { frames[offset] = mozilla::Move(physicalFrame.ref()); - frames[offset].label = DuplicateString(asmJSIter().label()); + frames[offset].label = DuplicateString(wasmIter().label()); if (!frames[offset].label) return 0; // Drop stack frames silently on OOM. return 1; @@ -1946,7 +1946,7 @@ JS::ProfilingFrameIterator::getPhysicalFrameWithoutLabel() const } bool -JS::ProfilingFrameIterator::isAsmJS() const +JS::ProfilingFrameIterator::isWasm() const { MOZ_ASSERT(!done()); return activation_->isWasm(); diff --git a/js/src/vm/Stack.h b/js/src/vm/Stack.h index 70ad440f7004..a39fd1d3d7a9 100644 --- a/js/src/vm/Stack.h +++ b/js/src/vm/Stack.h @@ -1677,11 +1677,11 @@ class WasmActivation : public Activation return true; } - // Returns a pointer to the base of the innermost stack frame of asm.js code + // Returns a pointer to the base of the innermost stack frame of wasm code // in this activation. uint8_t* fp() const { return fp_; } - // Returns the reason why asm.js code called out of asm.js code. + // Returns the reason why wasm code called out of wasm code. wasm::ExitReason exitReason() const { return exitReason_; } // Read by JIT code: @@ -1710,7 +1710,7 @@ class WasmActivation : public Activation // Additionally, there are derived FrameIter types that automatically skip // certain frames: // - ScriptFrameIter only shows frames that have an associated JSScript -// (currently everything other than asm.js stack frames). When !hasScript(), +// (currently everything other than wasm stack frames). When !hasScript(), // clients must stick to the portion of the // interface marked below. // - NonBuiltinScriptFrameIter additionally filters out builtin (self-hosted) diff --git a/tools/profiler/core/GeckoSampler.cpp b/tools/profiler/core/GeckoSampler.cpp index 351dc98fd362..70f6047b0f52 100644 --- a/tools/profiler/core/GeckoSampler.cpp +++ b/tools/profiler/core/GeckoSampler.cpp @@ -782,7 +782,7 @@ void mergeStacksIntoProfile(ThreadProfile& aProfile, TickSample* aSample, Native startBufferGen); for (; jsCount < maxFrames && !jsIter.done(); ++jsIter) { // See note below regarding 'J' entries. - if (aSample->isSamplingCurrentThread || jsIter.isAsmJS()) { + if (aSample->isSamplingCurrentThread || jsIter.isWasm()) { uint32_t extracted = jsIter.extractStack(jsFrames, jsCount, maxFrames); jsCount += extracted; if (jsCount == maxFrames) @@ -886,7 +886,7 @@ void mergeStacksIntoProfile(ThreadProfile& aProfile, TickSample* aSample, Native MOZ_ASSERT(jsIndex >= 0); const JS::ProfilingFrameIterator::Frame& jsFrame = jsFrames[jsIndex]; - // Stringifying non-asm.js JIT frames is delayed until streaming + // Stringifying non-wasm JIT frames is delayed until streaming // time. To re-lookup the entry in the JitcodeGlobalTable, we need to // store the JIT code address ('J') in the circular buffer. // @@ -900,7 +900,7 @@ void mergeStacksIntoProfile(ThreadProfile& aProfile, TickSample* aSample, Native // the buffer, nsRefreshDriver would now be holding on to a backtrace // with stale JIT code return addresses. if (aSample->isSamplingCurrentThread || - jsFrame.kind == JS::ProfilingFrameIterator::Frame_AsmJS) { + jsFrame.kind == JS::ProfilingFrameIterator::Frame_Wasm) { addDynamicTag(aProfile, 'c', jsFrame.label.get()); } else { MOZ_ASSERT(jsFrame.kind == JS::ProfilingFrameIterator::Frame_Ion ||