Bug 1528772: Support hoisting RegExp when "exec" is called. r=jandem
authorAndré Bargull <andre.bargull@gmail.com>
Mon, 18 Feb 2019 08:17:34 -0800
changeset 519525 8cd8d6fd4931766ac24ca6248b78520607acd7ed
parent 519524 7eb6431fcc65e7baf25e9bb6a1bf18e9c5e90cdf
child 519526 739c3b30b230fe1df1b3b94ae9b6a7df9467f31a
push id10862
push userffxbld-merge
push dateMon, 11 Mar 2019 13:01:11 +0000
treeherdermozilla-beta@a2e7f5c935da [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1528772
milestone67.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 1528772: Support hoisting RegExp when "exec" is called. r=jandem
js/src/jit/IonAnalysis.cpp
js/src/vm/CommonPropertyNames.h
--- a/js/src/jit/IonAnalysis.cpp
+++ b/js/src/jit/IonAnalysis.cpp
@@ -2321,17 +2321,18 @@ static bool IsRegExpHoistableCall(Compil
   if (name == runtime->names().RegExpBuiltinExec ||
       name == runtime->names().UnwrapAndCallRegExpBuiltinExec ||
       name == runtime->names().RegExpMatcher ||
       name == runtime->names().RegExpTester ||
       name == runtime->names().RegExpSearcher) {
     return IsExclusiveFirstArg(call, def);
   }
 
-  if (name == runtime->names().RegExp_prototype_Exec) {
+  if (name == runtime->names().RegExp_prototype_Exec ||
+      name == runtime->names().CallRegExpMethodIfWrapped) {
     return IsExclusiveThisArg(call, def);
   }
 
   return false;
 }
 
 static bool CanCompareRegExp(MCompare* compare, MDefinition* def) {
   MDefinition* value;
--- a/js/src/vm/CommonPropertyNames.h
+++ b/js/src/vm/CommonPropertyNames.h
@@ -55,16 +55,18 @@
   MACRO(byteOffset, byteOffset, "byteOffset")                                  \
   MACRO(bytes, bytes, "bytes")                                                 \
   MACRO(BYTES_PER_ELEMENT, BYTES_PER_ELEMENT, "BYTES_PER_ELEMENT")             \
   MACRO(call, call, "call")                                                    \
   MACRO(callContentFunction, callContentFunction, "callContentFunction")       \
   MACRO(callee, callee, "callee")                                              \
   MACRO(caller, caller, "caller")                                              \
   MACRO(callFunction, callFunction, "callFunction")                            \
+  MACRO(CallRegExpMethodIfWrapped, CallRegExpMethodIfWrapped,                  \
+        "CallRegExpMethodIfWrapped")                                           \
   MACRO(cancel, cancel, "cancel")                                              \
   MACRO(case, case_, "case")                                                   \
   MACRO(caseFirst, caseFirst, "caseFirst")                                     \
   MACRO(catch, catch_, "catch")                                                \
   MACRO(class, class_, "class")                                                \
   MACRO(Collator, Collator, "Collator")                                        \
   MACRO(collections, collections, "collections")                               \
   MACRO(columnNumber, columnNumber, "columnNumber")                            \