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

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

Issue 10440099: Adding unary op optimizations. missing assembly operations/ (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 6 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_optimizer.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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 f->Print("%s(", DebugName()); 70 f->Print("%s(", DebugName());
71 PrintOperandsTo(f); 71 PrintOperandsTo(f);
72 f->Print(")"); 72 f->Print(")");
73 } 73 }
74 74
75 75
76 void Computation::PrintOperandsTo(BufferFormatter* f) const { 76 void Computation::PrintOperandsTo(BufferFormatter* f) const {
77 for (int i = 0; i < InputCount(); ++i) { 77 for (int i = 0; i < InputCount(); ++i) {
78 if (i > 0) f->Print(", "); 78 if (i > 0) f->Print(", ");
79 if (InputAt(i) != NULL) InputAt(i)->PrintTo(f); 79 if (InputAt(i) != NULL) InputAt(i)->PrintTo(f);
80 f->Print(")");
81 } 80 }
82 } 81 }
83 82
84 83
85 void UseVal::PrintTo(BufferFormatter* f) const { 84 void UseVal::PrintTo(BufferFormatter* f) const {
86 f->Print("t%d", definition()->temp_index()); 85 f->Print("t%d", definition()->temp_index());
87 } 86 }
88 87
89 88
90 void ConstantVal::PrintTo(BufferFormatter* f) const { 89 void ConstantVal::PrintTo(BufferFormatter* f) const {
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 281
283 282
284 void BinaryOpComp::PrintOperandsTo(BufferFormatter* f) const { 283 void BinaryOpComp::PrintOperandsTo(BufferFormatter* f) const {
285 f->Print("%s, ", Token::Str(op_kind())); 284 f->Print("%s, ", Token::Str(op_kind()));
286 left()->PrintTo(f); 285 left()->PrintTo(f);
287 f->Print(", "); 286 f->Print(", ");
288 right()->PrintTo(f); 287 right()->PrintTo(f);
289 } 288 }
290 289
291 290
291 void UnarySmiOpComp::PrintOperandsTo(BufferFormatter* f) const {
292 f->Print("%s, ", Token::Str(op_kind()));
293 value()->PrintTo(f);
294 }
295
296
292 void GraphEntryInstr::PrintTo(BufferFormatter* f) const { 297 void GraphEntryInstr::PrintTo(BufferFormatter* f) const {
293 f->Print("%2d: [graph]", block_id()); 298 f->Print("%2d: [graph]", block_id());
294 } 299 }
295 300
296 301
297 void JoinEntryInstr::PrintTo(BufferFormatter* f) const { 302 void JoinEntryInstr::PrintTo(BufferFormatter* f) const {
298 f->Print("%2d: [join]", block_id()); 303 f->Print("%2d: [join]", block_id());
299 } 304 }
300 305
301 306
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 f->Print(" %s ", DebugName()); 350 f->Print(" %s ", DebugName());
346 f->Print("if "); 351 f->Print("if ");
347 value()->PrintTo(f); 352 value()->PrintTo(f);
348 f->Print(" goto (%d, %d)", 353 f->Print(" goto (%d, %d)",
349 true_successor()->block_id(), 354 true_successor()->block_id(),
350 false_successor()->block_id()); 355 false_successor()->block_id());
351 } 356 }
352 357
353 358
354 } // namespace dart 359 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_optimizer.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698