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

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

Issue 169243003: MIPS: Remove arch specific api callback generate functions. (Closed) Base URL: git@github.com:paul99/v8m-rb.git@master
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 | « no previous file | 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 752 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 Handle<JSObject> holder_obj, 763 Handle<JSObject> holder_obj,
764 IC::UtilityId id) { 764 IC::UtilityId id) {
765 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); 765 PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
766 __ CallExternalReference( 766 __ CallExternalReference(
767 ExternalReference(IC_Utility(id), masm->isolate()), 767 ExternalReference(IC_Utility(id), masm->isolate()),
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 void StubCompiler::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 bool is_store,
779 int argc, 779 int argc,
780 Register* values) { 780 Register* values) {
781 ASSERT(!receiver.is(scratch_in)); 781 ASSERT(!receiver.is(scratch_in));
782 // Preparing to push, adjust sp. 782 // Preparing to push, adjust sp.
783 __ Subu(sp, sp, Operand((argc + 1) * kPointerSize)); 783 __ Subu(sp, sp, Operand((argc + 1) * kPointerSize));
784 __ sw(receiver, MemOperand(sp, argc * kPointerSize)); // Push receiver. 784 __ sw(receiver, MemOperand(sp, argc * kPointerSize)); // Push receiver.
785 // Write the arguments to stack frame. 785 // Write the arguments to stack frame.
786 for (int i = 0; i < argc; i++) { 786 for (int i = 0; i < argc; i++) {
787 Register arg = values[argc-1-i]; 787 Register arg = values[argc-1-i];
788 ASSERT(!receiver.is(arg)); 788 ASSERT(!receiver.is(arg));
789 ASSERT(!scratch_in.is(arg)); 789 ASSERT(!scratch_in.is(arg));
790 __ sw(arg, MemOperand(sp, (argc-1-i) * kPointerSize)); // Push arg. 790 __ sw(arg, MemOperand(sp, (argc-1-i) * kPointerSize)); // Push arg.
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1058 1058
1059 1059
1060 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { 1060 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) {
1061 // Return the constant value. 1061 // Return the constant value.
1062 __ li(v0, value); 1062 __ li(v0, value);
1063 __ Ret(); 1063 __ Ret();
1064 } 1064 }
1065 1065
1066 1066
1067 void LoadStubCompiler::GenerateLoadCallback( 1067 void LoadStubCompiler::GenerateLoadCallback(
1068 const CallOptimization& call_optimization,
1069 Handle<Map> receiver_map) {
1070 GenerateFastApiCall(
1071 masm(), call_optimization, receiver_map,
1072 receiver(), scratch3(), false, 0, NULL);
1073 }
1074
1075
1076 void LoadStubCompiler::GenerateLoadCallback(
1077 Register reg, 1068 Register reg,
1078 Handle<ExecutableAccessorInfo> callback) { 1069 Handle<ExecutableAccessorInfo> callback) {
1079 // Build AccessorInfo::args_ list on the stack and push property name below 1070 // Build AccessorInfo::args_ list on the stack and push property name below
1080 // the exit frame to make GC aware of them and store pointers to them. 1071 // the exit frame to make GC aware of them and store pointers to them.
1081 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0); 1072 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0);
1082 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1); 1073 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1);
1083 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2); 1074 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2);
1084 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 3); 1075 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 3);
1085 STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4); 1076 STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4);
1086 STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5); 1077 STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5);
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
1240 // Do tail-call to the runtime system. 1231 // Do tail-call to the runtime system.
1241 ExternalReference store_callback_property = 1232 ExternalReference store_callback_property =
1242 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); 1233 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate());
1243 __ TailCallExternalReference(store_callback_property, 5, 1); 1234 __ TailCallExternalReference(store_callback_property, 5, 1);
1244 1235
1245 // Return the generated code. 1236 // Return the generated code.
1246 return GetCode(kind(), Code::FAST, name); 1237 return GetCode(kind(), Code::FAST, name);
1247 } 1238 }
1248 1239
1249 1240
1250 Handle<Code> StoreStubCompiler::CompileStoreCallback(
1251 Handle<JSObject> object,
1252 Handle<JSObject> holder,
1253 Handle<Name> name,
1254 const CallOptimization& call_optimization) {
1255 HandlerFrontend(IC::CurrentTypeOf(object, isolate()),
1256 receiver(), holder, name);
1257
1258 Register values[] = { value() };
1259 GenerateFastApiCall(
1260 masm(), call_optimization, handle(object->map()),
1261 receiver(), scratch3(), true, 1, values);
1262
1263 // Return the generated code.
1264 return GetCode(kind(), Code::FAST, name);
1265 }
1266
1267
1268 #undef __ 1241 #undef __
1269 #define __ ACCESS_MASM(masm) 1242 #define __ ACCESS_MASM(masm)
1270 1243
1271 1244
1272 void StoreStubCompiler::GenerateStoreViaSetter( 1245 void StoreStubCompiler::GenerateStoreViaSetter(
1273 MacroAssembler* masm, 1246 MacroAssembler* masm,
1274 Handle<HeapType> type, 1247 Handle<HeapType> type,
1275 Handle<JSFunction> setter) { 1248 Handle<JSFunction> setter) {
1276 // ----------- S t a t e ------------- 1249 // ----------- S t a t e -------------
1277 // -- a0 : value 1250 // -- a0 : value
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1597 // ----------------------------------- 1570 // -----------------------------------
1598 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1571 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1599 } 1572 }
1600 1573
1601 1574
1602 #undef __ 1575 #undef __
1603 1576
1604 } } // namespace v8::internal 1577 } } // namespace v8::internal
1605 1578
1606 #endif // V8_TARGET_ARCH_MIPS 1579 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698