| 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 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 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 647 SmiCheckType smi_check_type) { | 647 SmiCheckType smi_check_type) { |
| 648 if (smi_check_type == DO_SMI_CHECK) { | 648 if (smi_check_type == DO_SMI_CHECK) { |
| 649 JumpIfSmi(obj, fail); | 649 JumpIfSmi(obj, fail); |
| 650 } | 650 } |
| 651 | 651 |
| 652 CompareMap(obj, map); | 652 CompareMap(obj, map); |
| 653 j(not_equal, fail); | 653 j(not_equal, fail); |
| 654 } | 654 } |
| 655 | 655 |
| 656 | 656 |
| 657 void MacroAssembler::DispatchMap(Register obj, | 657 void MacroAssembler::DispatchWeakMap(Register obj, Register scratch1, |
| 658 Register unused, | 658 Register scratch2, Handle<WeakCell> cell, |
| 659 Handle<Map> map, | 659 Handle<Code> success, |
| 660 Handle<Code> success, | 660 SmiCheckType smi_check_type) { |
| 661 SmiCheckType smi_check_type) { | |
| 662 Label fail; | 661 Label fail; |
| 663 if (smi_check_type == DO_SMI_CHECK) { | 662 if (smi_check_type == DO_SMI_CHECK) { |
| 664 JumpIfSmi(obj, &fail); | 663 JumpIfSmi(obj, &fail); |
| 665 } | 664 } |
| 666 cmp(FieldOperand(obj, HeapObject::kMapOffset), Immediate(map)); | 665 mov(scratch1, FieldOperand(obj, HeapObject::kMapOffset)); |
| 666 CmpWeakValue(scratch1, cell, scratch2); |
| 667 j(equal, success); | 667 j(equal, success); |
| 668 | 668 |
| 669 bind(&fail); | 669 bind(&fail); |
| 670 } | 670 } |
| 671 | 671 |
| 672 | 672 |
| 673 Condition MacroAssembler::IsObjectStringType(Register heap_object, | 673 Condition MacroAssembler::IsObjectStringType(Register heap_object, |
| 674 Register map, | 674 Register map, |
| 675 Register instance_type) { | 675 Register instance_type) { |
| 676 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); | 676 mov(map, FieldOperand(heap_object, HeapObject::kMapOffset)); |
| (...skipping 2688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3365 if (mag.shift > 0) sar(edx, mag.shift); | 3365 if (mag.shift > 0) sar(edx, mag.shift); |
| 3366 mov(eax, dividend); | 3366 mov(eax, dividend); |
| 3367 shr(eax, 31); | 3367 shr(eax, 31); |
| 3368 add(edx, eax); | 3368 add(edx, eax); |
| 3369 } | 3369 } |
| 3370 | 3370 |
| 3371 | 3371 |
| 3372 } } // namespace v8::internal | 3372 } } // namespace v8::internal |
| 3373 | 3373 |
| 3374 #endif // V8_TARGET_ARCH_X87 | 3374 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |