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

Side by Side Diff: lib/compiler/implementation/ssa/bailout.dart

Issue 10001008: Many type fixes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class BailoutInfo { 5 class BailoutInfo {
6 int instructionId; 6 int instructionId;
7 int bailoutId; 7 int bailoutId;
8 BailoutInfo(this.instructionId, this.bailoutId); 8 BailoutInfo(this.instructionId, this.bailoutId);
9 } 9 }
10 10
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // 134 //
135 // while (true) { <-- (4) update the marker with the environment 135 // while (true) { <-- (4) update the marker with the environment
136 // use(x); <-- (3) environment = {x} 136 // use(x); <-- (3) environment = {x}
137 // bailout; <-- (2) has the marker when computed 137 // bailout; <-- (2) has the marker when computed
138 // } <-- (1) create a loop marker 138 // } <-- (1) create a loop marker
139 // 139 //
140 // The bailout instruction first captures the marker, but it 140 // The bailout instruction first captures the marker, but it
141 // will be replaced by the live environment at the loop entry, 141 // will be replaced by the live environment at the loop entry,
142 // in this case {x}. 142 // in this case {x}.
143 environment.removeLoopMarker(block); 143 environment.removeLoopMarker(block);
144 capturedEnvironments.forEach((instruction, env) { 144 capturedEnvironments.forEach((ignoredInstruction, env) {
145 if (env.containsLoopMarker(block)) { 145 if (env.containsLoopMarker(block)) {
146 env.removeLoopMarker(block); 146 env.removeLoopMarker(block);
147 env.addAll(environment); 147 env.addAll(environment);
148 } 148 }
149 }); 149 });
150 } 150 }
151 } 151 }
152 152
153 void visitPhi(HPhi phi) { 153 void visitPhi(HPhi phi) {
154 maybeCaptureEnvironment(phi); 154 maybeCaptureEnvironment(phi);
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 compiler.internalError('Control flow instructions already dealt with.', 359 compiler.internalError('Control flow instructions already dealt with.',
360 instruction: instruction); 360 instruction: instruction);
361 } 361 }
362 362
363 visitTypeGuard(HTypeGuard guard) { 363 visitTypeGuard(HTypeGuard guard) {
364 blocks.forEach((HBasicBlock block) { 364 blocks.forEach((HBasicBlock block) {
365 block.guards.add(guard); 365 block.guards.add(guard);
366 }); 366 });
367 } 367 }
368 } 368 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698