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

Side by Side Diff: src/arm/code-stubs-arm.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 | « no previous file | src/arm/macro-assembler-arm.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_ARM 7 #if V8_TARGET_ARCH_ARM
8 8
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "code-stubs.h" 10 #include "code-stubs.h"
(...skipping 5116 matching lines...) Expand 10 before | Expand all | Expand 10 after
5127 __ CompareObjectType(r3, r3, r4, MAP_TYPE); 5127 __ CompareObjectType(r3, r3, r4, MAP_TYPE);
5128 __ Assert(eq, kUnexpectedInitialMapForArrayFunction); 5128 __ Assert(eq, kUnexpectedInitialMapForArrayFunction);
5129 } 5129 }
5130 5130
5131 // Figure out the right elements kind 5131 // Figure out the right elements kind
5132 __ ldr(r3, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset)); 5132 __ ldr(r3, FieldMemOperand(r1, JSFunction::kPrototypeOrInitialMapOffset));
5133 // Load the map's "bit field 2" into |result|. We only need the first byte, 5133 // Load the map's "bit field 2" into |result|. We only need the first byte,
5134 // but the following bit field extraction takes care of that anyway. 5134 // but the following bit field extraction takes care of that anyway.
5135 __ ldr(r3, FieldMemOperand(r3, Map::kBitField2Offset)); 5135 __ ldr(r3, FieldMemOperand(r3, Map::kBitField2Offset));
5136 // Retrieve elements_kind from bit field 2. 5136 // Retrieve elements_kind from bit field 2.
5137 __ Ubfx(r3, r3, Map::kElementsKindShift, Map::kElementsKindBitCount); 5137 __ DecodeField<Map::ElementsKindBits>(r3);
5138 5138
5139 if (FLAG_debug_code) { 5139 if (FLAG_debug_code) {
5140 Label done; 5140 Label done;
5141 __ cmp(r3, Operand(FAST_ELEMENTS)); 5141 __ cmp(r3, Operand(FAST_ELEMENTS));
5142 __ b(eq, &done); 5142 __ b(eq, &done);
5143 __ cmp(r3, Operand(FAST_HOLEY_ELEMENTS)); 5143 __ cmp(r3, Operand(FAST_HOLEY_ELEMENTS));
5144 __ Assert(eq, 5144 __ Assert(eq,
5145 kInvalidElementsKindForInternalArrayOrInternalPackedArray); 5145 kInvalidElementsKindForInternalArrayOrInternalPackedArray);
5146 __ bind(&done); 5146 __ bind(&done);
5147 } 5147 }
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
5299 MemOperand(fp, 6 * kPointerSize), 5299 MemOperand(fp, 6 * kPointerSize),
5300 NULL); 5300 NULL);
5301 } 5301 }
5302 5302
5303 5303
5304 #undef __ 5304 #undef __
5305 5305
5306 } } // namespace v8::internal 5306 } } // namespace v8::internal
5307 5307
5308 #endif // V8_TARGET_ARCH_ARM 5308 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698