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

Side by Side Diff: src/mips/stub-cache-mips.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/mips/code-stubs-mips.cc ('k') | src/stub-cache.h » ('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 2880 matching lines...) Expand 10 before | Expand all | Expand 10 after
2891 2891
2892 // Handle store cache miss. 2892 // Handle store cache miss.
2893 __ bind(&miss); 2893 __ bind(&miss);
2894 TailCallBuiltin(masm(), MissBuiltin(kind())); 2894 TailCallBuiltin(masm(), MissBuiltin(kind()));
2895 2895
2896 // Return the generated code. 2896 // Return the generated code.
2897 return GetCode(kind(), Code::INTERCEPTOR, name); 2897 return GetCode(kind(), Code::INTERCEPTOR, name);
2898 } 2898 }
2899 2899
2900 2900
2901 Handle<Code> StoreStubCompiler::CompileStoreGlobal(
2902 Handle<GlobalObject> object,
2903 Handle<PropertyCell> cell,
2904 Handle<Name> name) {
2905 Label miss;
2906
2907 // Check that the map of the global has not changed.
2908 __ lw(scratch1(), FieldMemOperand(receiver(), HeapObject::kMapOffset));
2909 __ Branch(&miss, ne, scratch1(), Operand(Handle<Map>(object->map())));
2910
2911 // Check that the value in the cell is not the hole. If it is, this
2912 // cell could have been deleted and reintroducing the global needs
2913 // to update the property details in the property dictionary of the
2914 // global object. We bail out to the runtime system to do that.
2915 __ li(scratch1(), Operand(cell));
2916 __ LoadRoot(scratch2(), Heap::kTheHoleValueRootIndex);
2917 __ lw(scratch3(), FieldMemOperand(scratch1(), Cell::kValueOffset));
2918 __ Branch(&miss, eq, scratch3(), Operand(scratch2()));
2919
2920 // Store the value in the cell.
2921 __ sw(value(), FieldMemOperand(scratch1(), Cell::kValueOffset));
2922 __ mov(v0, a0); // Stored value must be returned in v0.
2923 // Cells are always rescanned, so no write barrier here.
2924
2925 Counters* counters = isolate()->counters();
2926 __ IncrementCounter(
2927 counters->named_store_global_inline(), 1, scratch1(), scratch2());
2928 __ Ret();
2929
2930 // Handle store cache miss.
2931 __ bind(&miss);
2932 __ IncrementCounter(
2933 counters->named_store_global_inline_miss(), 1, scratch1(), scratch2());
2934 TailCallBuiltin(masm(), MissBuiltin(kind()));
2935
2936 // Return the generated code.
2937 return GetICCode(kind(), Code::NORMAL, name);
2938 }
2939
2940
2941 Handle<Code> LoadStubCompiler::CompileLoadNonexistent( 2901 Handle<Code> LoadStubCompiler::CompileLoadNonexistent(
2942 Handle<JSObject> object, 2902 Handle<JSObject> object,
2943 Handle<JSObject> last, 2903 Handle<JSObject> last,
2944 Handle<Name> name, 2904 Handle<Name> name,
2945 Handle<GlobalObject> global) { 2905 Handle<GlobalObject> global) {
2946 Label success; 2906 Label success;
2947 2907
2948 NonexistentHandlerFrontend(object, last, name, &success, global); 2908 NonexistentHandlerFrontend(object, last, name, &success, global);
2949 2909
2950 __ bind(&success); 2910 __ bind(&success);
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
3187 // ----------------------------------- 3147 // -----------------------------------
3188 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); 3148 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric);
3189 } 3149 }
3190 3150
3191 3151
3192 #undef __ 3152 #undef __
3193 3153
3194 } } // namespace v8::internal 3154 } } // namespace v8::internal
3195 3155
3196 #endif // V8_TARGET_ARCH_MIPS 3156 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | src/stub-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698