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

Unified Diff: src/ia32/builtins-ia32.cc

Issue 2106883003: [builtins] Add receiver to builtin exit frames (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments Created 4 years, 6 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/heap-symbols.h ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/builtins-ia32.cc
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc
index cf507c435c3717dae4c279b9571be17cbe5e3f40..203affdcd0ecd7c6036105b6c2a9ce2d5e9cd4d9 100644
--- a/src/ia32/builtins-ia32.cc
+++ b/src/ia32/builtins-ia32.cc
@@ -36,17 +36,20 @@ void Builtins::Generate_Adaptor(MacroAssembler* masm, CFunctionId id,
// ordinary functions).
__ mov(esi, FieldOperand(edi, JSFunction::kContextOffset));
+ // JumpToExternalReference expects eax to contain the number of arguments
+ // including the receiver and the extra arguments.
+ const int num_extra_args = 3;
+ __ add(eax, Immediate(num_extra_args + 1));
+
// Insert extra arguments.
- const int num_extra_args = 2;
__ PopReturnAddressTo(ecx);
+ __ SmiTag(eax);
+ __ Push(eax);
+ __ SmiUntag(eax);
__ Push(edi);
__ Push(edx);
__ PushReturnAddressFrom(ecx);
- // JumpToExternalReference expects eax to contain the number of arguments
- // including the receiver and the extra arguments.
- __ add(eax, Immediate(num_extra_args + 1));
-
__ JumpToExternalReference(ExternalReference(id, masm->isolate()),
exit_frame_type == BUILTIN_EXIT);
}
« no previous file with comments | « src/heap-symbols.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698