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

Side by Side Diff: src/mips/code-stubs-mips.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/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.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_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "code-stubs.h" 10 #include "code-stubs.h"
(...skipping 5331 matching lines...) Expand 10 before | Expand all | Expand 10 after
5342 t0, Operand(MAP_TYPE)); 5342 t0, Operand(MAP_TYPE));
5343 } 5343 }
5344 5344
5345 // Figure out the right elements kind. 5345 // Figure out the right elements kind.
5346 __ lw(a3, FieldMemOperand(a1, JSFunction::kPrototypeOrInitialMapOffset)); 5346 __ lw(a3, FieldMemOperand(a1, JSFunction::kPrototypeOrInitialMapOffset));
5347 5347
5348 // Load the map's "bit field 2" into a3. We only need the first byte, 5348 // Load the map's "bit field 2" into a3. We only need the first byte,
5349 // but the following bit field extraction takes care of that anyway. 5349 // but the following bit field extraction takes care of that anyway.
5350 __ lbu(a3, FieldMemOperand(a3, Map::kBitField2Offset)); 5350 __ lbu(a3, FieldMemOperand(a3, Map::kBitField2Offset));
5351 // Retrieve elements_kind from bit field 2. 5351 // Retrieve elements_kind from bit field 2.
5352 __ Ext(a3, a3, Map::kElementsKindShift, Map::kElementsKindBitCount); 5352 __ DecodeField<Map::ElementsKindBits>(a3);
5353 5353
5354 if (FLAG_debug_code) { 5354 if (FLAG_debug_code) {
5355 Label done; 5355 Label done;
5356 __ Branch(&done, eq, a3, Operand(FAST_ELEMENTS)); 5356 __ Branch(&done, eq, a3, Operand(FAST_ELEMENTS));
5357 __ Assert( 5357 __ Assert(
5358 eq, kInvalidElementsKindForInternalArrayOrInternalPackedArray, 5358 eq, kInvalidElementsKindForInternalArrayOrInternalPackedArray,
5359 a3, Operand(FAST_HOLEY_ELEMENTS)); 5359 a3, Operand(FAST_HOLEY_ELEMENTS));
5360 __ bind(&done); 5360 __ bind(&done);
5361 } 5361 }
5362 5362
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
5501 MemOperand(fp, 6 * kPointerSize), 5501 MemOperand(fp, 6 * kPointerSize),
5502 NULL); 5502 NULL);
5503 } 5503 }
5504 5504
5505 5505
5506 #undef __ 5506 #undef __
5507 5507
5508 } } // namespace v8::internal 5508 } } // namespace v8::internal
5509 5509
5510 #endif // V8_TARGET_ARCH_MIPS 5510 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698