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

Side by Side Diff: vm/flow_graph_optimizer.cc

Issue 11316203: Rename the field type_arguments_instance_field_offset_ to (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 years 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 | « vm/flow_graph_builder.cc ('k') | vm/intrinsifier_ia32.cc » ('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/flow_graph_optimizer.h" 5 #include "vm/flow_graph_optimizer.h"
6 6
7 #include "vm/bit_vector.h" 7 #include "vm/bit_vector.h"
8 #include "vm/cha.h" 8 #include "vm/cha.h"
9 #include "vm/flow_graph_builder.h" 9 #include "vm/flow_graph_builder.h"
10 #include "vm/flow_graph_compiler.h" 10 #include "vm/flow_graph_compiler.h"
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 const Function& target = 552 const Function& target =
553 Function::ZoneHandle(call->ic_data()->GetTargetAt(0)); 553 Function::ZoneHandle(call->ic_data()->GetTargetAt(0));
554 const AbstractType& value_type = 554 const AbstractType& value_type =
555 AbstractType::ZoneHandle(target.ParameterTypeAt(2)); 555 AbstractType::ZoneHandle(target.ParameterTypeAt(2));
556 Value* instantiator = NULL; 556 Value* instantiator = NULL;
557 Value* type_args = NULL; 557 Value* type_args = NULL;
558 switch (class_id) { 558 switch (class_id) {
559 case kArrayCid: 559 case kArrayCid:
560 case kGrowableObjectArrayCid: { 560 case kGrowableObjectArrayCid: {
561 const Class& instantiator_class = Class::Handle(target.Owner()); 561 const Class& instantiator_class = Class::Handle(target.Owner());
562 intptr_t type_arguments_instance_field_offset = 562 intptr_t type_arguments_field_offset =
563 instantiator_class.type_arguments_instance_field_offset(); 563 instantiator_class.type_arguments_field_offset();
564 LoadFieldInstr* load_type_args = 564 LoadFieldInstr* load_type_args =
565 new LoadFieldInstr(array->Copy(), 565 new LoadFieldInstr(array->Copy(),
566 type_arguments_instance_field_offset, 566 type_arguments_field_offset,
567 Type::ZoneHandle()); // No type. 567 Type::ZoneHandle()); // No type.
568 InsertBefore(call, load_type_args, NULL, Definition::kValue); 568 InsertBefore(call, load_type_args, NULL, Definition::kValue);
569 instantiator = array->Copy(); 569 instantiator = array->Copy();
570 type_args = new Value(load_type_args); 570 type_args = new Value(load_type_args);
571 break; 571 break;
572 } 572 }
573 case kFloat32ArrayCid: 573 case kFloat32ArrayCid:
574 case kFloat64ArrayCid: { 574 case kFloat64ArrayCid: {
575 ConstantInstr* null_constant = new ConstantInstr(Object::ZoneHandle()); 575 ConstantInstr* null_constant = new ConstantInstr(Object::ZoneHandle());
576 InsertBefore(call, null_constant, NULL, Definition::kValue); 576 InsertBefore(call, null_constant, NULL, Definition::kValue);
(...skipping 3210 matching lines...) Expand 10 before | Expand all | Expand 10 after
3787 3787
3788 if (FLAG_trace_constant_propagation) { 3788 if (FLAG_trace_constant_propagation) {
3789 OS::Print("\n==== After constant propagation ====\n"); 3789 OS::Print("\n==== After constant propagation ====\n");
3790 FlowGraphPrinter printer(*graph_); 3790 FlowGraphPrinter printer(*graph_);
3791 printer.PrintBlocks(); 3791 printer.PrintBlocks();
3792 } 3792 }
3793 } 3793 }
3794 3794
3795 3795
3796 } // namespace dart 3796 } // namespace dart
OLDNEW
« no previous file with comments | « vm/flow_graph_builder.cc ('k') | vm/intrinsifier_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698