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

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

Issue 306513002: Convert ElementsKind into a BitField (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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/objects.h ('k') | src/x64/macro-assembler-x64.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_X64 7 #if V8_TARGET_ARCH_X64
8 8
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "code-stubs.h" 10 #include "code-stubs.h"
(...skipping 4877 matching lines...) Expand 10 before | Expand all | Expand 10 after
4888 __ Check(equal, kUnexpectedInitialMapForArrayFunction); 4888 __ Check(equal, kUnexpectedInitialMapForArrayFunction);
4889 } 4889 }
4890 4890
4891 // Figure out the right elements kind 4891 // Figure out the right elements kind
4892 __ movp(rcx, FieldOperand(rdi, JSFunction::kPrototypeOrInitialMapOffset)); 4892 __ movp(rcx, FieldOperand(rdi, JSFunction::kPrototypeOrInitialMapOffset));
4893 4893
4894 // Load the map's "bit field 2" into |result|. We only need the first byte, 4894 // Load the map's "bit field 2" into |result|. We only need the first byte,
4895 // but the following masking takes care of that anyway. 4895 // but the following masking takes care of that anyway.
4896 __ movzxbp(rcx, FieldOperand(rcx, Map::kBitField2Offset)); 4896 __ movzxbp(rcx, FieldOperand(rcx, Map::kBitField2Offset));
4897 // Retrieve elements_kind from bit field 2. 4897 // Retrieve elements_kind from bit field 2.
4898 __ andp(rcx, Immediate(Map::kElementsKindMask)); 4898 __ DecodeField<Map::ElementsKindBits>(rcx);
4899 __ shrp(rcx, Immediate(Map::kElementsKindShift));
4900 4899
4901 if (FLAG_debug_code) { 4900 if (FLAG_debug_code) {
4902 Label done; 4901 Label done;
4903 __ cmpl(rcx, Immediate(FAST_ELEMENTS)); 4902 __ cmpl(rcx, Immediate(FAST_ELEMENTS));
4904 __ j(equal, &done); 4903 __ j(equal, &done);
4905 __ cmpl(rcx, Immediate(FAST_HOLEY_ELEMENTS)); 4904 __ cmpl(rcx, Immediate(FAST_HOLEY_ELEMENTS));
4906 __ Assert(equal, 4905 __ Assert(equal,
4907 kInvalidElementsKindForInternalArrayOrInternalPackedArray); 4906 kInvalidElementsKindForInternalArrayOrInternalPackedArray);
4908 __ bind(&done); 4907 __ bind(&done);
4909 } 4908 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
5095 return_value_operand, 5094 return_value_operand,
5096 NULL); 5095 NULL);
5097 } 5096 }
5098 5097
5099 5098
5100 #undef __ 5099 #undef __
5101 5100
5102 } } // namespace v8::internal 5101 } } // namespace v8::internal
5103 5102
5104 #endif // V8_TARGET_ARCH_X64 5103 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/objects.h ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698