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

Side by Side Diff: src/arm64/macro-assembler-arm64.cc

Issue 300023011: Convert String array index/length hash to BitField (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback 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/arm/macro-assembler-arm.cc ('k') | src/ia32/macro-assembler-ia32.h » ('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_ARM64 7 #if V8_TARGET_ARCH_ARM64
8 8
9 #include "bootstrapper.h" 9 #include "bootstrapper.h"
10 #include "codegen.h" 10 #include "codegen.h"
(...skipping 3957 matching lines...) Expand 10 before | Expand all | Expand 10 after
3968 } 3968 }
3969 3969
3970 3970
3971 void MacroAssembler::IndexFromHash(Register hash, Register index) { 3971 void MacroAssembler::IndexFromHash(Register hash, Register index) {
3972 // If the hash field contains an array index pick it out. The assert checks 3972 // If the hash field contains an array index pick it out. The assert checks
3973 // that the constants for the maximum number of digits for an array index 3973 // that the constants for the maximum number of digits for an array index
3974 // cached in the hash field and the number of bits reserved for it does not 3974 // cached in the hash field and the number of bits reserved for it does not
3975 // conflict. 3975 // conflict.
3976 ASSERT(TenToThe(String::kMaxCachedArrayIndexLength) < 3976 ASSERT(TenToThe(String::kMaxCachedArrayIndexLength) <
3977 (1 << String::kArrayIndexValueBits)); 3977 (1 << String::kArrayIndexValueBits));
3978 // We want the smi-tagged index in key. kArrayIndexValueMask has zeros in 3978 DecodeField<String::ArrayIndexValueBits>(index, hash);
3979 // the low kHashShift bits. 3979 SmiTag(index, index);
3980 STATIC_ASSERT(kSmiTag == 0);
3981 Ubfx(hash, hash, String::kHashShift, String::kArrayIndexValueBits);
3982 SmiTag(index, hash);
3983 } 3980 }
3984 3981
3985 3982
3986 void MacroAssembler::EmitSeqStringSetCharCheck( 3983 void MacroAssembler::EmitSeqStringSetCharCheck(
3987 Register string, 3984 Register string,
3988 Register index, 3985 Register index,
3989 SeqStringSetCharCheckIndexType index_type, 3986 SeqStringSetCharCheckIndexType index_type,
3990 Register scratch, 3987 Register scratch,
3991 uint32_t encoding_mask) { 3988 uint32_t encoding_mask) {
3992 ASSERT(!AreAliased(string, index, scratch)); 3989 ASSERT(!AreAliased(string, index, scratch));
(...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after
5260 } 5257 }
5261 } 5258 }
5262 5259
5263 5260
5264 #undef __ 5261 #undef __
5265 5262
5266 5263
5267 } } // namespace v8::internal 5264 } } // namespace v8::internal
5268 5265
5269 #endif // V8_TARGET_ARCH_ARM64 5266 #endif // V8_TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/ia32/macro-assembler-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698