| Index: src/ic/arm64/ic-arm64.cc
|
| diff --git a/src/ic/arm64/ic-arm64.cc b/src/ic/arm64/ic-arm64.cc
|
| index a3f7da96e1b46ec6765e9c8576d5e2d2579973bd..5e548dd136e811de77b9fa8100ad25f91f6a58bd 100644
|
| --- a/src/ic/arm64/ic-arm64.cc
|
| +++ b/src/ic/arm64/ic-arm64.cc
|
| @@ -258,93 +258,6 @@ static void GenerateKeyNameCheck(MacroAssembler* masm, Register key,
|
| }
|
|
|
|
|
| -// Neither 'object' nor 'key' are modified by this function.
|
| -//
|
| -// If the 'unmapped_case' or 'slow_case' exit is taken, the 'map' register is
|
| -// left with the object's elements map. Otherwise, it is used as a scratch
|
| -// register.
|
| -static MemOperand GenerateMappedArgumentsLookup(MacroAssembler* masm,
|
| - Register object, Register key,
|
| - Register map, Register scratch1,
|
| - Register scratch2,
|
| - Label* unmapped_case,
|
| - Label* slow_case) {
|
| - DCHECK(!AreAliased(object, key, map, scratch1, scratch2));
|
| -
|
| - Heap* heap = masm->isolate()->heap();
|
| -
|
| - // Check that the receiver is a JSObject. Because of the elements
|
| - // map check later, we do not need to check for interceptors or
|
| - // whether it requires access checks.
|
| - __ JumpIfSmi(object, slow_case);
|
| - // Check that the object is some kind of JSObject.
|
| - __ JumpIfObjectType(object, map, scratch1, FIRST_JS_RECEIVER_TYPE, slow_case,
|
| - lt);
|
| -
|
| - // Check that the key is a positive smi.
|
| - __ JumpIfNotSmi(key, slow_case);
|
| - __ Tbnz(key, kXSignBit, slow_case);
|
| -
|
| - // Load the elements object and check its map.
|
| - Handle<Map> arguments_map(heap->sloppy_arguments_elements_map());
|
| - __ Ldr(map, FieldMemOperand(object, JSObject::kElementsOffset));
|
| - __ CheckMap(map, scratch1, arguments_map, slow_case, DONT_DO_SMI_CHECK);
|
| -
|
| - // Check if element is in the range of mapped arguments. If not, jump
|
| - // to the unmapped lookup.
|
| - __ Ldr(scratch1, FieldMemOperand(map, FixedArray::kLengthOffset));
|
| - __ Sub(scratch1, scratch1, Smi::FromInt(2));
|
| - __ Cmp(key, scratch1);
|
| - __ B(hs, unmapped_case);
|
| -
|
| - // Load element index and check whether it is the hole.
|
| - static const int offset =
|
| - FixedArray::kHeaderSize + 2 * kPointerSize - kHeapObjectTag;
|
| -
|
| - __ Add(scratch1, map, offset);
|
| - __ SmiUntag(scratch2, key);
|
| - __ Ldr(scratch1, MemOperand(scratch1, scratch2, LSL, kPointerSizeLog2));
|
| - __ JumpIfRoot(scratch1, Heap::kTheHoleValueRootIndex, unmapped_case);
|
| -
|
| - // Load value from context and return it.
|
| - __ Ldr(scratch2, FieldMemOperand(map, FixedArray::kHeaderSize));
|
| - __ SmiUntag(scratch1);
|
| - __ Lsl(scratch1, scratch1, kPointerSizeLog2);
|
| - __ Add(scratch1, scratch1, Context::kHeaderSize - kHeapObjectTag);
|
| - // The base of the result (scratch2) is passed to RecordWrite in
|
| - // KeyedStoreIC::GenerateSloppyArguments and it must be a HeapObject.
|
| - return MemOperand(scratch2, scratch1);
|
| -}
|
| -
|
| -
|
| -// The 'parameter_map' register must be loaded with the parameter map of the
|
| -// arguments object and is overwritten.
|
| -static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm,
|
| - Register key,
|
| - Register parameter_map,
|
| - Register scratch,
|
| - Label* slow_case) {
|
| - DCHECK(!AreAliased(key, parameter_map, scratch));
|
| -
|
| - // Element is in arguments backing store, which is referenced by the
|
| - // second element of the parameter_map.
|
| - const int kBackingStoreOffset = FixedArray::kHeaderSize + kPointerSize;
|
| - Register backing_store = parameter_map;
|
| - __ Ldr(backing_store, FieldMemOperand(parameter_map, kBackingStoreOffset));
|
| - Handle<Map> fixed_array_map(masm->isolate()->heap()->fixed_array_map());
|
| - __ CheckMap(backing_store, scratch, fixed_array_map, slow_case,
|
| - DONT_DO_SMI_CHECK);
|
| - __ Ldr(scratch, FieldMemOperand(backing_store, FixedArray::kLengthOffset));
|
| - __ Cmp(key, scratch);
|
| - __ B(hs, slow_case);
|
| -
|
| - __ Add(backing_store, backing_store,
|
| - FixedArray::kHeaderSize - kHeapObjectTag);
|
| - __ SmiUntag(scratch, key);
|
| - return MemOperand(backing_store, scratch, LSL, kPointerSizeLog2);
|
| -}
|
| -
|
| -
|
| void LoadIC::GenerateNormal(MacroAssembler* masm) {
|
| Register dictionary = x0;
|
| DCHECK(!dictionary.is(LoadDescriptor::ReceiverRegister()));
|
| @@ -390,52 +303,6 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) {
|
| }
|
|
|
|
|
| -void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) {
|
| - ASM_LOCATION("KeyedStoreIC::GenerateSloppyArguments");
|
| - Label slow, notin;
|
| - Register value = StoreDescriptor::ValueRegister();
|
| - Register key = StoreDescriptor::NameRegister();
|
| - Register receiver = StoreDescriptor::ReceiverRegister();
|
| - DCHECK(receiver.is(x1));
|
| - DCHECK(key.is(x2));
|
| - DCHECK(value.is(x0));
|
| -
|
| - Register map = x3;
|
| -
|
| - // These registers are used by GenerateMappedArgumentsLookup to build a
|
| - // MemOperand. They are live for as long as the MemOperand is live.
|
| - Register mapped1 = x4;
|
| - Register mapped2 = x5;
|
| -
|
| - MemOperand mapped = GenerateMappedArgumentsLookup(
|
| - masm, receiver, key, map, mapped1, mapped2, ¬in, &slow);
|
| - Operand mapped_offset = mapped.OffsetAsOperand();
|
| - __ Str(value, mapped);
|
| - __ Add(x10, mapped.base(), mapped_offset);
|
| - __ Mov(x11, value);
|
| - __ RecordWrite(mapped.base(), x10, x11, kLRHasNotBeenSaved, kDontSaveFPRegs);
|
| - __ Ret();
|
| -
|
| - __ Bind(¬in);
|
| -
|
| - // These registers are used by GenerateMappedArgumentsLookup to build a
|
| - // MemOperand. They are live for as long as the MemOperand is live.
|
| - Register unmapped1 = map; // This is assumed to alias 'map'.
|
| - Register unmapped2 = x4;
|
| - MemOperand unmapped =
|
| - GenerateUnmappedArgumentsLookup(masm, key, unmapped1, unmapped2, &slow);
|
| - Operand unmapped_offset = unmapped.OffsetAsOperand();
|
| - __ Str(value, unmapped);
|
| - __ Add(x10, unmapped.base(), unmapped_offset);
|
| - __ Mov(x11, value);
|
| - __ RecordWrite(unmapped.base(), x10, x11, kLRHasNotBeenSaved,
|
| - kDontSaveFPRegs);
|
| - __ Ret();
|
| - __ Bind(&slow);
|
| - GenerateMiss(masm);
|
| -}
|
| -
|
| -
|
| void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) {
|
| // The return address is in lr.
|
| Isolate* isolate = masm->isolate();
|
|
|