Bug 845226 - Move inlined functions into jsscriptinlines.h r=dvander
authorNicholas D. Matsakis <nmatsakis@mozilla.com>
Tue, 26 Feb 2013 16:42:43 -0500
changeset 123087 f246412bcadb5e89555cc0cc3eb8d7743fe94c2d
parent 123086 c5dd0f5ef51766032cdb890dc34b1a7bf828315b
child 123088 83c19059e39674a7fd843dd5cf7698b69d0d4d09
push id24372
push useremorley@mozilla.com
push dateWed, 27 Feb 2013 13:22:59 +0000
treeherdermozilla-central@0a91da5f5eab [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs845226
milestone22.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 845226 - Move inlined functions into jsscriptinlines.h r=dvander
js/src/jsscript.h
js/src/jsscriptinlines.h
--- a/js/src/jsscript.h
+++ b/js/src/jsscript.h
@@ -624,26 +624,18 @@ class JSScript : public js::gc::Cell
 
     /*
      * Original compiled function for the script, if it has a function.
      * NULL for global and eval scripts.
      */
     JSFunction *function() const { return function_; }
     void setFunction(JSFunction *fun);
 
-    JSFunction *originalFunction() const {
-        if (!isCallsiteClone)
-            return NULL;
-        return enclosingScopeOrOriginalFunction_->toFunction();
-    }
-    void setOriginalFunctionObject(JSObject *fun) {
-        JS_ASSERT(isCallsiteClone);
-        JS_ASSERT(fun->isFunction());
-        enclosingScopeOrOriginalFunction_ = fun;
-    }
+    JSFunction *originalFunction() const;
+    void setOriginalFunctionObject(JSObject *fun);
 
     JSFlatString *sourceData(JSContext *cx);
 
     static bool loadSource(JSContext *cx, js::HandleScript scr, bool *worked);
 
     js::ScriptSource *scriptSource() {
         return scriptSource_;
     }
--- a/js/src/jsscriptinlines.h
+++ b/js/src/jsscriptinlines.h
@@ -201,9 +201,23 @@ JSScript::writeBarrierPost(js::UnrootedS
 }
 
 inline JSPrincipals *
 JSScript::principals()
 {
     return compartment()->principals;
 }
 
+inline JSFunction *
+JSScript::originalFunction() const {
+    if (!isCallsiteClone)
+        return NULL;
+    return enclosingScopeOrOriginalFunction_->toFunction();
+}
+
+inline void
+JSScript::setOriginalFunctionObject(JSObject *fun) {
+    JS_ASSERT(isCallsiteClone);
+    JS_ASSERT(fun->isFunction());
+    enclosingScopeOrOriginalFunction_ = fun;
+}
+
 #endif /* jsscriptinlines_h___ */