Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart

Issue 12082074: Fix another bailout problem where not all blocks were visiting when propagating bailout information… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/ssa/codegen.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (revision 17870)
+++ sdk/lib/_internal/compiler/implementation/ssa/codegen.dart (working copy)
@@ -2669,8 +2669,7 @@
=> new js.VariableUse(variableNames.stateName);
HBasicBlock beginGraph(HGraph graph) {
- propagator =
- new SsaBailoutPropagator(compiler, generateAtUseSite, variableNames);
+ propagator = new SsaBailoutPropagator(compiler, variableNames);
propagator.visitGraph(graph);
// TODO(ngeoffray): We could avoid generating the state at the
// call site for non-complex bailout methods.
@@ -2730,10 +2729,7 @@
bool visitAndOrInfo(HAndOrBlockInformation info) => false;
visitLoopBranch(HLoopBranch node) {
- HBasicBlock header = node.isDoWhile()
- ? node.block.successors[0]
- : node.block;
- if (header.hasBailoutTargets()) {
+ if (node.computeLoopHeader().hasBailoutTargets()) {
// The graph visitor in [visitLoopInfo] does not handle the
// condition. We must instead manually emit it here.
handleLoopCondition(node);
@@ -2763,8 +2759,13 @@
generateStatements(info.initializer);
}
beginLoop(info.loopHeader);
- generateStatements(info.condition);
+ if (!info.isDoWhile()) {
+ generateStatements(info.condition);
+ }
generateStatements(info.body);
+ if (info.isDoWhile()) {
+ generateStatements(info.condition);
+ }
if (info.updates != null) {
generateStatements(info.updates);
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/bailout.dart ('k') | sdk/lib/_internal/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698