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 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1578 FpuRegister fpu_temp = locs()->temp(2).fpu_reg(); | 1578 FpuRegister fpu_temp = locs()->temp(2).fpu_reg(); |
1579 | 1579 |
1580 Label store_pointer, copy_payload; | 1580 Label store_pointer, copy_payload; |
1581 __ LoadObject(temp, Field::ZoneHandle(field().raw()), PP); | 1581 __ LoadObject(temp, Field::ZoneHandle(field().raw()), PP); |
1582 __ cmpq(FieldAddress(temp, Field::guarded_cid_offset()), | 1582 __ cmpq(FieldAddress(temp, Field::guarded_cid_offset()), |
1583 Immediate(kDoubleCid)); | 1583 Immediate(kDoubleCid)); |
1584 __ j(NOT_EQUAL, &store_pointer); | 1584 __ j(NOT_EQUAL, &store_pointer); |
1585 __ cmpq(FieldAddress(temp, Field::is_nullable_offset()), | 1585 __ cmpq(FieldAddress(temp, Field::is_nullable_offset()), |
1586 Immediate(kNullCid)); | 1586 Immediate(kNullCid)); |
1587 __ j(EQUAL, &store_pointer); | 1587 __ j(EQUAL, &store_pointer); |
| 1588 __ movzxb(temp2, FieldAddress(temp, Field::kind_bits_offset())); |
| 1589 __ testq(temp2, Immediate(1 << Field::kUnboxingCandidateBit)); |
| 1590 __ j(ZERO, &store_pointer); |
1588 | 1591 |
1589 __ movq(temp, FieldAddress(instance_reg, field().Offset())); | 1592 __ movq(temp, FieldAddress(instance_reg, field().Offset())); |
1590 __ CompareObject(temp, Object::null_object(), PP); | 1593 __ CompareObject(temp, Object::null_object(), PP); |
1591 __ j(NOT_EQUAL, ©_payload); | 1594 __ j(NOT_EQUAL, ©_payload); |
1592 | 1595 |
1593 StoreInstanceFieldSlowPath* slow_path = | 1596 StoreInstanceFieldSlowPath* slow_path = |
1594 new StoreInstanceFieldSlowPath(this); | 1597 new StoreInstanceFieldSlowPath(this); |
1595 compiler->AddSlowPathCode(slow_path); | 1598 compiler->AddSlowPathCode(slow_path); |
1596 | 1599 |
1597 if (!compiler->is_optimizing()) { | 1600 if (!compiler->is_optimizing()) { |
(...skipping 3338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4936 PcDescriptors::kOther, | 4939 PcDescriptors::kOther, |
4937 locs()); | 4940 locs()); |
4938 __ Drop(2); // Discard type arguments and receiver. | 4941 __ Drop(2); // Discard type arguments and receiver. |
4939 } | 4942 } |
4940 | 4943 |
4941 } // namespace dart | 4944 } // namespace dart |
4942 | 4945 |
4943 #undef __ | 4946 #undef __ |
4944 | 4947 |
4945 #endif // defined TARGET_ARCH_X64 | 4948 #endif // defined TARGET_ARCH_X64 |
OLD | NEW |