Bug 1304672: Undo the renaming of debuggerObservesAsmJS => Wasm; r=luke
authorBenjamin Bouvier <benj@benj.me>
Wed, 09 Nov 2016 17:31:54 +0100
changeset 348618 56f7c0be1ddaab2c5e3752814443c206c23f6e9c
parent 348617 56280cec9fe25cd3da50e3efc2e131c75b2bef66
child 348619 f0b9e37236b5fc5df582b72942916241f1ece3de
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs1304672
milestone52.0a1
Bug 1304672: Undo the renaming of debuggerObservesAsmJS => Wasm; r=luke MozReview-Commit-ID: 1vxk30n72Zf
js/src/jsapi.cpp
js/src/jscompartment.cpp
js/src/jscompartment.h
js/src/vm/Debugger.cpp
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -3888,17 +3888,17 @@ JS::CompileOptions::CompileOptions(JSCon
 {
     this->version = (version != JSVERSION_UNKNOWN) ? version : cx->findVersion();
 
     strictOption = cx->options().strictMode();
     extraWarningsOption = cx->compartment()->behaviors().extraWarnings(cx);
     werrorOption = cx->options().werror();
     if (!cx->options().asmJS())
         asmJSOption = AsmJSOption::Disabled;
-    else if (cx->compartment()->debuggerObservesWasm())
+    else if (cx->compartment()->debuggerObservesAsmJS())
         asmJSOption = AsmJSOption::DisabledByDebugger;
     else
         asmJSOption = AsmJSOption::Enabled;
     throwOnAsmJSValidationFailureOption = cx->options().throwOnAsmJSValidationFailure();
 }
 
 static bool
 Compile(JSContext* cx, const ReadOnlyCompileOptions& options, ScopeKind scopeKind,
--- a/js/src/jscompartment.cpp
+++ b/js/src/jscompartment.cpp
@@ -1083,17 +1083,17 @@ JSCompartment::ensureDelazifyScriptsForD
 }
 
 void
 JSCompartment::updateDebuggerObservesFlag(unsigned flag)
 {
     MOZ_ASSERT(isDebuggee());
     MOZ_ASSERT(flag == DebuggerObservesAllExecution ||
                flag == DebuggerObservesCoverage ||
-               flag == DebuggerObservesWasm);
+               flag == DebuggerObservesAsmJS);
 
     GlobalObject* global = zone()->runtimeFromMainThread()->gc.isForegroundSweeping()
                            ? unsafeUnbarrieredMaybeGlobal()
                            : maybeGlobal();
     const GlobalObject::DebuggerVector* v = global->getDebuggers();
     for (auto p = v->begin(); p != v->end(); p++) {
         Debugger* dbg = *p;
         if (flag == DebuggerObservesAllExecution ? dbg->observesAllExecution() :
--- a/js/src/jscompartment.h
+++ b/js/src/jscompartment.h
@@ -551,28 +551,28 @@ struct JSCompartment
      * slot for the former, or a special slot for the latter.
      */
     JSObject*                    gcIncomingGrayPointers;
 
   private:
     enum {
         IsDebuggee = 1 << 0,
         DebuggerObservesAllExecution = 1 << 1,
-        DebuggerObservesWasm = 1 << 2,
+        DebuggerObservesAsmJS = 1 << 2,
         DebuggerObservesCoverage = 1 << 3,
         DebuggerNeedsDelazification = 1 << 4
     };
 
     unsigned debugModeBits;
     friend class AutoRestoreCompartmentDebugMode;
 
     static const unsigned DebuggerObservesMask = IsDebuggee |
                                                  DebuggerObservesAllExecution |
                                                  DebuggerObservesCoverage |
-                                                 DebuggerObservesWasm;
+                                                 DebuggerObservesAsmJS;
 
     void updateDebuggerObservesFlag(unsigned flag);
 
     bool getNonWrapperObjectForCurrentCompartment(JSContext* cx, js::MutableHandleObject obj);
     bool getOrCreateWrapper(JSContext* cx, js::HandleObject existing, js::MutableHandleObject obj);
 
   public:
     JSCompartment(JS::Zone* zone, const JS::CompartmentOptions& options);
@@ -704,17 +704,17 @@ struct JSCompartment
     // invariants of JSCompartment's debug mode bits, JSScript::isDebuggee,
     // InterpreterFrame::isDebuggee, and BaselineFrame::isDebuggee are
     // enumerated below.
     //
     // 1. When a compartment's isDebuggee() == true, relazification and lazy
     //    parsing are disabled.
     //
     //    Whether AOT wasm is disabled is togglable by the Debugger API. By
-    //    default it is disabled. See debuggerObservesWasm below.
+    //    default it is disabled. See debuggerObservesAsmJS below.
     //
     // 2. When a compartment's debuggerObservesAllExecution() == true, all of
     //    the compartment's scripts are considered debuggee scripts.
     //
     // 3. A script is considered a debuggee script either when, per above, its
     //    compartment is observing all execution, or if it has breakpoints set.
     //
     // 4. A debuggee script always pushes a debuggee frame.
@@ -753,22 +753,22 @@ struct JSCompartment
     }
 
     // True if this compartment's global is a debuggee of some Debugger object
     // whose allowUnobservedAsmJS flag is false.
     //
     // 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;
+    bool debuggerObservesAsmJS() const {
+        static const unsigned Mask = IsDebuggee | DebuggerObservesAsmJS;
         return (debugModeBits & Mask) == Mask;
     }
-    void updateDebuggerObservesWasm() {
-        updateDebuggerObservesFlag(DebuggerObservesWasm);
+    void updateDebuggerObservesAsmJS() {
+        updateDebuggerObservesFlag(DebuggerObservesAsmJS);
     }
 
     // True if this compartment's global is a debuggee of some Debugger object
     // whose collectCoverageInfo flag is true.
     bool debuggerObservesCoverage() const {
         static const unsigned Mask = DebuggerObservesCoverage;
         return (debugModeBits & Mask) == Mask;
     }
--- a/js/src/vm/Debugger.cpp
+++ b/js/src/vm/Debugger.cpp
@@ -2777,20 +2777,20 @@ Debugger::updateObservesCoverageOnDebugg
 
 void
 Debugger::updateObservesAsmJSOnDebuggees(IsObserving observing)
 {
     for (WeakGlobalObjectSet::Range r = debuggees.all(); !r.empty(); r.popFront()) {
         GlobalObject* global = r.front();
         JSCompartment* comp = global->compartment();
 
-        if (comp->debuggerObservesWasm() == observing)
+        if (comp->debuggerObservesAsmJS() == observing)
             continue;
 
-        comp->updateDebuggerObservesWasm();
+        comp->updateDebuggerObservesAsmJS();
     }
 }
 
 
 /*** Allocations Tracking *************************************************************************/
 
 /* static */ bool
 Debugger::cannotTrackAllocations(const GlobalObject& global)
@@ -3473,17 +3473,17 @@ Debugger::setAllowUnobservedAsmJS(JSCont
     THIS_DEBUGGER(cx, argc, vp, "set allowUnobservedAsmJS", args, dbg);
     if (!args.requireAtLeast(cx, "Debugger.set allowUnobservedAsmJS", 1))
         return false;
     dbg->allowUnobservedAsmJS = ToBoolean(args[0]);
 
     for (WeakGlobalObjectSet::Range r = dbg->debuggees.all(); !r.empty(); r.popFront()) {
         GlobalObject* global = r.front();
         JSCompartment* comp = global->compartment();
-        comp->updateDebuggerObservesWasm();
+        comp->updateDebuggerObservesAsmJS();
     }
 
     args.rval().setUndefined();
     return true;
 }
 
 /* static */ bool
 Debugger::getCollectCoverageInfo(JSContext* cx, unsigned argc, Value* vp)
@@ -3925,17 +3925,17 @@ Debugger::addDebuggeeGlobal(JSContext* c
     auto allocationsTrackingGuard = MakeScopeExit([&] {
         if (trackingAllocationSites && enabled)
             Debugger::removeAllocationsTracking(*global);
     });
 
     // (6)
     AutoRestoreCompartmentDebugMode debugModeGuard(debuggeeCompartment);
     debuggeeCompartment->setIsDebuggee();
-    debuggeeCompartment->updateDebuggerObservesWasm();
+    debuggeeCompartment->updateDebuggerObservesAsmJS();
     debuggeeCompartment->updateDebuggerObservesCoverage();
     if (observesAllExecution() && !ensureExecutionObservabilityOfCompartment(cx, debuggeeCompartment))
         return false;
 
     globalDebuggersGuard.release();
     debuggeesGuard.release();
     zoneDebuggersGuard.release();
     debuggeeZonesGuard.release();
@@ -4041,17 +4041,17 @@ Debugger::removeDebuggeeGlobal(FreeOp* f
      */
     if (trackingAllocationSites)
         Debugger::removeAllocationsTracking(*global);
 
     if (global->getDebuggers()->empty()) {
         global->compartment()->unsetIsDebuggee();
     } else {
         global->compartment()->updateDebuggerObservesAllExecution();
-        global->compartment()->updateDebuggerObservesWasm();
+        global->compartment()->updateDebuggerObservesAsmJS();
         global->compartment()->updateDebuggerObservesCoverage();
     }
 }
 
 
 static inline DebuggerSourceReferent GetSourceReferent(JSObject* obj);
 
 /*