Index: src/x64/stub-cache-x64.cc |
diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc |
index 2b5bcfa346269ec4380cf51194eaf1049eefcaf0..3e1de1feb1f855305c57ab5abd817f1c596d317f 100644 |
--- a/src/x64/stub-cache-x64.cc |
+++ b/src/x64/stub-cache-x64.cc |
@@ -335,16 +335,6 @@ void PropertyHandlerCompiler::GenerateFastApiCall( |
} |
-void NamedStoreHandlerCompiler::GenerateRestoreName(MacroAssembler* masm, |
- Label* label, |
- Handle<Name> name) { |
- if (!label->is_unused()) { |
- __ bind(label); |
- __ Move(this->name(), name); |
- } |
-} |
- |
- |
void PropertyHandlerCompiler::GenerateCheckPropertyCell( |
MacroAssembler* masm, Handle<JSGlobalObject> global, Handle<Name> name, |
Register scratch, Label* miss) { |
@@ -358,15 +348,33 @@ void PropertyHandlerCompiler::GenerateCheckPropertyCell( |
} |
+void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm, |
+ Handle<Code> code) { |
+ __ jmp(code, RelocInfo::CODE_TARGET); |
+} |
+ |
+ |
+#undef __ |
+#define __ ACCESS_MASM((masm())) |
+ |
+ |
+void NamedStoreHandlerCompiler::GenerateRestoreName(Label* label, |
+ Handle<Name> name) { |
+ if (!label->is_unused()) { |
+ __ bind(label); |
+ __ Move(this->name(), name); |
+ } |
+} |
+ |
+ |
void NamedStoreHandlerCompiler::GenerateNegativeHolderLookup( |
- MacroAssembler* masm, Handle<JSObject> holder, Register holder_reg, |
- Handle<Name> name, Label* miss) { |
- if (holder->IsJSGlobalObject()) { |
- GenerateCheckPropertyCell( |
- masm, Handle<JSGlobalObject>::cast(holder), name, scratch1(), miss); |
- } else if (!holder->HasFastProperties() && !holder->IsJSGlobalProxy()) { |
- GenerateDictionaryNegativeLookup( |
- masm, miss, holder_reg, name, scratch1(), scratch2()); |
+ Register holder_reg, Handle<Name> name, Label* miss) { |
+ if (holder()->IsJSGlobalObject()) { |
+ GenerateCheckPropertyCell(masm(), Handle<JSGlobalObject>::cast(holder()), |
+ name, scratch1(), miss); |
+ } else if (!holder()->HasFastProperties()) { |
+ GenerateDictionaryNegativeLookup(masm(), miss, holder_reg, name, scratch1(), |
+ scratch2()); |
} |
} |
@@ -374,10 +382,9 @@ void NamedStoreHandlerCompiler::GenerateNegativeHolderLookup( |
// Receiver_reg is preserved on jumps to miss_label, but may be destroyed if |
// store is successful. |
void NamedStoreHandlerCompiler::GenerateStoreTransition( |
- MacroAssembler* masm, LookupResult* lookup, Handle<Map> transition, |
- Handle<Name> name, Register receiver_reg, Register storage_reg, |
- Register value_reg, Register scratch1, Register scratch2, Register unused, |
- Label* miss_label, Label* slow) { |
+ Handle<Map> transition, Handle<Name> name, Register receiver_reg, |
+ Register storage_reg, Register value_reg, Register scratch1, |
+ Register scratch2, Register unused, Label* miss_label, Label* slow) { |
int descriptor = transition->LastAdded(); |
DescriptorArray* descriptors = transition->instance_descriptors(); |
PropertyDetails details = descriptors->GetDetails(descriptor); |
@@ -385,7 +392,7 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( |
ASSERT(!representation.IsNone()); |
if (details.type() == CONSTANT) { |
- Handle<Object> constant(descriptors->GetValue(descriptor), masm->isolate()); |
+ Handle<Object> constant(descriptors->GetValue(descriptor), isolate()); |
__ Cmp(value_reg, constant); |
__ j(not_equal, miss_label); |
} else if (representation.IsSmi()) { |
@@ -417,8 +424,8 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( |
__ jmp(&do_store); |
__ bind(&heap_number); |
- __ CheckMap(value_reg, masm->isolate()->factory()->heap_number_map(), |
- miss_label, DONT_DO_SMI_CHECK); |
+ __ CheckMap(value_reg, isolate()->factory()->heap_number_map(), miss_label, |
+ DONT_DO_SMI_CHECK); |
__ movsd(xmm0, FieldOperand(value_reg, HeapNumber::kValueOffset)); |
__ bind(&do_store); |
@@ -440,9 +447,8 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( |
__ PushReturnAddressFrom(scratch1); |
__ TailCallExternalReference( |
ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage), |
- masm->isolate()), |
- 3, |
- 1); |
+ isolate()), |
+ 3, 1); |
return; |
} |
@@ -525,12 +531,12 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( |
// Both name_reg and receiver_reg are preserved on jumps to miss_label, |
// but may be destroyed if store is successful. |
void NamedStoreHandlerCompiler::GenerateStoreField( |
- MacroAssembler* masm, Handle<JSObject> object, LookupResult* lookup, |
- Register receiver_reg, Register name_reg, Register value_reg, |
- Register scratch1, Register scratch2, Label* miss_label) { |
- // Stub never generated for non-global objects that require access |
- // checks. |
- ASSERT(object->IsJSGlobalProxy() || !object->IsAccessCheckNeeded()); |
+ Handle<JSObject> object, LookupResult* lookup, Register receiver_reg, |
+ Register name_reg, Register value_reg, Register scratch1, Register scratch2, |
+ Label* miss_label) { |
+ // Stub never generated for objects that require access checks. |
+ ASSERT(!object->IsAccessCheckNeeded()); |
+ ASSERT(!object->IsJSGlobalProxy()); |
FieldIndex index = lookup->GetFieldIndex(); |
@@ -573,8 +579,8 @@ void NamedStoreHandlerCompiler::GenerateStoreField( |
__ jmp(&do_store); |
__ bind(&heap_number); |
- __ CheckMap(value_reg, masm->isolate()->factory()->heap_number_map(), |
- miss_label, DONT_DO_SMI_CHECK); |
+ __ CheckMap(value_reg, isolate()->factory()->heap_number_map(), miss_label, |
+ DONT_DO_SMI_CHECK); |
__ movsd(xmm0, FieldOperand(value_reg, HeapNumber::kValueOffset)); |
__ bind(&do_store); |
__ movsd(FieldOperand(scratch1, HeapNumber::kValueOffset), xmm0); |
@@ -621,16 +627,6 @@ void NamedStoreHandlerCompiler::GenerateStoreField( |
} |
-void PropertyAccessCompiler::GenerateTailCall(MacroAssembler* masm, |
- Handle<Code> code) { |
- __ jmp(code, RelocInfo::CODE_TARGET); |
-} |
- |
- |
-#undef __ |
-#define __ ACCESS_MASM((masm())) |
- |
- |
Register PropertyHandlerCompiler::CheckPrototypes( |
Register object_reg, Register holder_reg, Register scratch1, |
Register scratch2, Handle<Name> name, Label* miss, |
@@ -757,7 +753,7 @@ void NamedStoreHandlerCompiler::FrontendFooter(Handle<Name> name, Label* miss) { |
if (!miss->is_unused()) { |
Label success; |
__ jmp(&success); |
- GenerateRestoreName(masm(), miss, name); |
+ GenerateRestoreName(miss, name); |
TailCallBuiltin(masm(), MissBuiltin(kind())); |
__ bind(&success); |
} |
@@ -1052,20 +1048,6 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor( |
} |
-void NamedStoreHandlerCompiler::GenerateStoreArrayLength() { |
- // Prepare tail call to StoreIC_ArrayLength. |
- __ PopReturnAddressTo(scratch1()); |
- __ Push(receiver()); |
- __ Push(value()); |
- __ PushReturnAddressFrom(scratch1()); |
- |
- ExternalReference ref = |
- ExternalReference(IC_Utility(IC::kStoreIC_ArrayLength), |
- masm()->isolate()); |
- __ TailCallExternalReference(ref, 2, 1); |
-} |
- |
- |
Handle<Code> PropertyICCompiler::CompileKeyedStorePolymorphic( |
MapHandleList* receiver_maps, CodeHandleList* handler_stubs, |
MapHandleList* transitioned_maps) { |