From 514c90e37c1f65cb3d50dd932b07c1edbb5ef09c Mon Sep 17 00:00:00 2001 From: Jan de Mooij Date: Thu, 1 Mar 2018 15:36:13 +0100 Subject: [PATCH] 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 --- js/src/jit/IonAnalysis.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/src/jit/IonAnalysis.cpp b/js/src/jit/IonAnalysis.cpp index 90303255df..2c9ffb607d 100644 --- a/js/src/jit/IonAnalysis.cpp +++ b/js/src/jit/IonAnalysis.cpp @@ -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++) {