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

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

Issue 17554003: Change static calls in unoptimized code to always call via a stub. Using ICData, the call count of … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/cha.h" 9 #include "vm/cha.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 609
610 void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id, 610 void FlowGraphCompiler::GenerateStaticCall(intptr_t deopt_id,
611 intptr_t token_pos, 611 intptr_t token_pos,
612 const Function& function, 612 const Function& function,
613 intptr_t argument_count, 613 intptr_t argument_count,
614 const Array& argument_names, 614 const Array& argument_names,
615 LocationSummary* locs) { 615 LocationSummary* locs) {
616 const Array& arguments_descriptor = 616 const Array& arguments_descriptor =
617 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, 617 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count,
618 argument_names)); 618 argument_names));
619 EmitStaticCall(function, arguments_descriptor, argument_count, 619 if (is_optimizing()) {
620 deopt_id, token_pos, locs); 620 EmitStaticCall(function, arguments_descriptor, argument_count,
621 deopt_id, token_pos, locs);
622 } else {
623 EmitUnoptimizedStaticCall(function, arguments_descriptor, argument_count,
624 deopt_id, token_pos, locs);
625 }
621 } 626 }
622 627
623 628
624 void FlowGraphCompiler::GenerateNumberTypeCheck(Register kClassIdReg, 629 void FlowGraphCompiler::GenerateNumberTypeCheck(Register kClassIdReg,
625 const AbstractType& type, 630 const AbstractType& type,
626 Label* is_instance_lbl, 631 Label* is_instance_lbl,
627 Label* is_not_instance_lbl) { 632 Label* is_not_instance_lbl) {
628 assembler()->Comment("NumberTypeCheck"); 633 assembler()->Comment("NumberTypeCheck");
629 GrowableArray<intptr_t> args; 634 GrowableArray<intptr_t> args;
630 if (type.IsNumberType()) { 635 if (type.IsNumberType()) {
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1088 1093
1089 for (int i = 0; i < len; i++) { 1094 for (int i = 0; i < len; i++) {
1090 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i), 1095 sorted->Add(CidTarget(ic_data.GetReceiverClassIdAt(i),
1091 &Function::ZoneHandle(ic_data.GetTargetAt(i)), 1096 &Function::ZoneHandle(ic_data.GetTargetAt(i)),
1092 ic_data.GetCountAt(i))); 1097 ic_data.GetCountAt(i)));
1093 } 1098 }
1094 sorted->Sort(HighestCountFirst); 1099 sorted->Sort(HighestCountFirst);
1095 } 1100 }
1096 1101
1097 } // namespace dart 1102 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698