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

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

Issue 10867012: Add a smi-check instruction for arithmetic smi operations. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: addressed comments Created 8 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
« 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 #include "vm/parser.h" 9 #include "vm/parser.h"
10 10
(...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 f->Print("%s", Token::Str(op_kind())); 401 f->Print("%s", Token::Str(op_kind()));
402 } 402 }
403 403
404 404
405 void UnarySmiOpComp::PrintOperandsTo(BufferFormatter* f) const { 405 void UnarySmiOpComp::PrintOperandsTo(BufferFormatter* f) const {
406 f->Print("%s, ", Token::Str(op_kind())); 406 f->Print("%s, ", Token::Str(op_kind()));
407 value()->PrintTo(f); 407 value()->PrintTo(f);
408 } 408 }
409 409
410 410
411 void CheckClassComp::PrintOperandsTo(BufferFormatter* f) const {
412 value()->PrintTo(f);
413 f->Print(", cid={");
414 for (intptr_t i = 0; i < ic_data()->NumberOfChecks(); i++) {
415 f->Print("%d ", ic_data()->GetReceiverClassIdAt(i));
416 }
417 f->Print("}");
418 }
419
420
411 void GraphEntryInstr::PrintTo(BufferFormatter* f) const { 421 void GraphEntryInstr::PrintTo(BufferFormatter* f) const {
412 f->Print("%2d: [graph]", block_id()); 422 f->Print("%2d: [graph]", block_id());
413 if (start_env_ != NULL) { 423 if (start_env_ != NULL) {
414 f->Print("\n{\n"); 424 f->Print("\n{\n");
415 const GrowableArray<Value*>& values = start_env_->values(); 425 const GrowableArray<Value*>& values = start_env_->values();
416 for (intptr_t i = 0; i < values.length(); i++) { 426 for (intptr_t i = 0; i < values.length(); i++) {
417 if (values[i]->IsUse()) { 427 if (values[i]->IsUse()) {
418 Definition* def = values[i]->AsUse()->definition(); 428 Definition* def = values[i]->AsUse()->definition();
419 f->Print(" ", i); 429 f->Print(" ", i);
420 def->PrintTo(f); 430 def->PrintTo(f);
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
820 if ((locations_ != NULL) && !locations_[i].IsInvalid()) { 830 if ((locations_ != NULL) && !locations_[i].IsInvalid()) {
821 f->Print(" ["); 831 f->Print(" [");
822 locations_[i].PrintTo(f); 832 locations_[i].PrintTo(f);
823 f->Print("]"); 833 f->Print("]");
824 } 834 }
825 } 835 }
826 f->Print(" }"); 836 f->Print(" }");
827 } 837 }
828 838
829 } // namespace dart 839 } // 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