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

Side by Side Diff: frog/leg/ssa/codegen.dart

Issue 9601014: Support for stack traces in catch blocks. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 9 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 SsaCodeGeneratorTask extends CompilerTask { 5 class SsaCodeGeneratorTask extends CompilerTask {
6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler); 6 SsaCodeGeneratorTask(Compiler compiler) : super(compiler);
7 String get name() => 'SSA code generator'; 7 String get name() => 'SSA code generator';
8 8
9 String generate(WorkItem work, HGraph graph) { 9 String generate(WorkItem work, HGraph graph) {
10 return measure(() { 10 return measure(() {
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 visitBasicBlock(successors[0]); 452 visitBasicBlock(successors[0]);
453 indent--; 453 indent--;
454 454
455 if (node.finallyBlock != successors[1]) { 455 if (node.finallyBlock != successors[1]) {
456 // Printing the catch part. 456 // Printing the catch part.
457 addIndentation(); 457 addIndentation();
458 String name = temporary(node.exception); 458 String name = temporary(node.exception);
459 parameterNames[node.exception.element] = name; 459 parameterNames[node.exception.element] = name;
460 buffer.add('} catch ($name) {\n'); 460 buffer.add('} catch ($name) {\n');
461 indent++; 461 indent++;
462 addIndentation();
463 visitBasicBlock(successors[1]); 462 visitBasicBlock(successors[1]);
464 parameterNames.remove(node.exception.element); 463 parameterNames.remove(node.exception.element);
465 indent--; 464 indent--;
466 } 465 }
467 466
468 if (node.finallyBlock != null) { 467 if (node.finallyBlock != null) {
469 addIndentation(); 468 addIndentation();
470 buffer.add('} finally {\n'); 469 buffer.add('} finally {\n');
471 indent++; 470 indent++;
472 visitBasicBlock(node.finallyBlock); 471 visitBasicBlock(node.finallyBlock);
(...skipping 935 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 startBailoutSwitch(); 1407 startBailoutSwitch();
1409 } 1408 }
1410 } 1409 }
1411 1410
1412 void endElse(HIf node) { 1411 void endElse(HIf node) {
1413 if (node.elseBlock.hasBailouts()) { 1412 if (node.elseBlock.hasBailouts()) {
1414 endBailoutSwitch(); 1413 endBailoutSwitch();
1415 } 1414 }
1416 } 1415 }
1417 } 1416 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698