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 DecodeField<Map::ElementsKindBits>(ecx); | 4595 __ DecodeField<Map::ElementsKindBits>(ecx); |
4596 | 4596 |
4597 if (FLAG_debug_code) { | 4597 if (FLAG_debug_code) { |
4598 Label done; | 4598 Label done; |
4599 __ cmp(ecx, Immediate(FAST_ELEMENTS)); | 4599 __ cmp(ecx, Immediate(FAST_ELEMENTS)); |
4600 __ j(equal, &done); | 4600 __ j(equal, &done); |
4601 __ cmp(ecx, Immediate(FAST_HOLEY_ELEMENTS)); | 4601 __ cmp(ecx, Immediate(FAST_HOLEY_ELEMENTS)); |
4602 __ Assert(equal, | 4602 __ Assert(equal, |
4603 kInvalidElementsKindForInternalArrayOrInternalPackedArray); | 4603 kInvalidElementsKindForInternalArrayOrInternalPackedArray); |
4604 __ bind(&done); | 4604 __ bind(&done); |
4605 } | 4605 } |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4771 Operand(ebp, 7 * kPointerSize), | 4771 Operand(ebp, 7 * kPointerSize), |
4772 NULL); | 4772 NULL); |
4773 } | 4773 } |
4774 | 4774 |
4775 | 4775 |
4776 #undef __ | 4776 #undef __ |
4777 | 4777 |
4778 } } // namespace v8::internal | 4778 } } // namespace v8::internal |
4779 | 4779 |
4780 #endif // V8_TARGET_ARCH_X87 | 4780 #endif // V8_TARGET_ARCH_X87 |
OLD | NEW |