Skip to content

Commit

Permalink
#593: M1608256 (disable optimization)
Browse files Browse the repository at this point in the history
  • Loading branch information
classilla committed Mar 6, 2020
1 parent e901c0a commit 6dc2318
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
8 changes: 0 additions & 8 deletions js/src/jit/Ion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
4 changes: 4 additions & 0 deletions js/src/jit/IonAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -1945,6 +1948,7 @@ jit::MakeMRegExpHoistable(MIRGenerator* mir, MIRGraph& graph)
}

return true;
#endif
}

bool
Expand Down
11 changes: 3 additions & 8 deletions js/src/jit/Lowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6dc2318

Please sign in to comment.