From dcad4b8d08991e4d1599fe4bbea98657a43e64cd Mon Sep 17 00:00:00 2001 From: "verwaest@chromium.org" Date: Wed, 11 Sep 2013 13:34:07 +0000 Subject: [PATCH] Delete useless CompileStoreGlobal StoreGlobal stubs are generated by Hydrogen now BUG= R=verwaest@chromium.org Review URL: https://chromiumcodereview.appspot.com/23881004 Patch from Weiliang Lin . git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16653 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/arm/code-stubs-arm.cc | 2 -- src/arm/stub-cache-arm.cc | 41 ----------------------------------------- src/ia32/code-stubs-ia32.cc | 2 -- src/ia32/stub-cache-ia32.cc | 42 ------------------------------------------ src/mips/code-stubs-mips.cc | 2 -- src/mips/stub-cache-mips.cc | 40 ---------------------------------------- src/stub-cache.h | 4 ---- src/x64/code-stubs-x64.cc | 2 -- src/x64/stub-cache-x64.cc | 42 ------------------------------------------ 9 files changed, 177 deletions(-) diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc index 740cb9b..3a1d128 100644 --- a/src/arm/code-stubs-arm.cc +++ b/src/arm/code-stubs-arm.cc @@ -6424,8 +6424,6 @@ static const AheadOfTimeWriteBarrierStubList kAheadOfTime[] = { // Also used in StoreIC::GenerateNormal via GenerateDictionaryStore. // Also used in KeyedStoreIC::GenerateGeneric. { REG(r3), REG(r4), REG(r5), EMIT_REMEMBERED_SET }, - // Used in CompileStoreGlobal. - { REG(r4), REG(r1), REG(r2), OMIT_REMEMBERED_SET }, // Used in StoreStubCompiler::CompileStoreField via GenerateStoreField. { REG(r1), REG(r2), REG(r3), EMIT_REMEMBERED_SET }, { REG(r3), REG(r2), REG(r1), EMIT_REMEMBERED_SET }, diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc index c1c87d9..5bab086 100644 --- a/src/arm/stub-cache-arm.cc +++ b/src/arm/stub-cache-arm.cc @@ -2912,47 +2912,6 @@ Handle StoreStubCompiler::CompileStoreInterceptor( } -Handle StoreStubCompiler::CompileStoreGlobal( - Handle object, - Handle cell, - Handle name) { - Label miss; - - // Check that the map of the global has not changed. - __ ldr(scratch1(), FieldMemOperand(receiver(), HeapObject::kMapOffset)); - __ cmp(scratch1(), Operand(Handle(object->map()))); - __ b(ne, &miss); - - // Check that the value in the cell is not the hole. If it is, this - // cell could have been deleted and reintroducing the global needs - // to update the property details in the property dictionary of the - // global object. We bail out to the runtime system to do that. - __ mov(scratch1(), Operand(cell)); - __ LoadRoot(scratch2(), Heap::kTheHoleValueRootIndex); - __ ldr(scratch3(), FieldMemOperand(scratch1(), Cell::kValueOffset)); - __ cmp(scratch3(), scratch2()); - __ b(eq, &miss); - - // Store the value in the cell. - __ str(value(), FieldMemOperand(scratch1(), Cell::kValueOffset)); - // Cells are always rescanned, so no write barrier here. - - Counters* counters = isolate()->counters(); - __ IncrementCounter( - counters->named_store_global_inline(), 1, scratch1(), scratch2()); - __ Ret(); - - // Handle store cache miss. - __ bind(&miss); - __ IncrementCounter( - counters->named_store_global_inline_miss(), 1, scratch1(), scratch2()); - TailCallBuiltin(masm(), MissBuiltin(kind())); - - // Return the generated code. - return GetICCode(kind(), Code::NORMAL, name); -} - - Handle LoadStubCompiler::CompileLoadNonexistent( Handle object, Handle last, diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc index 88b216b..ee9e535 100644 --- a/src/ia32/code-stubs-ia32.cc +++ b/src/ia32/code-stubs-ia32.cc @@ -6812,8 +6812,6 @@ static const AheadOfTimeWriteBarrierStubList kAheadOfTime[] = { // Used in CompileArrayPushCall. { REG(ebx), REG(ecx), REG(edx), EMIT_REMEMBERED_SET }, { REG(ebx), REG(edi), REG(edx), OMIT_REMEMBERED_SET }, - // Used in CompileStoreGlobal and CallFunctionStub. - { REG(ebx), REG(ecx), REG(edx), OMIT_REMEMBERED_SET }, // Used in StoreStubCompiler::CompileStoreField and // KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. { REG(edx), REG(ecx), REG(ebx), EMIT_REMEMBERED_SET }, diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc index bcf64ce..d2da43e 100644 --- a/src/ia32/stub-cache-ia32.cc +++ b/src/ia32/stub-cache-ia32.cc @@ -3004,48 +3004,6 @@ Handle StoreStubCompiler::CompileStoreInterceptor( } -Handle StoreStubCompiler::CompileStoreGlobal( - Handle object, - Handle cell, - Handle name) { - Label miss; - - // Check that the map of the global has not changed. - __ cmp(FieldOperand(receiver(), HeapObject::kMapOffset), - Immediate(Handle(object->map()))); - __ j(not_equal, &miss); - - // Compute the cell operand to use. - __ mov(scratch1(), Immediate(cell)); - Operand cell_operand = - FieldOperand(scratch1(), PropertyCell::kValueOffset); - - // Check that the value in the cell is not the hole. If it is, this - // cell could have been deleted and reintroducing the global needs - // to update the property details in the property dictionary of the - // global object. We bail out to the runtime system to do that. - __ cmp(cell_operand, factory()->the_hole_value()); - __ j(equal, &miss); - - // Store the value in the cell. - __ mov(cell_operand, value()); - // No write barrier here, because cells are always rescanned. - - // Return the value (register eax). - Counters* counters = isolate()->counters(); - __ IncrementCounter(counters->named_store_global_inline(), 1); - __ ret(0); - - // Handle store cache miss. - __ bind(&miss); - __ IncrementCounter(counters->named_store_global_inline_miss(), 1); - TailCallBuiltin(masm(), MissBuiltin(kind())); - - // Return the generated code. - return GetICCode(kind(), Code::NORMAL, name); -} - - Handle KeyedStoreStubCompiler::CompileStorePolymorphic( MapHandleList* receiver_maps, CodeHandleList* handler_stubs, diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc index 752a24c..4a7bbea 100644 --- a/src/mips/code-stubs-mips.cc +++ b/src/mips/code-stubs-mips.cc @@ -6554,8 +6554,6 @@ static const AheadOfTimeWriteBarrierStubList kAheadOfTime[] = { // Also used in StoreIC::GenerateNormal via GenerateDictionaryStore. // Also used in KeyedStoreIC::GenerateGeneric. { REG(a3), REG(t0), REG(t1), EMIT_REMEMBERED_SET }, - // Used in CompileStoreGlobal. - { REG(t0), REG(a1), REG(a2), OMIT_REMEMBERED_SET }, // Used in StoreStubCompiler::CompileStoreField via GenerateStoreField. { REG(a1), REG(a2), REG(a3), EMIT_REMEMBERED_SET }, { REG(a3), REG(a2), REG(a1), EMIT_REMEMBERED_SET }, diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc index cc75a61..a8004d9 100644 --- a/src/mips/stub-cache-mips.cc +++ b/src/mips/stub-cache-mips.cc @@ -2935,46 +2935,6 @@ Handle StoreStubCompiler::CompileStoreInterceptor( } -Handle StoreStubCompiler::CompileStoreGlobal( - Handle object, - Handle cell, - Handle name) { - Label miss; - - // Check that the map of the global has not changed. - __ lw(scratch1(), FieldMemOperand(receiver(), HeapObject::kMapOffset)); - __ Branch(&miss, ne, scratch1(), Operand(Handle(object->map()))); - - // Check that the value in the cell is not the hole. If it is, this - // cell could have been deleted and reintroducing the global needs - // to update the property details in the property dictionary of the - // global object. We bail out to the runtime system to do that. - __ li(scratch1(), Operand(cell)); - __ LoadRoot(scratch2(), Heap::kTheHoleValueRootIndex); - __ lw(scratch3(), FieldMemOperand(scratch1(), Cell::kValueOffset)); - __ Branch(&miss, eq, scratch3(), Operand(scratch2())); - - // Store the value in the cell. - __ sw(value(), FieldMemOperand(scratch1(), Cell::kValueOffset)); - __ mov(v0, a0); // Stored value must be returned in v0. - // Cells are always rescanned, so no write barrier here. - - Counters* counters = isolate()->counters(); - __ IncrementCounter( - counters->named_store_global_inline(), 1, scratch1(), scratch2()); - __ Ret(); - - // Handle store cache miss. - __ bind(&miss); - __ IncrementCounter( - counters->named_store_global_inline_miss(), 1, scratch1(), scratch2()); - TailCallBuiltin(masm(), MissBuiltin(kind())); - - // Return the generated code. - return GetICCode(kind(), Code::NORMAL, name); -} - - Handle LoadStubCompiler::CompileLoadNonexistent( Handle object, Handle last, diff --git a/src/stub-cache.h b/src/stub-cache.h index 12afdd3..141e567 100644 --- a/src/stub-cache.h +++ b/src/stub-cache.h @@ -982,10 +982,6 @@ class StoreStubCompiler: public BaseStoreStubCompiler { Handle CompileStoreInterceptor(Handle object, Handle name); - Handle CompileStoreGlobal(Handle object, - Handle holder, - Handle name); - private: static Register* registers(); virtual Code::Kind kind() { return Code::STORE_IC; } diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc index d27b5fb..f6cfb4f 100644 --- a/src/x64/code-stubs-x64.cc +++ b/src/x64/code-stubs-x64.cc @@ -5899,8 +5899,6 @@ struct AheadOfTimeWriteBarrierStubList kAheadOfTime[] = { { REG(rbx), REG(rax), REG(rdi), EMIT_REMEMBERED_SET }, // Used in CompileArrayPushCall. { REG(rbx), REG(rcx), REG(rdx), EMIT_REMEMBERED_SET }, - // Used in CompileStoreGlobal. - { REG(rbx), REG(rcx), REG(rdx), OMIT_REMEMBERED_SET }, // Used in StoreStubCompiler::CompileStoreField and // KeyedStoreStubCompiler::CompileStoreField via GenerateStoreField. { REG(rdx), REG(rcx), REG(rbx), EMIT_REMEMBERED_SET }, diff --git a/src/x64/stub-cache-x64.cc b/src/x64/stub-cache-x64.cc index 31f60be..b2cfa86 100644 --- a/src/x64/stub-cache-x64.cc +++ b/src/x64/stub-cache-x64.cc @@ -2897,48 +2897,6 @@ Handle StoreStubCompiler::CompileStoreInterceptor( } -Handle StoreStubCompiler::CompileStoreGlobal( - Handle object, - Handle cell, - Handle name) { - Label miss; - - // Check that the map of the global has not changed. - __ Cmp(FieldOperand(receiver(), HeapObject::kMapOffset), - Handle(object->map())); - __ j(not_equal, &miss); - - // Compute the cell operand to use. - __ Move(scratch1(), cell); - Operand cell_operand = - FieldOperand(scratch1(), PropertyCell::kValueOffset); - - // Check that the value in the cell is not the hole. If it is, this - // cell could have been deleted and reintroducing the global needs - // to update the property details in the property dictionary of the - // global object. We bail out to the runtime system to do that. - __ CompareRoot(cell_operand, Heap::kTheHoleValueRootIndex); - __ j(equal, &miss); - - // Store the value in the cell. - __ movq(cell_operand, value()); - // Cells are always rescanned, so no write barrier here. - - // Return the value (register rax). - Counters* counters = isolate()->counters(); - __ IncrementCounter(counters->named_store_global_inline(), 1); - __ ret(0); - - // Handle store cache miss. - __ bind(&miss); - __ IncrementCounter(counters->named_store_global_inline_miss(), 1); - TailCallBuiltin(masm(), MissBuiltin(kind())); - - // Return the generated code. - return GetICCode(kind(), Code::NORMAL, name); -} - - Handle KeyedStoreStubCompiler::CompileStorePolymorphic( MapHandleList* receiver_maps, CodeHandleList* handler_stubs, -- 2.7.4