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

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

Issue 153773002: A64: Synchronize with r16679. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
Patch Set: Created 6 years, 10 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 | Annotate | Revision Log
« no previous file with comments | « src/x64/regexp-macro-assembler-x64.cc ('k') | test/cctest/cctest.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 2215 matching lines...) Expand 10 before | Expand all | Expand 10 after
2226 Handle<JSFunction> function, 2226 Handle<JSFunction> function,
2227 Handle<String> name, 2227 Handle<String> name,
2228 Code::StubType type) { 2228 Code::StubType type) {
2229 // ----------- S t a t e ------------- 2229 // ----------- S t a t e -------------
2230 // -- rcx : name 2230 // -- rcx : name
2231 // -- rsp[0] : return address 2231 // -- rsp[0] : return address
2232 // -- rsp[(argc - n) * 4] : arg[n] (zero-based) 2232 // -- rsp[(argc - n) * 4] : arg[n] (zero-based)
2233 // -- ... 2233 // -- ...
2234 // -- rsp[(argc + 1) * 4] : receiver 2234 // -- rsp[(argc + 1) * 4] : receiver
2235 // ----------------------------------- 2235 // -----------------------------------
2236
2237 if (!CpuFeatures::IsSupported(SSE2)) {
2238 return Handle<Code>::null();
2239 }
2240
2241 CpuFeatureScope use_sse2(masm(), SSE2);
2242
2243 const int argc = arguments().immediate(); 2236 const int argc = arguments().immediate();
2244 2237
2245 // If the object is not a JSObject or we got an unexpected number of 2238 // If the object is not a JSObject or we got an unexpected number of
2246 // arguments, bail out to the regular call. 2239 // arguments, bail out to the regular call.
2247 if (!object->IsJSObject() || argc != 1) { 2240 if (!object->IsJSObject() || argc != 1) {
2248 return Handle<Code>::null(); 2241 return Handle<Code>::null();
2249 } 2242 }
2250 2243
2251 Label miss; 2244 Label miss;
2252 GenerateNameCheck(name, &miss); 2245 GenerateNameCheck(name, &miss);
(...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after
2890 // Do tail-call to the runtime system. 2883 // Do tail-call to the runtime system.
2891 ExternalReference store_ic_property = 2884 ExternalReference store_ic_property =
2892 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate()); 2885 ExternalReference(IC_Utility(IC::kStoreInterceptorProperty), isolate());
2893 __ TailCallExternalReference(store_ic_property, 4, 1); 2886 __ TailCallExternalReference(store_ic_property, 4, 1);
2894 2887
2895 // Return the generated code. 2888 // Return the generated code.
2896 return GetCode(kind(), Code::INTERCEPTOR, name); 2889 return GetCode(kind(), Code::INTERCEPTOR, name);
2897 } 2890 }
2898 2891
2899 2892
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( 2893 Handle<Code> KeyedStoreStubCompiler::CompileStorePolymorphic(
2943 MapHandleList* receiver_maps, 2894 MapHandleList* receiver_maps,
2944 CodeHandleList* handler_stubs, 2895 CodeHandleList* handler_stubs,
2945 MapHandleList* transitioned_maps) { 2896 MapHandleList* transitioned_maps) {
2946 Label miss; 2897 Label miss;
2947 __ JumpIfSmi(receiver(), &miss, Label::kNear); 2898 __ JumpIfSmi(receiver(), &miss, Label::kNear);
2948 2899
2949 __ movq(scratch1(), FieldOperand(receiver(), HeapObject::kMapOffset)); 2900 __ movq(scratch1(), FieldOperand(receiver(), HeapObject::kMapOffset));
2950 int receiver_count = receiver_maps->length(); 2901 int receiver_count = receiver_maps->length();
2951 for (int i = 0; i < receiver_count; ++i) { 2902 for (int i = 0; i < receiver_count; ++i) {
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
3199 // ----------------------------------- 3150 // -----------------------------------
3200 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); 3151 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric);
3201 } 3152 }
3202 3153
3203 3154
3204 #undef __ 3155 #undef __
3205 3156
3206 } } // namespace v8::internal 3157 } } // namespace v8::internal
3207 3158
3208 #endif // V8_TARGET_ARCH_X64 3159 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/regexp-macro-assembler-x64.cc ('k') | test/cctest/cctest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698