Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(754)

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 306513002: Convert ElementsKind into a BitField (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/arm64/macro-assembler-arm64.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698