Bug 1070962 part 2 - Remove GetTopIonJSScript overloads. r=jandem
authorNicolas B. Pierron <nicolas.b.pierron@mozilla.com>
Mon, 13 Oct 2014 17:33:59 +0200
changeset 210191 82d31104b072fffb8477ee5490e61291d6399654
parent 210190 aa3aa08cca9ab8e6d33a02aa31d1494e07b5d9d1
child 210192 553feb23aa52b8e3560657d2bd0968ecd58a838f
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersjandem
bugs1070962
milestone35.0a1
Bug 1070962 part 2 - Remove GetTopIonJSScript overloads. r=jandem
js/src/jit/IonFrames-inl.h
js/src/jit/IonFrames.h
--- a/js/src/jit/IonFrames-inl.h
+++ b/js/src/jit/IonFrames-inl.h
@@ -75,24 +75,12 @@ GetTopBaselineFrame(JSContext *cx)
     MOZ_ASSERT(iter.type() == JitFrame_Exit);
     ++iter;
     if (iter.isBaselineStub())
         ++iter;
     MOZ_ASSERT(iter.isBaselineJS());
     return iter.baselineFrame();
 }
 
-inline JSScript *
-GetTopIonJSScript(JSContext *cx, void **returnAddrOut = nullptr)
-{
-    return GetTopIonJSScript(cx->mainThread().jitTop, returnAddrOut, SequentialExecution);
-}
-
-inline JSScript *
-GetTopIonJSScript(ForkJoinContext *cx, void **returnAddrOut = nullptr)
-{
-    return GetTopIonJSScript(cx->perThreadData->jitTop, returnAddrOut, ParallelExecution);
-}
-
 } // namespace jit
 } // namespace js
 
 #endif /* jit_IonFrames_inl_h */
--- a/js/src/jit/IonFrames.h
+++ b/js/src/jit/IonFrames.h
@@ -287,19 +287,19 @@ void UpdateJitActivationsForMinorGC(PerT
 static inline uint32_t
 MakeFrameDescriptor(uint32_t frameSize, FrameType type)
 {
     return (frameSize << FRAMESIZE_SHIFT) | type;
 }
 
 // Returns the JSScript associated with the topmost Ion frame.
 inline JSScript *
-GetTopIonJSScript(uint8_t *jitTop, void **returnAddrOut, ExecutionMode mode)
+GetTopIonJSScript(ThreadSafeContext *cx, void **returnAddrOut = nullptr)
 {
-    JitFrameIterator iter(jitTop, mode);
+    JitFrameIterator iter(cx);
     MOZ_ASSERT(iter.type() == JitFrame_Exit);
     ++iter;
 
     MOZ_ASSERT(iter.returnAddressToFp() != nullptr);
     if (returnAddrOut)
         *returnAddrOut = (void *) iter.returnAddressToFp();
 
     if (iter.isBaselineStub()) {