Bug 914132 part 1 - MTypeOf should never be effectful. r=evilpie
authorJan de Mooij <jdemooij@mozilla.com>
Tue, 10 Sep 2013 16:16:59 +0200
changeset 146411 5fd5f21d4663d636fdcfdfba8dd10c268142048f
parent 146410 ab0a4b4b9b1fd684cc38fe144782b5adb73a9985
child 146412 61824642543ad2d21365f8a8e368686f452f9f69
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewersevilpie
bugs914132
milestone26.0a1
Bug 914132 part 1 - MTypeOf should never be effectful. r=evilpie
js/src/jit/IonBuilder.cpp
js/src/jit/MIR.h
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -8932,18 +8932,16 @@ bool
 IonBuilder::jsop_typeof()
 {
     MDefinition *input = current->pop();
     MTypeOf *ins = MTypeOf::New(input, input->type());
 
     current->add(ins);
     current->push(ins);
 
-    if (ins->isEffectful() && !resumeAfter(ins))
-        return false;
     return true;
 }
 
 bool
 IonBuilder::jsop_toid()
 {
     // No-op if the index is an integer.
     if (current->peek(-1)->type() == MIRType_Int32)
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -2914,21 +2914,17 @@ class MTypeOf
         return this;
     }
     MIRType inputType() const {
         return inputType_;
     }
     MDefinition *foldsTo(bool useValueNumbers);
 
     AliasSet getAliasSet() const {
-        if (inputType_ <= MIRType_String)
-            return AliasSet::None();
-
-        // For objects, typeof may invoke an effectful typeof hook.
-        return AliasSet::Store(AliasSet::Any);
+        return AliasSet::None();
     }
 };
 
 class MToId
   : public MBinaryInstruction,
     public BoxInputsPolicy
 {
     MToId(MDefinition *object, MDefinition *index)