Bug 1044022 - Clean-up: IonMonkey: the LIRGenerator should inherit from MDefinitionVisitor instead of MDefinitionVisitorDefaultNYI. r=nbp
authorInanc Seylan <inanc.seylan@gmail.com>
Tue, 05 Aug 2014 07:38:00 -0400
changeset 200263 4db3058a5c9f54b92e4e675478f86f7b1c34c1f8
parent 200262 721eb8e94100c8947b6c00e22ea69b4462d6050b
child 200264 53c7fcb7ead91a2bda0ec1fd26de32c8058e04dd
push id47860
push userryanvm@gmail.com
push dateTue, 19 Aug 2014 12:42:37 +0000
treeherdermozilla-inbound@bb91698edd20 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs1044022
milestone34.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 1044022 - Clean-up: IonMonkey: the LIRGenerator should inherit from MDefinitionVisitor instead of MDefinitionVisitorDefaultNYI. r=nbp
js/src/jit/Lowering.cpp
js/src/jit/Lowering.h
js/src/jit/shared/Lowering-shared.h
--- a/js/src/jit/Lowering.cpp
+++ b/js/src/jit/Lowering.cpp
@@ -3878,8 +3878,37 @@ LIRGenerator::generate()
 
         if (!visitBlock(*block))
             return false;
     }
 
     lirGraph_.setArgumentSlotCount(maxargslots_);
     return true;
 }
+
+bool
+LIRGenerator::visitPhi(MPhi *phi)
+{
+    // Phi nodes are not lowered because they are only meaningful for the register allocator.
+    MOZ_ASSUME_UNREACHABLE("Unexpected Phi node during Lowering.");
+}
+
+bool
+LIRGenerator::visitBeta(MBeta *beta)
+{
+    // Beta nodes are supposed to be removed before because they are
+    // only used to carry the range information for Range analysis
+    MOZ_ASSUME_UNREACHABLE("Unexpected Beta node during Lowering.");
+}
+
+bool
+LIRGenerator::visitObjectState(MObjectState *objState)
+{
+    // ObjectState nodes are always recovered on bailouts
+    MOZ_ASSUME_UNREACHABLE("Unexpected ObjectState node during Lowering.");
+}
+
+bool
+LIRGenerator::visitArrayState(MArrayState *objState)
+{
+    // ArrayState nodes are always recovered on bailouts
+    MOZ_ASSUME_UNREACHABLE("Unexpected ArrayState node during Lowering.");
+}
--- a/js/src/jit/Lowering.h
+++ b/js/src/jit/Lowering.h
@@ -263,14 +263,18 @@ class LIRGenerator : public LIRGenerator
     bool visitSetDOMProperty(MSetDOMProperty *ins);
     bool visitGetDOMProperty(MGetDOMProperty *ins);
     bool visitGetDOMMember(MGetDOMMember *ins);
     bool visitRecompileCheck(MRecompileCheck *ins);
     bool visitSimdExtractElement(MSimdExtractElement *ins);
     bool visitSimdBinaryArith(MSimdBinaryArith *ins);
     bool visitSimdValueX4(MSimdValueX4 *ins);
     bool visitSimdConstant(MSimdConstant *ins);
+    bool visitPhi(MPhi *ins);
+    bool visitBeta(MBeta *ins);
+    bool visitObjectState(MObjectState *ins);
+    bool visitArrayState(MArrayState *ins);
 };
 
 } // namespace jit
 } // namespace js
 
 #endif /* jit_Lowering_h */
--- a/js/src/jit/shared/Lowering-shared.h
+++ b/js/src/jit/shared/Lowering-shared.h
@@ -18,17 +18,17 @@ namespace jit {
 class MBasicBlock;
 class MTableSwitch;
 class MIRGenerator;
 class MIRGraph;
 class MDefinition;
 class MInstruction;
 class LOsiPoint;
 
-class LIRGeneratorShared : public MDefinitionVisitorDefaultNYI
+class LIRGeneratorShared : public MDefinitionVisitor
 {
   protected:
     MIRGenerator *gen;
     MIRGraph &graph;
     LIRGraph &lirGraph_;
     LBlock *current;
     MResumePoint *lastResumePoint_;
     LRecoverInfo *cachedRecoverInfo_;