Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
address review: check datastack space for extra_bytes, require CO_OPT…
…IMIZED in vectorcall fast path
  • Loading branch information
youknowone committed Mar 10, 2026
commit aa9f5a8150c6e9590a73588268e24b7c0f10609c
2 changes: 0 additions & 2 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@
"dedentations",
"dedents",
"deduped",
"compactlong",
"compactlongs",
"deoptimize",
"descrs",
"downcastable",
Expand Down
1 change: 1 addition & 0 deletions crates/vm/src/builtins/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1374,6 +1374,7 @@ pub(crate) fn vectorcall_function(

let has_kwargs = kwnames.is_some_and(|kw| !kw.is_empty());
let is_simple = !has_kwargs
&& code.flags.contains(bytecode::CodeFlags::OPTIMIZED)
&& !code.flags.contains(bytecode::CodeFlags::VARARGS)
&& !code.flags.contains(bytecode::CodeFlags::VARKEYWORDS)
&& code.kwonlyarg_count == 0
Expand Down
4 changes: 3 additions & 1 deletion crates/vm/src/frame.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
// spell-checker: ignore compactlong compactlongs

use crate::anystr::AnyStr;
#[cfg(feature = "flame")]
use crate::bytecode::InstructionMetadata;
Expand Down Expand Up @@ -8747,7 +8749,7 @@ impl ExecutingFrame<'_> {
Some(frame_size) => frame_size
.checked_add(extra_bytes)
.is_some_and(|size| vm.datastack_has_space(size)),
None => true,
None => extra_bytes == 0 || vm.datastack_has_space(extra_bytes),
}
}

Expand Down