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

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

Issue 167083002: MIPS: api accessor store ics should return passed value. (Closed) Base URL: https://github.com/v8/v8.git@gbl
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
« no previous file with comments | « src/mips/code-stubs-mips.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 757 matching lines...) Expand 10 before | Expand all | Expand 10 after
768 StubCache::kInterceptorArgsLength); 768 StubCache::kInterceptorArgsLength);
769 } 769 }
770 770
771 771
772 // Generate call to api function. 772 // Generate call to api function.
773 static void GenerateFastApiCall(MacroAssembler* masm, 773 static void GenerateFastApiCall(MacroAssembler* masm,
774 const CallOptimization& optimization, 774 const CallOptimization& optimization,
775 Handle<Map> receiver_map, 775 Handle<Map> receiver_map,
776 Register receiver, 776 Register receiver,
777 Register scratch_in, 777 Register scratch_in,
778 bool is_store,
778 int argc, 779 int argc,
779 Register* values) { 780 Register* values) {
780 ASSERT(!receiver.is(scratch_in)); 781 ASSERT(!receiver.is(scratch_in));
781 // Preparing to push, adjust sp. 782 // Preparing to push, adjust sp.
782 __ Subu(sp, sp, Operand((argc + 1) * kPointerSize)); 783 __ Subu(sp, sp, Operand((argc + 1) * kPointerSize));
783 __ sw(receiver, MemOperand(sp, argc * kPointerSize)); // Push receiver. 784 __ sw(receiver, MemOperand(sp, argc * kPointerSize)); // Push receiver.
784 // Write the arguments to stack frame. 785 // Write the arguments to stack frame.
785 for (int i = 0; i < argc; i++) { 786 for (int i = 0; i < argc; i++) {
786 Register arg = values[argc-1-i]; 787 Register arg = values[argc-1-i];
787 ASSERT(!receiver.is(arg)); 788 ASSERT(!receiver.is(arg));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 837 Address function_address = v8::ToCData<Address>(api_call_info->callback());
837 ApiFunction fun(function_address); 838 ApiFunction fun(function_address);
838 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL; 839 ExternalReference::Type type = ExternalReference::DIRECT_API_CALL;
839 ExternalReference ref = 840 ExternalReference ref =
840 ExternalReference(&fun, 841 ExternalReference(&fun,
841 type, 842 type,
842 masm->isolate()); 843 masm->isolate());
843 __ li(api_function_address, Operand(ref)); 844 __ li(api_function_address, Operand(ref));
844 845
845 // Jump to stub. 846 // Jump to stub.
846 CallApiFunctionStub stub(true, call_data_undefined, argc); 847 CallApiFunctionStub stub(is_store, call_data_undefined, argc);
847 __ TailCallStub(&stub); 848 __ TailCallStub(&stub);
848 } 849 }
849 850
850 851
851 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) { 852 void StubCompiler::GenerateTailCall(MacroAssembler* masm, Handle<Code> code) {
852 __ Jump(code, RelocInfo::CODE_TARGET); 853 __ Jump(code, RelocInfo::CODE_TARGET);
853 } 854 }
854 855
855 856
856 #undef __ 857 #undef __
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1061 __ li(v0, value); 1062 __ li(v0, value);
1062 __ Ret(); 1063 __ Ret();
1063 } 1064 }
1064 1065
1065 1066
1066 void LoadStubCompiler::GenerateLoadCallback( 1067 void LoadStubCompiler::GenerateLoadCallback(
1067 const CallOptimization& call_optimization, 1068 const CallOptimization& call_optimization,
1068 Handle<Map> receiver_map) { 1069 Handle<Map> receiver_map) {
1069 GenerateFastApiCall( 1070 GenerateFastApiCall(
1070 masm(), call_optimization, receiver_map, 1071 masm(), call_optimization, receiver_map,
1071 receiver(), scratch3(), 0, NULL); 1072 receiver(), scratch3(), false, 0, NULL);
1072 } 1073 }
1073 1074
1074 1075
1075 void LoadStubCompiler::GenerateLoadCallback( 1076 void LoadStubCompiler::GenerateLoadCallback(
1076 Register reg, 1077 Register reg,
1077 Handle<ExecutableAccessorInfo> callback) { 1078 Handle<ExecutableAccessorInfo> callback) {
1078 // Build AccessorInfo::args_ list on the stack and push property name below 1079 // Build AccessorInfo::args_ list on the stack and push property name below
1079 // the exit frame to make GC aware of them and store pointers to them. 1080 // the exit frame to make GC aware of them and store pointers to them.
1080 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0); 1081 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0);
1081 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1); 1082 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1);
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
1250 Handle<JSObject> object, 1251 Handle<JSObject> object,
1251 Handle<JSObject> holder, 1252 Handle<JSObject> holder,
1252 Handle<Name> name, 1253 Handle<Name> name,
1253 const CallOptimization& call_optimization) { 1254 const CallOptimization& call_optimization) {
1254 HandlerFrontend(IC::CurrentTypeOf(object, isolate()), 1255 HandlerFrontend(IC::CurrentTypeOf(object, isolate()),
1255 receiver(), holder, name); 1256 receiver(), holder, name);
1256 1257
1257 Register values[] = { value() }; 1258 Register values[] = { value() };
1258 GenerateFastApiCall( 1259 GenerateFastApiCall(
1259 masm(), call_optimization, handle(object->map()), 1260 masm(), call_optimization, handle(object->map()),
1260 receiver(), scratch3(), 1, values); 1261 receiver(), scratch3(), true, 1, values);
1261 1262
1262 // Return the generated code. 1263 // Return the generated code.
1263 return GetCode(kind(), Code::FAST, name); 1264 return GetCode(kind(), Code::FAST, name);
1264 } 1265 }
1265 1266
1266 1267
1267 #undef __ 1268 #undef __
1268 #define __ ACCESS_MASM(masm) 1269 #define __ ACCESS_MASM(masm)
1269 1270
1270 1271
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after
1596 // ----------------------------------- 1597 // -----------------------------------
1597 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1598 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1598 } 1599 }
1599 1600
1600 1601
1601 #undef __ 1602 #undef __
1602 1603
1603 } } // namespace v8::internal 1604 } } // namespace v8::internal
1604 1605
1605 #endif // V8_TARGET_ARCH_MIPS 1606 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/mips/code-stubs-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698