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

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

Issue 151163005: A64: Synchronize with r16356. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/a64
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/simulator-a64.cc ('k') | src/api.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 903 matching lines...) Expand 10 before | Expand all | Expand 10 after
914 // After the call to the API function we need to free memory used for: 914 // After the call to the API function we need to free memory used for:
915 // - JS arguments 915 // - JS arguments
916 // - the receiver 916 // - the receiver
917 // - the space allocated by ReserveSpaceForFastApiCall. 917 // - the space allocated by ReserveSpaceForFastApiCall.
918 // 918 //
919 // The memory allocated for v8::Arguments structure will be freed when we'll 919 // The memory allocated for v8::Arguments structure will be freed when we'll
920 // leave the ExitFrame. 920 // leave the ExitFrame.
921 const int kStackUnwindSpace = argc + kFastApiCallArguments + 1; 921 const int kStackUnwindSpace = argc + kFastApiCallArguments + 1;
922 922
923 Address function_address = v8::ToCData<Address>(api_call_info->callback()); 923 Address function_address = v8::ToCData<Address>(api_call_info->callback());
924 bool returns_handle = 924 // TODO(dcarney): fix signatures using returns_handle
925 !CallbackTable::ReturnsVoid(masm->isolate(), function_address); 925 const bool returns_handle = false;
926 ApiFunction fun(function_address); 926 ApiFunction fun(function_address);
927 ExternalReference::Type type = 927 ExternalReference::Type type =
928 returns_handle ? 928 returns_handle ?
929 ExternalReference::DIRECT_API_CALL : 929 ExternalReference::DIRECT_API_CALL :
930 ExternalReference::DIRECT_API_CALL_NEW; 930 ExternalReference::DIRECT_API_CALL_NEW;
931 ExternalReference ref = ExternalReference(&fun, type, masm->isolate()); 931 ExternalReference ref = ExternalReference(&fun, type, masm->isolate());
932 932
933 Address thunk_address = 933 Address thunk_address = FUNCTION_ADDR(&InvokeFunctionCallback);
934 returns_handle ?
935 FUNCTION_ADDR(&InvokeInvocationCallback) :
936 FUNCTION_ADDR(&InvokeFunctionCallback);
937 ExternalReference::Type thunk_type = 934 ExternalReference::Type thunk_type =
938 returns_handle ? 935 returns_handle ?
939 ExternalReference::PROFILING_API_CALL : 936 ExternalReference::PROFILING_API_CALL :
940 ExternalReference::PROFILING_API_CALL_NEW; 937 ExternalReference::PROFILING_API_CALL_NEW;
941 ApiFunction thunk_fun(thunk_address); 938 ApiFunction thunk_fun(thunk_address);
942 ExternalReference thunk_ref = 939 ExternalReference thunk_ref =
943 ExternalReference(&thunk_fun, thunk_type, masm->isolate()); 940 ExternalReference(&thunk_fun, thunk_type, masm->isolate());
944 941
945 AllowExternalCallThatCantCauseGC scope(masm); 942 AllowExternalCallThatCantCauseGC scope(masm);
946 // CallApiFunctionAndReturn can spill registers inside the exit frame, 943 // CallApiFunctionAndReturn can spill registers inside the exit frame,
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 // - the isolate 1445 // - the isolate
1449 // - the property name 1446 // - the property name
1450 // - the receiver. 1447 // - the receiver.
1451 // 1448 //
1452 // The memory allocated inside the ExitFrame will be freed when we'll leave 1449 // The memory allocated inside the ExitFrame will be freed when we'll leave
1453 // the ExitFrame in CallApiFunctionAndReturn. 1450 // the ExitFrame in CallApiFunctionAndReturn.
1454 const int kStackUnwindSpace = kFastApiCallArguments + 1; 1451 const int kStackUnwindSpace = kFastApiCallArguments + 1;
1455 1452
1456 // Do the API call. 1453 // Do the API call.
1457 Address getter_address = v8::ToCData<Address>(callback->getter()); 1454 Address getter_address = v8::ToCData<Address>(callback->getter());
1458 bool returns_handle = !CallbackTable::ReturnsVoid(isolate(), getter_address); 1455 // TODO(dcarney): fix signatures using returns_handle
1456 const bool returns_handle = false;
1459 1457
1460 ApiFunction fun(getter_address); 1458 ApiFunction fun(getter_address);
1461 ExternalReference::Type type = 1459 ExternalReference::Type type =
1462 returns_handle ? 1460 returns_handle ?
1463 ExternalReference::DIRECT_GETTER_CALL : 1461 ExternalReference::DIRECT_GETTER_CALL :
1464 ExternalReference::DIRECT_GETTER_CALL_NEW; 1462 ExternalReference::DIRECT_GETTER_CALL_NEW;
1465 ExternalReference ref = ExternalReference(&fun, type, isolate()); 1463 ExternalReference ref = ExternalReference(&fun, type, isolate());
1466 1464
1467 Address thunk_address = returns_handle 1465 Address thunk_address = FUNCTION_ADDR(&InvokeAccessorGetterCallback);
1468 ? FUNCTION_ADDR(&InvokeAccessorGetter)
1469 : FUNCTION_ADDR(&InvokeAccessorGetterCallback);
1470 ExternalReference::Type thunk_type = 1466 ExternalReference::Type thunk_type =
1471 returns_handle ? 1467 ExternalReference::PROFILING_GETTER_CALL_NEW;
1472 ExternalReference::PROFILING_GETTER_CALL :
1473 ExternalReference::PROFILING_GETTER_CALL_NEW;
1474 ApiFunction thunk_fun(thunk_address); 1468 ApiFunction thunk_fun(thunk_address);
1475 ExternalReference thunk_ref = 1469 ExternalReference thunk_ref =
1476 ExternalReference(&thunk_fun, thunk_type, isolate()); 1470 ExternalReference(&thunk_fun, thunk_type, isolate());
1477 1471
1478 // TODO(jbramley): I don't know where '5' comes from, but this goes away at 1472 // TODO(jbramley): I don't know where '5' comes from, but this goes away at
1479 // some point. 1473 // some point.
1480 __ CallApiFunctionAndReturn(ref, 1474 __ CallApiFunctionAndReturn(ref,
1481 getter_address, 1475 getter_address,
1482 thunk_ref, 1476 thunk_ref,
1483 x2, 1477 x2,
(...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after
3250 3244
3251 // Miss case, call the runtime. 3245 // Miss case, call the runtime.
3252 __ Bind(&miss_force_generic); 3246 __ Bind(&miss_force_generic);
3253 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric); 3247 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_MissForceGeneric);
3254 } 3248 }
3255 3249
3256 3250
3257 } } // namespace v8::internal 3251 } } // namespace v8::internal
3258 3252
3259 #endif // V8_TARGET_ARCH_A64 3253 #endif // V8_TARGET_ARCH_A64
OLDNEW
« no previous file with comments | « src/a64/simulator-a64.cc ('k') | src/api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698