Bug 834701 - Remove the XBL bit from spidermonkey. r=luke
authorBobby Holley <bobbyholley@gmail.com>
Mon, 20 May 2013 22:34:18 -0600
changeset 139607 a701f70457806d2b1876c32b2d230d6a8f41270d
parent 139606 da67b0f5dd1e37a6739447b4ceeedd547bd9a9ae
child 139608 b54ce66659aa483f4568f3175b6d960abf7900ee
push id3911
push userakeybl@mozilla.com
push dateMon, 24 Jun 2013 20:17:26 +0000
treeherdermozilla-aurora@7e26ca8db92b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs834701
milestone24.0a1
Bug 834701 - Remove the XBL bit from spidermonkey. r=luke
js/src/frontend/BytecodeEmitter.cpp
js/src/jsapi.cpp
js/src/jsapi.h
js/src/jsdbgapi.cpp
js/src/jsdbgapi.h
js/src/jsscript.cpp
js/src/jsscript.h
--- a/js/src/frontend/BytecodeEmitter.cpp
+++ b/js/src/frontend/BytecodeEmitter.cpp
@@ -4351,18 +4351,17 @@ EmitFunc(JSContext *cx, BytecodeEmitter 
         // Inherit most things (principals, version, etc) from the parent.
         Rooted<JSScript*> parent(cx, bce->script);
         CompileOptions options(cx);
         options.setPrincipals(parent->principals())
                .setOriginPrincipals(parent->originPrincipals)
                .setCompileAndGo(parent->compileAndGo)
                .setSelfHostingMode(parent->selfHosted)
                .setNoScriptRval(false)
-               .setVersion(parent->getVersion())
-               .setUserBit(parent->userBit);
+               .setVersion(parent->getVersion());
 
         bool generateBytecode = true;
 #ifdef JS_ION
         if (funbox->useAsm) {
             RootedFunction moduleFun(cx);
 
             // In a function like this:
             //
--- a/js/src/jsapi.cpp
+++ b/js/src/jsapi.cpp
@@ -5257,17 +5257,16 @@ JS::CompileOptions::CompileOptions(JSCon
       versionSet(false),
       utf8(false),
       filename(NULL),
       lineno(1),
       compileAndGo(cx->hasOption(JSOPTION_COMPILE_N_GO)),
       forEval(false),
       noScriptRval(cx->hasOption(JSOPTION_NO_SCRIPT_RVAL)),
       selfHostingMode(false),
-      userBit(false),
       sourcePolicy(SAVE_SOURCE)
 {
 }
 
 JSScript *
 JS::Compile(JSContext *cx, HandleObject obj, CompileOptions options,
             const jschar *chars, size_t length)
 {
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -3882,17 +3882,16 @@ struct JS_PUBLIC_API(CompileOptions) {
     bool versionSet;
     bool utf8;
     const char *filename;
     unsigned lineno;
     bool compileAndGo;
     bool forEval;
     bool noScriptRval;
     bool selfHostingMode;
-    bool userBit;
     enum SourcePolicy {
         NO_SOURCE,
         LAZY_SOURCE,
         SAVE_SOURCE
     } sourcePolicy;
 
     explicit CompileOptions(JSContext *cx);
     CompileOptions &setPrincipals(JSPrincipals *p) { principals = p; return *this; }
@@ -3901,17 +3900,16 @@ struct JS_PUBLIC_API(CompileOptions) {
     CompileOptions &setUTF8(bool u) { utf8 = u; return *this; }
     CompileOptions &setFileAndLine(const char *f, unsigned l) {
         filename = f; lineno = l; return *this;
     }
     CompileOptions &setCompileAndGo(bool cng) { compileAndGo = cng; return *this; }
     CompileOptions &setForEval(bool eval) { forEval = eval; return *this; }
     CompileOptions &setNoScriptRval(bool nsr) { noScriptRval = nsr; return *this; }
     CompileOptions &setSelfHostingMode(bool shm) { selfHostingMode = shm; return *this; }
-    CompileOptions &setUserBit(bool bit) { userBit = bit; return *this; }
     CompileOptions &setSourcePolicy(SourcePolicy sp) { sourcePolicy = sp; return *this; }
 };
 
 extern JS_PUBLIC_API(JSScript *)
 Compile(JSContext *cx, JSHandleObject obj, CompileOptions options,
         const char *bytes, size_t length);
 
 extern JS_PUBLIC_API(JSScript *)
--- a/js/src/jsdbgapi.cpp
+++ b/js/src/jsdbgapi.cpp
@@ -595,28 +595,16 @@ JS_GetScriptLineExtent(JSContext *cx, JS
 
 JS_PUBLIC_API(JSVersion)
 JS_GetScriptVersion(JSContext *cx, JSScript *script)
 {
     return VersionNumber(script->getVersion());
 }
 
 JS_PUBLIC_API(bool)
-JS_GetScriptUserBit(JSScript *script)
-{
-    return script->userBit;
-}
-
-JS_PUBLIC_API(void)
-JS_SetScriptUserBit(JSScript *script, bool b)
-{
-    script->userBit = b;
-}
-
-JS_PUBLIC_API(bool)
 JS_GetScriptIsSelfHosted(JSScript *script)
 {
     return script->selfHosted;
 }
 
 /***************************************************************************/
 
 JS_PUBLIC_API(void)
--- a/js/src/jsdbgapi.h
+++ b/js/src/jsdbgapi.h
@@ -220,22 +220,16 @@ JS_GetScriptBaseLineNumber(JSContext *cx
 
 extern JS_PUBLIC_API(unsigned)
 JS_GetScriptLineExtent(JSContext *cx, JSScript *script);
 
 extern JS_PUBLIC_API(JSVersion)
 JS_GetScriptVersion(JSContext *cx, JSScript *script);
 
 extern JS_PUBLIC_API(bool)
-JS_GetScriptUserBit(JSScript *script);
-
-extern JS_PUBLIC_API(void)
-JS_SetScriptUserBit(JSScript *script, bool b);
-
-extern JS_PUBLIC_API(bool)
 JS_GetScriptIsSelfHosted(JSScript *script);
 
 /************************************************************************/
 
 /*
  * Hook setters for script creation and destruction, see jsprvtd.h for the
  * typedefs.  These macros provide binary compatibility and newer, shorter
  * synonyms.
--- a/js/src/jsscript.cpp
+++ b/js/src/jsscript.cpp
@@ -1672,17 +1672,16 @@ JSScript::Create(JSContext *cx, HandleOb
         JS_ReportErrorNumber(cx, js_GetErrorMessage, NULL, JSMSG_TOO_DEEP, js_function_str);
         return NULL;
     }
     script->staticLevel = uint16_t(staticLevel);
 
     script->setScriptSource(ss);
     script->sourceStart = bufStart;
     script->sourceEnd = bufEnd;
-    script->userBit = options.userBit;
 
     return script;
 }
 
 static inline uint8_t *
 AllocScriptData(JSContext *cx, size_t size)
 {
     uint8_t *data = static_cast<uint8_t *>(cx->calloc_(JS_ROUNDUP(size, sizeof(Value))));
@@ -2303,18 +2302,17 @@ js::CloneScript(JSContext *cx, HandleObj
     /* Now that all fallible allocation is complete, create the GC thing. */
 
     CompileOptions options(cx);
     options.setPrincipals(cx->compartment->principals)
            .setOriginPrincipals(src->originPrincipals)
            .setCompileAndGo(src->compileAndGo)
            .setSelfHostingMode(src->selfHosted)
            .setNoScriptRval(src->noScriptRval)
-           .setVersion(src->getVersion())
-           .setUserBit(src->userBit);
+           .setVersion(src->getVersion());
     RootedScript dst(cx, JSScript::Create(cx, enclosingScope, src->savedCallerFun,
                                           options, src->staticLevel,
                                           src->scriptSource(), src->sourceStart, src->sourceEnd));
     if (!dst) {
         js_free(data);
         return NULL;
     }
 
--- a/js/src/jsscript.h
+++ b/js/src/jsscript.h
@@ -436,17 +436,16 @@ class JSScript : public js::gc::Cell
     bool            isGenerator:1;    /* is a generator */
     bool            isGeneratorExp:1; /* is a generator expression */
     bool            hasScriptCounts:1;/* script has an entry in
                                          JSCompartment::scriptCountsMap */
     bool            hasDebugScript:1; /* script has an entry in
                                          JSCompartment::debugScriptMap */
     bool            hasFreezeConstraints:1; /* freeze constraints for stack
                                              * type sets have been generated */
-    bool            userBit:1; /* Opaque, used by the embedding. */
 
   private:
     /* See comments below. */
     bool            argsHasVarBinding_:1;
     bool            needsArgsAnalysis_:1;
     bool            needsArgsObj_:1;
 
     //