pub struct execcmd_dispatch {
pub precmd_skip: usize,
pub is_builtin: bool,
pub is_shfunc: bool,
pub cflags: u32,
pub use_defpath: bool,
pub has_command_vv: bool,
pub exec_argv0: Option<String>,
pub is_empty_command: bool,
}Expand description
Dispatch decision returned by execcmd_compile_head — the
fusevm-bytecode-time head resolver that mirrors the local-variable
state the C execcmd_exec function carries through c:2913-2916
(is_builtin, is_shfunc, cflags, use_defpath) plus the
precmd-modifier strip count. The fusevm bytecode compiler reads
this to emit the correct dispatch opcode in
src/extensions/compile_zsh.rs::compile_simple.
Not a C struct — invented to bridge the divergence between the C wordcode-walker (which mutates locals + falls through to invocation) and zshrs’s split parse → compile → VM pipeline.
Fields§
§precmd_skip: usizeNumber of BINF_PREFIX words to strip from the head of args.
Src/exec.c:3086 uremnode(preargs, firstnode(preargs)).
is_builtin: boolSet when the head (after strip) is a real builtin
(Src/exec.c:3065 is_builtin = 1).
is_shfunc: boolSet when the head (after strip) is a shell function
(Src/exec.c:3053 is_shfunc = 1).
cflags: u32cflags accumulator from Src/exec.c:2915 — gathers
BINF_BUILTIN | BINF_COMMAND | BINF_EXEC | BINF_DASH | BINF_NOGLOB bits encountered during the precommand-modifier
walk (c:3062 cflags |= hn->flags).
use_defpath: boolcommand -p requested: use the default $PATH for lookup
(Src/exec.c:3160 use_defpath = 1). NOT YET HONORED by the
fusevm compiler — flagged for follow-up.
has_command_vv: boolcommand -v / command -V requested: the dispatch target
flips to bin_whence per Src/exec.c:3149-3157
(hn = &commandbn.node; is_builtin = 1). The fusevm compiler
reads this and emits Op::CallBuiltin(BUILTIN_WHENCE_FROM_COMMAND)
instead of resolving the post-strip head.
exec_argv0: Option<String>exec -a NAME requested: ARGV0 override per Src/exec.c:3214-3240.
Some(NAME) triggers zputenv("ARGV0=NAME") before exec.
is_empty_command: boolEmpty-command branch fired with no redirs (Src/exec.c:3372-3406
— the else arm of if (redir && nonempty(redir))). Covers
bare exec / noglob / command. Caller emits
lastval = cmdoutval (0 when no $(cmd) ran) and returns.
Also fires for the (cflags & BINF_PREFIX) && (cflags & BINF_COMMAND) sub-case at c:3365-3371 (bare command
returns 0 without complaining about missing redirs).
Trait Implementations§
Source§impl Clone for execcmd_dispatch
impl Clone for execcmd_dispatch
Source§fn clone(&self) -> execcmd_dispatch
fn clone(&self) -> execcmd_dispatch
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for execcmd_dispatch
impl Debug for execcmd_dispatch
Source§impl Default for execcmd_dispatch
impl Default for execcmd_dispatch
Source§fn default() -> execcmd_dispatch
fn default() -> execcmd_dispatch
Auto Trait Implementations§
impl Freeze for execcmd_dispatch
impl RefUnwindSafe for execcmd_dispatch
impl Send for execcmd_dispatch
impl Sync for execcmd_dispatch
impl Unpin for execcmd_dispatch
impl UnsafeUnpin for execcmd_dispatch
impl UnwindSafe for execcmd_dispatch
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
T, using the provided data to resolve any offsets.