Bug 1437450 - Disable Ion no-clone optimization for regexps if the graph contains try blocks. r=nbp, a=RyanVM

--HG--
extra : source : 61b461277369e0cec89c79d8526a82c575818e94
extra : intermediate-source : 806696d494300c8c09ad2c0c3141194b5418a706
extra : histedit_source : e38bbe5c22bace744f6da0b8ff39462b64fe5a95
This commit is contained in:
Jan de Mooij 2018-03-01 15:36:13 +01:00 committed by Roy Tam
commit 514c90e37c

View file

@ -2188,6 +2188,12 @@ IsRegExpHoistable(MIRGenerator* mir, MDefinition* regexp, MDefinitionVector& wor
bool
jit::MakeMRegExpHoistable(MIRGenerator* mir, MIRGraph& graph)
{
// 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.
if (graph.hasTryBlock())
return true;
MDefinitionVector worklist(graph.alloc());
for (ReversePostorderIterator block(graph.rpoBegin()); block != graph.rpoEnd(); block++) {