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

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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 VisitGenericAstNode(node);
168 } 168 }
169 169
170 170
171 void AstPrinter::VisitBinaryOpWithMask32Node(BinaryOpWithMask32Node* node) {
172 OS::Print("(%s ", node->Name());
173 node->VisitChildren(this);
174 OS::Print(" & 0x%"Px64"", node->mask32());
175 OS::Print(")");
176 }
177
178
171 void AstPrinter::VisitUnaryOpNode(UnaryOpNode* node) { 179 void AstPrinter::VisitUnaryOpNode(UnaryOpNode* node) {
172 VisitGenericAstNode(node); 180 VisitGenericAstNode(node);
173 } 181 }
174 182
175 183
176 void AstPrinter::VisitConditionalExprNode(ConditionalExprNode* node) { 184 void AstPrinter::VisitConditionalExprNode(ConditionalExprNode* node) {
177 VisitGenericAstNode(node); 185 VisitGenericAstNode(node);
178 } 186 }
179 187
180 188
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 ASSERT(node_sequence != NULL); 497 ASSERT(node_sequence != NULL);
490 AstPrinter ast_printer; 498 AstPrinter ast_printer;
491 const char* function_name = 499 const char* function_name =
492 parsed_function.function().ToFullyQualifiedCString(); 500 parsed_function.function().ToFullyQualifiedCString();
493 OS::Print("Ast for function '%s' {\n", function_name); 501 OS::Print("Ast for function '%s' {\n", function_name);
494 node_sequence->Visit(&ast_printer); 502 node_sequence->Visit(&ast_printer);
495 OS::Print("}\n"); 503 OS::Print("}\n");
496 } 504 }
497 505
498 } // namespace dart 506 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698