Index: src/ic/mips64/ic-mips64.cc |
diff --git a/src/ic/mips64/ic-mips64.cc b/src/ic/mips64/ic-mips64.cc |
index b1364f36c22b93426a702280b9b41e80143b74a1..2c1a20f55970c8ff8103f46c0fd7784d5ada5403 100644 |
--- a/src/ic/mips64/ic-mips64.cc |
+++ b/src/ic/mips64/ic-mips64.cc |
@@ -328,117 +328,6 @@ void LoadIC::GenerateRuntimeGetProperty(MacroAssembler* masm) { |
} |
-static MemOperand GenerateMappedArgumentsLookup( |
- MacroAssembler* masm, Register object, Register key, Register scratch1, |
- Register scratch2, Register scratch3, Label* unmapped_case, |
- Label* slow_case) { |
- Heap* heap = masm->isolate()->heap(); |
- |
- // Check that the receiver is a JSObject. Because of the 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. |
- __ GetObjectType(object, scratch1, scratch2); |
- __ Branch(slow_case, lt, scratch2, Operand(FIRST_JS_RECEIVER_TYPE)); |
- |
- // Check that the key is a positive smi. |
- __ NonNegativeSmiTst(key, scratch1); |
- __ Branch(slow_case, ne, scratch1, Operand(zero_reg)); |
- |
- // Load the elements into scratch1 and check its map. |
- Handle<Map> arguments_map(heap->sloppy_arguments_elements_map()); |
- __ ld(scratch1, FieldMemOperand(object, JSObject::kElementsOffset)); |
- __ CheckMap(scratch1, scratch2, 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 with the parameter map in scratch1. |
- __ ld(scratch2, FieldMemOperand(scratch1, FixedArray::kLengthOffset)); |
- __ Dsubu(scratch2, scratch2, Operand(Smi::FromInt(2))); |
- __ Branch(unmapped_case, Ugreater_equal, key, Operand(scratch2)); |
- |
- // Load element index and check whether it is the hole. |
- const int kOffset = |
- FixedArray::kHeaderSize + 2 * kPointerSize - kHeapObjectTag; |
- |
- __ SmiUntag(scratch3, key); |
- __ dsll(scratch3, scratch3, kPointerSizeLog2); |
- __ Daddu(scratch3, scratch3, Operand(kOffset)); |
- |
- __ Daddu(scratch2, scratch1, scratch3); |
- __ ld(scratch2, MemOperand(scratch2)); |
- __ LoadRoot(scratch3, Heap::kTheHoleValueRootIndex); |
- __ Branch(unmapped_case, eq, scratch2, Operand(scratch3)); |
- |
- // Load value from context and return it. We can reuse scratch1 because |
- // we do not jump to the unmapped lookup (which requires the parameter |
- // map in scratch1). |
- __ ld(scratch1, FieldMemOperand(scratch1, FixedArray::kHeaderSize)); |
- __ SmiUntag(scratch3, scratch2); |
- __ dsll(scratch3, scratch3, kPointerSizeLog2); |
- __ Daddu(scratch3, scratch3, Operand(Context::kHeaderSize - kHeapObjectTag)); |
- __ Daddu(scratch2, scratch1, scratch3); |
- return MemOperand(scratch2); |
-} |
- |
- |
-static MemOperand GenerateUnmappedArgumentsLookup(MacroAssembler* masm, |
- Register key, |
- Register parameter_map, |
- Register scratch, |
- Label* slow_case) { |
- // Element is in arguments backing store, which is referenced by the |
- // second element of the parameter_map. The parameter_map register |
- // must be loaded with the parameter map of the arguments object and is |
- // overwritten. |
- const int kBackingStoreOffset = FixedArray::kHeaderSize + kPointerSize; |
- Register backing_store = parameter_map; |
- __ ld(backing_store, FieldMemOperand(parameter_map, kBackingStoreOffset)); |
- __ CheckMap(backing_store, scratch, Heap::kFixedArrayMapRootIndex, slow_case, |
- DONT_DO_SMI_CHECK); |
- __ ld(scratch, FieldMemOperand(backing_store, FixedArray::kLengthOffset)); |
- __ Branch(slow_case, Ugreater_equal, key, Operand(scratch)); |
- __ SmiUntag(scratch, key); |
- __ dsll(scratch, scratch, kPointerSizeLog2); |
- __ Daddu(scratch, scratch, Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
- __ Daddu(scratch, backing_store, scratch); |
- return MemOperand(scratch); |
-} |
- |
- |
-void KeyedStoreIC::GenerateSloppyArguments(MacroAssembler* masm) { |
- Register receiver = StoreDescriptor::ReceiverRegister(); |
- Register key = StoreDescriptor::NameRegister(); |
- Register value = StoreDescriptor::ValueRegister(); |
- DCHECK(value.is(a0)); |
- |
- Label slow, notin; |
- // Store address is returned in register (of MemOperand) mapped_location. |
- MemOperand mapped_location = GenerateMappedArgumentsLookup( |
- masm, receiver, key, a3, a4, a5, ¬in, &slow); |
- __ sd(value, mapped_location); |
- __ mov(t1, value); |
- DCHECK_EQ(mapped_location.offset(), 0); |
- __ RecordWrite(a3, mapped_location.rm(), t1, kRAHasNotBeenSaved, |
- kDontSaveFPRegs); |
- __ Ret(USE_DELAY_SLOT); |
- __ mov(v0, value); // (In delay slot) return the value stored in v0. |
- __ bind(¬in); |
- // The unmapped lookup expects that the parameter map is in a3. |
- // Store address is returned in register (of MemOperand) unmapped_location. |
- MemOperand unmapped_location = |
- GenerateUnmappedArgumentsLookup(masm, key, a3, a4, &slow); |
- __ sd(value, unmapped_location); |
- __ mov(t1, value); |
- DCHECK_EQ(unmapped_location.offset(), 0); |
- __ RecordWrite(a3, unmapped_location.rm(), t1, kRAHasNotBeenSaved, |
- kDontSaveFPRegs); |
- __ Ret(USE_DELAY_SLOT); |
- __ mov(v0, a0); // (In delay slot) return the value stored in v0. |
- __ bind(&slow); |
- GenerateMiss(masm); |
-} |
- |
- |
void KeyedLoadIC::GenerateMiss(MacroAssembler* masm) { |
// The return address is in ra. |
Isolate* isolate = masm->isolate(); |