| OLD | NEW |
| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| (...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 829 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 830 Register array = locs()->in(0).reg(); | 830 Register array = locs()->in(0).reg(); |
| 831 __ pushq(array); | 831 __ pushq(array); |
| 832 const int kNumberOfArguments = 1; | 832 const int kNumberOfArguments = 1; |
| 833 const Array& kNoArgumentNames = Object::null_array(); | 833 const Array& kNoArgumentNames = Object::null_array(); |
| 834 compiler->GenerateStaticCall(deopt_id(), | 834 compiler->GenerateStaticCall(deopt_id(), |
| 835 token_pos(), | 835 token_pos(), |
| 836 CallFunction(), | 836 CallFunction(), |
| 837 kNumberOfArguments, | 837 kNumberOfArguments, |
| 838 kNoArgumentNames, | 838 kNoArgumentNames, |
| 839 locs()); | 839 locs(), |
| 840 ICData::Handle()); |
| 840 ASSERT(locs()->out(0).reg() == RAX); | 841 ASSERT(locs()->out(0).reg() == RAX); |
| 841 } | 842 } |
| 842 | 843 |
| 843 | 844 |
| 844 LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Isolate* isolate, | 845 LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Isolate* isolate, |
| 845 bool opt) const { | 846 bool opt) const { |
| 846 const intptr_t kNumInputs = 1; | 847 const intptr_t kNumInputs = 1; |
| 847 return LocationSummary::Make(isolate, | 848 return LocationSummary::Make(isolate, |
| 848 kNumInputs, | 849 kNumInputs, |
| 849 Location::RequiresRegister(), | 850 Location::RequiresRegister(), |
| (...skipping 3934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4784 ASSERT((ic_data.NumberOfChecks() == 1)); | 4785 ASSERT((ic_data.NumberOfChecks() == 1)); |
| 4785 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0)); | 4786 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0)); |
| 4786 | 4787 |
| 4787 const intptr_t kNumberOfArguments = 1; | 4788 const intptr_t kNumberOfArguments = 1; |
| 4788 __ pushq(value_obj); | 4789 __ pushq(value_obj); |
| 4789 compiler->GenerateStaticCall(deopt_id(), | 4790 compiler->GenerateStaticCall(deopt_id(), |
| 4790 instance_call()->token_pos(), | 4791 instance_call()->token_pos(), |
| 4791 target, | 4792 target, |
| 4792 kNumberOfArguments, | 4793 kNumberOfArguments, |
| 4793 Object::null_array(), // No argument names. | 4794 Object::null_array(), // No argument names. |
| 4794 locs()); | 4795 locs(), |
| 4796 ICData::Handle()); |
| 4795 __ Bind(&done); | 4797 __ Bind(&done); |
| 4796 } | 4798 } |
| 4797 | 4799 |
| 4798 | 4800 |
| 4799 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Isolate* isolate, | 4801 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Isolate* isolate, |
| 4800 bool opt) const { | 4802 bool opt) const { |
| 4801 const intptr_t kNumInputs = 1; | 4803 const intptr_t kNumInputs = 1; |
| 4802 const intptr_t kNumTemps = 1; | 4804 const intptr_t kNumTemps = 1; |
| 4803 LocationSummary* result = new(isolate) LocationSummary( | 4805 LocationSummary* result = new(isolate) LocationSummary( |
| 4804 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4806 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| (...skipping 512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5317 } | 5319 } |
| 5318 ASSERT(ic_data().NumArgsTested() == 1); | 5320 ASSERT(ic_data().NumArgsTested() == 1); |
| 5319 if (!with_checks()) { | 5321 if (!with_checks()) { |
| 5320 ASSERT(ic_data().HasOneTarget()); | 5322 ASSERT(ic_data().HasOneTarget()); |
| 5321 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); | 5323 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); |
| 5322 compiler->GenerateStaticCall(deopt_id(), | 5324 compiler->GenerateStaticCall(deopt_id(), |
| 5323 instance_call()->token_pos(), | 5325 instance_call()->token_pos(), |
| 5324 target, | 5326 target, |
| 5325 instance_call()->ArgumentCount(), | 5327 instance_call()->ArgumentCount(), |
| 5326 instance_call()->argument_names(), | 5328 instance_call()->argument_names(), |
| 5327 locs()); | 5329 locs(), |
| 5330 ICData::Handle()); |
| 5328 return; | 5331 return; |
| 5329 } | 5332 } |
| 5330 | 5333 |
| 5331 // Load receiver into RAX. | 5334 // Load receiver into RAX. |
| 5332 __ movq(RAX, | 5335 __ movq(RAX, |
| 5333 Address(RSP, (instance_call()->ArgumentCount() - 1) * kWordSize)); | 5336 Address(RSP, (instance_call()->ArgumentCount() - 1) * kWordSize)); |
| 5334 LoadValueCid(compiler, RDI, RAX, | 5337 LoadValueCid(compiler, RDI, RAX, |
| 5335 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); | 5338 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); |
| 5336 compiler->EmitTestAndCall(ic_data(), | 5339 compiler->EmitTestAndCall(ic_data(), |
| 5337 RDI, // Class id register. | 5340 RDI, // Class id register. |
| (...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5820 PcDescriptors::kOther, | 5823 PcDescriptors::kOther, |
| 5821 locs()); | 5824 locs()); |
| 5822 __ Drop(ArgumentCount()); // Discard arguments. | 5825 __ Drop(ArgumentCount()); // Discard arguments. |
| 5823 } | 5826 } |
| 5824 | 5827 |
| 5825 } // namespace dart | 5828 } // namespace dart |
| 5826 | 5829 |
| 5827 #undef __ | 5830 #undef __ |
| 5828 | 5831 |
| 5829 #endif // defined TARGET_ARCH_X64 | 5832 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |