Merge backout.
authorDavid Anderson <danderson@mozilla.com>
Tue, 06 Sep 2011 13:54:54 -0700
changeset 105238 b4e0df409adc424e71d5d320c97bdcb8bfbd6af8
parent 105237 62935e48508a5992def4b6c9a456364c7d853bc5
child 105239 a2d39a64ab2804d78b8f28a0646af31b36bb012f
push id14706
push usereakhgari@mozilla.com
push dateTue, 11 Sep 2012 20:39:52 +0000
treeherdermozilla-inbound@d50bf1edaabe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone9.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
Merge backout.
js/src/ion/IonBuilder.cpp
js/src/ion/IonBuilder.h
js/src/ion/IonCode.h
js/src/ion/MIR.h
js/src/ion/MOpcodes.h
js/src/ion/TypeOracle.h
--- a/js/src/ion/IonBuilder.cpp
+++ b/js/src/ion/IonBuilder.cpp
@@ -375,19 +375,16 @@ IonBuilder::inspectOpcode(JSOp op)
         return jsop_neg();
 
       case JSOP_LOCALINC:
       case JSOP_INCLOCAL:
       case JSOP_LOCALDEC:
       case JSOP_DECLOCAL:
         return jsop_localinc(op);
 
-      case JSOP_GETGLOBAL:
-        return jsop_getglobal(op);
-
       case JSOP_LT:
       case JSOP_LE:
       case JSOP_GT:
       case JSOP_GE:
         return jsop_compare(op);
 
       case JSOP_ARGINC:
       case JSOP_INCARG:
@@ -1746,19 +1743,8 @@ IonBuilder::resumeAt(MInstruction *ins, 
 {
     MResumePoint *resumePoint = MResumePoint::New(current, pc);
     if (!resumePoint)
         return false;
     ins->setResumePoint(resumePoint);
     return true;
 }
 
-bool
-IonBuilder::jsop_getglobal(JSOp op)
-{
-    JSObject *globalObj = script->global();
-    MConstant *global = MConstant::New(ObjectValue(*globalObj));
-    current->add(global);
-
-    uint32 slot = script->getGlobalSlot(GET_SLOTNO(pc));
-    MLoad *load = MLoadSlot::New(global, slot);
-}
-
--- a/js/src/ion/IonBuilder.h
+++ b/js/src/ion/IonBuilder.h
@@ -244,17 +244,16 @@ class IonBuilder : public MIRGenerator
     bool jsop_bitnot();
     bool jsop_bitop(JSOp op);
     bool jsop_binary(JSOp op);
     bool jsop_neg();
     bool jsop_ifeq(JSOp op);
     bool jsop_localinc(JSOp op);
     bool jsop_arginc(JSOp op);
     bool jsop_compare(JSOp op);
-    bool jsop_getglobal(JSOp op);
 
   private:
     JSAtom **atoms;
     MBasicBlock *current;
     Vector<CFGState, 8, IonAllocPolicy> cfgStack_;
     Vector<ControlFlowInfo, 4, IonAllocPolicy> loops_;
     Vector<ControlFlowInfo, 0, IonAllocPolicy> switches_;
     TypeOracle *oracle;
--- a/js/src/ion/IonCode.h
+++ b/js/src/ion/IonCode.h
@@ -83,17 +83,17 @@ class IonCode : public gc::Cell
         dataSize_(0),
         relocTableSize_(0)
     { }
 
     uint32 dataOffset() const {
         return insnSize_;
     }
     uint32 relocTableOffset() const {
-        return dataOffset() + dataSize_;
+        return dataOffset() + relocTableSize_;
     }
 
   public:
     uint8 *raw() const {
         return code_;
     }
     size_t instructionsSize() const {
         return insnSize_;
--- a/js/src/ion/MIR.h
+++ b/js/src/ion/MIR.h
@@ -1274,79 +1274,16 @@ class MMul : public MBinaryArithInstruct
         return canBeNegativeZero_;
     }
 
     bool fallible() {
         return canBeNegativeZero_ || canOverflow_;
     }
 };
 
-// Returns obj->slots.
-class MSlots : public MUnaryInstruction
-{
-    MSlots(MDefinition *from, uint32 slot)
-      : MUnaryInstruction(from)
-    {
-        setResultType(MIRType_Slots);
-        setIdempotent();
-        JS_ASSERT(from->type() == MIRType_Object);
-    }
-
-  public:
-    INSTRUCTION_HEADER(Slots);
-
-    static MSlots *New(MDefinition *from, uint32 slot) {
-        return new MSlots(from, slot);
-    }
-};
-
-// Load from vp[slot]
-class MLoad : public MUnaryInstruction
-{
-    uint32 slot_;
-
-    MLoad(MDefinition *from, uint32 slot)
-      : MUnaryInstruction(from),
-        slot_(slot)
-    {
-        setResultType(MIRType_Value);
-        setIdempotent();
-        JS_ASSERT(from->type() == MIRType_Slots);
-    }
-
-  public:
-    INSTRUCTION_HEADER(Load);
-
-    static MLoad *New(MDefinition *from, uint32 slot) {
-        return new MLoad(from, slot);
-    }
-};
-
-// Load from an object's inline slots.
-class MLoadInline : public MUnaryInstruction
-{
-    uint32 slot_;
-
-    MLoadInline(MDefinition *from, uint32 slot)
-      : MUnaryInstruction(from),
-        slot_(slot)
-    {
-        setResultType(MIRType_Value);
-        setIdempotent();
-        JS_ASSERT(from->type() == MIRType_Object);
-    }
-
-  public:
-    INSTRUCTION_HEADER(LoadInline);
-
-    static MLoadInline *New(MDefinition *from, uint32 slot) {
-        return new MLoadInline(from, slot);
-    }
-};
-
 class MPhi : public MDefinition, public InlineForwardListNode<MPhi>
 {
     js::Vector<MDefinition *, 2, IonAllocPolicy> inputs_;
     uint32 slot_;
     bool triedToSpecialize_;
 
     MPhi(uint32 slot)
       : slot_(slot),
--- a/js/src/ion/MOpcodes.h
+++ b/js/src/ion/MOpcodes.h
@@ -65,20 +65,17 @@ namespace ion {
     _(Mul)                                                                  \
     _(Return)                                                               \
     _(Copy)                                                                 \
     _(Box)                                                                  \
     _(Unbox)                                                                \
     _(ToDouble)                                                             \
     _(ToInt32)                                                              \
     _(TruncateToInt32)                                                      \
-    _(Start)                                                                \
-    _(Slots)                                                                \
-    _(Load)                                                                 \
-    _(LoadInline)
+    _(Start)
 
 
 // Forward declarations of MIR types.
 #define FORWARD_DECLARE(op) class M##op;
  MIR_OPCODE_LIST(FORWARD_DECLARE)
 #undef FORWARD_DECLARE
 
 class MInstructionVisitor
--- a/js/src/ion/TypeOracle.h
+++ b/js/src/ion/TypeOracle.h
@@ -56,18 +56,17 @@ enum MIRType
     MIRType_Null,
     MIRType_Boolean,
     MIRType_Int32,
     MIRType_Double,
     MIRType_String,
     MIRType_Object,
     MIRType_Value,
     MIRType_Any,        // Any type.
-    MIRType_None,       // Invalid, used as a placeholder.
-    MIRType_Slots       // A slots vector
+    MIRType_None        // Invalid, used as a placeholder.
 };
 
 class TypeOracle
 {
   public:
     struct Unary {
         MIRType ival;
         MIRType rval;