| Index: src/arm64/macro-assembler-arm64.cc
|
| diff --git a/src/arm64/macro-assembler-arm64.cc b/src/arm64/macro-assembler-arm64.cc
|
| index b4870df9e87a24a770f4811c74d5dfc7ec543d12..c04cc83bfdaaa8100aa6282efbc9607229807283 100644
|
| --- a/src/arm64/macro-assembler-arm64.cc
|
| +++ b/src/arm64/macro-assembler-arm64.cc
|
| @@ -2065,79 +2065,6 @@ void MacroAssembler::JumpIfNotHeapNumber(Register object,
|
| }
|
|
|
|
|
| -void MacroAssembler::LookupNumberStringCache(Register object,
|
| - Register result,
|
| - Register scratch1,
|
| - Register scratch2,
|
| - Register scratch3,
|
| - Label* not_found) {
|
| - DCHECK(!AreAliased(object, result, scratch1, scratch2, scratch3));
|
| -
|
| - // Use of registers. Register result is used as a temporary.
|
| - Register number_string_cache = result;
|
| - Register mask = scratch3;
|
| -
|
| - // Load the number string cache.
|
| - LoadRoot(number_string_cache, Heap::kNumberStringCacheRootIndex);
|
| -
|
| - // Make the hash mask from the length of the number string cache. It
|
| - // contains two elements (number and string) for each cache entry.
|
| - Ldrsw(mask, UntagSmiFieldMemOperand(number_string_cache,
|
| - FixedArray::kLengthOffset));
|
| - Asr(mask, mask, 1); // Divide length by two.
|
| - Sub(mask, mask, 1); // Make mask.
|
| -
|
| - // Calculate the entry in the number string cache. The hash value in the
|
| - // number string cache for smis is just the smi value, and the hash for
|
| - // doubles is the xor of the upper and lower words. See
|
| - // Heap::GetNumberStringCache.
|
| - Label is_smi;
|
| - Label load_result_from_cache;
|
| -
|
| - JumpIfSmi(object, &is_smi);
|
| - JumpIfNotHeapNumber(object, not_found);
|
| -
|
| - STATIC_ASSERT(kDoubleSize == (kWRegSize * 2));
|
| - Add(scratch1, object, HeapNumber::kValueOffset - kHeapObjectTag);
|
| - Ldp(scratch1.W(), scratch2.W(), MemOperand(scratch1));
|
| - Eor(scratch1, scratch1, scratch2);
|
| - And(scratch1, scratch1, mask);
|
| -
|
| - // Calculate address of entry in string cache: each entry consists of two
|
| - // pointer sized fields.
|
| - Add(scratch1, number_string_cache,
|
| - Operand(scratch1, LSL, kPointerSizeLog2 + 1));
|
| -
|
| - Register probe = mask;
|
| - Ldr(probe, FieldMemOperand(scratch1, FixedArray::kHeaderSize));
|
| - JumpIfSmi(probe, not_found);
|
| - Ldr(d0, FieldMemOperand(object, HeapNumber::kValueOffset));
|
| - Ldr(d1, FieldMemOperand(probe, HeapNumber::kValueOffset));
|
| - Fcmp(d0, d1);
|
| - B(ne, not_found);
|
| - B(&load_result_from_cache);
|
| -
|
| - Bind(&is_smi);
|
| - Register scratch = scratch1;
|
| - And(scratch, mask, Operand::UntagSmi(object));
|
| - // Calculate address of entry in string cache: each entry consists
|
| - // of two pointer sized fields.
|
| - Add(scratch, number_string_cache,
|
| - Operand(scratch, LSL, kPointerSizeLog2 + 1));
|
| -
|
| - // Check if the entry is the smi we are looking for.
|
| - Ldr(probe, FieldMemOperand(scratch, FixedArray::kHeaderSize));
|
| - Cmp(object, probe);
|
| - B(ne, not_found);
|
| -
|
| - // Get the result from the cache.
|
| - Bind(&load_result_from_cache);
|
| - Ldr(result, FieldMemOperand(scratch, FixedArray::kHeaderSize + kPointerSize));
|
| - IncrementCounter(isolate()->counters()->number_to_string_native(), 1,
|
| - scratch1, scratch2);
|
| -}
|
| -
|
| -
|
| void MacroAssembler::TryRepresentDoubleAsInt(Register as_int,
|
| FPRegister value,
|
| FPRegister scratch_d,
|
|
|