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

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

Issue 8513004: Throw and a small fix to If. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 9 years, 1 month 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 | « frog/leg/ssa/builder.dart ('k') | frog/leg/ssa/nodes.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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(Node tree, HGraph graph) { 9 String generate(Node tree, HGraph graph) {
10 return measure(() { 10 return measure(() {
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 244
245 visitReturn(HReturn node) { 245 visitReturn(HReturn node) {
246 buffer.add('return '); 246 buffer.add('return ');
247 use(node.inputs[0]); 247 use(node.inputs[0]);
248 } 248 }
249 249
250 visitSubtract(HSubtract node) { 250 visitSubtract(HSubtract node) {
251 invoke(const SourceString('\$sub'), node.inputs); 251 invoke(const SourceString('\$sub'), node.inputs);
252 } 252 }
253 253
254 visitThrow(HThrow node) {
255 buffer.add('throw ');
256 use(node.inputs[0]);
257 }
258
254 visitTruncatingDivide(HTruncatingDivide node) { 259 visitTruncatingDivide(HTruncatingDivide node) {
255 invoke(const SourceString('\$tdiv'), node.inputs); 260 invoke(const SourceString('\$tdiv'), node.inputs);
256 } 261 }
257 262
258 void addIndentation() { 263 void addIndentation() {
259 for (int i = 0; i < indent; i++) { 264 for (int i = 0; i < indent; i++) {
260 buffer.add(' '); 265 buffer.add(' ');
261 } 266 }
262 } 267 }
263 } 268 }
OLDNEW
« no previous file with comments | « frog/leg/ssa/builder.dart ('k') | frog/leg/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698