Bug 890192 (part 2) - Slim down jsscriptinlines.h. r=terrence.
authorNicholas Nethercote <nnethercote@mozilla.com>
Wed, 03 Jul 2013 19:47:14 -0700
changeset 137594 4268cb0b521a0f964d2aa725ee01d938c5de3bf8
parent 137593 bbb77123a5851cb2b1de5a440b292c81a49d77ae
child 137595 c6eefbf2bf43be831d961ad3af040810024f1ce4
push id30604
push usernnethercote@mozilla.com
push dateMon, 08 Jul 2013 01:34:20 +0000
treeherdermozilla-inbound@e5d26a0da6e9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs890192
milestone25.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 890192 (part 2) - Slim down jsscriptinlines.h. r=terrence.
js/src/jsscript.h
js/src/jsscriptinlines.h
--- a/js/src/jsscript.h
+++ b/js/src/jsscript.h
@@ -946,17 +946,25 @@ class JSScript : public js::gc::Cell
         return arr->vector[index];
     }
 
     /*
      * The isEmpty method tells whether this script has code that computes any
      * result (not return value, result AKA normal completion value) other than
      * JSVAL_VOID, or any other effects.
      */
-    inline bool isEmpty() const;
+    bool isEmpty() const {
+        if (length > 3)
+            return false;
+
+        jsbytecode *pc = code;
+        if (noScriptRval && JSOp(*pc) == JSOP_FALSE)
+            ++pc;
+        return JSOp(*pc) == JSOP_STOP;
+    }
 
     bool varIsAliased(unsigned varSlot);
     bool formalIsAliased(unsigned argSlot);
     bool formalLivesInArgumentsObject(unsigned argSlot);
 
   private:
     /*
      * Recompile with or without single-stepping support, as directed
--- a/js/src/jsscriptinlines.h
+++ b/js/src/jsscriptinlines.h
@@ -103,28 +103,16 @@ JSScript::getRegExp(size_t index)
 {
     js::ObjectArray *arr = regexps();
     JS_ASSERT(uint32_t(index) < arr->length);
     JSObject *obj = arr->vector[index];
     JS_ASSERT(obj->is<js::RegExpObject>());
     return (js::RegExpObject *) obj;
 }
 
-inline bool
-JSScript::isEmpty() const
-{
-    if (length > 3)
-        return false;
-
-    jsbytecode *pc = code;
-    if (noScriptRval && JSOp(*pc) == JSOP_FALSE)
-        ++pc;
-    return JSOp(*pc) == JSOP_STOP;
-}
-
 inline js::GlobalObject &
 JSScript::global() const
 {
     /*
      * A JSScript always marks its compartment's global (via bindings) so we
      * can assert that maybeGlobal is non-null here.
      */
     return *compartment()->maybeGlobal();