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

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

Issue 1902373002: [builtins] Introduce a proper BUILTIN frame type. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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
« src/frames.cc ('K') | « src/frames-inl.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 34dd73c33159338813c3f3a942430826e60d38e0..984834b738899e97ef3324a0937c2b4adfbeda33 100644
--- a/src/ia32/builtins-ia32.cc
+++ b/src/ia32/builtins-ia32.cc
@@ -1553,6 +1553,8 @@ void Builtins::Generate_ArrayCode(MacroAssembler* masm) {
void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
// ----------- S t a t e -------------
// -- eax : number of arguments
+ // -- edi : function
+ // -- esi : context
// -- esp[0] : return address
// -- esp[(argc - n) * 8] : arg[n] (zero-based)
// -- esp[(argc + 1) * 8] : receiver
@@ -1588,7 +1590,11 @@ void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
Heap::kHeapNumberMapRootIndex, &convert_number);
{
// Parameter is not a Number, use the ToNumberStub to convert it.
- FrameScope scope(masm, StackFrame::INTERNAL);
+ FrameScope scope(masm, StackFrame::MANUAL);
+ __ Push(ebp);
+ __ Move(ebp, esp);
+ __ Push(esi);
+ __ Push(edi);
__ SmiTag(eax);
__ SmiTag(ecx);
__ Push(eax);
@@ -1601,6 +1607,8 @@ void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
__ Pop(edx);
__ Pop(ecx);
__ Pop(eax);
+ __ Pop(edi);
+ __ Pop(esi);
{
// Restore the double accumulator value (xmm0).
Label restore_smi, done_restore;
@@ -1615,6 +1623,7 @@ void Builtins::Generate_MathMaxMin(MacroAssembler* masm, MathMaxMinKind kind) {
}
__ SmiUntag(ecx);
__ SmiUntag(eax);
+ __ leave();
}
__ jmp(&convert);
__ bind(&convert_number);
« src/frames.cc ('K') | « src/frames-inl.h ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698