Index: src/ia32/stub-cache-ia32.cc |
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc |
index 46a3dbda7eeec0d5abb2c031ed9e495bf7443bc4..9c967e6923d7b9a0096b72ca8647ddc057fd165a 100644 |
--- a/src/ia32/stub-cache-ia32.cc |
+++ b/src/ia32/stub-cache-ia32.cc |
@@ -370,16 +370,6 @@ void PropertyHandlerCompiler::GenerateFastApiCall( |
} |
-void NamedStoreHandlerCompiler::GenerateRestoreName(MacroAssembler* masm, |
- Label* label, |
- Handle<Name> name) { |
- if (!label->is_unused()) { |
- __ bind(label); |
- __ mov(this->name(), Immediate(name)); |
- } |
-} |
- |
- |
// Generate code to check that a global property cell is empty. Create |
// the property cell at compilation time if no cell exists for the |
// property. |
@@ -401,15 +391,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); |
+ __ mov(this->name(), Immediate(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()); |
} |
} |
@@ -417,10 +425,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); |
@@ -428,7 +435,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()); |
__ CmpObject(value_reg, constant); |
__ j(not_equal, miss_label); |
} else if (representation.IsSmi()) { |
@@ -461,8 +468,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); |
@@ -484,9 +491,8 @@ void NamedStoreHandlerCompiler::GenerateStoreTransition( |
__ push(scratch1); |
__ TailCallExternalReference( |
ExternalReference(IC_Utility(IC::kSharedStoreIC_ExtendStorage), |
- masm->isolate()), |
- 3, |
- 1); |
+ isolate()), |
+ 3, 1); |
return; |
} |
@@ -577,12 +583,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(); |
@@ -624,8 +630,8 @@ void NamedStoreHandlerCompiler::GenerateStoreField( |
__ SmiTag(value_reg); |
__ 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); |
@@ -681,16 +687,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, |
@@ -816,7 +812,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); |
} |
@@ -1129,20 +1125,6 @@ Handle<Code> NamedStoreHandlerCompiler::CompileStoreInterceptor( |
} |
-void NamedStoreHandlerCompiler::GenerateStoreArrayLength() { |
- // Prepare tail call to StoreIC_ArrayLength. |
- __ pop(scratch1()); // remove the return address |
- __ push(receiver()); |
- __ push(value()); |
- __ push(scratch1()); // restore return address |
- |
- 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) { |