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

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

Issue 179443004: VM: Replace StoreVMField with StoreInstanceField. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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_type_propagator.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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 413
414 f->Print("%s [%s %s], ", 414 f->Print("%s [%s %s], ",
415 String::Handle(field().name()).ToCString(), 415 String::Handle(field().name()).ToCString(),
416 field().is_nullable() ? "nullable" : "non-nullable", 416 field().is_nullable() ? "nullable" : "non-nullable",
417 expected); 417 expected);
418 value()->PrintTo(f); 418 value()->PrintTo(f);
419 } 419 }
420 420
421 421
422 void StoreInstanceFieldInstr::PrintOperandsTo(BufferFormatter* f) const { 422 void StoreInstanceFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
423 f->Print("%s {%" Pd "}, ", 423 if (field().IsNull()) {
424 String::Handle(field().name()).ToCString(), 424 f->Print("{%" Pd "}, ", offset_in_bytes());
425 field().Offset()); 425 } else {
426 f->Print("%s {%" Pd "}, ",
427 String::Handle(field().name()).ToCString(),
428 field().Offset());
429 }
426 instance()->PrintTo(f); 430 instance()->PrintTo(f);
427 f->Print(", "); 431 f->Print(", ");
428 value()->PrintTo(f); 432 value()->PrintTo(f);
429 } 433 }
430 434
431 435
432 void IfThenElseInstr::PrintOperandsTo(BufferFormatter* f) const { 436 void IfThenElseInstr::PrintOperandsTo(BufferFormatter* f) const {
433 comparison()->PrintOperandsTo(f); 437 comparison()->PrintOperandsTo(f);
434 f->Print(" ? %" Pd " : %" Pd, 438 f->Print(" ? %" Pd " : %" Pd,
435 if_true_, 439 if_true_,
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 527
524 f->Print(" [%s %s]", 528 f->Print(" [%s %s]",
525 field()->is_nullable() ? "nullable" : "non-nullable", 529 field()->is_nullable() ? "nullable" : "non-nullable",
526 expected); 530 expected);
527 } 531 }
528 532
529 f->Print(", immutable=%d", immutable_); 533 f->Print(", immutable=%d", immutable_);
530 } 534 }
531 535
532 536
533 void StoreVMFieldInstr::PrintOperandsTo(BufferFormatter* f) const {
534 dest()->PrintTo(f);
535 f->Print(", %" Pd ", ", offset_in_bytes());
536 value()->PrintTo(f);
537 }
538
539
540 void InstantiateTypeInstr::PrintOperandsTo(BufferFormatter* f) const { 537 void InstantiateTypeInstr::PrintOperandsTo(BufferFormatter* f) const {
541 const String& type_name = String::Handle(type().Name()); 538 const String& type_name = String::Handle(type().Name());
542 f->Print("%s, ", type_name.ToCString()); 539 f->Print("%s, ", type_name.ToCString());
543 instantiator()->PrintTo(f); 540 instantiator()->PrintTo(f);
544 } 541 }
545 542
546 543
547 void InstantiateTypeArgumentsInstr::PrintOperandsTo(BufferFormatter* f) const { 544 void InstantiateTypeArgumentsInstr::PrintOperandsTo(BufferFormatter* f) const {
548 const String& type_args = String::Handle(type_arguments().Name()); 545 const String& type_args = String::Handle(type_arguments().Name());
549 f->Print("%s, ", type_args.ToCString()); 546 f->Print("%s, ", type_args.ToCString());
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 f->Print(" ["); 970 f->Print(" [");
974 locations_[i].PrintTo(f); 971 locations_[i].PrintTo(f);
975 f->Print("]"); 972 f->Print("]");
976 } 973 }
977 } 974 }
978 f->Print(" }"); 975 f->Print(" }");
979 if (outer_ != NULL) outer_->PrintTo(f); 976 if (outer_ != NULL) outer_->PrintTo(f);
980 } 977 }
981 978
982 } // namespace dart 979 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/flow_graph_type_propagator.cc ('k') | runtime/vm/intermediate_language.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698