From 6dc231866c298e2eee7f7b778fad8867d0f9e1b2 Mon Sep 17 00:00:00 2001 From: Cameron Kaiser Date: Thu, 5 Mar 2020 19:17:10 -0800 Subject: [PATCH] #593: M1608256 (disable optimization) --- js/src/jit/Ion.cpp | 8 -------- js/src/jit/IonAnalysis.cpp | 4 ++++ js/src/jit/Lowering.cpp | 11 +++-------- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp index caf8a3602..506153ffc 100644 --- a/js/src/jit/Ion.cpp +++ b/js/src/jit/Ion.cpp @@ -1509,14 +1509,6 @@ OptimizeMIR(MIRGenerator* mir) if (mir->shouldCancel("Start")) return false; - if (!mir->compilingAsmJS()) { - if (!MakeMRegExpHoistable(mir, graph)) - return false; - - if (mir->shouldCancel("Make MRegExp Hoistable")) - return false; - } - gs.spewPass("BuildSSA"); AssertBasicGraphCoherency(graph); diff --git a/js/src/jit/IonAnalysis.cpp b/js/src/jit/IonAnalysis.cpp index bc889ad95..77cc56763 100644 --- a/js/src/jit/IonAnalysis.cpp +++ b/js/src/jit/IonAnalysis.cpp @@ -1878,6 +1878,9 @@ jit::ApplyTypeInformation(MIRGenerator* mir, MIRGraph& graph) bool jit::MakeMRegExpHoistable(MIRGenerator* mir, MIRGraph& graph) { + MOZ_CRASH("thou may not hoist this regex"); + return false; +#if(0) // If we are compiling try blocks, regular expressions may be observable // from catch blocks (which Ion does not compile). For now just disable the // pass in this case. @@ -1945,6 +1948,7 @@ jit::MakeMRegExpHoistable(MIRGenerator* mir, MIRGraph& graph) } return true; +#endif } bool diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp index cadb46803..57d25bae8 100644 --- a/js/src/jit/Lowering.cpp +++ b/js/src/jit/Lowering.cpp @@ -2099,14 +2099,9 @@ MustCloneRegExp(MRegExp* regexp) void LIRGenerator::visitRegExp(MRegExp* ins) { - if (!MustCloneRegExp(ins)) { - RegExpObject* source = ins->source(); - define(new(alloc()) LPointer(source), ins); - } else { - LRegExp* lir = new(alloc()) LRegExp(); - defineReturn(lir, ins); - assignSafepoint(lir, ins); - } + LRegExp* lir = new(alloc()) LRegExp(); + defineReturn(lir, ins); + assignSafepoint(lir, ins); } void