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

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

Issue 9958007: During bailout construction add condition instructions to list of live variables. (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
« no previous file with comments | « no previous file | tests/language/src/ConditionBailoutTest.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 198
199 if (instruction.hasElse) { 199 if (instruction.hasElse) {
200 environment = elseEnvironment; 200 environment = elseEnvironment;
201 visitSubGraph(info.elseGraph); 201 visitSubGraph(info.elseGraph);
202 elseEnvironment = environment; 202 elseEnvironment = environment;
203 } 203 }
204 204
205 environment = thenEnvironment; 205 environment = thenEnvironment;
206 visitSubGraph(info.thenGraph); 206 visitSubGraph(info.thenGraph);
207 environment.addAll(elseEnvironment); 207 environment.addAll(elseEnvironment);
208 environment.add(instruction.condition);
ngeoffray 2012/03/30 08:18:50 Maybe call visitInstruction instead? I know it end
floitsch 2012/03/30 17:54:27 done. But be aware that this became visitInstructi
208 } 209 }
209 210
210 void visitGoto(HGoto goto) { 211 void visitGoto(HGoto goto) {
211 HBasicBlock block = goto.block; 212 HBasicBlock block = goto.block;
212 if (block.successors[0].dominator != block) return; 213 if (block.successors[0].dominator != block) return;
213 visitBasicBlock(block.successors[0]); 214 visitBasicBlock(block.successors[0]);
214 } 215 }
215 216
216 void visitBreak(HBreak breakInstruction) { 217 void visitBreak(HBreak breakInstruction) {
217 compiler.unimplemented("SsaEnvironmentBuilder.visitBreak"); 218 compiler.unimplemented("SsaEnvironmentBuilder.visitBreak");
(...skipping 27 matching lines...) Expand all
245 environment.addLoopMarker(header); 246 environment.addLoopMarker(header);
246 247
247 if (!branch.isDoWhile()) { 248 if (!branch.isDoWhile()) {
248 assert(block.successors[0] == block.dominatedBlocks[0]); 249 assert(block.successors[0] == block.dominatedBlocks[0]);
249 visitBasicBlock(block.successors[0]); 250 visitBasicBlock(block.successors[0]);
250 } 251 }
251 252
252 // We merge the environment required by the code after the loop, 253 // We merge the environment required by the code after the loop,
253 // and the code inside the loop. 254 // and the code inside the loop.
254 environment.addAll(joinEnvironment); 255 environment.addAll(joinEnvironment);
256 environment.add(branch.condition);
ngeoffray 2012/03/30 08:18:50 ditto
floitsch 2012/03/30 17:54:27 ditto (done, but visitInstruction(branch)).
255 } 257 }
256 258
257 // Deal with all kinds of control flow instructions. In case we add 259 // Deal with all kinds of control flow instructions. In case we add
258 // a new one, we will hit an internal error. 260 // a new one, we will hit an internal error.
259 void visitExit(HExit exit) {} 261 void visitExit(HExit exit) {}
260 262
261 void visitReturn(HReturn instruction) { 263 void visitReturn(HReturn instruction) {
262 environment.clear(); 264 environment.clear();
263 visitInstruction(instruction); 265 visitInstruction(instruction);
264 } 266 }
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 compiler.internalError('Control flow instructions already dealt with.', 359 compiler.internalError('Control flow instructions already dealt with.',
358 instruction: instruction); 360 instruction: instruction);
359 } 361 }
360 362
361 visitTypeGuard(HTypeGuard guard) { 363 visitTypeGuard(HTypeGuard guard) {
362 blocks.forEach((HBasicBlock block) { 364 blocks.forEach((HBasicBlock block) {
363 block.guards.add(guard); 365 block.guards.add(guard);
364 }); 366 });
365 } 367 }
366 } 368 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/src/ConditionBailoutTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698