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

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

Issue 10454049: Validate that all instructions dominate their inputs. And fix a bug where that did not happen. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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 final JavaScriptBackend backend; 6 final JavaScriptBackend backend;
7 SsaCodeGeneratorTask(JavaScriptBackend backend) 7 SsaCodeGeneratorTask(JavaScriptBackend backend)
8 : this.backend = backend, 8 : this.backend = backend,
9 super(backend.compiler); 9 super(backend.compiler);
10 String get name() => 'SSA code generator'; 10 String get name() => 'SSA code generator';
(...skipping 708 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 addIndented("try {\n"); 719 addIndented("try {\n");
720 indent++; 720 indent++;
721 generateStatements(info.body); 721 generateStatements(info.body);
722 indent--; 722 indent--;
723 addIndented("}"); 723 addIndented("}");
724 if (info.catchBlock !== null) { 724 if (info.catchBlock !== null) {
725 // Printing the catch part. 725 // Printing the catch part.
726 HParameterValue exception = info.catchVariable; 726 HParameterValue exception = info.catchVariable;
727 String name = temporary(exception); 727 String name = temporary(exception);
728 parameterNames[exception.element] = name; 728 parameterNames[exception.element] = name;
729 buffer.add('catch ($name) {\n'); 729 buffer.add(' catch ($name) {\n');
730 indent++; 730 indent++;
731 generateStatements(info.catchBlock); 731 generateStatements(info.catchBlock);
732 parameterNames.remove(exception.element); 732 parameterNames.remove(exception.element);
733 indent--; 733 indent--;
734 addIndented('}'); 734 addIndented('}');
735 } 735 }
736 if (info.finallyBlock != null) { 736 if (info.finallyBlock != null) {
737 buffer.add(" finally {\n"); 737 buffer.add(" finally {\n");
738 indent++; 738 indent++;
739 generateStatements(info.finallyBlock); 739 generateStatements(info.finallyBlock);
(...skipping 1892 matching lines...) Expand 10 before | Expand all | Expand 10 after
2632 startBailoutSwitch(); 2632 startBailoutSwitch();
2633 } 2633 }
2634 } 2634 }
2635 2635
2636 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) { 2636 void endLabeledBlock(HLabeledBlockInformation labeledBlockInfo) {
2637 if (labeledBlockInfo.body.start.hasGuards()) { 2637 if (labeledBlockInfo.body.start.hasGuards()) {
2638 endBailoutSwitch(); 2638 endBailoutSwitch();
2639 } 2639 }
2640 } 2640 }
2641 } 2641 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698