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 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1682 FpuRegister fpu_temp = locs()->temp(2).fpu_reg(); | 1682 FpuRegister fpu_temp = locs()->temp(2).fpu_reg(); |
1683 | 1683 |
1684 Label store_pointer, copy_payload; | 1684 Label store_pointer, copy_payload; |
1685 __ LoadObject(temp, Field::ZoneHandle(field().raw())); | 1685 __ LoadObject(temp, Field::ZoneHandle(field().raw())); |
1686 __ cmpl(FieldAddress(temp, Field::guarded_cid_offset()), | 1686 __ cmpl(FieldAddress(temp, Field::guarded_cid_offset()), |
1687 Immediate(kDoubleCid)); | 1687 Immediate(kDoubleCid)); |
1688 __ j(NOT_EQUAL, &store_pointer); | 1688 __ j(NOT_EQUAL, &store_pointer); |
1689 __ cmpl(FieldAddress(temp, Field::is_nullable_offset()), | 1689 __ cmpl(FieldAddress(temp, Field::is_nullable_offset()), |
1690 Immediate(kNullCid)); | 1690 Immediate(kNullCid)); |
1691 __ j(EQUAL, &store_pointer); | 1691 __ j(EQUAL, &store_pointer); |
| 1692 __ movzxb(temp2, FieldAddress(temp, Field::kind_bits_offset())); |
| 1693 __ testl(temp2, Immediate(1 << Field::kUnboxingCandidateBit)); |
| 1694 __ j(ZERO, &store_pointer); |
1692 | 1695 |
1693 const Immediate& raw_null = | 1696 const Immediate& raw_null = |
1694 Immediate(reinterpret_cast<intptr_t>(Object::null())); | 1697 Immediate(reinterpret_cast<intptr_t>(Object::null())); |
1695 __ movl(temp, FieldAddress(instance_reg, field().Offset())); | 1698 __ movl(temp, FieldAddress(instance_reg, field().Offset())); |
1696 __ cmpl(temp, raw_null); | 1699 __ cmpl(temp, raw_null); |
1697 __ j(NOT_EQUAL, ©_payload); | 1700 __ j(NOT_EQUAL, ©_payload); |
1698 | 1701 |
1699 StoreInstanceFieldSlowPath* slow_path = | 1702 StoreInstanceFieldSlowPath* slow_path = |
1700 new StoreInstanceFieldSlowPath(this); | 1703 new StoreInstanceFieldSlowPath(this); |
1701 compiler->AddSlowPathCode(slow_path); | 1704 compiler->AddSlowPathCode(slow_path); |
(...skipping 3497 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5199 PcDescriptors::kOther, | 5202 PcDescriptors::kOther, |
5200 locs()); | 5203 locs()); |
5201 __ Drop(2); // Discard type arguments and receiver. | 5204 __ Drop(2); // Discard type arguments and receiver. |
5202 } | 5205 } |
5203 | 5206 |
5204 } // namespace dart | 5207 } // namespace dart |
5205 | 5208 |
5206 #undef __ | 5209 #undef __ |
5207 | 5210 |
5208 #endif // defined TARGET_ARCH_IA32 | 5211 #endif // defined TARGET_ARCH_IA32 |
OLD | NEW |