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_X87 | 7 #if V8_TARGET_ARCH_X87 |
8 | 8 |
9 #include "bootstrapper.h" | 9 #include "bootstrapper.h" |
10 #include "code-stubs.h" | 10 #include "code-stubs.h" |
(...skipping 4574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4585 __ Assert(equal, kUnexpectedInitialMapForArrayFunction); | 4585 __ Assert(equal, kUnexpectedInitialMapForArrayFunction); |
4586 } | 4586 } |
4587 | 4587 |
4588 // Figure out the right elements kind | 4588 // Figure out the right elements kind |
4589 __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); | 4589 __ mov(ecx, FieldOperand(edi, JSFunction::kPrototypeOrInitialMapOffset)); |
4590 | 4590 |
4591 // Load the map's "bit field 2" into |result|. We only need the first byte, | 4591 // Load the map's "bit field 2" into |result|. We only need the first byte, |
4592 // but the following masking takes care of that anyway. | 4592 // but the following masking takes care of that anyway. |
4593 __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset)); | 4593 __ mov(ecx, FieldOperand(ecx, Map::kBitField2Offset)); |
4594 // Retrieve elements_kind from bit field 2. | 4594 // Retrieve elements_kind from bit field 2. |
4595 __ and_(ecx, Map::kElementsKindMask); | 4595 DecodeField<Map::ElementsKindBits>(ecx); |
4596 __ shr(ecx, Map::kElementsKindShift); | |
4597 | 4596 |
4598 if (FLAG_debug_code) { | 4597 if (FLAG_debug_code) { |
4599 Label done; | 4598 Label done; |
4600 __ cmp(ecx, Immediate(FAST_ELEMENTS)); | 4599 __ cmp(ecx, Immediate(FAST_ELEMENTS)); |
4601 __ j(equal, &done); | 4600 __ j(equal, &done); |
4602 __ cmp(ecx, Immediate(FAST_HOLEY_ELEMENTS)); | 4601 __ cmp(ecx, Immediate(FAST_HOLEY_ELEMENTS)); |
4603 __ Assert(equal, | 4602 __ Assert(equal, |
4604 kInvalidElementsKindForInternalArrayOrInternalPackedArray); | 4603 kInvalidElementsKindForInternalArrayOrInternalPackedArray); |
4605 __ bind(&done); | 4604 __ bind(&done); |
4606 } | 4605 } |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4772 Operand(ebp, 7 * kPointerSize), | 4771 Operand(ebp, 7 * kPointerSize), |
4773 NULL); | 4772 NULL); |
4774 } | 4773 } |
4775 | 4774 |
4776 | 4775 |
4777 #undef __ | 4776 #undef __ |
4778 | 4777 |
4779 } } // namespace v8::internal | 4778 } } // namespace v8::internal |
4780 | 4779 |
4781 #endif // V8_TARGET_ARCH_X87 | 4780 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |