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

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

Issue 22640019: Fix for running with --throw_on_javascript_int_overflow: recognize pattern (a << b) & mask and test… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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) 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 OS::Print("(as "); 157 OS::Print("(as ");
158 node->VisitChildren(this); 158 node->VisitChildren(this);
159 OS::Print(")"); 159 OS::Print(")");
160 } else { 160 } else {
161 VisitGenericAstNode(node); 161 VisitGenericAstNode(node);
162 } 162 }
163 } 163 }
164 164
165 165
166 void AstPrinter::VisitBinaryOpNode(BinaryOpNode* node) { 166 void AstPrinter::VisitBinaryOpNode(BinaryOpNode* node) {
167 VisitGenericAstNode(node); 167 OS::Print("(%s ", node->Name());
168 node->VisitChildren(this);
169 if (node->has_mask32()) {
170 OS::Print(" & 0x%"Px64"", node->mask32());
171 }
172 OS::Print(")");
168 } 173 }
169 174
170 175
171 void AstPrinter::VisitUnaryOpNode(UnaryOpNode* node) { 176 void AstPrinter::VisitUnaryOpNode(UnaryOpNode* node) {
172 VisitGenericAstNode(node); 177 VisitGenericAstNode(node);
173 } 178 }
174 179
175 180
176 void AstPrinter::VisitConditionalExprNode(ConditionalExprNode* node) { 181 void AstPrinter::VisitConditionalExprNode(ConditionalExprNode* node) {
177 VisitGenericAstNode(node); 182 VisitGenericAstNode(node);
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 ASSERT(node_sequence != NULL); 494 ASSERT(node_sequence != NULL);
490 AstPrinter ast_printer; 495 AstPrinter ast_printer;
491 const char* function_name = 496 const char* function_name =
492 parsed_function.function().ToFullyQualifiedCString(); 497 parsed_function.function().ToFullyQualifiedCString();
493 OS::Print("Ast for function '%s' {\n", function_name); 498 OS::Print("Ast for function '%s' {\n", function_name);
494 node_sequence->Visit(&ast_printer); 499 node_sequence->Visit(&ast_printer);
495 OS::Print("}\n"); 500 OS::Print("}\n");
496 } 501 }
497 502
498 } // namespace dart 503 } // namespace dart
OLDNEW
« runtime/vm/ast.h ('K') | « runtime/vm/ast.h ('k') | runtime/vm/bootstrap_natives.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698