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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
8 | 8 |
9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
10 #include "code-stubs.h" | 10 #include "code-stubs.h" |
(...skipping 4934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4945 __ Assert(equal, kUnexpectedInitialMapForArrayFunction); | 4945 __ Assert(equal, kUnexpectedInitialMapForArrayFunction); |
4946 } | 4946 } |
4947 | 4947 |
4948 // Figure out the right elements kind | 4948 // Figure out the right elements kind |
4949 __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); | 4949 __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); |
4950 | 4950 |
4951 // Load the map's "bit field 2" into |result|. We only need the first byte, | 4951 // Load the map's "bit field 2" into |result|. We only need the first byte, |
4952 // but the following masking takes care of that anyway. | 4952 // but the following masking takes care of that anyway. |
4953 __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset)); | 4953 __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset)); |
4954 // Retrieve elements_kind from bit field 2. | 4954 // Retrieve elements_kind from bit field 2. |
4955 __ and_(ecx, Map::kElementsKindMask); | 4955 __ DecodeField<Map::ElementsKindBits>(ecx); |
4956 __ shr(ecx, Map::kElementsKindShift); | |
4957 | 4956 |
4958 if (FLAG_debug_code) { | 4957 if (FLAG_debug_code) { |
4959 Label done; | 4958 Label done; |
4960 __ cmp(ecx, Immediate(FAST_ELEMENTS)); | 4959 __ cmp(ecx, Immediate(FAST_ELEMENTS)); |
4961 __ j(equal, &done); | 4960 __ j(equal, &done); |
4962 __ cmp(ecx, Immediate(FAST_HOLEY_ELEMENTS)); | 4961 __ cmp(ecx, Immediate(FAST_HOLEY_ELEMENTS)); |
4963 __ Assert(equal, | 4962 __ Assert(equal, |
4964 kInvalidElementsKindForInternalArrayOrInternalPackedArray); | 4963 kInvalidElementsKindForInternalArrayOrInternalPackedArray); |
4965 __ bind(&done); | 4964 __ bind(&done); |
4966 } | 4965 } |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5132 Operand(ebp, 7 * kPointerSize), | 5131 Operand(ebp, 7 * kPointerSize), |
5133 NULL); | 5132 NULL); |
5134 } | 5133 } |
5135 | 5134 |
5136 | 5135 |
5137 #undef __ | 5136 #undef __ |
5138 | 5137 |
5139 } } // namespace v8::internal | 5138 } } // namespace v8::internal |
5140 | 5139 |
5141 #endif // V8_TARGET_ARCH_IA32 | 5140 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |