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

Unified Diff: src/arm/code-stubs-arm.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 | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/code-stubs-arm.cc
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc
index fc59f4007e1589f75e219534a55db84a1eb6f8af..6b0298941068bf4a982f6d65f8055e2b98b1860c 100644
--- a/src/arm/code-stubs-arm.cc
+++ b/src/arm/code-stubs-arm.cc
@@ -2613,11 +2613,6 @@ void InternalArrayConstructorStub::Generate(MacroAssembler* masm) {
GenerateCase(masm, FAST_ELEMENTS);
}
-static int AddressOffset(ExternalReference ref0, ExternalReference ref1) {
- return ref0.address() - ref1.address();
-}
-
-
// Calls an API function. Allocates HandleScope, extracts returned value
// from handle and propagates exceptions. Restores context. stack_space
// - space to be unwound on exit (includes the call JS arguments space and
@@ -2732,6 +2727,9 @@ static void CallApiFunctionAndReturn(MacroAssembler* masm,
__ cmp(r4, r5);
__ b(ne, &promote_scheduled_exception);
+ // Check if the function returned a valid JavaScript value.
+ __ AssertApiCallResult(r0);
+
__ mov(pc, lr);
// Re-throw by promoting a scheduled exception.
@@ -2810,6 +2808,12 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
// holder
__ push(holder);
+ if (!is_store()) {
+ __ mov(r0, Operand(argc()));
+ __ Jump(masm->isolate()->builtins()->CallFunctionCallback(),
+ RelocInfo::CODE_TARGET);
+ }
+
// Prepare arguments.
__ mov(scratch, sp);
« no previous file with comments | « no previous file | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698