af62c4f0e5
Adapted from https://crrev.com/c/3862264. Add a new teardown trampoline for the case where a Sparkplug function is deoptimized during its function entry stack check. In these cases, the stack is in an incomplete setup state, so instead of forwarding to interpreter re-entry, we undo the partial stack setup and forward to the standard interpreter entry. R=leszeks@chromium.org Bug: chromium:1246907, chromium:1357554 Change-Id: I0795b20cdc60d3ba28bc32cd55bdf82d72f83aac Also-by: leszeks@chromium.org Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3865144 Commit-Queue: Simon Zünd <szuend@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Cr-Commit-Position: refs/heads/main@{#82811}
21 lines
483 B
JavaScript
21 lines
483 B
JavaScript
// Copyright 2022 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --always-sparkplug
|
|
|
|
var Debug = debug.Debug;
|
|
|
|
Debug.setListener(function (event, exec_state, event_data, data) {
|
|
if (event == Debug.DebugEvent.Break) {
|
|
Debug.setListener(null);
|
|
Debug.stepInto();
|
|
}
|
|
});
|
|
|
|
%ScheduleBreak();
|
|
(function foo() {
|
|
const x = 5;
|
|
() => x; // context-allocate x.
|
|
})();
|