Bug 859446 - Fix GCC warnings from baseline compiler merge. r=bhackett
authorJan de Mooij <jdemooij@mozilla.com>
Wed, 10 Apr 2013 16:41:00 +0200
changeset 128591 2e667c0efaa59f13acca6412784745aed7477802
parent 128590 1165f67ccfb5b12306136e5ffc36ab5886790156
child 128592 9e05e97946d98256d54e6bd029c58bdcbed829c9
push id24532
push userryanvm@gmail.com
push dateFri, 12 Apr 2013 19:06:49 +0000
treeherdermozilla-central@2aff2d574a1e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbhackett
bugs859446
milestone23.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 859446 - Fix GCC warnings from baseline compiler merge. r=bhackett
js/src/ion/BaselineCompiler.cpp
js/src/ion/BaselineCompiler.h
js/src/ion/BaselineFrame-inl.h
js/src/ion/BaselineFrame.h
js/src/ion/BaselineIC.cpp
js/src/ion/BaselineIC.h
js/src/ion/CompileInfo-inl.h
js/src/ion/CompileInfo.h
js/src/ion/IonLinker.h
js/src/ion/TypeOracle.cpp
js/src/ion/TypeOracle.h
js/src/ion/shared/BaselineCompiler-shared.h
js/src/jsgc.cpp
js/src/jsgc.h
js/src/jsgcinlines.h
--- a/js/src/ion/BaselineCompiler.cpp
+++ b/js/src/ion/BaselineCompiler.cpp
@@ -37,16 +37,33 @@ BaselineCompiler::init()
         new (&labels_[i]) Label();
 
     if (!frame.init())
         return false;
 
     return true;
 }
 
+bool
+BaselineCompiler::addPCMappingEntry(bool addIndexEntry)
+{
+    // Don't add multiple entries for a single pc.
+    size_t nentries = pcMappingEntries_.length();
+    if (nentries > 0 && pcMappingEntries_[nentries - 1].pcOffset == unsigned(pc - script->code))
+        return true;
+
+    PCMappingEntry entry;
+    entry.pcOffset = pc - script->code;
+    entry.nativeOffset = masm.currentOffset();
+    entry.slotInfo = getStackTopSlotInfo();
+    entry.addIndexEntry = addIndexEntry;
+
+    return pcMappingEntries_.append(entry);
+}
+
 MethodStatus
 BaselineCompiler::compile()
 {
     IonSpew(IonSpew_BaselineScripts, "Baseline compiling script %s:%d (%p)",
             script->filename(), script->lineno, script.get());
 
     if (!script->ensureRanAnalysis(cx))
         return Method_Error;
--- a/js/src/ion/BaselineCompiler.h
+++ b/js/src/ion/BaselineCompiler.h
@@ -227,16 +227,18 @@ class BaselineCompiler : public Baseline
     bool emitTest(bool branchIfTrue);
     bool emitAndOr(bool branchIfTrue);
     bool emitCall();
 
     bool emitFormalArgAccess(uint32_t arg, bool get);
 
     bool emitEnterBlock();
 
+    bool addPCMappingEntry(bool addIndexEntry);
+
     Address getScopeCoordinateAddress(Register reg);
 };
 
 } // namespace ion
 } // namespace js
 
 #endif
 
--- a/js/src/ion/BaselineFrame-inl.h
+++ b/js/src/ion/BaselineFrame-inl.h
@@ -59,13 +59,25 @@ BaselineFrame::popBlock(JSContext *cx)
     if (blockChain_->needsClone()) {
         JS_ASSERT(scopeChain_->asClonedBlock().staticBlock() == *blockChain_);
         popOffScopeChain();
     }
 
     setBlockChain(*blockChain_->enclosingBlock());
 }
 
+inline CallObject &
+BaselineFrame::callObj() const
+{
+    JS_ASSERT(hasCallObj());
+    JS_ASSERT(fun()->isHeavyweight());
+
+    JSObject *obj = scopeChain();
+    while (!obj->isCall())
+        obj = obj->enclosingScope();
+    return obj->asCall();
+}
+
 } // namespace ion
 } // namespace js
 
 #endif
 
--- a/js/src/ion/BaselineFrame.h
+++ b/js/src/ion/BaselineFrame.h
@@ -231,25 +231,17 @@ class BaselineFrame
     StaticBlockObject **addressOfBlockChain() {
         return &blockChain_;
     }
 
     bool hasCallObj() const {
         return flags_ & HAS_CALL_OBJ;
     }
 
-    CallObject &callObj() const {
-        JS_ASSERT(hasCallObj());
-        JS_ASSERT(fun()->isHeavyweight());
-
-        JSObject *obj = scopeChain();
-        while (!obj->isCall())
-            obj = obj->enclosingScope();
-        return obj->asCall();
-    }
+    inline CallObject &callObj() const;
 
     void setFlags(uint32_t flags) {
         flags_ = flags;
     }
     uint32_t *addressOfFlags() {
         return &flags_;
     }
 
--- a/js/src/ion/BaselineIC.cpp
+++ b/js/src/ion/BaselineIC.cpp
@@ -7246,10 +7246,286 @@ ICTypeOf_Typed::Compiler::generateStubCo
     masm.tagValue(JSVAL_TYPE_STRING, R0.scratchReg(), R0);
     EmitReturnFromIC(masm);
 
     masm.bind(&failure);
     EmitStubGuardFailure(masm);
     return true;
 }
 
