| 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/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
| (...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 SmiCheckType smi_check_type) { | 733 SmiCheckType smi_check_type) { |
| 734 if (smi_check_type == DO_SMI_CHECK) { | 734 if (smi_check_type == DO_SMI_CHECK) { |
| 735 JumpIfSmi(obj, fail); | 735 JumpIfSmi(obj, fail); |
| 736 } | 736 } |
| 737 | 737 |
| 738 CompareMap(obj, map); | 738 CompareMap(obj, map); |
| 739 j(not_equal, fail); | 739 j(not_equal, fail); |
| 740 } | 740 } |
| 741 | 741 |
| 742 | 742 |
| 743 void MacroAssembler::DispatchMap(Register obj, | 743 void MacroAssembler::DispatchWeakMap(Register obj, Register scratch1, |
| 744 Register unused, | 744 Register scratch2, Handle<WeakCell> cell, |
| 745 Handle<Map> map, | 745 Handle<Code> success, |
| 746 Handle<Code> success, | 746 SmiCheckType smi_check_type) { |
| 747 SmiCheckType smi_check_type) { | |
| 748 Label fail; | 747 Label fail; |
| 749 if (smi_check_type == DO_SMI_CHECK) { | 748 if (smi_check_type == DO_SMI_CHECK) { |
| 750 JumpIfSmi(obj, &fail); | 749 JumpIfSmi(obj, &fail); |
| 751 } | 750 } |
| 752 cmp(FieldOperand(obj, HeapObject::kMapOffset), Immediate(map)); | 751 mov(scratch1, FieldOperand(obj, HeapObject::kMapOffset)); |
| 752 CmpWeakValue(scratch1, cell, scratch2); |
| 753 j(equal, success); | 753 j(equal, success); |
| 754 | 754 |
| 755 bind(&fail); | 755 bind(&fail); |
| 756 } | 756 } |
| 757 | 757 |
| 758 | 758 |
| 759 Condition MacroAssembler::IsObjectStringType(Register heap_object, | 759 Condition MacroAssembler::IsObjectStringType(Register heap_object, |
| 760 Register map, | 760 Register map, |
| 761 Register instance_type) { | 761 Register instance_type) { |
| 762 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); | 762 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
| (...skipping 2687 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3450 if (mag.shift > 0) sar(edx, mag.shift); | 3450 if (mag.shift > 0) sar(edx, mag.shift); |
| 3451 mov(eax, dividend); | 3451 mov(eax, dividend); |
| 3452 shr(eax, 31); | 3452 shr(eax, 31); |
| 3453 add(edx, eax); | 3453 add(edx, eax); |
| 3454 } | 3454 } |
| 3455 | 3455 |
| 3456 | 3456 |
| 3457 } } // namespace v8::internal | 3457 } } // namespace v8::internal |
| 3458 | 3458 |
| 3459 #endif // V8_TARGET_ARCH_IA32 | 3459 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |