Module jit

Module jit 

Source

Structs§

ExternFnSig
Extern function signature info for FFI
JitCompiler
JIT Compiler for Sigil
SigilValue
Runtime value representation

Functions§

sigil_abs
sigil_ackermann
Iterative Ackermann function using explicit stack Much faster than recursive version - no stack overflow, O(result) space
sigil_add
sigil_array_add
Element-wise add two arrays into a new array (SIMD-friendly)
sigil_array_choice
Get random element of array (χ morpheme)
sigil_array_dot
Dot product of two arrays (SIMD-friendly)
sigil_array_fill
Fill array with a value (SIMD-friendly)
sigil_array_first
Get first element of array (α morpheme)
sigil_array_get
sigil_array_last
Get last element of array (ω morpheme)
sigil_array_len
sigil_array_max
Find maximum value in array (SIMD-friendly)
sigil_array_middle
Get middle element of array (μ morpheme)
sigil_array_min
Find minimum value in array (SIMD-friendly)
sigil_array_mul
Element-wise multiply two arrays into a new array (SIMD-friendly)
sigil_array_new
sigil_array_next
Get next element (iterator advance) - currently returns first element (ξ morpheme)
sigil_array_nth
Get nth element of array (ν morpheme) - same as sigil_array_get but clearer semantics
sigil_array_offset
Add a scalar to all elements (in-place, SIMD-friendly)
sigil_array_product
Product of all elements in array (Π morpheme)
sigil_array_push
sigil_array_scale
Multiply all elements by a scalar (in-place, SIMD-friendly)
sigil_array_set
sigil_array_sort
Sort array in ascending order (σ morpheme) - returns new sorted array
sigil_array_sum
Sum all elements in an array using SIMD-friendly loop
sigil_ceil
sigil_cos
sigil_div
sigil_exp
sigil_floor
sigil_ge
sigil_gpu_filter
GPU filter operation with parallel stream compaction Uses scan-based compaction algorithm
sigil_gpu_map
GPU map operation - would compile to WGSL/SPIR-V compute shader Shader structure:
sigil_gpu_reduce
GPU reduce operation - uses tree reduction in shared memory Achieves O(log n) parallel steps
sigil_gt
sigil_le
sigil_ln
sigil_lt
sigil_memo_free
Free a memoization cache
sigil_memo_get_1
Lookup a single-argument function result in cache Returns the cached value, or MEMO_NOT_FOUND if not found
sigil_memo_get_2
Lookup a two-argument function result in cache
sigil_memo_new
Create a new memoization cache
sigil_memo_set_1
Store a single-argument function result in cache
sigil_memo_set_2
Store a two-argument function result in cache
sigil_mul
sigil_now
sigil_parallel_filter
Parallel filter operation - filters elements in parallel Uses parallel predicate evaluation with stream compaction
sigil_parallel_map
Parallel map operation - applies a transformation in parallel across array elements For now, returns the array unchanged as full closure parallelization requires more complex infrastructure. In production, this would:
sigil_parallel_reduce
Parallel reduce operation - tree reduction for associative operations Achieves O(log n) depth with O(n) work
sigil_pow
sigil_print
sigil_print_float
sigil_print_int
sigil_print_str
sigil_simd_add
SIMD add - uses AVX when available
sigil_simd_cross
SIMD cross product (3D, ignores w component)
sigil_simd_div
SIMD divide
sigil_simd_dot
SIMD dot product (returns scalar) - optimized for auto-vectorization
sigil_simd_extract
Extract element from SIMD vector
sigil_simd_free
Free SIMD vector (for memory management)
sigil_simd_hadd
SIMD horizontal add (sum all lanes)
sigil_simd_length
SIMD length - uses FMA for length calculation
sigil_simd_length_sq
SIMD length squared - uses FMA for better performance
sigil_simd_max
SIMD max - element-wise maximum
sigil_simd_min
SIMD min - element-wise minimum
sigil_simd_mul
SIMD multiply
sigil_simd_new
Create a new Vec4 SIMD vector
sigil_simd_normalize
SIMD normalize - fast reciprocal sqrt pattern
sigil_simd_splat
Create Vec4 by splatting a scalar to all lanes
sigil_simd_sub
SIMD subtract
sigil_sin
sigil_sqrt
sigil_sub
sigil_tak
Iterative Tak (Takeuchi) function using explicit stack