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

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

Issue 322633002: Share ic data between unoptimized and optimized static calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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/intermediate_language.cc ('k') | runtime/vm/intermediate_language_arm64.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) 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_ARM. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM.
6 #if defined(TARGET_ARCH_ARM) 6 #if defined(TARGET_ARCH_ARM)
7 7
8 #include "vm/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/cpu.h" 10 #include "vm/cpu.h"
(...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 1014 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
1015 const Register array = locs()->in(0).reg(); 1015 const Register array = locs()->in(0).reg();
1016 __ Push(array); 1016 __ Push(array);
1017 const int kNumberOfArguments = 1; 1017 const int kNumberOfArguments = 1;
1018 const Array& kNoArgumentNames = Object::null_array(); 1018 const Array& kNoArgumentNames = Object::null_array();
1019 compiler->GenerateStaticCall(deopt_id(), 1019 compiler->GenerateStaticCall(deopt_id(),
1020 token_pos(), 1020 token_pos(),
1021 CallFunction(), 1021 CallFunction(),
1022 kNumberOfArguments, 1022 kNumberOfArguments,
1023 kNoArgumentNames, 1023 kNoArgumentNames,
1024 locs()); 1024 locs(),
1025 ICData::Handle());
1025 ASSERT(locs()->out(0).reg() == R0); 1026 ASSERT(locs()->out(0).reg() == R0);
1026 } 1027 }
1027 1028
1028 1029
1029 LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Isolate* isolate, 1030 LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Isolate* isolate,
1030 bool opt) const { 1031 bool opt) const {
1031 const intptr_t kNumInputs = 1; 1032 const intptr_t kNumInputs = 1;
1032 return LocationSummary::Make(isolate, 1033 return LocationSummary::Make(isolate,
1033 kNumInputs, 1034 kNumInputs,
1034 Location::RequiresRegister(), 1035 Location::RequiresRegister(),
(...skipping 4099 matching lines...) Expand 10 before | Expand all | Expand 10 after
5134 const ICData& ic_data = *instance_call()->ic_data(); 5135 const ICData& ic_data = *instance_call()->ic_data();
5135 ASSERT((ic_data.NumberOfChecks() == 1)); 5136 ASSERT((ic_data.NumberOfChecks() == 1));
5136 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0)); 5137 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0));
5137 5138
5138 const intptr_t kNumberOfArguments = 1; 5139 const intptr_t kNumberOfArguments = 1;
5139 compiler->GenerateStaticCall(deopt_id(), 5140 compiler->GenerateStaticCall(deopt_id(),
5140 instance_call()->token_pos(), 5141 instance_call()->token_pos(),
5141 target, 5142 target,
5142 kNumberOfArguments, 5143 kNumberOfArguments,
5143 Object::null_array(), // No argument names., 5144 Object::null_array(), // No argument names.,
5144 locs()); 5145 locs(),
5146 ICData::Handle());
5145 __ Bind(&done); 5147 __ Bind(&done);
5146 } 5148 }
5147 5149
5148 5150
5149 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Isolate* isolate, 5151 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Isolate* isolate,
5150 bool opt) const { 5152 bool opt) const {
5151 const intptr_t kNumInputs = 1; 5153 const intptr_t kNumInputs = 1;
5152 const intptr_t kNumTemps = 0; 5154 const intptr_t kNumTemps = 0;
5153 LocationSummary* result = new(isolate) LocationSummary( 5155 LocationSummary* result = new(isolate) LocationSummary(
5154 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); 5156 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall);
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
5566 } 5568 }
5567 ASSERT(ic_data().NumArgsTested() == 1); 5569 ASSERT(ic_data().NumArgsTested() == 1);
5568 if (!with_checks()) { 5570 if (!with_checks()) {
5569 ASSERT(ic_data().HasOneTarget()); 5571 ASSERT(ic_data().HasOneTarget());
5570 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); 5572 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0));
5571 compiler->GenerateStaticCall(deopt_id(), 5573 compiler->GenerateStaticCall(deopt_id(),
5572 instance_call()->token_pos(), 5574 instance_call()->token_pos(),
5573 target, 5575 target,
5574 instance_call()->ArgumentCount(), 5576 instance_call()->ArgumentCount(),
5575 instance_call()->argument_names(), 5577 instance_call()->argument_names(),
5576 locs()); 5578 locs(),
5579 ICData::Handle());
5577 return; 5580 return;
5578 } 5581 }
5579 5582
5580 // Load receiver into R0. 5583 // Load receiver into R0.
5581 __ LoadFromOffset(kWord, R0, SP, 5584 __ LoadFromOffset(kWord, R0, SP,
5582 (instance_call()->ArgumentCount() - 1) * kWordSize); 5585 (instance_call()->ArgumentCount() - 1) * kWordSize);
5583 5586
5584 LoadValueCid(compiler, R2, R0, 5587 LoadValueCid(compiler, R2, R0,
5585 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); 5588 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt);
5586 5589
(...skipping 763 matching lines...) Expand 10 before | Expand all | Expand 10 after
6350 compiler->GenerateCall(token_pos(), 6353 compiler->GenerateCall(token_pos(),
6351 &label, 6354 &label,
6352 PcDescriptors::kOther, 6355 PcDescriptors::kOther,
6353 locs()); 6356 locs());
6354 __ Drop(ArgumentCount()); // Discard arguments. 6357 __ Drop(ArgumentCount()); // Discard arguments.
6355 } 6358 }
6356 6359
6357 } // namespace dart 6360 } // namespace dart
6358 6361
6359 #endif // defined TARGET_ARCH_ARM 6362 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/intermediate_language_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698