| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |