Bug 1079068: Move mightBeMagicType in MIR.cpp; r=h4writer
authorBenjamin Bouvier <benj@benj.me>
Wed, 08 Oct 2014 16:29:14 +0200
changeset 232566 aea1690f59476d4f1e964e0febed6041dff66e34
parent 232565 1d454aaf1dec70298aa89ba79c890acab32f85a5
child 232567 e0b3b8c184243a3e849d01bbac8b28eee35c0660
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersh4writer
bugs1079068
milestone35.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 1079068: Move mightBeMagicType in MIR.cpp; r=h4writer
js/src/jit/MIR.cpp
js/src/jit/MIR.h
--- a/js/src/jit/MIR.cpp
+++ b/js/src/jit/MIR.cpp
@@ -219,16 +219,28 @@ MDefinition::congruentIfOperandsEqual(co
 
 MDefinition *
 MDefinition::foldsTo(TempAllocator &alloc)
 {
     // In the default case, there are no constants to fold.
     return this;
 }
 
+bool
+MDefinition::mightBeMagicType() const
+{
+    if (IsMagicType(type()))
+        return true;
+
+    if (MIRType_Value != type())
+        return false;
+
+    return !resultTypeSet() || resultTypeSet()->hasType(types::Type::MagicArgType());
+}
+
 MDefinition *
 MInstruction::foldsToStoredValue(TempAllocator &alloc, MDefinition *loaded)
 {
     // If the type are matching then we return the value which is used as
     // argument of the store.
     if (loaded->type() != type()) {
         // If we expect to read a type which is more generic than the type seen
         // by the store, then we box the value used by the store.
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -591,25 +591,17 @@ class MDefinition : public MNode
             return true;
 
         if (MIRType_Value != this->type())
             return false;
 
         return !resultTypeSet() || resultTypeSet()->mightBeMIRType(type);
     }
 
-    bool mightBeMagicType() const {
-        if (IsMagicType(type()))
-            return true;
-
-        if (MIRType_Value != type())
-            return false;
-
-        return !resultTypeSet() || resultTypeSet()->hasType(types::Type::MagicArgType());
-    }
+    bool mightBeMagicType() const;
 
     // Float32 specialization operations (see big comment in IonAnalysis before the Float32
     // specialization algorithm).
     virtual bool isFloat32Commutative() const { return false; }
     virtual bool canProduceFloat32() const { return false; }
     virtual bool canConsumeFloat32(MUse *use) const { return false; }
     virtual void trySpecializeFloat32(TempAllocator &alloc) {}
 #ifdef DEBUG