+ICProfiler_PushFunction::ICProfiler_PushFunction(IonCode *stubCode, const char *str,
+                                                 HandleScript script)
+  : ICStub(ICStub::Profiler_PushFunction, stubCode),
+    str_(str),
+    script_(script)
+{ }
+
+ICTypeMonitor_SingleObject::ICTypeMonitor_SingleObject(IonCode *stubCode, HandleObject obj)
+  : ICStub(TypeMonitor_SingleObject, stubCode),
+    obj_(obj)
+{ }
+
+ICTypeMonitor_TypeObject::ICTypeMonitor_TypeObject(IonCode *stubCode, HandleTypeObject type)
+  : ICStub(TypeMonitor_TypeObject, stubCode),
+    type_(type)
+{ }
+
+ICTypeUpdate_SingleObject::ICTypeUpdate_SingleObject(IonCode *stubCode, HandleObject obj)
+  : ICStub(TypeUpdate_SingleObject, stubCode),
+    obj_(obj)
+{ }
+
+ICTypeUpdate_TypeObject::ICTypeUpdate_TypeObject(IonCode *stubCode, HandleTypeObject type)
+  : ICStub(TypeUpdate_TypeObject, stubCode),
+    type_(type)
+{ }
+
+ICGetElemNativeStub::ICGetElemNativeStub(ICStub::Kind kind, IonCode *stubCode,
+                                         ICStub *firstMonitorStub,
+                                         HandleShape shape, HandleValue idval,
+                                         bool isFixedSlot, uint32_t offset)
+  : ICMonitoredStub(kind, stubCode, firstMonitorStub),
+    shape_(shape),
+    idval_(idval),
+    offset_(offset)
+{
+    extra_ = isFixedSlot;
+}
+
+ICGetElemNativeStub::~ICGetElemNativeStub()
+{ }
+
+ICGetElem_NativePrototype::ICGetElem_NativePrototype(IonCode *stubCode, ICStub *firstMonitorStub,
+                                                     HandleShape shape, HandleValue idval,
+                                                     bool isFixedSlot, uint32_t offset,
+                                                     HandleObject holder, HandleShape holderShape)
+  : ICGetElemNativeStub(ICStub::GetElem_NativePrototype, stubCode, firstMonitorStub, shape,
+                        idval, isFixedSlot, offset),
+    holder_(holder),
+    holderShape_(holderShape)
+{ }
+
+ICGetElem_Dense::ICGetElem_Dense(IonCode *stubCode, ICStub *firstMonitorStub, HandleShape shape)
+    : ICMonitoredStub(GetElem_Dense, stubCode, firstMonitorStub),
+      shape_(shape)
+{ }
+
+ICGetElem_TypedArray::ICGetElem_TypedArray(IonCode *stubCode, HandleShape shape, uint32_t type)
+  : ICStub(GetElem_TypedArray, stubCode),
+    shape_(shape)
+{
+    extra_ = uint16_t(type);
+    JS_ASSERT(extra_ == type);
+}
+
+ICSetElem_Dense::ICSetElem_Dense(IonCode *stubCode, HandleShape shape, HandleTypeObject type)
+  : ICUpdatedStub(SetElem_Dense, stubCode),
+    shape_(shape),
+    type_(type)
+{ }
+
+ICSetElem_DenseAdd::ICSetElem_DenseAdd(IonCode *stubCode, types::TypeObject *type,
+                                       size_t protoChainDepth)
+  : ICUpdatedStub(SetElem_DenseAdd, stubCode),
+    type_(type)
+{
+    JS_ASSERT(protoChainDepth <= MAX_PROTO_CHAIN_DEPTH);
+    extra_ = protoChainDepth;
+}
+
+template <size_t ProtoChainDepth>
+ICUpdatedStub *
+ICSetElemDenseAddCompiler::getStubSpecific(ICStubSpace *space, const AutoShapeVector *shapes)
+{
+    return ICSetElem_DenseAddImpl<ProtoChainDepth>::New(space, getStubCode(), obj_->getType(cx),
+                                                        shapes);
+}
+
+ICSetElem_TypedArray::ICSetElem_TypedArray(IonCode *stubCode, HandleShape shape, uint32_t type,
+                                           bool expectOutOfBounds)
+  : ICStub(SetElem_TypedArray, stubCode),
+    shape_(shape)
+{
+    extra_ = uint8_t(type);
+    JS_ASSERT(extra_ == type);
+    extra_ |= (static_cast<uint16_t>(expectOutOfBounds) << 8);
+}
+
+ICGetName_Global::ICGetName_Global(IonCode *stubCode, ICStub *firstMonitorStub, HandleShape shape,
+                                   uint32_t slot)
+  : ICMonitoredStub(GetName_Global, stubCode, firstMonitorStub),
+    shape_(shape),
+    slot_(slot)
+{ }
+
+template <size_t NumHops>
+ICGetName_Scope<NumHops>::ICGetName_Scope(IonCode *stubCode, ICStub *firstMonitorStub,
+                                          AutoShapeVector *shapes, uint32_t offset)
+  : ICMonitoredStub(GetStubKind(), stubCode, firstMonitorStub),
+    offset_(offset)
+{
+    JS_STATIC_ASSERT(NumHops <= MAX_HOPS);
+    JS_ASSERT(shapes->length() == NumHops + 1);
+    for (size_t i = 0; i < NumHops + 1; i++)
+        shapes_[i].init((*shapes)[i]);
+}
+
+ICGetIntrinsic_Constant::ICGetIntrinsic_Constant(IonCode *stubCode, HandleValue value)
+  : ICStub(GetIntrinsic_Constant, stubCode),
+    value_(value)
+{ }
+
+ICGetIntrinsic_Constant::~ICGetIntrinsic_Constant()
+{ }
+
+ICGetProp_String::ICGetProp_String(IonCode *stubCode, ICStub *firstMonitorStub,
+                                   HandleShape stringProtoShape, uint32_t offset)
+  : ICMonitoredStub(GetProp_String, stubCode, firstMonitorStub),
+    stringProtoShape_(stringProtoShape),
+    offset_(offset)
+{ }
+
+ICGetPropNativeStub::ICGetPropNativeStub(ICStub::Kind kind, IonCode *stubCode,
+                                         ICStub *firstMonitorStub,
+                                         HandleShape shape, uint32_t offset)
+  : ICMonitoredStub(kind, stubCode, firstMonitorStub),
+    shape_(shape),
+    offset_(offset)
+{ }
+
+ICGetProp_NativePrototype::ICGetProp_NativePrototype(IonCode *stubCode, ICStub *firstMonitorStub,
+                                                     HandleShape shape, uint32_t offset,
+                                                     HandleObject holder, HandleShape holderShape)
+  : ICGetPropNativeStub(GetProp_NativePrototype, stubCode, firstMonitorStub, shape, offset),
+    holder_(holder),
+    holderShape_(holderShape)
+{ }
+
+ICGetPropCallGetter::ICGetPropCallGetter(Kind kind, IonCode *stubCode, ICStub *firstMonitorStub,
+                                         HandleShape shape, HandleObject holder,
+                                         HandleShape holderShape,
+                                         HandleFunction getter, uint32_t pcOffset)
+  : ICMonitoredStub(kind, stubCode, firstMonitorStub),
+    shape_(shape),
+    holder_(holder),
+    holderShape_(holderShape),
+    getter_(getter),
+    pcOffset_(pcOffset)
+{
+    JS_ASSERT(kind == ICStub::GetProp_CallScripted || kind == ICStub::GetProp_CallNative);
+}
+
+ICSetProp_Native::ICSetProp_Native(IonCode *stubCode, HandleTypeObject type, HandleShape shape,
+                                   uint32_t offset)
+  : ICUpdatedStub(SetProp_Native, stubCode),
+    type_(type),
+    shape_(shape),
+    offset_(offset)
+{ }
+
+ICUpdatedStub *
+ICSetProp_Native::Compiler::getStub(ICStubSpace *space)
+{
+    RootedTypeObject type(cx, obj_->getType(cx));
+    RootedShape shape(cx, obj_->lastProperty());
+    ICUpdatedStub *stub = ICSetProp_Native::New(space, getStubCode(), type, shape, offset_);
+    if (!stub || !stub->initUpdatingChain(cx, space))
+        return NULL;
+    return stub;
+}
+
+ICSetProp_NativeAdd::ICSetProp_NativeAdd(IonCode *stubCode, HandleTypeObject type,
+                                         size_t protoChainDepth,
+                                         HandleShape newShape, uint32_t offset)
+  : ICUpdatedStub(SetProp_NativeAdd, stubCode),
+    type_(type),
+    newShape_(newShape),
+    offset_(offset)
+{
+    JS_ASSERT(protoChainDepth <= MAX_PROTO_CHAIN_DEPTH);
+    extra_ = protoChainDepth;
+}
+
+template <size_t ProtoChainDepth>
+ICSetProp_NativeAddImpl<ProtoChainDepth>::ICSetProp_NativeAddImpl(IonCode *stubCode,
+                                                                  HandleTypeObject type,
+                                                                  const AutoShapeVector *shapes,
+                                                                  HandleShape newShape,
+                                                                  uint32_t offset)
+  : ICSetProp_NativeAdd(stubCode, type, ProtoChainDepth, newShape, offset)
+{
+    JS_ASSERT(shapes->length() == NumShapes);
+    for (size_t i = 0; i < NumShapes; i++)
+        shapes_[i].init((*shapes)[i]);
+}
+
+ICSetPropNativeAddCompiler::ICSetPropNativeAddCompiler(JSContext *cx, HandleObject obj,
+                                                       HandleShape oldShape,
+                                                       size_t protoChainDepth, bool isFixedSlot,
+                                                       uint32_t offset)
+  : ICStubCompiler(cx, ICStub::SetProp_NativeAdd),
+    obj_(cx, obj),
+    oldShape_(cx, oldShape),
+    protoChainDepth_(protoChainDepth),
+    isFixedSlot_(isFixedSlot),
+    offset_(offset)
+{
+    JS_ASSERT(protoChainDepth_ <= ICSetProp_NativeAdd::MAX_PROTO_CHAIN_DEPTH);
+}
+
+ICSetPropCallSetter::ICSetPropCallSetter(Kind kind, IonCode *stubCode, HandleShape shape,
+                                         HandleObject holder, HandleShape holderShape,
+                                         HandleFunction setter, uint32_t pcOffset)
+  : ICStub(kind, stubCode),
+    shape_(shape),
+    holder_(holder),
+    holderShape_(holderShape),
+    setter_(setter),
+    pcOffset_(pcOffset)
+{
+    JS_ASSERT(kind == ICStub::SetProp_CallScripted || kind == ICStub::SetProp_CallNative);
+}
+
+ICCall_Scripted::ICCall_Scripted(IonCode *stubCode, ICStub *firstMonitorStub,
+                                 HandleScript calleeScript, uint32_t pcOffset)
+  : ICMonitoredStub(ICStub::Call_Scripted, stubCode, firstMonitorStub),
+    calleeScript_(calleeScript),
+    pcOffset_(pcOffset)
+{ }
+
+ICCall_Native::ICCall_Native(IonCode *stubCode, ICStub *firstMonitorStub, HandleFunction callee,
+                             uint32_t pcOffset)
+  : ICMonitoredStub(ICStub::Call_Native, stubCode, firstMonitorStub),
+    callee_(callee),
+    pcOffset_(pcOffset)
+{ }
+
+ICGetProp_CallListBaseNative::ICGetProp_CallListBaseNative(IonCode *stubCode, ICStub *firstMonitorStub,
+                                                           HandleShape shape, BaseProxyHandler *proxyHandler,
+                                                           HandleShape expandoShape, HandleObject holder,
+                                                           HandleShape holderShape, HandleFunction getter,
+                                                           uint32_t pcOffset)
+  : ICMonitoredStub(GetProp_CallListBaseNative, stubCode, firstMonitorStub),
+    shape_(shape),
+    proxyHandler_(proxyHandler),
+    expandoShape_(expandoShape),
+    holder_(holder),
+    holderShape_(holderShape),
+    getter_(getter),
+    pcOffset_(pcOffset)
+{ }
+
+ICGetProp_CallListBaseNative::Compiler::Compiler(JSContext *cx, ICStub *firstMonitorStub, HandleObject obj,
+                                                 HandleObject holder, HandleFunction getter,
+                                                 uint32_t pcOffset)
+  : ICStubCompiler(cx, ICStub::GetProp_CallListBaseNative),
+    firstMonitorStub_(firstMonitorStub),
+    obj_(cx, obj),
+    holder_(cx, holder),
+    getter_(cx, getter),
+    pcOffset_(pcOffset)
+{
+    JS_ASSERT(obj_->isProxy());
+    JS_ASSERT(GetProxyHandler(obj_)->family() == GetListBaseHandlerFamily());
+}
+
 } // namespace ion
 } // namespace js
