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

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

Issue 169353002: Remove arch specific api callback generate functions (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/a64/stub-cache-a64.cc ('k') | src/ia32/stub-cache-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 765 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 Handle<JSObject> holder_obj, 776 Handle<JSObject> holder_obj,
777 IC::UtilityId id) { 777 IC::UtilityId id) {
778 PushInterceptorArguments(masm, receiver, holder, name, holder_obj); 778 PushInterceptorArguments(masm, receiver, holder, name, holder_obj);
779 __ CallExternalReference( 779 __ CallExternalReference(
780 ExternalReference(IC_Utility(id), masm->isolate()), 780 ExternalReference(IC_Utility(id), masm->isolate()),
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 void StubCompiler::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 bool is_store,
792 int argc, 792 int argc,
793 Register* values) { 793 Register* values) {
794 ASSERT(!receiver.is(scratch_in)); 794 ASSERT(!receiver.is(scratch_in));
795 __ push(receiver); 795 __ push(receiver);
796 // Write the arguments to stack frame. 796 // Write the arguments to stack frame.
797 for (int i = 0; i < argc; i++) { 797 for (int i = 0; i < argc; i++) {
798 Register arg = values[argc-1-i]; 798 Register arg = values[argc-1-i];
799 ASSERT(!receiver.is(arg)); 799 ASSERT(!receiver.is(arg));
800 ASSERT(!scratch_in.is(arg)); 800 ASSERT(!scratch_in.is(arg));
801 __ push(arg); 801 __ push(arg);
802 } 802 }
803 ASSERT(optimization.is_simple_api_call()); 803 ASSERT(optimization.is_simple_api_call());
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 1070
1071 1071
1072 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) { 1072 void LoadStubCompiler::GenerateLoadConstant(Handle<Object> value) {
1073 // Return the constant value. 1073 // Return the constant value.
1074 __ Move(r0, value); 1074 __ Move(r0, value);
1075 __ Ret(); 1075 __ Ret();
1076 } 1076 }
1077 1077
1078 1078
1079 void LoadStubCompiler::GenerateLoadCallback( 1079 void LoadStubCompiler::GenerateLoadCallback(
1080 const CallOptimization& call_optimization,
1081 Handle<Map> receiver_map) {
1082 GenerateFastApiCall(
1083 masm(), call_optimization, receiver_map,
1084 receiver(), scratch3(), false, 0, NULL);
1085 }
1086
1087
1088 void LoadStubCompiler::GenerateLoadCallback(
1089 Register reg, 1080 Register reg,
1090 Handle<ExecutableAccessorInfo> callback) { 1081 Handle<ExecutableAccessorInfo> callback) {
1091 // Build AccessorInfo::args_ list on the stack and push property name below 1082 // Build AccessorInfo::args_ list on the stack and push property name below
1092 // the exit frame to make GC aware of them and store pointers to them. 1083 // the exit frame to make GC aware of them and store pointers to them.
1093 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0); 1084 STATIC_ASSERT(PropertyCallbackArguments::kHolderIndex == 0);
1094 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1); 1085 STATIC_ASSERT(PropertyCallbackArguments::kIsolateIndex == 1);
1095 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2); 1086 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueDefaultValueIndex == 2);
1096 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 3); 1087 STATIC_ASSERT(PropertyCallbackArguments::kReturnValueOffset == 3);
1097 STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4); 1088 STATIC_ASSERT(PropertyCallbackArguments::kDataIndex == 4);
1098 STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5); 1089 STATIC_ASSERT(PropertyCallbackArguments::kThisIndex == 5);
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 // Do tail-call to the runtime system. 1245 // Do tail-call to the runtime system.
1255 ExternalReference store_callback_property = 1246 ExternalReference store_callback_property =
1256 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate()); 1247 ExternalReference(IC_Utility(IC::kStoreCallbackProperty), isolate());
1257 __ TailCallExternalReference(store_callback_property, 5, 1); 1248 __ TailCallExternalReference(store_callback_property, 5, 1);
1258 1249
1259 // Return the generated code. 1250 // Return the generated code.
1260 return GetCode(kind(), Code::FAST, name); 1251 return GetCode(kind(), Code::FAST, name);
1261 } 1252 }
1262 1253
1263 1254
1264 Handle<Code> StoreStubCompiler::CompileStoreCallback(
1265 Handle<JSObject> object,
1266 Handle<JSObject> holder,
1267 Handle<Name> name,
1268 const CallOptimization& call_optimization) {
1269 HandlerFrontend(IC::CurrentTypeOf(object, isolate()),
1270 receiver(), holder, name);
1271
1272 Register values[] = { value() };
1273 GenerateFastApiCall(
1274 masm(), call_optimization, handle(object->map()),
1275 receiver(), scratch3(), true, 1, values);
1276
1277 // Return the generated code.
1278 return GetCode(kind(), Code::FAST, name);
1279 }
1280
1281
1282 #undef __ 1255 #undef __
1283 #define __ ACCESS_MASM(masm) 1256 #define __ ACCESS_MASM(masm)
1284 1257
1285 1258
1286 void StoreStubCompiler::GenerateStoreViaSetter( 1259 void StoreStubCompiler::GenerateStoreViaSetter(
1287 MacroAssembler* masm, 1260 MacroAssembler* masm,
1288 Handle<HeapType> type, 1261 Handle<HeapType> type,
1289 Handle<JSFunction> setter) { 1262 Handle<JSFunction> setter) {
1290 // ----------- S t a t e ------------- 1263 // ----------- S t a t e -------------
1291 // -- r0 : value 1264 // -- r0 : value
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
1613 // ----------------------------------- 1586 // -----------------------------------
1614 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); 1587 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss);
1615 } 1588 }
1616 1589
1617 1590
1618 #undef __ 1591 #undef __
1619 1592
1620 } } // namespace v8::internal 1593 } } // namespace v8::internal
1621 1594
1622 #endif // V8_TARGET_ARCH_ARM 1595 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/a64/stub-cache-a64.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698