Expand description
Result Type FFI Functions for JIT
Functions for creating and manipulating Result types (Ok/Err) in JIT-compiled code.
Functionsยง
- jit_
is_ err - Check if a value is Err (returns TAG_BOOL_TRUE or TAG_BOOL_FALSE)
- jit_
is_ none - Check if a value is None (returns TAG_BOOL_TRUE or TAG_BOOL_FALSE)
- jit_
is_ ok - Check if a value is Ok (returns TAG_BOOL_TRUE or TAG_BOOL_FALSE)
- jit_
is_ result - Check if a value is any Result type (Ok or Err)
- jit_
is_ some - Check if a value is Some (returns TAG_BOOL_TRUE or TAG_BOOL_FALSE)
- jit_
make_ err - Create an Err result wrapping the inner value
- jit_
make_ ok - Create an Ok result wrapping the inner value
- jit_
make_ some - Create a Some value wrapping the inner value
- jit_
result_ inner - Map over Ok value - if Ok, applies function and returns new Ok This is a simplified version that just returns the inner value for now (full map support would require function call machinery)
- jit_
unwrap_ err - Unwrap an Err value, returning the inner value If not Err, returns TAG_NULL
- jit_
unwrap_ ok - Unwrap an Ok value, returning the inner value If not Ok, returns TAG_NULL
- jit_
unwrap_ or - Unwrap Ok or return default value If Ok, returns the inner value; otherwise returns the default
- jit_
unwrap_ some - Unwrap a Some value, returning the inner value If not Some, returns TAG_NULL