Bug 808519 part 1 - Rename IonFrame_JS to IonFrame_OptimizedJS. r=dvander
authorJan de Mooij <jdemooij@mozilla.com>
Mon, 05 Nov 2012 17:35:10 +0100
changeset 112314 1cc2de645efdb3672bca63702742c54d91ca669c
parent 112313 041c8232bdcbc829664cf92541eb2feaf73aa9f1
child 112315 9a13c51926cd2b73f6e98652b96b922330f30e7d
push id23812
push useremorley@mozilla.com
push dateTue, 06 Nov 2012 14:01:34 +0000
treeherdermozilla-central@f4aeed115e54 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs808519
milestone19.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 808519 part 1 - Rename IonFrame_JS to IonFrame_OptimizedJS. r=dvander
js/src/ion/Bailouts.cpp
js/src/ion/CodeGenerator.cpp
js/src/ion/Ion.cpp
js/src/ion/IonFrameIterator.h
js/src/ion/IonFrames-inl.h
js/src/ion/IonFrames.cpp
js/src/ion/arm/Bailouts-arm.cpp
js/src/ion/arm/MacroAssembler-arm.cpp
js/src/ion/shared/MacroAssembler-x86-shared.h
js/src/ion/x64/Bailouts-x64.cpp
js/src/ion/x64/MacroAssembler-x64.h
js/src/ion/x86/Bailouts-x86.cpp
js/src/ion/x86/MacroAssembler-x86.h
--- a/js/src/ion/Bailouts.cpp
+++ b/js/src/ion/Bailouts.cpp
@@ -56,17 +56,17 @@ InlineFrameIterator::InlineFrameIterator
         start_ = SnapshotIterator(*iter);
         findNextFrame();
     }
 }
 
 void
 IonBailoutIterator::dump() const
 {
-    if (type_ == IonFrame_JS) {
+    if (type_ == IonFrame_OptimizedJS) {
         InlineFrameIterator frames(this);
         for (;;) {
             frames.dump();
             if (!frames.more())
                 break;
             ++frames;
         }
     } else {
@@ -345,17 +345,17 @@ EnsureExitFrame(IonCommonFrameLayout *fr
         // The rectifier code uses the frame descriptor to discard its stack,
         // so modifying its descriptor size here would be dangerous. Instead,
         // we change the frame type, and teach the stack walking code how to
         // deal with this edge case. bug 717297 would obviate the need
         frame->changePrevType(IonFrame_Bailed_Rectifier);
         return;
     }
 
-    JS_ASSERT(frame->prevType() == IonFrame_JS);
+    JS_ASSERT(frame->prevType() == IonFrame_OptimizedJS);
     frame->changePrevType(IonFrame_Bailed_JS);
 }
 
 uint32
 ion::Bailout(BailoutStack *sp)
 {
     AssertCanGC();
     JSContext *cx = GetIonContext()->cx;
--- a/js/src/ion/CodeGenerator.cpp
+++ b/js/src/ion/CodeGenerator.cpp
@@ -837,17 +837,17 @@ CodeGenerator::visitCallGeneric(LCallGen
 
     // Guard that the IonScript has been compiled.
     masm.branchPtr(Assembler::BelowOrEqual, objreg, ImmWord(ION_COMPILING_SCRIPT), &invoke);
 
     // Nestle the StackPointer up to the argument vector.
     masm.freeStack(unusedStack);
 
     // Construct the IonFramePrefix.
-    uint32 descriptor = MakeFrameDescriptor(masm.framePushed(), IonFrame_JS);
+    uint32 descriptor = MakeFrameDescriptor(masm.framePushed(), IonFrame_OptimizedJS);
     masm.Push(Imm32(call->numActualArgs()));
     masm.Push(calleereg);
     masm.Push(Imm32(descriptor));
 
     // Check whether the provided arguments satisfy target argc.
     masm.load16ZeroExtend(Address(calleereg, offsetof(JSFunction, nargs)), nargsreg);
     masm.cmp32(nargsreg, Imm32(call->numStackArgs()));
     masm.j(Assembler::Above, &thunk);
@@ -930,17 +930,17 @@ CodeGenerator::visitCallKnown(LCallKnown
     // Load the start of the target IonCode.
     masm.movePtr(Address(objreg, IonScript::offsetOfMethod()), objreg);
     masm.movePtr(Address(objreg, IonCode::offsetOfCode()), objreg);
 
     // Nestle the StackPointer up to the argument vector.
     masm.freeStack(unusedStack);
 
     // Construct the IonFramePrefix.
-    uint32 descriptor = MakeFrameDescriptor(masm.framePushed(), IonFrame_JS);
+    uint32 descriptor = MakeFrameDescriptor(masm.framePushed(), IonFrame_OptimizedJS);
     masm.Push(Imm32(call->numActualArgs()));
     masm.Push(calleereg);
     masm.Push(Imm32(descriptor));
 
     // Finally call the function in objreg.
     uint32 callOffset = masm.callIon(objreg);
     if (!markSafepointAt(callOffset, call))
         return false;
@@ -1146,17 +1146,17 @@ CodeGenerator::visitApplyArgsGeneric(LAp
     // Guard that the IonScript has been compiled.
     masm.branchPtr(Assembler::BelowOrEqual, objreg, ImmWord(ION_COMPILING_SCRIPT), &invoke);
 
     // Call with an Ion frame or a rectifier frame.
     {
         // Create the frame descriptor.
         unsigned pushed = masm.framePushed();
         masm.addPtr(Imm32(pushed), copyreg);
-        masm.makeFrameDescriptor(copyreg, IonFrame_JS);
+        masm.makeFrameDescriptor(copyreg, IonFrame_OptimizedJS);
 
         masm.Push(argcreg);
         masm.Push(calleereg);
         masm.Push(copyreg); // descriptor
 
         Label underflow, rejoin;
 
         // Check whether the provided arguments satisfy target argc.
--- a/js/src/ion/Ion.cpp
+++ b/js/src/ion/Ion.cpp
@@ -1582,17 +1582,17 @@ InvalidateActivation(FreeOp *fop, uint8 
     for (IonFrameIterator it(ionTop); !it.done(); ++it, ++frameno) {
         JS_ASSERT_IF(frameno == 1, it.type() == IonFrame_Exit);
 
 #ifdef DEBUG
         switch (it.type()) {
           case IonFrame_Exit:
             IonSpew(IonSpew_Invalidate, "#%d exit frame @ %p", frameno, it.fp());
             break;
-          case IonFrame_JS:
+          case IonFrame_OptimizedJS:
           {
             JS_ASSERT(it.isScripted());
             IonSpew(IonSpew_Invalidate, "#%d JS frame @ %p, %s:%d (fun: %p, script: %p, pc %p)",
                     frameno, it.fp(), it.script()->filename, it.script()->lineno,
                     it.maybeCallee(), it.script(), it.returnAddressToFp());
             break;
           }
           case IonFrame_Rectifier:
--- a/js/src/ion/IonFrameIterator.h
+++ b/js/src/ion/IonFrameIterator.h
@@ -16,18 +16,18 @@ struct JSFunction;
 struct JSScript;
 
 namespace js {
 namespace ion {
 
 enum FrameType
 {
     // A JS frame is analagous to a js::StackFrame, representing one scripted
-    // functon activation.
-    IonFrame_JS,
+    // functon activation. OptimizedJS frames are used by the optimizing compiler.
+    IonFrame_OptimizedJS,
 
     // The entry frame is the initial prologue block transitioning from the VM
     // into the Ion world.
     IonFrame_Entry,
 
     // A rectifier frame sits in between two JS frames, adapting argc != nargs
     // mismatches in calls.
     IonFrame_Rectifier,
@@ -90,32 +90,32 @@ class IonFrameIterator
     uint8 *fp() const {
         return current_;
     }
 
     inline IonCommonFrameLayout *current() const;
     inline uint8 *returnAddress() const;
 
     IonJSFrameLayout *jsFrame() const {
-        JS_ASSERT(type() == IonFrame_JS);
+        JS_ASSERT(type() == IonFrame_OptimizedJS);
         return (IonJSFrameLayout *) fp();
     }
 
     IonExitFrameLayout *exitFrame() const {
         JS_ASSERT(type() == IonFrame_Exit);
         return (IonExitFrameLayout *) fp();
     }
 
     // Returns whether the JS frame has been invalidated and, if so,
     // places the invalidated Ion script in |ionScript|.
     bool checkInvalidation(IonScript **ionScript) const;
     bool checkInvalidation() const;
 
     bool isScripted() const {
-        return type_ == IonFrame_JS;
+        return type_ == IonFrame_OptimizedJS;
     }
     bool isNative() const;
     bool isOOLNativeGetter() const;
     bool isOOLPropertyOp() const;
     bool isDOMExit() const;
     bool isEntry() const {
         return type_ == IonFrame_Entry;
     }
--- a/js/src/ion/IonFrames-inl.h
+++ b/js/src/ion/IonFrames-inl.h
@@ -24,17 +24,17 @@ SafepointIndex::resolve()
 }
 
 static inline size_t
 SizeOfFramePrefix(FrameType type)
 {
     switch (type) {
       case IonFrame_Entry:
         return IonEntryFrameLayout::Size();
-      case IonFrame_JS:
+      case IonFrame_OptimizedJS:
       case IonFrame_Bailed_JS:
         return IonJSFrameLayout::Size();
       case IonFrame_Rectifier:
         return IonRectifierFrameLayout::Size();
       case IonFrame_Bailed_Rectifier:
         return IonBailedRectifierFrameLayout::Size();
       case IonFrame_Exit:
         return IonExitFrameLayout::Size();
@@ -92,17 +92,17 @@ GetTopIonJSScript(JSContext *cx, const S
     // If needed, grab the safepoint index.
     if (safepointIndexOut)
         *safepointIndexOut = iter.safepoint();
 
     JS_ASSERT(iter.returnAddressToFp() != NULL);
     if (returnAddrOut)
         *returnAddrOut = (void *) iter.returnAddressToFp();
 
-    JS_ASSERT(iter.type() == IonFrame_JS);
+    JS_ASSERT(iter.type() == IonFrame_OptimizedJS);
     IonJSFrameLayout *frame = static_cast<IonJSFrameLayout*>(iter.current());
     switch (GetCalleeTokenTag(frame->calleeToken())) {
       case CalleeToken_Function: {
         JSFunction *fun = CalleeTokenToFunction(frame->calleeToken());
         return fun->script();
       }
       case CalleeToken_Script:
         return CalleeTokenToScript(frame->calleeToken());
--- a/js/src/ion/IonFrames.cpp
+++ b/js/src/ion/IonFrames.cpp
@@ -47,17 +47,17 @@ IonFrameIterator::IonFrameIterator(const
       frameSize_(0),
       cachedSafepointIndex_(NULL),
       activation_(activations.activation())
 {
 }
 
 IonFrameIterator::IonFrameIterator(IonJSFrameLayout *fp)
   : current_((uint8 *)fp),
-    type_(IonFrame_JS),
+    type_(IonFrame_OptimizedJS),
     returnAddressToFp_(fp->returnAddress()),
     frameSize_(fp->prevFrameLocalSize())
 {
 }
 
 bool
 IonFrameIterator::checkInvalidation() const
 {
@@ -149,17 +149,17 @@ bool
 IonFrameIterator::isFunctionFrame() const
 {
     return js::ion::CalleeTokenIsFunction(calleeToken());
 }
 
 bool
 IonFrameIterator::isEntryJSFrame() const
 {
-    if (prevType() == IonFrame_JS || prevType() == IonFrame_Bailed_JS)
+    if (prevType() == IonFrame_OptimizedJS || prevType() == IonFrame_Bailed_JS)
         return false;
 
     if (prevType() == IonFrame_Entry)
         return true;
 
     IonFrameIterator iter(*this);
     ++iter;
     for (; !iter.done(); ++iter) {
@@ -196,17 +196,17 @@ uint8 *
 IonFrameIterator::prevFp() const
 {
     size_t currentSize = SizeOfFramePrefix(type_);
     // This quick fix must be removed as soon as bug 717297 land.  This is
     // needed because the descriptor size of JS-to-JS frame which is just after
     // a Rectifier frame should not change. (cf EnsureExitFrame function)
     if (prevType() == IonFrame_Bailed_Rectifier || prevType() == IonFrame_Bailed_JS) {
         JS_ASSERT(type_ == IonFrame_Exit);
-        currentSize = SizeOfFramePrefix(IonFrame_JS);
+        currentSize = SizeOfFramePrefix(IonFrame_OptimizedJS);
     }
     currentSize += current()->prevFrameLocalSize();
     return current_ + currentSize;
 }
 
 IonFrameIterator &
 IonFrameIterator::operator++()
 {
@@ -222,17 +222,17 @@ IonFrameIterator::operator++()
         return *this;
     }
 
     // Note: prevFp() needs the current type, so set it after computing the
     // next frame.
     uint8 *prev = prevFp();
     type_ = current()->prevType();
     if (type_ == IonFrame_Bailed_JS)
-        type_ = IonFrame_JS;
+        type_ = IonFrame_OptimizedJS;
     returnAddressToFp_ = current()->returnAddress();
     current_ = prev;
     return *this;
 }
 
 uintptr_t *
 IonFrameIterator::spillBase() const
 {
@@ -640,17 +640,17 @@ MarkIonExitFrame(JSTracer *trc, const Io
 static void
 MarkIonActivation(JSTracer *trc, const IonActivationIterator &activations)
 {
     for (IonFrameIterator frames(activations); !frames.done(); ++frames) {
         switch (frames.type()) {
           case IonFrame_Exit:
             MarkIonExitFrame(trc, frames);
             break;
-          case IonFrame_JS:
+          case IonFrame_OptimizedJS:
             MarkIonJSFrame(trc, frames);
             break;
           case IonFrame_Bailed_JS:
             JS_NOT_REACHED("invalid");
             break;
           case IonFrame_Rectifier:
           case IonFrame_Bailed_Rectifier: {
             IonCompartment *ionCompartment = activations.activation()->compartment()->ionCompartment();
@@ -864,17 +864,17 @@ SnapshotIterator::slotValue(const Slot &
         JS_NOT_REACHED("huh?");
         return UndefinedValue();
     }
 }
 
 IonScript *
 IonFrameIterator::ionScript() const
 {
-    JS_ASSERT(type() == IonFrame_JS);
+    JS_ASSERT(type() == IonFrame_OptimizedJS);
 
     IonScript *ionScript;
     if (checkInvalidation(&ionScript))
         return ionScript;
     return script()->ionScript();
 }
 
 const SafepointIndex *
@@ -1098,17 +1098,17 @@ SnapshotIterator::warnUnreadableSlot()
 void
 IonFrameIterator::dump() const
 {
     switch (type_) {
       case IonFrame_Entry:
         fprintf(stderr, " Entry frame\n");
         fprintf(stderr, "  Frame size: %u\n", unsigned(current()->prevFrameLocalSize()));
         break;
-      case IonFrame_JS:
+      case IonFrame_OptimizedJS:
       {
         InlineFrameIterator frames(this);
         for (;;) {
             frames.dump();
             if (!frames.more())
                 break;
             ++frames;
         }
--- a/js/src/ion/arm/Bailouts-arm.cpp
+++ b/js/src/ion/arm/Bailouts-arm.cpp
@@ -117,17 +117,17 @@ IonBailoutIterator::IonBailoutIterator(c
                                        BailoutStack *bailout)
   : IonFrameIterator(activations),
     machine_(bailout->machine())
 {
     uint8 *sp = bailout->parentStackPointer();
     uint8 *fp = sp + bailout->frameSize();
 
     current_ = fp;
-    type_ = IonFrame_JS;
+    type_ = IonFrame_OptimizedJS;
     topFrameSize_ = current_ - sp;
     topIonScript_ = script()->ion;
 
     if (bailout->frameClass() == FrameSizeClass::None()) {
         snapshotOffset_ = bailout->snapshotOffset();
         return;
     }
 
@@ -154,12 +154,12 @@ IonBailoutIterator::IonBailoutIterator(c
   : IonFrameIterator(activations),
     machine_(bailout->machine())
 {
     returnAddressToFp_ = bailout->osiPointReturnAddress();
     topIonScript_ = bailout->ionScript();
     const OsiIndex *osiIndex = topIonScript_->getOsiIndex(returnAddressToFp_);
 
     current_ = (uint8*) bailout->fp();
-    type_ = IonFrame_JS;
+    type_ = IonFrame_OptimizedJS;
     topFrameSize_ = current_ - bailout->sp();
     snapshotOffset_ = osiIndex->snapshotOffset();
 }
--- a/js/src/ion/arm/MacroAssembler-arm.cpp
+++ b/js/src/ion/arm/MacroAssembler-arm.cpp
@@ -1318,17 +1318,17 @@ MacroAssemblerARM::ma_vstr(VFPRegister s
     as_add(ScratchRegister, base, lsl(index, shift));
     ma_vstr(src, Operand(ScratchRegister, 0));
 }
 
 bool
 MacroAssemblerARMCompat::buildFakeExitFrame(const Register &scratch, uint32 *offset)
 {
     DebugOnly<uint32> initialDepth = framePushed();
-    uint32 descriptor = MakeFrameDescriptor(framePushed(), IonFrame_JS);
+    uint32 descriptor = MakeFrameDescriptor(framePushed(), IonFrame_OptimizedJS);
 
     Push(Imm32(descriptor)); // descriptor_
 
     enterNoPool();
     DebugOnly<uint32> offsetBeforePush = currentOffset();
     Push(pc); // actually pushes $pc + 8.
 
     // Consume an additional 4 bytes. The start of the next instruction will
@@ -1344,43 +1344,43 @@ MacroAssemblerARMCompat::buildFakeExitFr
     *offset = pseudoReturnOffset;
     return true;
 }
 
 bool
 MacroAssemblerARMCompat::buildOOLFakeExitFrame(void *fakeReturnAddr)
 {
     DebugOnly<uint32> initialDepth = framePushed();
-    uint32 descriptor = MakeFrameDescriptor(framePushed(), IonFrame_JS);
+    uint32 descriptor = MakeFrameDescriptor(framePushed(), IonFrame_OptimizedJS);
 
     Push(Imm32(descriptor)); // descriptor_
 
     enterNoPool();
     Push(Imm32((uint32) fakeReturnAddr));
     leaveNoPool();
 
     return true;
 }
 
 void
 MacroAssemblerARMCompat::callWithExitFrame(IonCode *target)
 {
-    uint32 descriptor = MakeFrameDescriptor(framePushed(), IonFrame_JS);
+    uint32 descriptor = MakeFrameDescriptor(framePushed(), IonFrame_OptimizedJS);
     Push(Imm32(descriptor)); // descriptor
 
     addPendingJump(m_buffer.nextOffset(), target->raw(), Relocation::IONCODE);
     ma_mov(Imm32((int) target->raw()), ScratchRegister);
     ma_callIonHalfPush(ScratchRegister);
 }
 
 void
 MacroAssemblerARMCompat::callWithExitFrame(IonCode *target, Register dynStack)
 {
     ma_add(Imm32(framePushed()), dynStack);
-    makeFrameDescriptor(dynStack, IonFrame_JS);
+    makeFrameDescriptor(dynStack, IonFrame_OptimizedJS);
     Push(dynStack); // descriptor
 
     addPendingJump(m_buffer.nextOffset(), target->raw(), Relocation::IONCODE);
     ma_mov(Imm32((int) target->raw()), ScratchRegister);
     ma_callIonHalfPush(ScratchRegister);
 }
 
 void
--- a/js/src/ion/shared/MacroAssembler-x86-shared.h
+++ b/js/src/ion/shared/MacroAssembler-x86-shared.h
@@ -359,36 +359,36 @@ class MacroAssemblerX86Shared : public A
     bool buildFakeExitFrame(const Register &scratch, uint32 *offset) {
         DebugOnly<uint32> initialDepth = framePushed();
 
         CodeLabel *cl = new CodeLabel();
         if (!addCodeLabel(cl))
             return false;
         mov(cl->dest(), scratch);
 
-        uint32 descriptor = MakeFrameDescriptor(framePushed(), IonFrame_JS);
+        uint32 descriptor = MakeFrameDescriptor(framePushed(), IonFrame_OptimizedJS);
         Push(Imm32(descriptor));
         Push(scratch);
 
         bind(cl->src());
         *offset = currentOffset();
 
         JS_ASSERT(framePushed() == initialDepth + IonExitFrameLayout::Size());
         return true;
     }
 
     bool buildOOLFakeExitFrame(void *fakeReturnAddr) {
-        uint32 descriptor = MakeFrameDescriptor(framePushed(), IonFrame_JS);
+        uint32 descriptor = MakeFrameDescriptor(framePushed(), IonFrame_OptimizedJS);
         Push(Imm32(descriptor));
         Push(ImmWord(fakeReturnAddr));
         return true;
     }
 
     void callWithExitFrame(IonCode *target) {
-        uint32 descriptor = MakeFrameDescriptor(framePushed(), IonFrame_JS);
+        uint32 descriptor = MakeFrameDescriptor(framePushed(), IonFrame_OptimizedJS);
         Push(Imm32(descriptor));
         call(target);
     }
     void callIon(const Register &callee) {
         call(callee);
     }
 
     void checkStackAlignment() {
--- a/js/src/ion/x64/Bailouts-x64.cpp
+++ b/js/src/ion/x64/Bailouts-x64.cpp
@@ -54,28 +54,28 @@ IonBailoutIterator::IonBailoutIterator(c
                                        BailoutStack *bailout)
   : IonFrameIterator(activations),
     machine_(bailout->machineState())
 {
     uint8 *sp = bailout->parentStackPointer();
     uint8 *fp = sp + bailout->frameSize();
 
     current_ = fp;
-    type_ = IonFrame_JS;
+    type_ = IonFrame_OptimizedJS;
     topFrameSize_ = current_ - sp;
     topIonScript_ = script()->ion;
     snapshotOffset_ = bailout->snapshotOffset();
 }
 
 IonBailoutIterator::IonBailoutIterator(const IonActivationIterator &activations,
                                        InvalidationBailoutStack *bailout)
   : IonFrameIterator(activations),
     machine_(bailout->machine())
 {
     returnAddressToFp_ = bailout->osiPointReturnAddress();
     topIonScript_ = bailout->ionScript();
     const OsiIndex *osiIndex = topIonScript_->getOsiIndex(returnAddressToFp_);
 
     current_ = (uint8*) bailout->fp();
-    type_ = IonFrame_JS;
+    type_ = IonFrame_OptimizedJS;
     topFrameSize_ = current_ - bailout->sp();
     snapshotOffset_ = osiIndex->snapshotOffset();
 }
--- a/js/src/ion/x64/MacroAssembler-x64.h
+++ b/js/src/ion/x64/MacroAssembler-x64.h
@@ -865,17 +865,17 @@ class MacroAssemblerX64 : public MacroAs
     // ThreadData::ionTop.
     void linkExitFrame() {
         mov(ImmWord(GetIonContext()->cx->runtime), ScratchReg);
         mov(StackPointer, Operand(ScratchReg, offsetof(JSRuntime, ionTop)));
     }
 
     void callWithExitFrame(IonCode *target, Register dynStack) {
         addPtr(Imm32(framePushed()), dynStack);
-        makeFrameDescriptor(dynStack, IonFrame_JS);
+        makeFrameDescriptor(dynStack, IonFrame_OptimizedJS);
         Push(dynStack);
         call(target);
     }
 
     void enterOsr(Register calleeToken, Register code) {
         push(Imm32(0)); // num actual args.
         push(calleeToken);
         push(Imm32(MakeFrameDescriptor(0, IonFrame_Osr)));
--- a/js/src/ion/x86/Bailouts-x86.cpp
+++ b/js/src/ion/x86/Bailouts-x86.cpp
@@ -70,17 +70,17 @@ IonBailoutIterator::IonBailoutIterator(c
                                        BailoutStack *bailout)
   : IonFrameIterator(activations),
     machine_(bailout->machine())
 {
     uint8 *sp = bailout->parentStackPointer();
     uint8 *fp = sp + bailout->frameSize();
 
     current_ = fp;
-    type_ = IonFrame_JS;
+    type_ = IonFrame_OptimizedJS;
     topFrameSize_ = current_ - sp;
     topIonScript_ = script()->ion;
 
     if (bailout->frameClass() == FrameSizeClass::None()) {
         snapshotOffset_ = bailout->snapshotOffset();
         return;
     }
 
@@ -107,12 +107,12 @@ IonBailoutIterator::IonBailoutIterator(c
   : IonFrameIterator(activations),
     machine_(bailout->machine())
 {
     returnAddressToFp_ = bailout->osiPointReturnAddress();
     topIonScript_ = bailout->ionScript();
     const OsiIndex *osiIndex = topIonScript_->getOsiIndex(returnAddressToFp_);
 
     current_ = (uint8*) bailout->fp();
-    type_ = IonFrame_JS;
+    type_ = IonFrame_OptimizedJS;
     topFrameSize_ = current_ - bailout->sp();
     snapshotOffset_ = osiIndex->snapshotOffset();
 }
--- a/js/src/ion/x86/MacroAssembler-x86.h
+++ b/js/src/ion/x86/MacroAssembler-x86.h
@@ -722,17 +722,17 @@ class MacroAssemblerX86 : public MacroAs
     // ThreadData::ionTop.
     void linkExitFrame() {
         JSCompartment *compartment = GetIonContext()->compartment;
         movl(StackPointer, Operand(&compartment->rt->ionTop));
     }
 
     void callWithExitFrame(IonCode *target, Register dynStack) {
         addPtr(Imm32(framePushed()), dynStack);
-        makeFrameDescriptor(dynStack, IonFrame_JS);
+        makeFrameDescriptor(dynStack, IonFrame_OptimizedJS);
         Push(dynStack);
         call(target);
     }
 
     void enterOsr(Register calleeToken, Register code) {
         push(Imm32(0)); // num actual args.
         push(calleeToken);
         push(Imm32(MakeFrameDescriptor(0, IonFrame_Osr)));