[ia32][builtins] Defer throw in InterpreterEntryTrampoline
Port of https://chromium-review.googlesource.com/c/v8/v8/+/1825222 Bug: v8:9771 Change-Id: I5915cc3001350bde0ee5f4f935dbd849048803b6 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1847357 Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Reviewed-by: Dan Elphick <delphick@chromium.org> Cr-Commit-Position: refs/heads/master@{#64179}
This commit is contained in:
parent
fabfa417b4
commit
6396199878
@ -1019,6 +1019,7 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
|||||||
__ push(Immediate(Smi::FromInt(BytecodeArray::kHeaderSize - kHeapObjectTag)));
|
__ push(Immediate(Smi::FromInt(BytecodeArray::kHeaderSize - kHeapObjectTag)));
|
||||||
|
|
||||||
// Allocate the local and temporary register file on the stack.
|
// Allocate the local and temporary register file on the stack.
|
||||||
|
Label stack_overflow;
|
||||||
{
|
{
|
||||||
// Load frame size from the BytecodeArray object.
|
// Load frame size from the BytecodeArray object.
|
||||||
Register frame_size = ecx;
|
Register frame_size = ecx;
|
||||||
@ -1026,13 +1027,10 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
|||||||
BytecodeArray::kFrameSizeOffset));
|
BytecodeArray::kFrameSizeOffset));
|
||||||
|
|
||||||
// Do a stack check to ensure we don't go over the limit.
|
// Do a stack check to ensure we don't go over the limit.
|
||||||
Label ok;
|
|
||||||
__ mov(eax, esp);
|
__ mov(eax, esp);
|
||||||
__ sub(eax, frame_size);
|
__ sub(eax, frame_size);
|
||||||
__ CompareRealStackLimit(eax);
|
__ CompareRealStackLimit(eax);
|
||||||
__ j(above_equal, &ok);
|
__ j(below, &stack_overflow);
|
||||||
__ CallRuntime(Runtime::kThrowStackOverflow);
|
|
||||||
__ bind(&ok);
|
|
||||||
|
|
||||||
// If ok, push undefined as the initial value for all register file entries.
|
// If ok, push undefined as the initial value for all register file entries.
|
||||||
Label loop_header;
|
Label loop_header;
|
||||||
@ -1118,6 +1116,9 @@ void Builtins::Generate_InterpreterEntryTrampoline(MacroAssembler* masm) {
|
|||||||
|
|
||||||
__ bind(&compile_lazy);
|
__ bind(&compile_lazy);
|
||||||
GenerateTailCallToReturnedCode(masm, Runtime::kCompileLazy);
|
GenerateTailCallToReturnedCode(masm, Runtime::kCompileLazy);
|
||||||
|
|
||||||
|
__ bind(&stack_overflow);
|
||||||
|
__ CallRuntime(Runtime::kThrowStackOverflow);
|
||||||
__ int3(); // Should not return.
|
__ int3(); // Should not return.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user