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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
8 | 8 |
9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
10 #include "code-stubs.h" | 10 #include "code-stubs.h" |
(...skipping 5116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5127 __ CompareObjectType(r3, r3, r4, MAP_TYPE); | 5127 __ CompareObjectType(r3, r3, r4, MAP_TYPE); |
5128 __ Assert(eq, kUnexpectedInitialMapForArrayFunction); | 5128 __ Assert(eq, kUnexpectedInitialMapForArrayFunction); |
5129 } | 5129 } |
5130 | 5130 |
5131 // Figure out the right elements kind | 5131 // Figure out the right elements kind |
5132 __ ldr(r3, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset)); | 5132 __ ldr(r3, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset)); |
5133 // Load the map's "bit field 2" into |result|. We only need the first byte, | 5133 // Load the map's "bit field 2" into |result|. We only need the first byte, |
5134 // but the following bit field extraction takes care of that anyway. | 5134 // but the following bit field extraction takes care of that anyway. |
5135 __ ldr(r3, FieldMemOperand(r3, Map::kBitField2Offset)); | 5135 __ ldr(r3, FieldMemOperand(r3, Map::kBitField2Offset)); |
5136 // Retrieve elements_kind from bit field 2. | 5136 // Retrieve elements_kind from bit field 2. |
5137 __ Ubfx(r3, r3, Map::kElementsKindShift, Map::kElementsKindBitCount); | 5137 __ DecodeField<Map::ElementsKindBits>(r3); |
5138 | 5138 |
5139 if (FLAG_debug_code) { | 5139 if (FLAG_debug_code) { |
5140 Label done; | 5140 Label done; |
5141 __ cmp(r3, Operand(FAST_ELEMENTS)); | 5141 __ cmp(r3, Operand(FAST_ELEMENTS)); |
5142 __ b(eq, &done); | 5142 __ b(eq, &done); |
5143 __ cmp(r3, Operand(FAST_HOLEY_ELEMENTS)); | 5143 __ cmp(r3, Operand(FAST_HOLEY_ELEMENTS)); |
5144 __ Assert(eq, | 5144 __ Assert(eq, |
5145 kInvalidElementsKindForInternalArrayOrInternalPackedArray); | 5145 kInvalidElementsKindForInternalArrayOrInternalPackedArray); |
5146 __ bind(&done); | 5146 __ bind(&done); |
5147 } | 5147 } |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5299 MemOperand(fp, 6 * kPointerSize), | 5299 MemOperand(fp, 6 * kPointerSize), |
5300 NULL); | 5300 NULL); |
5301 } | 5301 } |
5302 | 5302 |
5303 | 5303 |
5304 #undef __ | 5304 #undef __ |
5305 | 5305 |
5306 } } // namespace v8::internal | 5306 } } // namespace v8::internal |
5307 | 5307 |
5308 #endif // V8_TARGET_ARCH_ARM | 5308 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |