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 5683 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5694 compiler->GenerateStaticCall(deopt_id(), | 5694 compiler->GenerateStaticCall(deopt_id(), |
5695 instance_call()->token_pos(), | 5695 instance_call()->token_pos(), |
5696 target, | 5696 target, |
5697 instance_call()->ArgumentCount(), | 5697 instance_call()->ArgumentCount(), |
5698 instance_call()->argument_names(), | 5698 instance_call()->argument_names(), |
5699 locs(), | 5699 locs(), |
5700 ICData::Handle()); | 5700 ICData::Handle()); |
5701 return; | 5701 return; |
5702 } | 5702 } |
5703 | 5703 |
5704 // Load receiver into EAX. | |
5705 __ movl(EAX, | |
5706 Address(ESP, (instance_call()->ArgumentCount() - 1) * kWordSize)); | |
5707 | |
5708 Label* deopt = compiler->AddDeoptStub( | 5704 Label* deopt = compiler->AddDeoptStub( |
5709 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); | 5705 deopt_id(), ICData::kDeoptPolymorphicInstanceCallTestFail); |
5710 LoadValueCid(compiler, EDI, EAX, | 5706 Label ok; |
5711 (ic_data().GetReceiverClassIdAt(0) == kSmiCid) ? NULL : deopt); | |
5712 | |
5713 compiler->EmitTestAndCall(ic_data(), | 5707 compiler->EmitTestAndCall(ic_data(), |
5714 EDI, // Class id register. | |
5715 instance_call()->ArgumentCount(), | 5708 instance_call()->ArgumentCount(), |
5716 instance_call()->argument_names(), | 5709 instance_call()->argument_names(), |
5717 deopt, | 5710 deopt, |
| 5711 &ok, |
5718 deopt_id(), | 5712 deopt_id(), |
5719 instance_call()->token_pos(), | 5713 instance_call()->token_pos(), |
5720 locs()); | 5714 locs()); |
| 5715 __ Bind(&ok); |
5721 } | 5716 } |
5722 | 5717 |
5723 | 5718 |
5724 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, | 5719 LocationSummary* BranchInstr::MakeLocationSummary(Zone* zone, |
5725 bool opt) const { | 5720 bool opt) const { |
5726 comparison()->InitializeLocationSummary(zone, opt); | 5721 comparison()->InitializeLocationSummary(zone, opt); |
5727 // Branches don't produce a result. | 5722 // Branches don't produce a result. |
5728 comparison()->locs()->set_out(0, Location::NoLocation()); | 5723 comparison()->locs()->set_out(0, Location::NoLocation()); |
5729 return comparison()->locs(); | 5724 return comparison()->locs(); |
5730 } | 5725 } |
(...skipping 1148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6879 __ Drop(1); | 6874 __ Drop(1); |
6880 __ popl(result); | 6875 __ popl(result); |
6881 } | 6876 } |
6882 | 6877 |
6883 | 6878 |
6884 } // namespace dart | 6879 } // namespace dart |
6885 | 6880 |
6886 #undef __ | 6881 #undef __ |
6887 | 6882 |
6888 #endif // defined TARGET_ARCH_IA32 | 6883 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |