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