| Index: src/mips/stub-cache-mips.cc
|
| diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc
|
| index 9e00692afaabadd6a9004c053eacf8fecae01a1c..e585a8cc47fdd3c671a0aea3bd787dcf33bde67e 100644
|
| --- a/src/mips/stub-cache-mips.cc
|
| +++ b/src/mips/stub-cache-mips.cc
|
| @@ -313,7 +313,7 @@ void StubCompiler::GenerateFastPropertyLoad(MacroAssembler* masm,
|
| bool inobject,
|
| int index,
|
| Representation representation) {
|
| - ASSERT(!FLAG_track_double_fields || !representation.IsDouble());
|
| + ASSERT(!representation.IsDouble());
|
| int offset = index * kPointerSize;
|
| if (!inobject) {
|
| // Calculate the offset into the properties array.
|
| @@ -342,61 +342,6 @@ void StubCompiler::GenerateLoadArrayLength(MacroAssembler* masm,
|
| }
|
|
|
|
|
| -// Generate code to check if an object is a string. If the object is a
|
| -// heap object, its map's instance type is left in the scratch1 register.
|
| -// If this is not needed, scratch1 and scratch2 may be the same register.
|
| -static void GenerateStringCheck(MacroAssembler* masm,
|
| - Register receiver,
|
| - Register scratch1,
|
| - Register scratch2,
|
| - Label* smi,
|
| - Label* non_string_object) {
|
| - // Check that the receiver isn't a smi.
|
| - __ JumpIfSmi(receiver, smi, t0);
|
| -
|
| - // Check that the object is a string.
|
| - __ lw(scratch1, FieldMemOperand(receiver, HeapObject::kMapOffset));
|
| - __ lbu(scratch1, FieldMemOperand(scratch1, Map::kInstanceTypeOffset));
|
| - __ And(scratch2, scratch1, Operand(kIsNotStringMask));
|
| - // The cast is to resolve the overload for the argument of 0x0.
|
| - __ Branch(non_string_object,
|
| - ne,
|
| - scratch2,
|
| - Operand(static_cast<int32_t>(kStringTag)));
|
| -}
|
| -
|
| -
|
| -// Generate code to load the length from a string object and return the length.
|
| -// If the receiver object is not a string or a wrapped string object the
|
| -// execution continues at the miss label. The register containing the
|
| -// receiver is potentially clobbered.
|
| -void StubCompiler::GenerateLoadStringLength(MacroAssembler* masm,
|
| - Register receiver,
|
| - Register scratch1,
|
| - Register scratch2,
|
| - Label* miss) {
|
| - Label check_wrapper;
|
| -
|
| - // Check if the object is a string leaving the instance type in the
|
| - // scratch1 register.
|
| - GenerateStringCheck(masm, receiver, scratch1, scratch2, miss, &check_wrapper);
|
| -
|
| - // Load length directly from the string.
|
| - __ Ret(USE_DELAY_SLOT);
|
| - __ lw(v0, FieldMemOperand(receiver, String::kLengthOffset));
|
| -
|
| - // Check if the object is a JSValue wrapper.
|
| - __ bind(&check_wrapper);
|
| - __ Branch(miss, ne, scratch1, Operand(JS_VALUE_TYPE));
|
| -
|
| - // Unwrap the value and check if the wrapped value is a string.
|
| - __ lw(scratch1, FieldMemOperand(receiver, JSValue::kValueOffset));
|
| - GenerateStringCheck(masm, scratch1, scratch2, scratch2, miss, miss);
|
| - __ Ret(USE_DELAY_SLOT);
|
| - __ lw(v0, FieldMemOperand(scratch1, String::kLengthOffset));
|
| -}
|
| -
|
| -
|
| void StubCompiler::GenerateLoadFunctionPrototype(MacroAssembler* masm,
|
| Register receiver,
|
| Register scratch1,
|
| @@ -467,11 +412,11 @@ void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
|
| Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate());
|
| __ li(scratch1, constant);
|
| __ Branch(miss_label, ne, value_reg, Operand(scratch1));
|
| - } else if (FLAG_track_fields && representation.IsSmi()) {
|
| + } else if (representation.IsSmi()) {
|
| __ JumpIfNotSmi(value_reg, miss_label);
|
| - } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
|
| + } else if (representation.IsHeapObject()) {
|
| __ JumpIfSmi(value_reg, miss_label);
|
| - } else if (FLAG_track_double_fields && representation.IsDouble()) {
|
| + } else if (representation.IsDouble()) {
|
| Label do_store, heap_number;
|
| __ LoadRoot(scratch3, Heap::kHeapNumberMapRootIndex);
|
| __ AllocateHeapNumber(storage_reg, scratch1, scratch2, scratch3, slow);
|
| @@ -545,15 +490,15 @@ void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
|
| if (index < 0) {
|
| // Set the property straight into the object.
|
| int offset = object->map()->instance_size() + (index * kPointerSize);
|
| - if (FLAG_track_double_fields && representation.IsDouble()) {
|
| + if (representation.IsDouble()) {
|
| __ sw(storage_reg, FieldMemOperand(receiver_reg, offset));
|
| } else {
|
| __ sw(value_reg, FieldMemOperand(receiver_reg, offset));
|
| }
|
|
|
| - if (!FLAG_track_fields || !representation.IsSmi()) {
|
| + if (!representation.IsSmi()) {
|
| // Update the write barrier for the array address.
|
| - if (!FLAG_track_double_fields || !representation.IsDouble()) {
|
| + if (!representation.IsDouble()) {
|
| __ mov(storage_reg, value_reg);
|
| }
|
| __ RecordWriteField(receiver_reg,
|
| @@ -571,15 +516,15 @@ void StoreStubCompiler::GenerateStoreTransition(MacroAssembler* masm,
|
| // Get the properties array
|
| __ lw(scratch1,
|
| FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset));
|
| - if (FLAG_track_double_fields && representation.IsDouble()) {
|
| + if (representation.IsDouble()) {
|
| __ sw(storage_reg, FieldMemOperand(scratch1, offset));
|
| } else {
|
| __ sw(value_reg, FieldMemOperand(scratch1, offset));
|
| }
|
|
|
| - if (!FLAG_track_fields || !representation.IsSmi()) {
|
| + if (!representation.IsSmi()) {
|
| // Update the write barrier for the array address.
|
| - if (!FLAG_track_double_fields || !representation.IsDouble()) {
|
| + if (!representation.IsDouble()) {
|
| __ mov(storage_reg, value_reg);
|
| }
|
| __ RecordWriteField(scratch1,
|
| @@ -630,11 +575,11 @@ void StoreStubCompiler::GenerateStoreField(MacroAssembler* masm,
|
|
|
| Representation representation = lookup->representation();
|
| ASSERT(!representation.IsNone());
|
| - if (FLAG_track_fields && representation.IsSmi()) {
|
| + if (representation.IsSmi()) {
|
| __ JumpIfNotSmi(value_reg, miss_label);
|
| - } else if (FLAG_track_heap_object_fields && representation.IsHeapObject()) {
|
| + } else if (representation.IsHeapObject()) {
|
| __ JumpIfSmi(value_reg, miss_label);
|
| - } else if (FLAG_track_double_fields && representation.IsDouble()) {
|
| + } else if (representation.IsDouble()) {
|
| // Load the double storage.
|
| if (index < 0) {
|
| int offset = object->map()->instance_size() + (index * kPointerSize);
|
| @@ -676,7 +621,7 @@ void StoreStubCompiler::GenerateStoreField(MacroAssembler* masm,
|
| int offset = object->map()->instance_size() + (index * kPointerSize);
|
| __ sw(value_reg, FieldMemOperand(receiver_reg, offset));
|
|
|
| - if (!FLAG_track_fields || !representation.IsSmi()) {
|
| + if (!representation.IsSmi()) {
|
| // Skip updating write barrier if storing a smi.
|
| __ JumpIfSmi(value_reg, &exit);
|
|
|
| @@ -700,7 +645,7 @@ void StoreStubCompiler::GenerateStoreField(MacroAssembler* masm,
|
| FieldMemOperand(receiver_reg, JSObject::kPropertiesOffset));
|
| __ sw(value_reg, FieldMemOperand(scratch1, offset));
|
|
|
| - if (!FLAG_track_fields || !representation.IsSmi()) {
|
| + if (!representation.IsSmi()) {
|
| // Skip updating write barrier if storing a smi.
|
| __ JumpIfSmi(value_reg, &exit);
|
|
|
| @@ -1242,20 +1187,16 @@ Handle<Code> StoreStubCompiler::CompileStoreCallback(
|
| void StoreStubCompiler::GenerateStoreViaSetter(
|
| MacroAssembler* masm,
|
| Handle<HeapType> type,
|
| + Register receiver,
|
| Handle<JSFunction> setter) {
|
| // ----------- S t a t e -------------
|
| - // -- a0 : value
|
| - // -- a1 : receiver
|
| - // -- a2 : name
|
| // -- ra : return address
|
| // -----------------------------------
|
| {
|
| FrameScope scope(masm, StackFrame::INTERNAL);
|
| - Register receiver = a1;
|
| - Register value = a0;
|
|
|
| // Save value register, so we can restore it later.
|
| - __ push(value);
|
| + __ push(value());
|
|
|
| if (!setter.is_null()) {
|
| // Call the JavaScript setter with receiver and value on the stack.
|
| @@ -1265,7 +1206,7 @@ void StoreStubCompiler::GenerateStoreViaSetter(
|
| FieldMemOperand(
|
| receiver, JSGlobalObject::kGlobalReceiverOffset));
|
| }
|
| - __ Push(receiver, value);
|
| + __ Push(receiver, value());
|
| ParameterCount actual(1);
|
| ParameterCount expected(setter);
|
| __ InvokeFunction(setter, expected, actual,
|
| @@ -1293,21 +1234,6 @@ void StoreStubCompiler::GenerateStoreViaSetter(
|
| Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
|
| Handle<JSObject> object,
|
| Handle<Name> name) {
|
| - Label miss;
|
| -
|
| - // Check that the map of the object hasn't changed.
|
| - __ CheckMap(receiver(), scratch1(), Handle<Map>(object->map()), &miss,
|
| - DO_SMI_CHECK);
|
| -
|
| - // Perform global security token check if needed.
|
| - if (object->IsJSGlobalProxy()) {
|
| - __ CheckAccessGlobalProxy(receiver(), scratch1(), &miss);
|
| - }
|
| -
|
| - // Stub is never generated for non-global objects that require access
|
| - // checks.
|
| - ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded());
|
| -
|
| __ Push(receiver(), this->name(), value());
|
|
|
| // Do tail-call to the runtime system.
|
| @@ -1315,10 +1241,6 @@ Handle<Code> StoreStubCompiler::CompileStoreInterceptor(
|
| ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate());
|
| __ TailCallExternalReference(store_ic_property, 3, 1);
|
|
|
| - // Handle store cache miss.
|
| - __ bind(&miss);
|
| - TailCallBuiltin(masm(), MissBuiltin(kind()));
|
| -
|
| // Return the generated code.
|
| return GetCode(kind(), Code::FAST, name);
|
| }
|
| @@ -1352,16 +1274,21 @@ Register* KeyedLoadStubCompiler::registers() {
|
| }
|
|
|
|
|
| +Register StoreStubCompiler::value() {
|
| + return a0;
|
| +}
|
| +
|
| +
|
| Register* StoreStubCompiler::registers() {
|
| - // receiver, name, value, scratch1, scratch2, scratch3.
|
| - static Register registers[] = { a1, a2, a0, a3, t0, t1 };
|
| + // receiver, name, scratch1, scratch2, scratch3.
|
| + static Register registers[] = { a1, a2, a3, t0, t1 };
|
| return registers;
|
| }
|
|
|
|
|
| Register* KeyedStoreStubCompiler::registers() {
|
| - // receiver, name, value, scratch1, scratch2, scratch3.
|
| - static Register registers[] = { a2, a1, a0, a3, t0, t1 };
|
| + // receiver, name, scratch1, scratch2, scratch3.
|
| + static Register registers[] = { a2, a1, a3, t0, t1 };
|
| return registers;
|
| }
|
|
|
|
|