| OLD | NEW | 
|---|
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. | 
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be | 
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. | 
| 4 | 4 | 
| 5 #include "src/v8.h" | 5 #include "src/v8.h" | 
| 6 | 6 | 
| 7 #if V8_TARGET_ARCH_IA32 | 7 #if V8_TARGET_ARCH_IA32 | 
| 8 | 8 | 
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" | 
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" | 
| (...skipping 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1682       } else { | 1682       } else { | 
| 1683         Label check_for_nan; | 1683         Label check_for_nan; | 
| 1684         __ j(not_equal, &check_for_nan, Label::kNear); | 1684         __ j(not_equal, &check_for_nan, Label::kNear); | 
| 1685         __ Move(eax, Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); | 1685         __ Move(eax, Immediate(Smi::FromInt(NegativeComparisonResult(cc)))); | 
| 1686         __ ret(0); | 1686         __ ret(0); | 
| 1687         __ bind(&check_for_nan); | 1687         __ bind(&check_for_nan); | 
| 1688       } | 1688       } | 
| 1689     } | 1689     } | 
| 1690 | 1690 | 
| 1691     // Test for NaN. Compare heap numbers in a general way, | 1691     // Test for NaN. Compare heap numbers in a general way, | 
| 1692     // to hanlde NaNs correctly. | 1692     // to handle NaNs correctly. | 
| 1693     __ cmp(FieldOperand(edx, HeapObject::kMapOffset), | 1693     __ cmp(FieldOperand(edx, HeapObject::kMapOffset), | 
| 1694            Immediate(isolate()->factory()->heap_number_map())); | 1694            Immediate(isolate()->factory()->heap_number_map())); | 
| 1695     __ j(equal, &generic_heap_number_comparison, Label::kNear); | 1695     __ j(equal, &generic_heap_number_comparison, Label::kNear); | 
| 1696     if (cc != equal) { | 1696     if (cc != equal) { | 
| 1697       Label not_simd; |  | 
| 1698       __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); | 1697       __ mov(ecx, FieldOperand(eax, HeapObject::kMapOffset)); | 
| 1699       __ movzx_b(ecx, FieldOperand(ecx, Map::kInstanceTypeOffset)); | 1698       __ movzx_b(ecx, FieldOperand(ecx, Map::kInstanceTypeOffset)); | 
| 1700       // Call runtime on identical JSObjects.  Otherwise return equal. | 1699       // Call runtime on identical JSObjects.  Otherwise return equal. | 
| 1701       __ cmpb(ecx, static_cast<uint8_t>(FIRST_SPEC_OBJECT_TYPE)); | 1700       __ cmpb(ecx, static_cast<uint8_t>(FIRST_SPEC_OBJECT_TYPE)); | 
| 1702       __ j(above_equal, &runtime_call, Label::kFar); | 1701       __ j(above_equal, &runtime_call, Label::kFar); | 
| 1703       // Call runtime on identical symbols since we need to throw a TypeError. | 1702       // Call runtime on identical symbols since we need to throw a TypeError. | 
| 1704       __ cmpb(ecx, static_cast<uint8_t>(SYMBOL_TYPE)); | 1703       __ cmpb(ecx, static_cast<uint8_t>(SYMBOL_TYPE)); | 
| 1705       __ j(equal, &runtime_call, Label::kFar); | 1704       __ j(equal, &runtime_call, Label::kFar); | 
| 1706       // Call runtime on identical SIMD values since we must throw a TypeError. | 1705       // Call runtime on identical SIMD values since we must throw a TypeError. | 
| 1707       __ cmpb(ecx, static_cast<uint8_t>(FIRST_SIMD_VALUE_TYPE)); | 1706       __ cmpb(ecx, static_cast<uint8_t>(SIMD128_VALUE_TYPE)); | 
| 1708       __ j(less, ¬_simd, Label::kFar); | 1707       __ j(equal, &runtime_call, Label::kFar); | 
| 1709       __ cmpb(ecx, static_cast<uint8_t>(LAST_SIMD_VALUE_TYPE)); |  | 
| 1710       __ j(less_equal, &runtime_call, Label::kFar); |  | 
| 1711       __ bind(¬_simd); |  | 
| 1712       if (is_strong(strength())) { | 1708       if (is_strong(strength())) { | 
| 1713         // We have already tested for smis and heap numbers, so if both | 1709         // We have already tested for smis and heap numbers, so if both | 
| 1714         // arguments are not strings we must proceed to the slow case. | 1710         // arguments are not strings we must proceed to the slow case. | 
| 1715         __ test(ecx, Immediate(kIsNotStringMask)); | 1711         __ test(ecx, Immediate(kIsNotStringMask)); | 
| 1716         __ j(not_zero, &runtime_call, Label::kFar); | 1712         __ j(not_zero, &runtime_call, Label::kFar); | 
| 1717       } | 1713       } | 
| 1718     } | 1714     } | 
| 1719     __ Move(eax, Immediate(Smi::FromInt(EQUAL))); | 1715     __ Move(eax, Immediate(Smi::FromInt(EQUAL))); | 
| 1720     __ ret(0); | 1716     __ ret(0); | 
| 1721 | 1717 | 
| (...skipping 3936 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 5658                            Operand(ebp, 7 * kPointerSize), NULL); | 5654                            Operand(ebp, 7 * kPointerSize), NULL); | 
| 5659 } | 5655 } | 
| 5660 | 5656 | 
| 5661 | 5657 | 
| 5662 #undef __ | 5658 #undef __ | 
| 5663 | 5659 | 
| 5664 }  // namespace internal | 5660 }  // namespace internal | 
| 5665 }  // namespace v8 | 5661 }  // namespace v8 | 
| 5666 | 5662 | 
| 5667 #endif  // V8_TARGET_ARCH_IA32 | 5663 #endif  // V8_TARGET_ARCH_IA32 | 
| OLD | NEW | 
|---|