Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(615)

Unified Diff: src/ia32/stub-cache-ia32.cc

Issue 430783002: Cleanup in stub-cache.cc; remove unused ArrayLength store ICs. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Port Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm64/stub-cache-arm64.cc ('k') | src/ic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/arm64/stub-cache-arm64.cc ('k') | src/ic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698