--- a/js/src/ion/BaselineIC.h
+++ b/js/src/ion/BaselineIC.h
@@ -5,17 +5,17 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #if !defined(jsion_baseline_ic_h__) && defined(JS_ION)
 #define jsion_baseline_ic_h__
 
 #include "jscntxt.h"
 #include "jscompartment.h"
-#include "jsgcinlines.h"
+#include "jsgc.h"
 #include "jsopcode.h"
 #include "jsproxy.h"
 #include "BaselineJIT.h"
 #include "BaselineRegisters.h"
 
 #include "gc/Heap.h"
 
 namespace js {
@@ -1136,21 +1136,17 @@ class ICProfiler_Fallback : public ICFal
 class ICProfiler_PushFunction : public ICStub
 {
     friend class ICStubSpace;
 
   protected:
     const char *str_;
     HeapPtrScript script_;
 
-    ICProfiler_PushFunction(IonCode *stubCode, const char *str, HandleScript script)
-      : ICStub(ICStub::Profiler_PushFunction, stubCode),
-        str_(str),
-        script_(script)
-    { }
+    ICProfiler_PushFunction(IonCode *stubCode, const char *str, HandleScript script);
 
   public:
     static inline ICProfiler_PushFunction *New(ICStubSpace *space, IonCode *code,
                                                const char *str, HandleScript script)
     {
         if (!code)
             return NULL;
         return space->allocate<ICProfiler_PushFunction>(code, str, script);
@@ -1486,20 +1482,17 @@ class ICTypeMonitor_PrimitiveSet : publi
 };
 
 class ICTypeMonitor_SingleObject : public ICStub
 {
     friend class ICStubSpace;
 
     HeapPtrObject obj_;
 
-    ICTypeMonitor_SingleObject(IonCode *stubCode, HandleObject obj)
-      : ICStub(TypeMonitor_SingleObject, stubCode),
-        obj_(obj)
-    { }
+    ICTypeMonitor_SingleObject(IonCode *stubCode, HandleObject obj);
 
   public:
     static inline ICTypeMonitor_SingleObject *New(
             ICStubSpace *space, IonCode *code, HandleObject obj)
     {
         if (!code)
             return NULL;
         return space->allocate<ICTypeMonitor_SingleObject>(code, obj);
@@ -1531,20 +1524,17 @@ class ICTypeMonitor_SingleObject : publi
 };
 
 class ICTypeMonitor_TypeObject : public ICStub
 {
     friend class ICStubSpace;
 
     HeapPtrTypeObject type_;
 
-    ICTypeMonitor_TypeObject(IonCode *stubCode, HandleTypeObject type)
-      : ICStub(TypeMonitor_TypeObject, stubCode),
-        type_(type)
-    { }
+    ICTypeMonitor_TypeObject(IonCode *stubCode, HandleTypeObject type);
 
   public:
     static inline ICTypeMonitor_TypeObject *New(
             ICStubSpace *space, IonCode *code, HandleTypeObject type)
     {
         if (!code)
             return NULL;
         return space->allocate<ICTypeMonitor_TypeObject>(code, type);
@@ -1655,20 +1645,17 @@ class ICTypeUpdate_PrimitiveSet : public
 
 // Type update stub to handle a singleton object.
 class ICTypeUpdate_SingleObject : public ICStub
 {
     friend class ICStubSpace;
 
     HeapPtrObject obj_;
 
-    ICTypeUpdate_SingleObject(IonCode *stubCode, HandleObject obj)
-      : ICStub(TypeUpdate_SingleObject, stubCode),
-        obj_(obj)
-    { }
+    ICTypeUpdate_SingleObject(IonCode *stubCode, HandleObject obj);
 
   public:
     static inline ICTypeUpdate_SingleObject *New(ICStubSpace *space, IonCode *code,
                                                  HandleObject obj)
     {
         if (!code)
             return NULL;
         return space->allocate<ICTypeUpdate_SingleObject>(code, obj);
@@ -1701,20 +1688,17 @@ class ICTypeUpdate_SingleObject : public
 
 // Type update stub to handle a single TypeObject.
 class ICTypeUpdate_TypeObject : public ICStub
 {
     friend class ICStubSpace;
 
     HeapPtrTypeObject type_;
 
-    ICTypeUpdate_TypeObject(IonCode *stubCode, HandleTypeObject type)
-      : ICStub(TypeUpdate_TypeObject, stubCode),
-        type_(type)
-    { }
+    ICTypeUpdate_TypeObject(IonCode *stubCode, HandleTypeObject type);
 
   public:
     static inline ICTypeUpdate_TypeObject *New(ICStubSpace *space, IonCode *code,
                                                HandleTypeObject type)
     {
         if (!code)
             return NULL;
         return space->allocate<ICTypeUpdate_TypeObject>(code, type);
@@ -2783,24 +2767,19 @@ class ICGetElemNativeStub : public ICMon
 {
     HeapPtrShape shape_;
     HeapValue idval_;
     uint32_t offset_;
 
   protected:
     ICGetElemNativeStub(ICStub::Kind kind, IonCode *stubCode, ICStub *firstMonitorStub,
                         HandleShape shape, HandleValue idval,
-                        bool isFixedSlot, uint32_t offset)
-      : ICMonitoredStub(kind, stubCode, firstMonitorStub),
-        shape_(shape),
-        idval_(idval),
-        offset_(offset)
-    {
-        extra_ = isFixedSlot;
-    }
+                        bool isFixedSlot, uint32_t offset);
+
+    ~ICGetElemNativeStub();
 
   public:
     HeapPtrShape &shape() {
         return shape_;
     }
     static size_t offsetOfShape() {
         return offsetof(ICGetElemNativeStub, shape_);
     }
@@ -2851,22 +2830,17 @@ class ICGetElem_NativePrototype : public
 {
     friend class ICStubSpace;
     HeapPtrObject holder_;
     HeapPtrShape holderShape_;
 
     ICGetElem_NativePrototype(IonCode *stubCode, ICStub *firstMonitorStub,
                               HandleShape shape, HandleValue idval,
                               bool isFixedSlot, uint32_t offset,
-                              HandleObject holder, HandleShape holderShape)
-      : ICGetElemNativeStub(ICStub::GetElem_NativePrototype, stubCode, firstMonitorStub, shape,
-                            idval, isFixedSlot, offset),
-        holder_(holder),
-        holderShape_(holderShape)
-    {}
+                              HandleObject holder, HandleShape holderShape);
 
   public:
     static inline ICGetElem_NativePrototype *New(ICStubSpace *space, IonCode *code,
                                                  ICStub *firstMonitorStub,
                                                  HandleShape shape, HandleValue idval,
                                                  bool isFixedSlot, uint32_t offset,
                                                  HandleObject holder, HandleShape holderShape)
     {
@@ -2967,20 +2941,17 @@ class ICGetElem_String : public ICStub
 };
 
 class ICGetElem_Dense : public ICMonitoredStub
 {
     friend class ICStubSpace;
 
     HeapPtrShape shape_;
 
-    ICGetElem_Dense(IonCode *stubCode, ICStub *firstMonitorStub, HandleShape shape)
-      : ICMonitoredStub(GetElem_Dense, stubCode, firstMonitorStub),
-        shape_(shape)
-    {}
+    ICGetElem_Dense(IonCode *stubCode, ICStub *firstMonitorStub, HandleShape shape);
 
   public:
     static inline ICGetElem_Dense *New(ICStubSpace *space, IonCode *code,
                                        ICStub *firstMonitorStub, HandleShape shape)
     {
         if (!code)
             return NULL;
         return space->allocate<ICGetElem_Dense>(code, firstMonitorStub, shape);
@@ -3016,23 +2987,17 @@ class ICGetElem_Dense : public ICMonitor
 
 class ICGetElem_TypedArray : public ICStub
 {
     friend class ICStubSpace;
 
   protected: // Protected to silence Clang warning.
     HeapPtrShape shape_;
 
-    ICGetElem_TypedArray(IonCode *stubCode, HandleShape shape, uint32_t type)
-      : ICStub(GetElem_TypedArray, stubCode),
-        shape_(shape)
-    {
-        extra_ = uint16_t(type);
-        JS_ASSERT(extra_ == type);
-    }
+    ICGetElem_TypedArray(IonCode *stubCode, HandleShape shape, uint32_t type);
 
   public:
     static inline ICGetElem_TypedArray *New(ICStubSpace *space, IonCode *code,
                                             HandleShape shape, uint32_t type)
     {
         if (!code)
             return NULL;
         return space->allocate<ICGetElem_TypedArray>(code, shape, type);
@@ -3109,21 +3074,17 @@ class ICSetElem_Fallback : public ICFall
 
 class ICSetElem_Dense : public ICUpdatedStub
 {
     friend class ICStubSpace;
 
     HeapPtrShape shape_;
     HeapPtrTypeObject type_;
 
-    ICSetElem_Dense(IonCode *stubCode, HandleShape shape, HandleTypeObject type)
-      : ICUpdatedStub(SetElem_Dense, stubCode),
-        shape_(shape),
-        type_(type)
-    {}
+    ICSetElem_Dense(IonCode *stubCode, HandleShape shape, HandleTypeObject type);
 
   public:
     static inline ICSetElem_Dense *New(ICStubSpace *space, IonCode *code, HandleShape shape,
                                        HandleTypeObject type) {
         if (!code)
             return NULL;
         return space->allocate<ICSetElem_Dense>(code, shape, type);
     }
@@ -3175,23 +3136,17 @@ class ICSetElem_DenseAdd : public ICUpda
     friend class ICStubSpace;
 
   public:
     static const size_t MAX_PROTO_CHAIN_DEPTH = 4;
 
   protected:
     HeapPtrTypeObject type_;
 
-    ICSetElem_DenseAdd(IonCode *stubCode, types::TypeObject *type, size_t protoChainDepth)
-      : ICUpdatedStub(SetElem_DenseAdd, stubCode),
-        type_(type)
-    {
-        JS_ASSERT(protoChainDepth <= MAX_PROTO_CHAIN_DEPTH);
-        extra_ = protoChainDepth;
-    }
+    ICSetElem_DenseAdd(IonCode *stubCode, types::TypeObject *type, size_t protoChainDepth);
 
   public:
     static size_t offsetOfType() {
         return offsetof(ICSetElem_DenseAdd, type_);
     }
 
     HeapPtrTypeObject &type() {
         return type_;
@@ -3266,40 +3221,30 @@ class ICSetElemDenseAddCompiler : public
   public:
     ICSetElemDenseAddCompiler(JSContext *cx, HandleObject obj, size_t protoChainDepth)
         : ICStubCompiler(cx, ICStub::SetElem_DenseAdd),
           obj_(cx, obj),
           protoChainDepth_(protoChainDepth)
     {}
 
     template <size_t ProtoChainDepth>
-    ICUpdatedStub *getStubSpecific(ICStubSpace *space, const AutoShapeVector *shapes) {
-        return ICSetElem_DenseAddImpl<ProtoChainDepth>::New(space, getStubCode(), obj_->getType(cx),
-                                                            shapes);
-    }
+    ICUpdatedStub *getStubSpecific(ICStubSpace *space, const AutoShapeVector *shapes);
 
     ICUpdatedStub *getStub(ICStubSpace *space);
 };
 
 class ICSetElem_TypedArray : public ICStub
 {
     friend class ICStubSpace;
 
   protected: // Protected to silence Clang warning.
     HeapPtrShape shape_;
 
     ICSetElem_TypedArray(IonCode *stubCode, HandleShape shape, uint32_t type,
-                         bool expectOutOfBounds)
-      : ICStub(SetElem_TypedArray, stubCode),
-        shape_(shape)
-    {
-        extra_ = uint8_t(type);
-        JS_ASSERT(extra_ == type);
-        extra_ |= (static_cast<uint16_t>(expectOutOfBounds) << 8);
-    }
+                         bool expectOutOfBounds);
 
   public:
     static inline ICSetElem_TypedArray *New(ICStubSpace *space, IonCode *code,
                                             HandleShape shape, uint32_t type,
                                             bool expectOutOfBounds)
     {
         if (!code)
             return NULL;
@@ -3426,21 +3371,17 @@ class ICGetName_Fallback : public ICMoni
 class ICGetName_Global : public ICMonitoredStub
 {
     friend class ICStubSpace;
 
   protected: // Protected to silence Clang warning.
     HeapPtrShape shape_;
     uint32_t slot_;
 
-    ICGetName_Global(IonCode *stubCode, ICStub *firstMonitorStub, HandleShape shape, uint32_t slot)
-      : ICMonitoredStub(GetName_Global, stubCode, firstMonitorStub),
-        shape_(shape),
-        slot_(slot)
-    {}
+    ICGetName_Global(IonCode *stubCode, ICStub *firstMonitorStub, HandleShape shape, uint32_t slot);
 
   public:
     static inline ICGetName_Global *New(ICStubSpace *space, IonCode *code, ICStub *firstMonitorStub,
                                         HandleShape shape, uint32_t slot)
     {
         if (!code)
             return NULL;
         return space->allocate<ICGetName_Global>(code, firstMonitorStub, shape, slot);
@@ -3488,25 +3429,17 @@ class ICGetName_Scope : public ICMonitor
     friend class ICStubSpace;
 
     static const size_t MAX_HOPS = 6;
 
     HeapPtrShape shapes_[NumHops + 1];
     uint32_t offset_;
 
     ICGetName_Scope(IonCode *stubCode, ICStub *firstMonitorStub,
-                    AutoShapeVector *shapes, uint32_t offset)
-      : ICMonitoredStub(GetStubKind(), stubCode, firstMonitorStub),
-        offset_(offset)
-    {
-        JS_STATIC_ASSERT(NumHops <= MAX_HOPS);
-        JS_ASSERT(shapes->length() == NumHops + 1);
-        for (size_t i = 0; i < NumHops + 1; i++)
-            shapes_[i].init((*shapes)[i]);
-    }
+                    AutoShapeVector *shapes, uint32_t offset);
 
     static Kind GetStubKind() {
         return (Kind) (GetName_Scope0 + NumHops);
     }
 
   public:
     static inline ICGetName_Scope *New(ICStubSpace *space, IonCode *code, ICStub *firstMonitorStub,
                                        AutoShapeVector *shapes, uint32_t offset)
@@ -3630,20 +3563,18 @@ class ICGetIntrinsic_Fallback : public I
 
 // Stub that loads the constant result of a GETINTRINSIC operation.
 class ICGetIntrinsic_Constant : public ICStub
 {
     friend class ICStubSpace;
 
     HeapValue value_;
 
-    ICGetIntrinsic_Constant(IonCode *stubCode, HandleValue value)
-      : ICStub(GetIntrinsic_Constant, stubCode),
-        value_(value)
-    {}
+    ICGetIntrinsic_Constant(IonCode *stubCode, HandleValue value);
+    ~ICGetIntrinsic_Constant();
 
   public:
     static inline ICGetIntrinsic_Constant *New(ICStubSpace *space, IonCode *code,
                                                HandleValue value)
     {
         if (!code)
             return NULL;
         return space->allocate<ICGetIntrinsic_Constant>(code, value);
@@ -3784,21 +3715,17 @@ class ICGetProp_String : public ICMonito
   protected: // Protected to silence Clang warning.
     // Shape of String.prototype to check for.
     HeapPtrShape stringProtoShape_;
 
     // Fixed or dynamic slot offset.
     uint32_t offset_;
 
     ICGetProp_String(IonCode *stubCode, ICStub *firstMonitorStub,
-                     HandleShape stringProtoShape, uint32_t offset)
-      : ICMonitoredStub(GetProp_String, stubCode, firstMonitorStub),
-        stringProtoShape_(stringProtoShape),
-        offset_(offset)
-    {}
+                     HandleShape stringProtoShape, uint32_t offset);
 
   public:
     static inline ICGetProp_String *New(ICStubSpace *space, IonCode *code, ICStub *firstMonitorStub,
                                         HandleShape stringProtoShape, uint32_t offset)
     {
         if (!code)
             return NULL;
         return space->allocate<ICGetProp_String>(code, firstMonitorStub, stringProtoShape, offset);
@@ -3882,21 +3809,17 @@ class ICGetPropNativeStub : public ICMon
     // Object shape (lastProperty).
     HeapPtrShape shape_;
 
     // Fixed or dynamic slot offset.
     uint32_t offset_;
 
   protected:
     ICGetPropNativeStub(ICStub::Kind kind, IonCode *stubCode, ICStub *firstMonitorStub,
-                        HandleShape shape, uint32_t offset)
-      : ICMonitoredStub(kind, stubCode, firstMonitorStub),
-        shape_(shape),
-        offset_(offset)
-    {}
+                        HandleShape shape, uint32_t offset);
 
   public:
     HeapPtrShape &shape() {
         return shape_;
     }
     uint32_t offset() const {
         return offset_;
     }
@@ -3937,21 +3860,17 @@ class ICGetProp_NativePrototype : public
     friend class ICStubSpace;
 
   protected:
     // Holder and its shape.
     HeapPtrObject holder_;
     HeapPtrShape holderShape_;
 
     ICGetProp_NativePrototype(IonCode *stubCode, ICStub *firstMonitorStub, HandleShape shape,
-                              uint32_t offset, HandleObject holder, HandleShape holderShape)
-      : ICGetPropNativeStub(GetProp_NativePrototype, stubCode, firstMonitorStub, shape, offset),
-        holder_(holder),
-        holderShape_(holderShape)
-    {}
+                              uint32_t offset, HandleObject holder, HandleShape holderShape);
 
   public:
     static inline ICGetProp_NativePrototype *New(ICStubSpace *space, IonCode *code,
                                                  ICStub *firstMonitorStub, HandleShape shape,
                                                  uint32_t offset, HandleObject holder,
                                                  HandleShape holderShape)
     {
         if (!code)
@@ -4035,26 +3954,17 @@ class ICGetPropCallGetter : public ICMon
     // Function to call.
     HeapPtrFunction getter_;
 
     // PC offset of call
     uint32_t pcOffset_;
 
     ICGetPropCallGetter(Kind kind, IonCode *stubCode, ICStub *firstMonitorStub,
                          HandleShape shape, HandleObject holder, HandleShape holderShape,
-                         HandleFunction getter, uint32_t pcOffset)
-      : ICMonitoredStub(kind, stubCode, firstMonitorStub),
-        shape_(shape),
-        holder_(holder),
-        holderShape_(holderShape),
-        getter_(getter),
-        pcOffset_(pcOffset)
-    {
-        JS_ASSERT(kind == ICStub::GetProp_CallScripted || kind == ICStub::GetProp_CallNative);
-    }
+                         HandleFunction getter, uint32_t pcOffset);
 
   public:
     HeapPtrShape &shape() {
         return shape_;
     }
     HeapPtrObject &holder() {
         return holder_;
     }
@@ -4215,28 +4125,20 @@ class ICGetProp_CallListBaseNative : pub
 
     // Function to call.
     HeapPtrFunction getter_;
 
     // PC offset of call
     uint32_t pcOffset_;
 
     ICGetProp_CallListBaseNative(IonCode *stubCode, ICStub *firstMonitorStub,
-                       HandleShape shape, BaseProxyHandler *proxyHandler,
-                       HandleShape expandoShape, HandleObject holder, HandleShape holderShape,
-                       HandleFunction getter, uint32_t pcOffset)
-      : ICMonitoredStub(GetProp_CallListBaseNative, stubCode, firstMonitorStub),
-        shape_(shape),
-        proxyHandler_(proxyHandler),
-        expandoShape_(expandoShape),
-        holder_(holder),
-        holderShape_(holderShape),
-        getter_(getter),
-        pcOffset_(pcOffset)
-    { }
+                                 HandleShape shape, BaseProxyHandler *proxyHandler,
+                                 HandleShape expandoShape, HandleObject holder,
+                                 HandleShape holderShape, HandleFunction getter,
+                                 uint32_t pcOffset);
 
   public:
     static inline ICGetProp_CallListBaseNative *New(
             ICStubSpace *space, IonCode *code, ICStub *firstMonitorStub,
             HandleShape shape, BaseProxyHandler *proxyHandler,
             HandleShape expandoShape, HandleObject holder, HandleShape holderShape,
             HandleFunction getter, uint32_t pcOffset)
     {
@@ -4295,27 +4197,17 @@ class ICGetProp_CallListBaseNative : pub
         RootedObject holder_;
         RootedFunction getter_;
         uint32_t pcOffset_;
 
         bool generateStubCode(MacroAssembler &masm);
 
       public:
         Compiler(JSContext *cx, ICStub *firstMonitorStub, HandleObject obj,
-                 HandleObject holder, HandleFunction getter, uint32_t pcOffset)
-          : ICStubCompiler(cx, ICStub::GetProp_CallListBaseNative),
-            firstMonitorStub_(firstMonitorStub),
-            obj_(cx, obj),
-            holder_(cx, holder),
-            getter_(cx, getter),
-            pcOffset_(pcOffset)
-        {
-            JS_ASSERT(obj_->isProxy());
-            JS_ASSERT(GetProxyHandler(obj_)->family() == GetListBaseHandlerFamily());
-        }
+                 HandleObject holder, HandleFunction getter, uint32_t pcOffset);
 
         ICStub *getStub(ICStubSpace *space) {
             RootedShape shape(cx, obj_->lastProperty());
             RootedShape holderShape(cx, holder_->lastProperty());
 
             Value expandoVal = obj_->getFixedSlot(GetListBaseExpandoSlot());
             RootedShape expandoShape(cx, NULL);
             if (expandoVal.isObject())
@@ -4379,22 +4271,17 @@ class ICSetProp_Native : public ICUpdate
 {
     friend class ICStubSpace;
 
   protected: // Protected to silence Clang warning.
     HeapPtrTypeObject type_;
     HeapPtrShape shape_;
     uint32_t offset_;
 
-    ICSetProp_Native(IonCode *stubCode, HandleTypeObject type, HandleShape shape, uint32_t offset)
-      : ICUpdatedStub(SetProp_Native, stubCode),
-        type_(type),
-        shape_(shape),
-        offset_(offset)
-    {}
+    ICSetProp_Native(IonCode *stubCode, HandleTypeObject type, HandleShape shape, uint32_t offset);
 
   public:
     static inline ICSetProp_Native *New(ICStubSpace *space, IonCode *code, HandleTypeObject type,
                                         HandleShape shape, uint32_t offset)
     {
         if (!code)
             return NULL;
         return space->allocate<ICSetProp_Native>(code, type, shape, offset);
@@ -4430,24 +4317,17 @@ class ICSetProp_Native : public ICUpdate
       public:
         Compiler(JSContext *cx, HandleObject obj, bool isFixedSlot, uint32_t offset)
           : ICStubCompiler(cx, ICStub::SetProp_Native),
             obj_(obj),
             isFixedSlot_(isFixedSlot),
             offset_(offset)
         {}
 
-        ICUpdatedStub *getStub(ICStubSpace *space) {
-            RootedTypeObject type(cx, obj_->getType(cx));
-            RootedShape shape(cx, obj_->lastProperty());
-            ICUpdatedStub *stub = ICSetProp_Native::New(space, getStubCode(), type, shape, offset_);
-            if (!stub || !stub->initUpdatingChain(cx, space))
-                return NULL;
-            return stub;
-        }
+        ICUpdatedStub *getStub(ICStubSpace *space);
     };
 };
 
 
 template <size_t ProtoChainDepth> class ICSetProp_NativeAddImpl;
 
 class ICSetProp_NativeAdd : public ICUpdatedStub
 {
@@ -4455,25 +4335,17 @@ class ICSetProp_NativeAdd : public ICUpd
     static const size_t MAX_PROTO_CHAIN_DEPTH = 4;
 
   protected: // Protected to silence Clang warning.
     HeapPtrTypeObject type_;
     HeapPtrShape newShape_;
     uint32_t offset_;
 
     ICSetProp_NativeAdd(IonCode *stubCode, HandleTypeObject type, size_t protoChainDepth,
-                        HandleShape newShape, uint32_t offset)
-      : ICUpdatedStub(SetProp_NativeAdd, stubCode),
-        type_(type),
-        newShape_(newShape),
-        offset_(offset)
-    {
-        JS_ASSERT(protoChainDepth <= MAX_PROTO_CHAIN_DEPTH);
-        extra_ = protoChainDepth;
-    }
+                        HandleShape newShape, uint32_t offset);
 
   public:
     size_t protoChainDepth() const {
         return extra_;
     }
     HeapPtrTypeObject &type() {
         return type_;
     }
@@ -4503,23 +4375,17 @@ class ICSetProp_NativeAddImpl : public I
 {
     friend class ICStubSpace;
 
     static const size_t NumShapes = ProtoChainDepth + 1;
     HeapPtrShape shapes_[NumShapes];
 
     ICSetProp_NativeAddImpl(IonCode *stubCode, HandleTypeObject type,
                             const AutoShapeVector *shapes,
-                            HandleShape newShape, uint32_t offset)
-      : ICSetProp_NativeAdd(stubCode, type, ProtoChainDepth, newShape, offset)
-    {
-        JS_ASSERT(shapes->length() == NumShapes);
-        for (size_t i = 0; i < NumShapes; i++)
-            shapes_[i].init((*shapes)[i]);
-    }
+                            HandleShape newShape, uint32_t offset);
 
   public:
     static inline ICSetProp_NativeAddImpl *New(
             ICStubSpace *space, IonCode *code, HandleTypeObject type,
             const AutoShapeVector *shapes, HandleShape newShape, uint32_t offset)
     {
         if (!code)
             return NULL;
@@ -4549,26 +4415,17 @@ class ICSetPropNativeAddCompiler : publi
         return static_cast<int32_t>(kind) | (static_cast<int32_t>(isFixedSlot_) << 16) |
                (static_cast<int32_t>(protoChainDepth_) << 20);
     }
 
     bool generateStubCode(MacroAssembler &masm);
 
   public:
     ICSetPropNativeAddCompiler(JSContext *cx, HandleObject obj, HandleShape oldShape,
-                               size_t protoChainDepth, bool isFixedSlot, uint32_t offset)
-      : ICStubCompiler(cx, ICStub::SetProp_NativeAdd),
-        obj_(cx, obj),
-        oldShape_(cx, oldShape),
-        protoChainDepth_(protoChainDepth),
-        isFixedSlot_(isFixedSlot),
-        offset_(offset)
-    {
-        JS_ASSERT(protoChainDepth_ <= ICSetProp_NativeAdd::MAX_PROTO_CHAIN_DEPTH);
-    }
+                               size_t protoChainDepth, bool isFixedSlot, uint32_t offset);
 
     template <size_t ProtoChainDepth>
     ICUpdatedStub *getStubSpecific(ICStubSpace *space, const AutoShapeVector *shapes)
     {
         RootedTypeObject type(cx, obj_->getType(cx));
         RootedShape newShape(cx, obj_->lastProperty());
 
         return ICSetProp_NativeAddImpl<ProtoChainDepth>::New(
@@ -4593,26 +4450,17 @@ class ICSetPropCallSetter : public ICStu
 
     // Function to call.
     HeapPtrFunction setter_;
 
     // PC of call, for profiler
     uint32_t pcOffset_;
 
     ICSetPropCallSetter(Kind kind, IonCode *stubCode, HandleShape shape, HandleObject holder,
-                        HandleShape holderShape, HandleFunction setter, uint32_t pcOffset)
-      : ICStub(kind, stubCode),
-        shape_(shape),
-        holder_(holder),
-        holderShape_(holderShape),
-        setter_(setter),
-        pcOffset_(pcOffset)
-    {
-        JS_ASSERT(kind == ICStub::SetProp_CallScripted || kind == ICStub::SetProp_CallNative);
-    }
+                        HandleShape holderShape, HandleFunction setter, uint32_t pcOffset);
 
   public:
     HeapPtrShape &shape() {
         return shape_;
     }
     HeapPtrObject &holder() {
         return holder_;
     }
@@ -4838,21 +4686,17 @@ class ICCall_Scripted : public ICMonitor
 {
     friend class ICStubSpace;
 
   protected:
     HeapPtrScript calleeScript_;
     uint32_t pcOffset_;
 
     ICCall_Scripted(IonCode *stubCode, ICStub *firstMonitorStub, HandleScript calleeScript,
-                    uint32_t pcOffset)
-      : ICMonitoredStub(ICStub::Call_Scripted, stubCode, firstMonitorStub),
-        calleeScript_(calleeScript),
-        pcOffset_(pcOffset)
-    { }
+                    uint32_t pcOffset);
 
   public:
     static inline ICCall_Scripted *New(
             ICStubSpace *space, IonCode *code, ICStub *firstMonitorStub, HandleScript calleeScript,
             uint32_t pcOffset)
     {
         if (!code)
             return NULL;
@@ -4942,21 +4786,17 @@ class ICCall_Native : public ICMonitored
 {
     friend class ICStubSpace;
 
   protected:
     HeapPtrFunction callee_;
     uint32_t pcOffset_;
 
     ICCall_Native(IonCode *stubCode, ICStub *firstMonitorStub, HandleFunction callee,
-                  uint32_t pcOffset)
-      : ICMonitoredStub(ICStub::Call_Native, stubCode, firstMonitorStub),
-        callee_(callee),
-        pcOffset_(pcOffset)
-    { }
+                  uint32_t pcOffset);
 
   public:
     static inline ICCall_Native *New(ICStubSpace *space, IonCode *code, ICStub *firstMonitorStub,
                                      HandleFunction callee, uint32_t pcOffset)
     {
         if (!code)
             return NULL;
         return space->allocate<ICCall_Native>(code, firstMonitorStub, callee, pcOffset);
--- a/js/src/ion/CompileInfo-inl.h
+++ b/js/src/ion/CompileInfo-inl.h
@@ -9,16 +9,22 @@
 #define jsion_compileinfo_inl_h__
 
 #include "CompileInfo.h"
 #include "jsscriptinlines.h"
 
 using namespace js;
 using namespace ion;
 
+const char *
+CompileInfo::filename() const
+{
+    return script_->filename();
+}
+
 JSAtom *
 CompileInfo::getAtom(jsbytecode *pc) const
 {
     return script_->getAtom(GET_UINT32_INDEX(pc));
 }
 
 PropertyName *
 CompileInfo::getName(jsbytecode *pc) const
--- a/js/src/ion/CompileInfo.h
+++ b/js/src/ion/CompileInfo.h
@@ -75,19 +75,18 @@ class CompileInfo
 
     jsbytecode *startPC() const {
         return script_->code;
     }
     jsbytecode *limitPC() const {
         return script_->code + script_->length;
     }
 
-    const char *filename() const {
-        return script_->filename();
-    }
+    inline const char *filename() const;
+
     unsigned lineno() const {
         return script_->lineno;
     }
     unsigned lineno(JSContext *cx, jsbytecode *pc) const {
         return PCToLineNumber(script_, pc);
     }
 
     // Script accessors based on PC.
--- a/js/src/ion/IonLinker.h
+++ b/js/src/ion/IonLinker.h
@@ -5,21 +5,21 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef jsion_linker_h__
 #define jsion_linker_h__
 
 #include "jscntxt.h"
 #include "jscompartment.h"
+#include "jsgc.h"
 #include "ion/IonCode.h"
 #include "ion/IonCompartment.h"
 #include "assembler/jit/ExecutableAllocator.h"
 #include "ion/IonMacroAssembler.h"
-#include "jsgcinlines.h"
 
 namespace js {
 namespace ion {
 
 class Linker
 {
     MacroAssembler &masm;
 
--- a/js/src/ion/TypeOracle.cpp
+++ b/js/src/ion/TypeOracle.cpp
@@ -13,16 +13,21 @@
 #include "jsobjinlines.h"
 #include "jsanalyze.h"
 
 using namespace js;
 using namespace js::ion;
 using namespace js::types;
 using namespace js::analyze;
 
+TypeInferenceOracle::TypeInferenceOracle()
+  : cx(NULL),
+    script_(NULL)
+{}
+
 bool
 TypeInferenceOracle::init(JSContext *cx, JSScript *script, bool inlinedCall)
 {
     AutoEnterAnalysis enter(cx);
 
     this->cx = cx;
     this->script_.init(script);
 
--- a/js/src/ion/TypeOracle.h
+++ b/js/src/ion/TypeOracle.h
@@ -242,17 +242,17 @@ class TypeInferenceOracle : public TypeO
     MIRType getMIRType(types::HeapTypeSet *types);
 
     bool analyzeTypesForInlinableCallees(JSContext *cx, JSScript *script,
                                          Vector<JSScript*> &seen);
     bool analyzeTypesForInlinableCallees(JSContext *cx, types::StackTypeSet *calleeTypes,
                                          Vector<JSScript*> &seen);
 
   public:
-    TypeInferenceOracle() : cx(NULL), script_(NULL) {}
+    TypeInferenceOracle();
 
     bool init(JSContext *cx, JSScript *script, bool inlinedCall);
 
     RawScript script() { return script_.get(); }
 
     UnaryTypes unaryTypes(RawScript script, jsbytecode *pc);
     BinaryTypes binaryTypes(RawScript script, jsbytecode *pc);
     Unary unaryOp(RawScript script, jsbytecode *pc);
--- a/js/src/ion/shared/BaselineCompiler-shared.h
+++ b/js/src/ion/shared/BaselineCompiler-shared.h
@@ -108,43 +108,16 @@ class BaselineCompilerShared
             return PCMappingSlotInfo::MakeSlotInfo(PCMappingSlotInfo::ToSlotLocation(frame.peek(-1)));
           case 2:
           default:
             return PCMappingSlotInfo::MakeSlotInfo(PCMappingSlotInfo::ToSlotLocation(frame.peek(-1)),
                                                    PCMappingSlotInfo::ToSlotLocation(frame.peek(-2)));
         }
     }
 
-    bool addPCMappingEntry(uint32_t nativeOffset, PCMappingSlotInfo slotInfo, bool addIndexEntry) {
-
-        // Don't add multiple entries for a single pc.
-        size_t nentries = pcMappingEntries_.length();
-        if (nentries > 0 && pcMappingEntries_[nentries - 1].pcOffset == unsigned(pc - script->code))
-            return true;
-
-        PCMappingEntry entry;
-        entry.pcOffset = pc - script->code;
-        entry.nativeOffset = nativeOffset;
-        entry.slotInfo = slotInfo;
-        entry.addIndexEntry = addIndexEntry;
-
-        IonSpew(IonSpew_BaselineOp, "PCMapping (%s:%u): %u => %u (%u:%u:%u)!",
-                        script->filename(), script->lineno,
-                        entry.pcOffset, entry.nativeOffset,
-                        (entry.slotInfo.toByte() & 0x3),
-                        ((entry.slotInfo.toByte() >> 2) & 0x3),
-                        ((entry.slotInfo.toByte() >> 4) & 0x3));
-
-        return pcMappingEntries_.append(entry);
-    }
-
-    bool addPCMappingEntry(bool addIndexEntry) {
-        return addPCMappingEntry(masm.currentOffset(), getStackTopSlotInfo(), addIndexEntry);
-    }
-
     template <typename T>
     void pushArg(const T& t) {
         masm.Push(t);
     }
     void prepareVMCall() {
         pushedBeforeCall_ = masm.framePushed();
         inCall_ = true;
 
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -5048,8 +5048,20 @@ AutoMaybeTouchDeadZones::~AutoMaybeTouch
 {
     if (inIncremental && runtime->gcObjectsMarkedInDeadZones != markCount) {
         JS::PrepareForFullGC(runtime);
         js::GC(runtime, GC_NORMAL, JS::gcreason::TRANSPLANT);
     }
 
     runtime->gcManipulatingDeadZones = manipulatingDeadZones;
 }
+
+AutoSuppressGC::AutoSuppressGC(JSContext *cx)
+  : suppressGC_(cx->runtime->mainThread.suppressGC)
+{
+    suppressGC_++;
+}
+
+AutoSuppressGC::AutoSuppressGC(JSCompartment *comp)
+  : suppressGC_(comp->rt->mainThread.suppressGC)
+{
+    suppressGC_++;
+}
--- a/js/src/jsgc.h
+++ b/js/src/jsgc.h
@@ -1250,16 +1250,36 @@ VerifyBarriers(JSRuntime *rt, VerifierTy
 
 static inline void
 MaybeVerifyBarriers(JSContext *cx, bool always = false)
 {
 }
 
 #endif
 
+/*
+ * Instances of this class set the |JSRuntime::suppressGC| flag for the duration
+ * that they are live. Use of this class is highly discouraged. Please carefully
+ * read the comment in jscntxt.h above |suppressGC| and take all appropriate
+ * precautions before instantiating this class.
+ */
+class AutoSuppressGC
+{
+    int32_t &suppressGC_;
+
+  public:
+    AutoSuppressGC(JSContext *cx);
+    AutoSuppressGC(JSCompartment *comp);
+
+    ~AutoSuppressGC()
+    {
+        suppressGC_--;
+    }
+};
+
 } /* namespace gc */
 
 void
 PurgeJITCaches(JS::Zone *zone);
 
 } /* namespace js */
 
 #endif /* jsgc_h___ */
--- a/js/src/jsgcinlines.h
+++ b/js/src/jsgcinlines.h
@@ -508,45 +508,16 @@ NewGCThing(JSContext *cx, AllocKind kind
         JS_ASSERT(!IsAtomsCompartment(cx->compartment));
         cx->runtime->gcVerifierNursery.insertPointer(t);
     }
 #endif
 
     return t;
 }
 
-/*
- * Instances of this class set the |JSRuntime::suppressGC| flag for the duration
- * that they are live. Use of this class is highly discouraged. Please carefully
- * read the comment in jscntxt.h above |suppressGC| and take all appropriate
- * precautions before instantiating this class.
- */
-class AutoSuppressGC
-{
-    int32_t &suppressGC_;
-
-  public:
-    AutoSuppressGC(JSContext *cx)
-      : suppressGC_(cx->runtime->mainThread.suppressGC)
-    {
-        suppressGC_++;
-    }
-
-    AutoSuppressGC(JSCompartment *comp)
-      : suppressGC_(comp->rt->mainThread.suppressGC)
-    {
-        suppressGC_++;
-    }
-
-    ~AutoSuppressGC()
-    {
-        suppressGC_--;
-    }
-};
-
 } /* namespace gc */
 } /* namespace js */
 
 template <js::AllowGC allowGC>
 inline JSObject *
 js_NewGCObject(JSContext *cx, js::gc::AllocKind kind, js::gc::InitialHeap heap)
 {
     JS_ASSERT(kind >= js::gc::FINALIZE_OBJECT0 && kind <= js::gc::FINALIZE_OBJECT_LAST);