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

Side by Side Diff: src/ia32/stub-cache-ia32.cc

Issue 23881004: Delete useless CompileStoreGlobal (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: clean up more code Created 7 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 2986 matching lines...) Expand 10 before | Expand all | Expand 10 after
2997 // Do tail-call to the runtime system. 2997 // Do tail-call to the runtime system.
2998 ExternalReference store_ic_property = 2998 ExternalReference store_ic_property =
2999 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate()); 2999 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate());
3000 __ TailCallExternalReference(store_ic_property, 4, 1); 3000 __ TailCallExternalReference(store_ic_property, 4, 1);
3001 3001
3002 // Return the generated code. 3002 // Return the generated code.
3003 return GetCode(kind(), Code::INTERCEPTOR, name); 3003 return GetCode(kind(), Code::INTERCEPTOR, name);
3004 } 3004 }
3005 3005
3006 3006
3007 Handle<Code> StoreStubCompiler::CompileStoreGlobal(
3008 Handle<GlobalObject> object,
3009 Handle<PropertyCell> cell,
3010 Handle<Name> name) {
3011 Label miss;
3012
3013 // Check that the map of the global has not changed.
3014 __ cmp(FieldOperand(receiver(), HeapObject::kMapOffset),
3015 Immediate(Handle<Map>(object->map())));
3016 __ j(not_equal, &miss);
3017
3018 // Compute the cell operand to use.
3019 __ mov(scratch1(), Immediate(cell));
3020 Operand cell_operand =
3021 FieldOperand(scratch1(), PropertyCell::kValueOffset);
3022
3023 // Check that the value in the cell is not the hole. If it is, this
3024 // cell could have been deleted and reintroducing the global needs
3025 // to update the property details in the property dictionary of the
3026 // global object. We bail out to the runtime system to do that.
3027 __ cmp(cell_operand, factory()->the_hole_value());
3028 __ j(equal, &miss);
3029
3030 // Store the value in the cell.
3031 __ mov(cell_operand, value());
3032 // No write barrier here, because cells are always rescanned.
3033
3034 // Return the value (register eax).
3035 Counters* counters = isolate()->counters();
3036 __ IncrementCounter(counters->named_store_global_inline(), 1);
3037 __ ret(0);
3038
3039 // Handle store cache miss.
3040 __ bind(&miss);
3041 __ IncrementCounter(counters->named_store_global_inline_miss(), 1);
3042 TailCallBuiltin(masm(), MissBuiltin(kind()));
3043
3044 // Return the generated code.
3045 return GetICCode(kind(), Code::NORMAL, name);
3046 }
3047
3048
3049 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic( 3007 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic(
3050 MapHandleList* receiver_maps, 3008 MapHandleList* receiver_maps,
3051 CodeHandleList* handler_stubs, 3009 CodeHandleList* handler_stubs,
3052 MapHandleList* transitioned_maps) { 3010 MapHandleList* transitioned_maps) {
3053 Label miss; 3011 Label miss;
3054 __ JumpIfSmi(receiver(), &miss, Label::kNear); 3012 __ JumpIfSmi(receiver(), &miss, Label::kNear);
3055 __ mov(scratch1(), FieldOperand(receiver(), HeapObject::kMapOffset)); 3013 __ mov(scratch1(), FieldOperand(receiver(), HeapObject::kMapOffset));
3056 for (int i = 0; i < receiver_maps->length(); ++i) { 3014 for (int i = 0; i < receiver_maps->length(); ++i) {
3057 __ cmp(scratch1(), receiver_maps->at(i)); 3015 __ cmp(scratch1(), receiver_maps->at(i));
3058 if (transitioned_maps->at(i).is_null()) { 3016 if (transitioned_maps->at(i).is_null()) {
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
3300 // ----------------------------------- 3258 // -----------------------------------
3301 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); 3259 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric);
3302 } 3260 }
3303 3261
3304 3262
3305 #undef __ 3263 #undef __
3306 3264
3307 } } // namespace v8::internal 3265 } } // namespace v8::internal
3308 3266
3309 #endif // V8_TARGET_ARCH_IA32 3267 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/code-stubs-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698