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

Side by Side Diff: src/x64/stub-cache-x64.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/x64/code-stubs-x64.cc ('k') | no next file » | 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 2879 matching lines...) Expand 10 before | Expand all | Expand 10 after
2890 // Do tail-call to the runtime system. 2890 // Do tail-call to the runtime system.
2891 ExternalReference store_ic_property = 2891 ExternalReference store_ic_property =
2892 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate()); 2892 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate());
2893 __ TailCallExternalReference(store_ic_property, 4, 1); 2893 __ TailCallExternalReference(store_ic_property, 4, 1);
2894 2894
2895 // Return the generated code. 2895 // Return the generated code.
2896 return GetCode(kind(), Code::INTERCEPTOR, name); 2896 return GetCode(kind(), Code::INTERCEPTOR, name);
2897 } 2897 }
2898 2898
2899 2899
2900 Handle<Code> StoreStubCompiler::CompileStoreGlobal(
2901 Handle<GlobalObject> object,
2902 Handle<PropertyCell> cell,
2903 Handle<Name> name) {
2904 Label miss;
2905
2906 // Check that the map of the global has not changed.
2907 __ Cmp(FieldOperand(receiver(), HeapObject::kMapOffset),
2908 Handle<Map>(object->map()));
2909 __ j(not_equal, &miss);
2910
2911 // Compute the cell operand to use.
2912 __ Move(scratch1(), cell);
2913 Operand cell_operand =
2914 FieldOperand(scratch1(), PropertyCell::kValueOffset);
2915
2916 // Check that the value in the cell is not the hole. If it is, this
2917 // cell could have been deleted and reintroducing the global needs
2918 // to update the property details in the property dictionary of the
2919 // global object. We bail out to the runtime system to do that.
2920 __ CompareRoot(cell_operand, Heap::kTheHoleValueRootIndex);
2921 __ j(equal, &miss);
2922
2923 // Store the value in the cell.
2924 __ movq(cell_operand, value());
2925 // Cells are always rescanned, so no write barrier here.
2926
2927 // Return the value (register rax).
2928 Counters* counters = isolate()->counters();
2929 __ IncrementCounter(counters->named_store_global_inline(), 1);
2930 __ ret(0);
2931
2932 // Handle store cache miss.
2933 __ bind(&miss);
2934 __ IncrementCounter(counters->named_store_global_inline_miss(), 1);
2935 TailCallBuiltin(masm(), MissBuiltin(kind()));
2936
2937 // Return the generated code.
2938 return GetICCode(kind(), Code::NORMAL, name);
2939 }
2940
2941
2942 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic( 2900 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic(
2943 MapHandleList* receiver_maps, 2901 MapHandleList* receiver_maps,
2944 CodeHandleList* handler_stubs, 2902 CodeHandleList* handler_stubs,
2945 MapHandleList* transitioned_maps) { 2903 MapHandleList* transitioned_maps) {
2946 Label miss; 2904 Label miss;
2947 __ JumpIfSmi(receiver(), &miss, Label::kNear); 2905 __ JumpIfSmi(receiver(), &miss, Label::kNear);
2948 2906
2949 __ movq(scratch1(), FieldOperand(receiver(), HeapObject::kMapOffset)); 2907 __ movq(scratch1(), FieldOperand(receiver(), HeapObject::kMapOffset));
2950 int receiver_count = receiver_maps->length(); 2908 int receiver_count = receiver_maps->length();
2951 for (int i = 0; i < receiver_count; ++i) { 2909 for (int i = 0; i < receiver_count; ++i) {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
3199 // ----------------------------------- 3157 // -----------------------------------
3200 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); 3158 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric);
3201 } 3159 }
3202 3160
3203 3161
3204 #undef __ 3162 #undef __
3205 3163
3206 } } // namespace v8::internal 3164 } } // namespace v8::internal
3207 3165
3208 #endif // V8_TARGET_ARCH_X64 3166 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698