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

Side by Side Diff: src/arm/stub-cache-arm.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/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.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 2894 matching lines...) Expand 10 before | Expand all | Expand 10 after
2905 2905
2906 // Handle store cache miss. 2906 // Handle store cache miss.
2907 __ bind(&miss); 2907 __ bind(&miss);
2908 TailCallBuiltin(masm(), MissBuiltin(kind())); 2908 TailCallBuiltin(masm(), MissBuiltin(kind()));
2909 2909
2910 // Return the generated code. 2910 // Return the generated code.
2911 return GetCode(kind(), Code::INTERCEPTOR, name); 2911 return GetCode(kind(), Code::INTERCEPTOR, name);
2912 } 2912 }
2913 2913
2914 2914
2915 Handle<Code> StoreStubCompiler::CompileStoreGlobal(
2916 Handle<GlobalObject> object,
2917 Handle<PropertyCell> cell,
2918 Handle<Name> name) {
2919 Label miss;
2920
2921 // Check that the map of the global has not changed.
2922 __ ldr(scratch1(), FieldMemOperand(receiver(), HeapObject::kMapOffset));
2923 __ cmp(scratch1(), Operand(Handle<Map>(object->map())));
2924 __ b(ne, &miss);
2925
2926 // Check that the value in the cell is not the hole. If it is, this
2927 // cell could have been deleted and reintroducing the global needs
2928 // to update the property details in the property dictionary of the
2929 // global object. We bail out to the runtime system to do that.
2930 __ mov(scratch1(), Operand(cell));
2931 __ LoadRoot(scratch2(), Heap::kTheHoleValueRootIndex);
2932 __ ldr(scratch3(), FieldMemOperand(scratch1(), Cell::kValueOffset));
2933 __ cmp(scratch3(), scratch2());
2934 __ b(eq, &miss);
2935
2936 // Store the value in the cell.
2937 __ str(value(), FieldMemOperand(scratch1(), Cell::kValueOffset));
2938 // Cells are always rescanned, so no write barrier here.
2939
2940 Counters* counters = isolate()->counters();
2941 __ IncrementCounter(
2942 counters->named_store_global_inline(), 1, scratch1(), scratch2());
2943 __ Ret();
2944
2945 // Handle store cache miss.
2946 __ bind(&miss);
2947 __ IncrementCounter(
2948 counters->named_store_global_inline_miss(), 1, scratch1(), scratch2());
2949 TailCallBuiltin(masm(), MissBuiltin(kind()));
2950
2951 // Return the generated code.
2952 return GetICCode(kind(), Code::NORMAL, name);
2953 }
2954
2955
2956 Handle<Code> LoadStubCompiler::CompileLoadNonexistent( 2915 Handle<Code> LoadStubCompiler::CompileLoadNonexistent(
2957 Handle<JSObject> object, 2916 Handle<JSObject> object,
2958 Handle<JSObject> last, 2917 Handle<JSObject> last,
2959 Handle<Name> name, 2918 Handle<Name> name,
2960 Handle<GlobalObject> global) { 2919 Handle<GlobalObject> global) {
2961 Label success; 2920 Label success;
2962 2921
2963 NonexistentHandlerFrontend(object, last, name, &success, global); 2922 NonexistentHandlerFrontend(object, last, name, &success, global);
2964 2923
2965 __ bind(&success); 2924 __ bind(&success);
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
3206 // ----------------------------------- 3165 // -----------------------------------
3207 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); 3166 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric);
3208 } 3167 }
3209 3168
3210 3169
3211 #undef __ 3170 #undef __
3212 3171
3213 } } // namespace v8::internal 3172 } } // namespace v8::internal
3214 3173
3215 #endif // V8_TARGET_ARCH_ARM 3174 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/ia32/code-stubs-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698