| 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 3656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3667 ASSERT(value == result); | 3667 ASSERT(value == result); |
| 3668 __ SmiUntag(value); | 3668 __ SmiUntag(value); |
| 3669 } else if (value_cid == kMintCid) { | 3669 } else if (value_cid == kMintCid) { |
| 3670 ASSERT((value != result) || (out_of_range == NULL)); | 3670 ASSERT((value != result) || (out_of_range == NULL)); |
| 3671 LoadInt32FromMint(compiler, | 3671 LoadInt32FromMint(compiler, |
| 3672 result, | 3672 result, |
| 3673 FieldAddress(value, lo_offset), | 3673 FieldAddress(value, lo_offset), |
| 3674 FieldAddress(value, hi_offset), | 3674 FieldAddress(value, hi_offset), |
| 3675 temp, | 3675 temp, |
| 3676 out_of_range); | 3676 out_of_range); |
| 3677 } else if (!CanDeoptimize()) { |
| 3678 ASSERT(value == result); |
| 3679 Label done; |
| 3680 __ SmiUntag(value); |
| 3681 __ j(NOT_CARRY, &done); |
| 3682 __ movl(value, Address(value, TIMES_2, lo_offset)); |
| 3683 __ Bind(&done); |
| 3677 } else { | 3684 } else { |
| 3678 ASSERT(value == result); | 3685 ASSERT(value == result); |
| 3679 Label done; | 3686 Label done; |
| 3680 __ SmiUntagOrCheckClass(value, kMintCid, temp, &done); | 3687 __ SmiUntagOrCheckClass(value, kMintCid, temp, &done); |
| 3681 __ j(NOT_EQUAL, deopt); | 3688 __ j(NOT_EQUAL, deopt); |
| 3682 if (out_of_range != NULL) { | 3689 if (out_of_range != NULL) { |
| 3683 Register value_temp = locs()->temp(1).reg(); | 3690 Register value_temp = locs()->temp(1).reg(); |
| 3684 __ movl(value_temp, value); | 3691 __ movl(value_temp, value); |
| 3685 value = value_temp; | 3692 value = value_temp; |
| 3686 } | 3693 } |
| (...skipping 3113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6800 #if defined(DEBUG) | 6807 #if defined(DEBUG) |
| 6801 __ movl(EDX, Immediate(kInvalidObjectPointer)); | 6808 __ movl(EDX, Immediate(kInvalidObjectPointer)); |
| 6802 #endif | 6809 #endif |
| 6803 } | 6810 } |
| 6804 | 6811 |
| 6805 } // namespace dart | 6812 } // namespace dart |
| 6806 | 6813 |
| 6807 #undef __ | 6814 #undef __ |
| 6808 | 6815 |
| 6809 #endif // defined TARGET_ARCH_IA32 | 6816 #endif // defined TARGET_ARCH_IA32 |
| OLD | NEW |