Bug 981894 - IonMonkey: Misc cleanups r=nbp
authorDan Gohman <sunfish@mozilla.com>
Thu, 20 Mar 2014 08:58:24 -0700
changeset 174611 d35f97a5b1fe6e2804797b447215a9ea5bb9b35d
parent 174610 61e72c13e60b3688d1d3e0714d373bdd6d67073c
child 174612 3762c3e540cd53baebd29e414c8c41d862a6dd26
push id26456
push userryanvm@gmail.com
push dateThu, 20 Mar 2014 21:03:17 +0000
treeherdermozilla-central@045dd7740be7 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs981894
milestone31.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 981894 - IonMonkey: Misc cleanups r=nbp
js/src/jit/IonFrames.cpp
js/src/jit/LIR.cpp
js/src/jit/MIRGraph.cpp
js/src/jit/MIRGraph.h
--- a/js/src/jit/IonFrames.cpp
+++ b/js/src/jit/IonFrames.cpp
@@ -48,17 +48,17 @@ ReadFrameSlot(IonJSFrameLayout *fp, int3
 }
 
 static inline double
 ReadFrameDoubleSlot(IonJSFrameLayout *fp, int32_t slot)
 {
     return *(double *)((char *)fp + OffsetOfFrameSlot(slot));
 }
 
-static inline double
+static inline float
 ReadFrameFloat32Slot(IonJSFrameLayout *fp, int32_t slot)
 {
     return *(float *)((char *)fp + OffsetOfFrameSlot(slot));
 }
 
 static inline int32_t
 ReadFrameInt32Slot(IonJSFrameLayout *fp, int32_t slot)
 {
--- a/js/src/jit/LIR.cpp
+++ b/js/src/jit/LIR.cpp
@@ -346,16 +346,17 @@ LInstruction::dump(FILE *fp)
         fprintf(fp, " t=(");
         for (size_t i = 0; i < numTemps(); i++) {
             PrintDefinition(fp, *getTemp(i));
             if (i != numTemps() - 1)
                 fprintf(fp, ", ");
         }
         fprintf(fp, ")");
     }
+    fprintf(stderr, "\n");
 }
 
 void
 LInstruction::dump()
 {
     return dump(stderr);
 }
 
--- a/js/src/jit/MIRGraph.cpp
+++ b/js/src/jit/MIRGraph.cpp
@@ -309,17 +309,16 @@ MBasicBlock::MBasicBlock(MIRGraph &graph
     successorWithPhis_(nullptr),
     positionInPhiSuccessor_(0),
     kind_(kind),
     loopDepth_(0),
     mark_(false),
     immediatelyDominated_(graph.alloc()),
     immediateDominator_(nullptr),
     numDominated_(0),
-    loopHeader_(nullptr),
     trackedPc_(pc)
 #if defined (JS_ION_PERF)
     , lineno_(0u),
     columnIndex_(0u)
 #endif
 {
 }
 
@@ -957,17 +956,17 @@ MBasicBlock::assertUsesAreNotWithin(MUse
     for (; use != end; use++) {
         JS_ASSERT_IF(use->consumer()->isDefinition(),
                      use->consumer()->toDefinition()->block()->id() < id());
     }
 #endif
 }
 
 bool
-MBasicBlock::dominates(MBasicBlock *other)
+MBasicBlock::dominates(const MBasicBlock *other) const
 {
     uint32_t high = domIndex() + numDominated();
     uint32_t low  = domIndex();
     return other->domIndex() >= low && other->domIndex() <= high;
 }
 
 void
 MBasicBlock::setUnreachable()
--- a/js/src/jit/MIRGraph.h
+++ b/js/src/jit/MIRGraph.h
@@ -80,25 +80,25 @@ class MBasicBlock : public TempObject, p
                                              unsigned loopStateSlots);
     static MBasicBlock *NewSplitEdge(MIRGraph &graph, CompileInfo &info, MBasicBlock *pred);
     static MBasicBlock *NewAbortPar(MIRGraph &graph, CompileInfo &info,
                                     MBasicBlock *pred, jsbytecode *entryPc,
                                     MResumePoint *resumePoint);
     static MBasicBlock *NewAsmJS(MIRGraph &graph, CompileInfo &info,
                                  MBasicBlock *pred, Kind kind);
 
-    bool dominates(MBasicBlock *other);
+    bool dominates(const MBasicBlock *other) const;
 
     void setId(uint32_t id) {
         id_ = id;
     }
 
     // Mark the current block and all dominated blocks as unreachable.
     void setUnreachable();
-    bool unreachable() {
+    bool unreachable() const {
         return unreachable_;
     }
     // Move the definition to the top of the stack.
     void pick(int32_t depth);
 
     // Exchange 2 stack slots at the defined depth
     void swapAt(int32_t depth);
 
@@ -446,25 +446,16 @@ class MBasicBlock : public TempObject, p
     void setSuccessorWithPhis(MBasicBlock *successor, uint32_t id) {
         successorWithPhis_ = successor;
         positionInPhiSuccessor_ = id;
     }
     size_t numSuccessors() const;
     MBasicBlock *getSuccessor(size_t index) const;
     size_t getSuccessorIndex(MBasicBlock *) const;
 
-    // Specifies the closest loop header dominating this block.
-    void setLoopHeader(MBasicBlock *loop) {
-        JS_ASSERT(loop->isLoopHeader());
-        loopHeader_ = loop;
-    }
-    MBasicBlock *loopHeader() const {
-        return loopHeader_;
-    }
-
     void setLoopDepth(uint32_t loopDepth) {
         loopDepth_ = loopDepth;
     }
     uint32_t loopDepth() const {
         return loopDepth_;
     }
 
     bool strict() const {
@@ -508,17 +499,16 @@ class MBasicBlock : public TempObject, p
     uint32_t loopDepth_;
 
     // Utility mark for traversal algorithms.
     bool mark_;
 
     Vector<MBasicBlock *, 1, IonAllocPolicy> immediatelyDominated_;
     MBasicBlock *immediateDominator_;
     size_t numDominated_;
-    MBasicBlock *loopHeader_;
 
     jsbytecode *trackedPc_;
 
 #if defined (JS_ION_PERF)
     unsigned lineno_;
     unsigned columnIndex_;
 
   public: