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

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

Issue 23513004: remove old style callbacks (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: inlined a function used once Created 7 years, 3 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/arguments.cc ('k') | src/builtins.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 885 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 __ str(ip, MemOperand(r0, 1 * kPointerSize)); 896 __ str(ip, MemOperand(r0, 1 * kPointerSize));
897 // v8::Arguments::length_ = argc 897 // v8::Arguments::length_ = argc
898 __ mov(ip, Operand(argc)); 898 __ mov(ip, Operand(argc));
899 __ str(ip, MemOperand(r0, 2 * kPointerSize)); 899 __ str(ip, MemOperand(r0, 2 * kPointerSize));
900 // v8::Arguments::is_construct_call = 0 900 // v8::Arguments::is_construct_call = 0
901 __ mov(ip, Operand::Zero()); 901 __ mov(ip, Operand::Zero());
902 __ str(ip, MemOperand(r0, 3 * kPointerSize)); 902 __ str(ip, MemOperand(r0, 3 * kPointerSize));
903 903
904 const int kStackUnwindSpace = argc + kFastApiCallArguments + 1; 904 const int kStackUnwindSpace = argc + kFastApiCallArguments + 1;
905 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 905 Address function_address = v8::ToCData<Address>(api_call_info->callback());
906 bool returns_handle = 906 // TODO(dcarney): fix signatures using returns_handle
Sven Panne 2013/08/27 09:12:43 I don't understand this TODO...
907 !CallbackTable::ReturnsVoid(masm->isolate(), function_address); 907 const bool returns_handle = false;
908 ApiFunction fun(function_address); 908 ApiFunction fun(function_address);
909 ExternalReference::Type type = 909 ExternalReference::Type type =
910 returns_handle ? 910 returns_handle ?
911 ExternalReference::DIRECT_API_CALL : 911 ExternalReference::DIRECT_API_CALL :
912 ExternalReference::DIRECT_API_CALL_NEW; 912 ExternalReference::DIRECT_API_CALL_NEW;
913 ExternalReference ref = ExternalReference(&fun, 913 ExternalReference ref = ExternalReference(&fun,
914 type, 914 type,
915 masm->isolate()); 915 masm->isolate());
916 Address thunk_address = returns_handle 916 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback);
917 ? FUNCTION_ADDR(&InvokeInvocationCallback)
918 : FUNCTION_ADDR(&InvokeFunctionCallback);
919 ExternalReference::Type thunk_type = 917 ExternalReference::Type thunk_type =
920 returns_handle ? 918 returns_handle ?
921 ExternalReference::PROFILING_API_CALL : 919 ExternalReference::PROFILING_API_CALL :
922 ExternalReference::PROFILING_API_CALL_NEW; 920 ExternalReference::PROFILING_API_CALL_NEW;
923 ApiFunction thunk_fun(thunk_address); 921 ApiFunction thunk_fun(thunk_address);
924 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, 922 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type,
925 masm->isolate()); 923 masm->isolate());
926 924
927 AllowExternalCallThatCantCauseGC scope(masm); 925 AllowExternalCallThatCantCauseGC scope(masm);
928 __ CallApiFunctionAndReturn(ref, 926 __ CallApiFunctionAndReturn(ref,
(...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after
1417 FrameScope frame_scope(masm(), StackFrame::MANUAL); 1415 FrameScope frame_scope(masm(), StackFrame::MANUAL);
1418 __ EnterExitFrame(false, kApiStackSpace); 1416 __ EnterExitFrame(false, kApiStackSpace);
1419 1417
1420 // Create AccessorInfo instance on the stack above the exit frame with 1418 // Create AccessorInfo instance on the stack above the exit frame with
1421 // scratch2 (internal::Object** args_) as the data. 1419 // scratch2 (internal::Object** args_) as the data.
1422 __ str(scratch2(), MemOperand(sp, 1 * kPointerSize)); 1420 __ str(scratch2(), MemOperand(sp, 1 * kPointerSize));
1423 __ add(r1, sp, Operand(1 * kPointerSize)); // r1 = AccessorInfo& 1421 __ add(r1, sp, Operand(1 * kPointerSize)); // r1 = AccessorInfo&
1424 1422
1425 const int kStackUnwindSpace = kFastApiCallArguments + 1; 1423 const int kStackUnwindSpace = kFastApiCallArguments + 1;
1426 Address getter_address = v8::ToCData<Address>(callback->getter()); 1424 Address getter_address = v8::ToCData<Address>(callback->getter());
1427 bool returns_handle = 1425 // TODO(dcarney): fix signatures using returns_handle
Sven Panne 2013/08/27 09:12:43 Same here.
1428 !CallbackTable::ReturnsVoid(isolate(), getter_address); 1426 const bool returns_handle = false;
1429 1427
1430 ApiFunction fun(getter_address); 1428 ApiFunction fun(getter_address);
1431 ExternalReference::Type type = 1429 ExternalReference::Type type =
1432 returns_handle ? 1430 returns_handle ?
1433 ExternalReference::DIRECT_GETTER_CALL : 1431 ExternalReference::DIRECT_GETTER_CALL :
1434 ExternalReference::DIRECT_GETTER_CALL_NEW; 1432 ExternalReference::DIRECT_GETTER_CALL_NEW;
1435 ExternalReference ref = ExternalReference(&fun, type, isolate()); 1433 ExternalReference ref = ExternalReference(&fun, type, isolate());
1436 1434
1437 Address thunk_address = returns_handle 1435 Address thunk_address = FUNCTION_ADDR(&InvokeAccessorGetterCallback);
1438 ? FUNCTION_ADDR(&InvokeAccessorGetter)
1439 : FUNCTION_ADDR(&InvokeAccessorGetterCallback);
1440 ExternalReference::Type thunk_type = 1436 ExternalReference::Type thunk_type =
1441 returns_handle ? 1437 ExternalReference::PROFILING_GETTER_CALL_NEW;
1442 ExternalReference::PROFILING_GETTER_CALL :
1443 ExternalReference::PROFILING_GETTER_CALL_NEW;
1444 ApiFunction thunk_fun(thunk_address); 1438 ApiFunction thunk_fun(thunk_address);
1445 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type, 1439 ExternalReference thunk_ref = ExternalReference(&thunk_fun, thunk_type,
1446 isolate()); 1440 isolate());
1447 __ CallApiFunctionAndReturn(ref, 1441 __ CallApiFunctionAndReturn(ref,
1448 getter_address, 1442 getter_address,
1449 thunk_ref, 1443 thunk_ref,
1450 r2, 1444 r2,
1451 kStackUnwindSpace, 1445 kStackUnwindSpace,
1452 returns_handle, 1446 returns_handle,
1453 5); 1447 5);
(...skipping 1719 matching lines...) Expand 10 before | Expand all | Expand 10 after
3173 // ----------------------------------- 3167 // -----------------------------------
3174 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); 3168 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric);
3175 } 3169 }
3176 3170
3177 3171
3178 #undef __ 3172 #undef __
3179 3173
3180 } } // namespace v8::internal 3174 } } // namespace v8::internal
3181 3175
3182 #endif // V8_TARGET_ARCH_ARM 3176 #endif // V8_TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « src/arguments.cc ('k') | src/builtins.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698