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

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

Issue 166653003: api accessor store ics should return passed value (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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/arm/code-stubs-arm.cc ('k') | src/code-stubs.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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
781 StubCache::kInterceptorArgsLength); 781 StubCache::kInterceptorArgsLength);
782 } 782 }
783 783
784 784
785 // Generate call to api function. 785 // Generate call to api function.
786 static void GenerateFastApiCall(MacroAssembler* masm, 786 static void GenerateFastApiCall(MacroAssembler* masm,
787 const CallOptimization& optimization, 787 const CallOptimization& optimization,
788 Handle<Map> receiver_map, 788 Handle<Map> receiver_map,
789 Register receiver, 789 Register receiver,
790 Register scratch_in, 790 Register scratch_in,
791 bool is_store,
791 int argc, 792 int argc,
792 Register* values) { 793 Register* values) {
793 ASSERT(!receiver.is(scratch_in)); 794 ASSERT(!receiver.is(scratch_in));
794 __ push(receiver); 795 __ push(receiver);
795 // Write the arguments to stack frame. 796 // Write the arguments to stack frame.
796 for (int i = 0; i < argc; i++) { 797 for (int i = 0; i < argc; i++) {
797 Register arg = values[argc-1-i]; 798 Register arg = values[argc-1-i];
798 ASSERT(!receiver.is(arg)); 799 ASSERT(!receiver.is(arg));
799 ASSERT(!scratch_in.is(arg)); 800 ASSERT(!scratch_in.is(arg));
800 __ push(arg); 801 __ push(arg);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 // Put api_function_address in place. 848 // Put api_function_address in place.
848 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 849 Address function_address = v8::ToCData<Address>(api_call_info->callback());
849 ApiFunction fun(function_address); 850 ApiFunction fun(function_address);
850 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; 851 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL;
851 ExternalReference ref = ExternalReference(&fun, 852 ExternalReference ref = ExternalReference(&fun,
852 type, 853 type,
853 masm->isolate()); 854 masm->isolate());
854 __ mov(api_function_address, Operand(ref)); 855 __ mov(api_function_address, Operand(ref));
855 856
856 // Jump to stub. 857 // Jump to stub.
857 CallApiFunctionStub stub(true, call_data_undefined, argc); 858 CallApiFunctionStub stub(is_store, call_data_undefined, argc);
858 __ TailCallStub(&stub); 859 __ TailCallStub(&stub);
859 } 860 }
860 861
861 862
862 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { 863 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) {
863 __ Jump(code, RelocInfo::CODE_TARGET); 864 __ Jump(code, RelocInfo::CODE_TARGET);
864 } 865 }
865 866
866 867
867 #undef __ 868 #undef __
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 __ Move(r0, value); 1074 __ Move(r0, value);
1074 __ Ret(); 1075 __ Ret();
1075 } 1076 }
1076 1077
1077 1078
1078 void LoadStubCompiler::GenerateLoadCallback( 1079 void LoadStubCompiler::GenerateLoadCallback(
1079 const CallOptimization& call_optimization, 1080 const CallOptimization& call_optimization,
1080 Handle<Map> receiver_map) { 1081 Handle<Map> receiver_map) {
1081 GenerateFastApiCall( 1082 GenerateFastApiCall(
1082 masm(), call_optimization, receiver_map, 1083 masm(), call_optimization, receiver_map,
1083 receiver(), scratch3(), 0, NULL); 1084 receiver(), scratch3(), false, 0, NULL);
1084 } 1085 }
1085 1086
1086 1087
1087 void LoadStubCompiler::GenerateLoadCallback( 1088 void LoadStubCompiler::GenerateLoadCallback(
1088 Register reg, 1089 Register reg,
1089 Handle<ExecutableAccessorInfo> callback) { 1090 Handle<ExecutableAccessorInfo> callback) {
1090 // Build AccessorInfo::args_ list on the stack and push property name below 1091 // Build AccessorInfo::args_ list on the stack and push property name below
1091 // the exit frame to make GC aware of them and store pointers to them. 1092 // the exit frame to make GC aware of them and store pointers to them.
1092 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0); 1093 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0);
1093 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1); 1094 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1);
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 Handle<JSObject> object, 1265 Handle<JSObject> object,
1265 Handle<JSObject> holder, 1266 Handle<JSObject> holder,
1266 Handle<Name> name, 1267 Handle<Name> name,
1267 const CallOptimization& call_optimization) { 1268 const CallOptimization& call_optimization) {
1268 HandlerFrontend(IC::CurrentTypeOf(object, isolate()), 1269 HandlerFrontend(IC::CurrentTypeOf(object, isolate()),
1269 receiver(), holder, name); 1270 receiver(), holder, name);
1270 1271
1271 Register values[] = { value() }; 1272 Register values[] = { value() };
1272 GenerateFastApiCall( 1273 GenerateFastApiCall(
1273 masm(), call_optimization, handle(object->map()), 1274 masm(), call_optimization, handle(object->map()),
1274 receiver(), scratch3(), 1, values); 1275 receiver(), scratch3(), true, 1, values);
1275 1276
1276 // Return the generated code. 1277 // Return the generated code.
1277 return GetCode(kind(), Code::FAST, name); 1278 return GetCode(kind(), Code::FAST, name);
1278 } 1279 }
1279 1280
1280 1281
1281 #undef __ 1282 #undef __
1282 #define __ ACCESS_MASM(masm) 1283 #define __ ACCESS_MASM(masm)
1283 1284
1284 1285
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after
1612 // ----------------------------------- 1613 // -----------------------------------
1613 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1614 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1614 } 1615 }
1615 1616
1616 1617
1617 #undef __ 1618 #undef __
1618 1619
1619 } } // namespace v8::internal 1620 } } // namespace v8::internal
1620 1621
1621 #endif // V8_TARGET_ARCH_ARM 1622 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arm/code-stubs-arm.cc ('k') | src/code-stubs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698