[vm] Remove dead current_sp from Dart entry.

This was part of an older mechanism that set the checked stack limit based on the SP values we had seen so far. Today we query the exact stack boundaries on all platforms.

TEST=ci
Change-Id: I5692d97b5d4f9104ee9796de7406eb5f050ac276
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/295745
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
Ryan Macnak 2023-04-18 18:31:15 +00:00 committed by Commit Queue
parent c4167766f2
commit b6adf9ff6a
2 changed files with 6 additions and 10 deletions

View file

@ -40,8 +40,7 @@ ObjectPtr DartEntry::InvokeFunction(const Function& function,
class ScopedIsolateStackLimits : public ValueObject {
public:
NO_SANITIZE_SAFE_STACK
explicit ScopedIsolateStackLimits(Thread* thread, uword current_sp)
: thread_(thread) {
explicit ScopedIsolateStackLimits(Thread* thread) : thread_(thread) {
ASSERT(thread != nullptr);
// Save the Thread's current stack limit and adjust the stack limit.
ASSERT(thread->isolate() == Isolate::Current());
@ -113,8 +112,7 @@ typedef uword /*ObjectPtr*/ (*invokestub_bare_instructions)(
ObjectPtr DartEntry::InvokeFunction(const Function& function,
const Array& arguments,
const Array& arguments_descriptor,
uword current_sp) {
const Array& arguments_descriptor) {
#if defined(DART_PRECOMPILER)
if (FLAG_precompiled_mode) {
FATAL("Should never invoke Dart code during AOT compilation");
@ -145,7 +143,7 @@ ObjectPtr DartEntry::InvokeFunction(const Function& function,
ASSERT(function.HasCode());
ScopedIsolateStackLimits stack_limit(thread, current_sp);
ScopedIsolateStackLimits stack_limit(thread);
SuspendLongJumpScope suspend_long_jump_scope(thread);
TransitionToGenerated transition(thread);

View file

@ -210,11 +210,9 @@ class DartEntry : public AllStatic {
// Invokes the specified instance, static, or closure function.
// On success, returns an InstancePtr. On failure, an ErrorPtr.
static ObjectPtr InvokeFunction(
const Function& function,
const Array& arguments,
const Array& arguments_descriptor,
uword current_sp = OSThread::GetCurrentStackPointer());
static ObjectPtr InvokeFunction(const Function& function,
const Array& arguments,
const Array& arguments_descriptor);
// Invokes the first argument in the provided arguments array as a callable
// object, performing any needed dynamic checks if the callable cannot receive