Index: src/ia32/builtins-ia32.cc |
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc |
index 5cbecc22bafd2aa8099bb8ab2a4e08da8a056bdf..6a80ddd23d68b8714f316b110b638981626457de 100644 |
--- a/src/ia32/builtins-ia32.cc |
+++ b/src/ia32/builtins-ia32.cc |
@@ -117,10 +117,9 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
{ |
FrameScope scope(masm, StackFrame::CONSTRUCT); |
- if (create_memento) { |
- __ AssertUndefinedOrAllocationSite(ebx); |
- __ push(ebx); |
- } |
+ // Always push a potential allocation site to preserve a fixed frame size. |
Michael Starzinger
2015/07/16 14:08:28
nit: Ideally this behavior will become the default
Michael Lippautz
2015/07/16 14:15:35
Done.
|
+ __ AssertUndefinedOrAllocationSite(ebx); |
+ __ push(ebx); |
// Preserve the incoming parameters on the stack. |
__ SmiTag(eax); |
@@ -254,7 +253,8 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm, |
__ mov(Operand(esi, AllocationMemento::kMapOffset), |
factory->allocation_memento_map()); |
// Get the cell or undefined. |
- __ mov(edx, Operand(esp, kPointerSize*2)); |
+ __ mov(edx, Operand(esp, 3 * kPointerSize)); |
Michael Starzinger
2015/07/16 14:08:28
Nice catch!
Michael Lippautz
2015/07/16 14:15:35
Acknowledged.
|
+ __ AssertUndefinedOrAllocationSite(edx); |
__ mov(Operand(esi, AllocationMemento::kAllocationSiteOffset), |
edx); |
} else { |
@@ -422,12 +422,13 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) { |
// -- edx: original constructor |
// ----------------------------------- |
- // TODO(dslomov): support pretenuring |
- CHECK(!FLAG_pretenuring_call_new); |
- |
{ |
FrameScope frame_scope(masm, StackFrame::CONSTRUCT); |
+ // Always push a potential allocation site to preserve a fixed frame size. |
Michael Starzinger
2015/07/16 14:08:28
Likewise.
Michael Lippautz
2015/07/16 14:15:35
Done.
|
+ __ AssertUndefinedOrAllocationSite(ebx); |
+ __ push(ebx); |
+ |
// Preserve actual arguments count. |
__ SmiTag(eax); |
__ push(eax); |