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

Unified Diff: src/arm64/code-stubs-arm64.cc

Issue 2841913003: [WIP] Initial CallFunctionCallback builtin.
Patch Set: Fix wrong register for arm64. Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm64/code-stubs-arm64.cc
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc
index c3c3367b10937d9b8223f8db099d81300733c8ac..8769f0079daf9e19db3ce4050b868df518f3fada 100644
--- a/src/arm64/code-stubs-arm64.cc
+++ b/src/arm64/code-stubs-arm64.cc
@@ -2828,11 +2828,6 @@ void InternalArrayConstructorStub::Generate(MacroAssembler* masm) {
static const int kCallApiFunctionSpillSpace = 4;
-static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
- return static_cast<int>(ref0.address() - ref1.address());
-}
-
-
// Calls an API function. Allocates HandleScope, extracts returned value
// from handle and propagates exceptions.
// 'stack_space' is the space to be unwound on exit (includes the call JS
@@ -2962,6 +2957,9 @@ static void CallApiFunctionAndReturn(
__ JumpIfNotRoot(x5, Heap::kTheHoleValueRootIndex,
&promote_scheduled_exception);
+ // Check if the function returned a valid JavaScript value.
+ __ AssertApiCallResult(x0);
+
if (stack_space_operand != NULL) {
__ Drop(x2, 1);
} else {
@@ -3039,6 +3037,12 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
// return value, return value default, isolate, holder.
__ Push(call_data, call_data, isolate_reg, holder);
+ if (!is_store()) {
+ __ Mov(x0, argc());
+ __ Jump(masm->isolate()->builtins()->CallFunctionCallback(),
+ RelocInfo::CODE_TARGET);
+ }
+
// Prepare arguments.
Register args = x6;
__ Mov(args, masm->StackPointer());
« no previous file with comments | « src/arm/macro-assembler-arm.cc ('k') | src/arm64/macro-assembler-arm64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698