| 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 <limits.h> // For LONG_MIN, LONG_MAX. | 5 #include <limits.h> // For LONG_MIN, LONG_MAX. |
| 6 | 6 |
| 7 #include "src/v8.h" | 7 #include "src/v8.h" |
| 8 | 8 |
| 9 #if V8_TARGET_ARCH_ARM | 9 #if V8_TARGET_ARCH_ARM |
| 10 | 10 |
| (...skipping 3771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3782 return no_reg; | 3782 return no_reg; |
| 3783 } | 3783 } |
| 3784 | 3784 |
| 3785 | 3785 |
| 3786 void MacroAssembler::JumpIfDictionaryInPrototypeChain( | 3786 void MacroAssembler::JumpIfDictionaryInPrototypeChain( |
| 3787 Register object, | 3787 Register object, |
| 3788 Register scratch0, | 3788 Register scratch0, |
| 3789 Register scratch1, | 3789 Register scratch1, |
| 3790 Label* found) { | 3790 Label* found) { |
| 3791 DCHECK(!scratch1.is(scratch0)); | 3791 DCHECK(!scratch1.is(scratch0)); |
| 3792 Factory* factory = isolate()->factory(); | |
| 3793 Register current = scratch0; | 3792 Register current = scratch0; |
| 3794 Label loop_again; | 3793 Label loop_again, end; |
| 3795 | 3794 |
| 3796 // scratch contained elements pointer. | 3795 // scratch contained elements pointer. |
| 3797 mov(current, object); | 3796 mov(current, object); |
| 3797 ldr(current, FieldMemOperand(current, HeapObject::kMapOffset)); |
| 3798 ldr(current, FieldMemOperand(current, Map::kPrototypeOffset)); |
| 3799 CompareRoot(current, Heap::kNullValueRootIndex); |
| 3800 b(eq, &end); |
| 3798 | 3801 |
| 3799 // Loop based on the map going up the prototype chain. | 3802 // Loop based on the map going up the prototype chain. |
| 3800 bind(&loop_again); | 3803 bind(&loop_again); |
| 3801 ldr(current, FieldMemOperand(current, HeapObject::kMapOffset)); | 3804 ldr(current, FieldMemOperand(current, HeapObject::kMapOffset)); |
| 3805 |
| 3806 STATIC_ASSERT(JS_PROXY_TYPE < JS_OBJECT_TYPE); |
| 3807 STATIC_ASSERT(JS_VALUE_TYPE < JS_OBJECT_TYPE); |
| 3808 ldrb(scratch1, FieldMemOperand(current, Map::kInstanceTypeOffset)); |
| 3809 cmp(scratch1, Operand(JS_OBJECT_TYPE)); |
| 3810 b(lo, found); |
| 3811 |
| 3802 ldr(scratch1, FieldMemOperand(current, Map::kBitField2Offset)); | 3812 ldr(scratch1, FieldMemOperand(current, Map::kBitField2Offset)); |
| 3803 DecodeField<Map::ElementsKindBits>(scratch1); | 3813 DecodeField<Map::ElementsKindBits>(scratch1); |
| 3804 cmp(scratch1, Operand(DICTIONARY_ELEMENTS)); | 3814 cmp(scratch1, Operand(DICTIONARY_ELEMENTS)); |
| 3805 b(eq, found); | 3815 b(eq, found); |
| 3806 ldr(current, FieldMemOperand(current, Map::kPrototypeOffset)); | 3816 ldr(current, FieldMemOperand(current, Map::kPrototypeOffset)); |
| 3807 cmp(current, Operand(factory->null_value())); | 3817 CompareRoot(current, Heap::kNullValueRootIndex); |
| 3808 b(ne, &loop_again); | 3818 b(ne, &loop_again); |
| 3819 |
| 3820 bind(&end); |
| 3809 } | 3821 } |
| 3810 | 3822 |
| 3811 | 3823 |
| 3812 #ifdef DEBUG | 3824 #ifdef DEBUG |
| 3813 bool AreAliased(Register reg1, | 3825 bool AreAliased(Register reg1, |
| 3814 Register reg2, | 3826 Register reg2, |
| 3815 Register reg3, | 3827 Register reg3, |
| 3816 Register reg4, | 3828 Register reg4, |
| 3817 Register reg5, | 3829 Register reg5, |
| 3818 Register reg6, | 3830 Register reg6, |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3900 } | 3912 } |
| 3901 } | 3913 } |
| 3902 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); | 3914 if (mag.shift > 0) mov(result, Operand(result, ASR, mag.shift)); |
| 3903 add(result, result, Operand(dividend, LSR, 31)); | 3915 add(result, result, Operand(dividend, LSR, 31)); |
| 3904 } | 3916 } |
| 3905 | 3917 |
| 3906 } // namespace internal | 3918 } // namespace internal |
| 3907 } // namespace v8 | 3919 } // namespace v8 |
| 3908 | 3920 |
| 3909 #endif // V8_TARGET_ARCH_ARM | 3921 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |