Bug 866706 - Ensure that MMonitorTypes boxes its inputs, r=dvander.
authorBrian Hackett <bhackett1024@gmail.com>
Wed, 01 May 2013 08:29:05 -0600
changeset 137245 120ca4a6afc3c72d2fb1b59804c372f63662453d
parent 137244 709034aa6a035f5c7a39f10ead2dc04f4191bbd2
child 137246 ea568a1576e52ce35ef522502e3868011216defc
push id3752
push userlsblakk@mozilla.com
push dateMon, 13 May 2013 17:21:10 +0000
treeherdermozilla-aurora@1580544aef0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdvander
bugs866706
milestone23.0a1
Bug 866706 - Ensure that MMonitorTypes boxes its inputs, r=dvander.
js/src/ion/MIR.h
--- a/js/src/ion/MIR.h
+++ b/js/src/ion/MIR.h
@@ -7119,17 +7119,17 @@ class MTypeBarrier
     virtual bool neverHoist() const {
         return resultTypeSet()->empty();
     }
 };
 
 // Like MTypeBarrier, guard that the value is in the given type set. This is
 // used before property writes to ensure the value being written is represented
 // in the property types for the object.
-class MMonitorTypes : public MUnaryInstruction
+class MMonitorTypes : public MUnaryInstruction, public BoxInputsPolicy
 {
     const types::StackTypeSet *typeSet_;
 
     MMonitorTypes(MDefinition *def, const types::StackTypeSet *types)
       : MUnaryInstruction(def),
         typeSet_(types)
     {
         setGuard();
@@ -7137,16 +7137,21 @@ class MMonitorTypes : public MUnaryInstr
     }
 
   public:
     INSTRUCTION_HEADER(MonitorTypes)
 
     static MMonitorTypes *New(MDefinition *def, const types::StackTypeSet *types) {
         return new MMonitorTypes(def, types);
     }
+
+    TypePolicy *typePolicy() {
+        return this;
+    }
+
     MDefinition *input() const {
         return getOperand(0);
     }
     const types::StackTypeSet *typeSet() const {
         return typeSet_;
     }
     AliasSet getAliasSet() const {
         return AliasSet::None();