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

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

Issue 10407018: Start porting fast typechecks to x64. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language.h » ('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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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/il_printer.h" 5 #include "vm/il_printer.h"
6 6
7 #include "vm/intermediate_language.h" 7 #include "vm/intermediate_language.h"
8 #include "vm/os.h" 8 #include "vm/os.h"
9 9
10 namespace dart { 10 namespace dart {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 f->Print("%s(", DebugName()); 59 f->Print("%s(", DebugName());
60 PrintOperandsTo(f); 60 PrintOperandsTo(f);
61 f->Print(")"); 61 f->Print(")");
62 } 62 }
63 63
64 64
65 void Computation::PrintOperandsTo(BufferFormatter* f) const { 65 void Computation::PrintOperandsTo(BufferFormatter* f) const {
66 for (int i = 0; i < InputCount(); ++i) { 66 for (int i = 0; i < InputCount(); ++i) {
67 if (i > 0) f->Print(", "); 67 if (i > 0) f->Print(", ");
68 if (InputAt(i) != NULL) InputAt(i)->PrintTo(f); 68 if (InputAt(i) != NULL) InputAt(i)->PrintTo(f);
69 OS::Print(")");
69 } 70 }
70 } 71 }
71 72
72 73
73 void UseVal::PrintTo(BufferFormatter* f) const { 74 void UseVal::PrintTo(BufferFormatter* f) const {
74 f->Print("t%d", definition()->temp_index()); 75 f->Print("t%d", definition()->temp_index());
75 } 76 }
76 77
77 78
78 void ConstantVal::PrintTo(BufferFormatter* f) const { 79 void ConstantVal::PrintTo(BufferFormatter* f) const {
79 f->Print("#%s", value().ToCString()); 80 f->Print("#%s", value().ToCString());
80 } 81 }
81 82
82 83
83 void AssertAssignableComp::PrintOperandsTo(BufferFormatter* f) const { 84 void AssertAssignableComp::PrintOperandsTo(BufferFormatter* f) const {
84 value()->PrintTo(f); 85 value()->PrintTo(f);
85 f->Print(", %s, '%s'", 86 f->Print(", %s, '%s'",
86 String::Handle(dst_type().Name()).ToCString(), 87 String::Handle(dst_type().Name()).ToCString(),
87 dst_name().ToCString()); 88 dst_name().ToCString());
89 if (instantiator() != NULL) {
90 OS::Print(" (instantiator:");
91 instantiator()->PrintTo(f);
92 OS::Print(")");
93 }
88 if (instantiator_type_arguments() != NULL) { 94 if (instantiator_type_arguments() != NULL) {
89 f->Print(" (instantiator:"); 95 f->Print(" (instantiator:");
90 instantiator_type_arguments()->PrintTo(f); 96 instantiator_type_arguments()->PrintTo(f);
91 f->Print(")"); 97 f->Print(")");
92 } 98 }
93 } 99 }
94 100
95 101
96 void ClosureCallComp::PrintOperandsTo(BufferFormatter* f) const { 102 void ClosureCallComp::PrintOperandsTo(BufferFormatter* f) const {
97 context()->PrintTo(f); 103 context()->PrintTo(f);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 f->Print("%s, ", String::Handle(field().name()).ToCString()); 181 f->Print("%s, ", String::Handle(field().name()).ToCString());
176 value()->PrintTo(f); 182 value()->PrintTo(f);
177 } 183 }
178 184
179 185
180 void InstanceOfComp::PrintOperandsTo(BufferFormatter* f) const { 186 void InstanceOfComp::PrintOperandsTo(BufferFormatter* f) const {
181 value()->PrintTo(f); 187 value()->PrintTo(f);
182 f->Print(" %s %s", 188 f->Print(" %s %s",
183 negate_result() ? "ISNOT" : "IS", 189 negate_result() ? "ISNOT" : "IS",
184 String::Handle(type().Name()).ToCString()); 190 String::Handle(type().Name()).ToCString());
191 if (instantiator() != NULL) {
192 OS::Print(" (instantiator:");
193 instantiator()->PrintTo(f);
194 OS::Print(")");
195 }
185 if (type_arguments() != NULL) { 196 if (type_arguments() != NULL) {
186 f->Print(" (type-arg:"); 197 f->Print(" (type-arg:");
187 type_arguments()->PrintTo(f); 198 type_arguments()->PrintTo(f);
188 } 199 }
189 } 200 }
190 201
191 202
192 void AllocateObjectComp::PrintOperandsTo(BufferFormatter* f) const { 203 void AllocateObjectComp::PrintOperandsTo(BufferFormatter* f) const {
193 f->Print("%s", Class::Handle(constructor().owner()).ToCString()); 204 f->Print("%s", Class::Handle(constructor().owner()).ToCString());
194 for (intptr_t i = 0; i < arguments().length(); i++) { 205 for (intptr_t i = 0; i < arguments().length(); i++) {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 f->Print(" %s ", DebugName()); 334 f->Print(" %s ", DebugName());
324 f->Print("if "); 335 f->Print("if ");
325 value()->PrintTo(f); 336 value()->PrintTo(f);
326 f->Print(" goto (%d, %d)", 337 f->Print(" goto (%d, %d)",
327 true_successor()->block_id(), 338 true_successor()->block_id(),
328 false_successor()->block_id()); 339 false_successor()->block_id());
329 } 340 }
330 341
331 342
332 } // namespace dart 343 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_compiler_x64.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698