Bug 1238003 - Part 2: Use Policy in RegExpMatcher and RegExpTester. r=jandem
authorTooru Fujisawa <arai_a@mac.com>
Sun, 10 Jan 2016 08:47:03 +0900
changeset 314407 2147db4759f28ce0f6f8a8e5ee8a4b08929e3471
parent 314406 934e519c00eddb0d125eaf189e6aa83d701f533b
child 314408 082aef6db76d0d20f5ce201742d7bf22b93c402f
push id5703
push userraliiev@mozilla.com
push dateMon, 07 Mar 2016 14:18:41 +0000
treeherdermozilla-beta@31e373ad5b5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1238003
milestone46.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 1238003 - Part 2: Use Policy in RegExpMatcher and RegExpTester. r=jandem
js/src/jit/MIR.h
js/src/jit/TypePolicy.cpp
--- a/js/src/jit/MIR.h
+++ b/js/src/jit/MIR.h
@@ -7511,17 +7511,20 @@ class MRegExp : public MNullaryInstructi
     }
     bool possiblyCalls() const override {
         return true;
     }
 };
 
 class MRegExpMatcher
   : public MAryInstruction<4>,
-    public NoTypePolicy::Data
+    public Mix4Policy<ObjectPolicy<0>,
+                      StringPolicy<1>,
+                      IntPolicy<2>,
+                      BooleanPolicy<3> >::Data
 {
   private:
 
     MRegExpMatcher(MDefinition* regexp, MDefinition* string, MDefinition* lastIndex,
                    MDefinition* sticky)
       : MAryInstruction<4>()
     {
         initOperand(0, regexp);
@@ -7566,17 +7569,20 @@ class MRegExpMatcher
 
     bool possiblyCalls() const override {
         return true;
     }
 };
 
 class MRegExpTester
   : public MAryInstruction<4>,
-    public NoTypePolicy::Data
+    public Mix4Policy<ObjectPolicy<0>,
+                      StringPolicy<1>,
+                      IntPolicy<2>,
+                      BooleanPolicy<3> >::Data
 {
   private:
 
     MRegExpTester(MDefinition* regexp, MDefinition* string, MDefinition* lastIndex,
                   MDefinition* sticky)
       : MAryInstruction<4>()
     {
         initOperand(0, regexp);
--- a/js/src/jit/TypePolicy.cpp
+++ b/js/src/jit/TypePolicy.cpp
@@ -1239,16 +1239,17 @@ FilterTypeSetPolicy::adjustInputs(TempAl
     _(Mix3Policy<ObjectPolicy<0>, IntPolicy<1>, IntPolicy<2> >)         \
     _(Mix3Policy<ObjectPolicy<0>, IntPolicy<1>, TruncateToInt32Policy<2> >) \
     _(Mix3Policy<ObjectPolicy<0>, ObjectPolicy<1>, BoxPolicy<2> >)      \
     _(Mix3Policy<ObjectPolicy<0>, ObjectPolicy<1>, IntPolicy<2> >)      \
     _(Mix3Policy<ObjectPolicy<0>, ObjectPolicy<1>, ObjectPolicy<2> >)   \
     _(Mix3Policy<StringPolicy<0>, IntPolicy<1>, IntPolicy<2>>)          \
     _(Mix3Policy<StringPolicy<0>, ObjectPolicy<1>, StringPolicy<2> >)   \
     _(Mix3Policy<StringPolicy<0>, StringPolicy<1>, StringPolicy<2> >)   \
+    _(Mix4Policy<ObjectPolicy<0>, StringPolicy<1>, IntPolicy<2>, BooleanPolicy<3>>) \
     _(Mix4Policy<ObjectPolicy<0>, IntPolicy<1>, IntPolicy<2>, IntPolicy<3>>) \
     _(Mix4Policy<ObjectPolicy<0>, IntPolicy<1>, TruncateToInt32Policy<2>, TruncateToInt32Policy<3> >) \
     _(Mix3Policy<ObjectPolicy<0>, CacheIdPolicy<1>, NoFloatPolicy<2>>)  \
     _(Mix4Policy<SimdScalarPolicy<0>, SimdScalarPolicy<1>, SimdScalarPolicy<2>, SimdScalarPolicy<3> >) \
     _(MixPolicy<BoxPolicy<0>, ObjectPolicy<1> >)                        \
     _(MixPolicy<ConvertToStringPolicy<0>, ConvertToStringPolicy<1> >)   \
     _(MixPolicy<ConvertToStringPolicy<0>, ObjectPolicy<1> >)            \
     _(MixPolicy<DoublePolicy<0>, DoublePolicy<1> >)                     \