| 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_IA32. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_IA32. |
| 6 #if defined(TARGET_ARCH_IA32) | 6 #if defined(TARGET_ARCH_IA32) |
| 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 889 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 900 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 900 void StringInterpolateInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 901 Register array = locs()->in(0).reg(); | 901 Register array = locs()->in(0).reg(); |
| 902 __ pushl(array); | 902 __ pushl(array); |
| 903 const int kNumberOfArguments = 1; | 903 const int kNumberOfArguments = 1; |
| 904 const Array& kNoArgumentNames = Object::null_array(); | 904 const Array& kNoArgumentNames = Object::null_array(); |
| 905 compiler->GenerateStaticCall(deopt_id(), | 905 compiler->GenerateStaticCall(deopt_id(), |
| 906 token_pos(), | 906 token_pos(), |
| 907 CallFunction(), | 907 CallFunction(), |
| 908 kNumberOfArguments, | 908 kNumberOfArguments, |
| 909 kNoArgumentNames, | 909 kNoArgumentNames, |
| 910 locs()); | 910 locs(), |
| 911 ICData::Handle()); |
| 911 ASSERT(locs()->out(0).reg() == EAX); | 912 ASSERT(locs()->out(0).reg() == EAX); |
| 912 } | 913 } |
| 913 | 914 |
| 914 | 915 |
| 915 LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Isolate* isolate, | 916 LocationSummary* LoadUntaggedInstr::MakeLocationSummary(Isolate* isolate, |
| 916 bool opt) const { | 917 bool opt) const { |
| 917 const intptr_t kNumInputs = 1; | 918 const intptr_t kNumInputs = 1; |
| 918 return LocationSummary::Make(isolate, | 919 return LocationSummary::Make(isolate, |
| 919 kNumInputs, | 920 kNumInputs, |
| 920 Location::RequiresRegister(), | 921 Location::RequiresRegister(), |
| (...skipping 4017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4938 ASSERT(instance_call()->HasICData()); | 4939 ASSERT(instance_call()->HasICData()); |
| 4939 const ICData& ic_data = *instance_call()->ic_data(); | 4940 const ICData& ic_data = *instance_call()->ic_data(); |
| 4940 ASSERT((ic_data.NumberOfChecks() == 1)); | 4941 ASSERT((ic_data.NumberOfChecks() == 1)); |
| 4941 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0)); | 4942 const Function& target = Function::ZoneHandle(ic_data.GetTargetAt(0)); |
| 4942 | 4943 |
| 4943 const intptr_t kNumberOfArguments = 1; | 4944 const intptr_t kNumberOfArguments = 1; |
| 4944 compiler->GenerateStaticCall(deopt_id(), | 4945 compiler->GenerateStaticCall(deopt_id(), |
| 4945 instance_call()->token_pos(), | 4946 instance_call()->token_pos(), |
| 4946 target, | 4947 target, |
| 4947 kNumberOfArguments, | 4948 kNumberOfArguments, |
| 4948 Object::null_array(), // No argument names., | 4949 Object::null_array(), // No argument names. |
| 4949 locs()); | 4950 locs(), |
| 4951 ICData::Handle()); |
| 4950 __ Bind(&done); | 4952 __ Bind(&done); |
| 4951 } | 4953 } |
| 4952 | 4954 |
| 4953 | 4955 |
| 4954 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Isolate* isolate, | 4956 LocationSummary* DoubleToSmiInstr::MakeLocationSummary(Isolate* isolate, |
| 4955 bool opt) const { | 4957 bool opt) const { |
| 4956 const intptr_t kNumInputs = 1; | 4958 const intptr_t kNumInputs = 1; |
| 4957 const intptr_t kNumTemps = 0; | 4959 const intptr_t kNumTemps = 0; |
| 4958 LocationSummary* result = new(isolate) LocationSummary( | 4960 LocationSummary* result = new(isolate) LocationSummary( |
| 4959 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); | 4961 isolate, kNumInputs, kNumTemps, LocationSummary::kNoCall); |
| (...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5415 } | 5417 } |
| 5416 ASSERT(ic_data().NumArgsTested() == 1); | 5418 ASSERT(ic_data().NumArgsTested() == 1); |
| 5417 if (!with_checks()) { | 5419 if (!with_checks()) { |
| 5418 ASSERT(ic_data().HasOneTarget()); | 5420 ASSERT(ic_data().HasOneTarget()); |
| 5419 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); | 5421 const Function& target = Function::ZoneHandle(ic_data().GetTargetAt(0)); |
| 5420 compiler->GenerateStaticCall(deopt_id(), | 5422 compiler->GenerateStaticCall(deopt_id(), |
| 5421 instance_call()->token_pos(), | 5423 instance_call()->token_pos(), |
| 5422 target, | 5424 target, |
| 5423 instance_call()->ArgumentCount(), | 5425 instance_call()->ArgumentCount(), |
| 5424 instance_call()->argument_names(), | 5426 instance_call()->argument_names(), |
| 5425 locs()); | 5427 locs(), |
| 5428 ICData::Handle()); |
| 5426 return; | 5429 return; |
| 5427 } | 5430 } |
| 5428 | 5431 |
| 5429 // Load receiver into EAX. | 5432 // Load receiver into EAX. |
| 5430 __ movl(EAX, | 5433 __ movl(EAX, |
| 5431 Address(ESP, (instance_call()->ArgumentCount() - 1) * kWordSize)); | 5434 Address(ESP, (instance_call()->ArgumentCount() - 1) * kWordSize)); |
| 5432 | 5435 |
| 5433 LoadValueCid(compiler, EDI, EAX, | 5436 LoadValueCid(compiler, EDI, EAX, |
| 5434 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); | 5437 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); |
| 5435 | 5438 |
| (...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6291 PcDescriptors::kOther, | 6294 PcDescriptors::kOther, |
| 6292 locs()); | 6295 locs()); |
| 6293 __ Drop(ArgumentCount()); // Discard arguments. | 6296 __ Drop(ArgumentCount()); // Discard arguments. |
| 6294 } | 6297 } |
| 6295 | 6298 |
| 6296 } // namespace dart | 6299 } // namespace dart |
| 6297 | 6300 |
| 6298 #undef __ | 6301 #undef __ |
| 6299 | 6302 |
| 6300 #endif // defined TARGET_ARCH_IA32 | 6303 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |