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

Side by Side Diff: runtime/vm/ast_printer.cc

Issue 27192005: Add new style of string interpolation optimization: new nodes, working constant folding. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | « runtime/vm/ast.h ('k') | runtime/vm/flow_graph_builder.cc » ('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 #include "vm/ast_printer.h" 5 #include "vm/ast_printer.h"
6 6
7 #include "vm/handles.h" 7 #include "vm/handles.h"
8 #include "vm/object.h" 8 #include "vm/object.h"
9 #include "vm/os.h" 9 #include "vm/os.h"
10 #include "vm/parser.h" 10 #include "vm/parser.h"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 void AstPrinter::VisitLetNode(LetNode* node) { 117 void AstPrinter::VisitLetNode(LetNode* node) {
118 VisitGenericAstNode(node); 118 VisitGenericAstNode(node);
119 } 119 }
120 120
121 121
122 void AstPrinter::VisitArrayNode(ArrayNode* node) { 122 void AstPrinter::VisitArrayNode(ArrayNode* node) {
123 VisitGenericAstNode(node); 123 VisitGenericAstNode(node);
124 } 124 }
125 125
126 126
127 void AstPrinter::VisitStringInterpolateNode(StringInterpolateNode* node) {
128 VisitGenericAstNode(node);
129 }
130
131
127 void AstPrinter::VisitLiteralNode(LiteralNode* node) { 132 void AstPrinter::VisitLiteralNode(LiteralNode* node) {
128 const Instance& literal = node->literal(); 133 const Instance& literal = node->literal();
129 OS::Print("(%s \"%s\")", node->PrettyName(), literal.ToCString()); 134 OS::Print("(%s \"%s\")", node->PrettyName(), literal.ToCString());
130 } 135 }
131 136
132 137
133 void AstPrinter::VisitTypeNode(TypeNode* node) { 138 void AstPrinter::VisitTypeNode(TypeNode* node) {
134 const AbstractType& type = node->type(); 139 const AbstractType& type = node->type();
135 OS::Print("(%s \"%s\")", 140 OS::Print("(%s \"%s\")",
136 node->PrettyName(), 141 node->PrettyName(),
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
484 ASSERT(node_sequence != NULL); 489 ASSERT(node_sequence != NULL);
485 AstPrinter ast_printer; 490 AstPrinter ast_printer;
486 const char* function_name = 491 const char* function_name =
487 parsed_function.function().ToFullyQualifiedCString(); 492 parsed_function.function().ToFullyQualifiedCString();
488 OS::Print("Ast for function '%s' {\n", function_name); 493 OS::Print("Ast for function '%s' {\n", function_name);
489 node_sequence->Visit(&ast_printer); 494 node_sequence->Visit(&ast_printer);
490 OS::Print("}\n"); 495 OS::Print("}\n");
491 } 496 }
492 497
493 } // namespace dart 498 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698