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

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

Issue 8660004: Parse parenthesized expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: frogsh Created 9 years 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 | « dart/frog/leg/scanner/parser.dart ('k') | dart/frog/leg/tree/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 SsaBuilderTask extends CompilerTask { 5 class SsaBuilderTask extends CompilerTask {
6 SsaBuilderTask(Compiler compiler) : super(compiler); 6 SsaBuilderTask(Compiler compiler) : super(compiler);
7 String get name() => 'SSA builder'; 7 String get name() => 'SSA builder';
8 8
9 HGraph build(Node tree, Map<Node, Element> elements) { 9 HGraph build(Node tree, Map<Node, Element> elements) {
10 return measure(() { 10 return measure(() {
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
505 void visitLiteralNull(LiteralNull node) { 505 void visitLiteralNull(LiteralNull node) {
506 push(new HLiteral(null)); 506 push(new HLiteral(null));
507 } 507 }
508 508
509 visitNodeList(NodeList node) { 509 visitNodeList(NodeList node) {
510 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) { 510 for (Link<Node> link = node.nodes; !link.isEmpty(); link = link.tail) {
511 visit(link.head); 511 visit(link.head);
512 } 512 }
513 } 513 }
514 514
515 void visitParenthesizedExpression(ParenthesizedExpression node) {
516 visit(node.expression);
517 }
518
515 visitOperator(Operator node) { 519 visitOperator(Operator node) {
516 // Operators are intercepted in their surrounding Send nodes. 520 // Operators are intercepted in their surrounding Send nodes.
517 unreachable(); 521 unreachable();
518 } 522 }
519 523
520 visitReturn(Return node) { 524 visitReturn(Return node) {
521 HInstruction value; 525 HInstruction value;
522 if (node.expression === null) { 526 if (node.expression === null) {
523 value = new HLiteral(null); 527 value = new HLiteral(null);
524 add(value); 528 add(value);
(...skipping 26 matching lines...) Expand all
551 add(initialValue); 555 add(initialValue);
552 updateDefinition(definition, initialValue); 556 updateDefinition(definition, initialValue);
553 } else { 557 } else {
554 assert(definition is SendSet); 558 assert(definition is SendSet);
555 visitSendSet(definition); 559 visitSendSet(definition);
556 pop(); // Discard value. 560 pop(); // Discard value.
557 } 561 }
558 } 562 }
559 } 563 }
560 } 564 }
OLDNEW
« no previous file with comments | « dart/frog/leg/scanner/parser.dart ('k') | dart/frog/leg/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698