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

Unified Diff: src/mips/code-stubs-mips.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/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/code-stubs-mips.cc
diff --git a/src/mips/code-stubs-mips.cc b/src/mips/code-stubs-mips.cc
index 0fcdafca21d8321b86f5dd248382c71c63b31fa4..232e3605697758108c6f089edd616b19efc52ca1 100644
--- a/src/mips/code-stubs-mips.cc
+++ b/src/mips/code-stubs-mips.cc
@@ -2795,11 +2795,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
@@ -2911,6 +2906,9 @@ static void CallApiFunctionAndReturn(
__ lw(t1, MemOperand(at));
__ Branch(&promote_scheduled_exception, ne, t0, Operand(t1));
+ // Check if the function returned a valid JavaScript value.
+ __ AssertApiCallResult(v0);
+
__ Ret();
// Re-throw by promoting a scheduled exception.
@@ -2980,6 +2978,12 @@ void CallApiCallbackStub::Generate(MacroAssembler* masm) {
// Push isolate and holder.
__ Push(scratch, holder);
+ if (!is_store()) {
+ __ li(a0, Operand(argc()));
+ __ Jump(masm->isolate()->builtins()->CallFunctionCallback(),
+ RelocInfo::CODE_TARGET);
+ }
+
// Prepare arguments.
__ mov(scratch, sp);
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698