Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
315 commits
Select commit Hold shift + click to select a range
ce7dd07
fix(abi): flatten struct parameters in C runtime to fix Windows x64 c…
vbxq Feb 26, 2026
f23e8f7
tests: winx64 regression tests (ABI)
vbxq Feb 26, 2026
d08bf49
fix(codegen): explicitly align sret_slot allocas for struct returns
vbxq Feb 26, 2026
8a7bc2d
fix(codegen): reject struct params/returns on extern C function decla…
vbxq Feb 26, 2026
0f0917a
fix(codegen): set module data layout early in CodegenContext::new()
vbxq Feb 26, 2026
8778824
fix(air): dispatch multi-instantiation generics to correct monomorphi…
vbxq Feb 26, 2026
2dcf2bd
fix(air): encode full FnPtr signature in monomorphization key
vbxq Feb 26, 2026
42df651
chore: cargo fmt
vbxq Feb 26, 2026
e5c15d3
fix(codegen): use unsigned LLVM instructions for unsigned integer ops…
vbxq Feb 26, 2026
8cec8db
fix(codegen): LLVM intrinsics for unsigned int/float casts
vbxq Feb 26, 2026
fec0ac7
fix(core): panic on allocation failure in __aelys_alloc and __aelys_r…
vbxq Feb 26, 2026
dd6af52
fix(lambdas): emit fnref instead of null for lambas values in AIR
vbxq Feb 26, 2026
5751a6e
fix(air): use alloca for locals written from multiple basic blocks
vbxq Feb 26, 2026
aa3aeba
critical(air): replace post-lowering block ID rename with pre-lowerin…
vbxq Feb 26, 2026
23b2ef9
fix(air): match for-loop default step literal to iterator type
vbxq Feb 26, 2026
00eda5b
fix(codegen): lower AirConst::Undef to LLVM undef instead of zero
vbxq Feb 26, 2026
27f4d25
fix(mono): mangle StructInit name from all type args at once
vbxq Feb 26, 2026
b5d6b3c
chore: cargo format
vbxq Feb 26, 2026
d3244b1
fix(air): reduce potential types collision
vbxq Feb 26, 2026
5803d59
comments
vbxq Feb 26, 2026
bc45b09
c.r.i.t.i.c.a.l : patch caller local types during monomorphization
vbxq Feb 26, 2026
053ae1f
refactor(air): there was god objects, split up the crate in separate …
vbxq Feb 26, 2026
f85ce35
feat(sema): implicit numeric widening at function call sites
vbxq Feb 26, 2026
b386124
refactor(codegen): split up/eliminate sret duplication/fix module bou…
vbxq Feb 26, 2026
ffdf624
tests: move codegen/tests/* to aelys/tests/*
vbxq Feb 26, 2026
8ccb980
fix(codegen): force alloca for locals assigned in multiple blocks
vbxq Feb 26, 2026
c54103f
tests(codegen): phi alloca blocks tests
vbxq Feb 26, 2026
210c593
feat(codegen): generic sret handling for C-convention struct returns
vbxq Feb 26, 2026
82e1c5b
test(codegen): add sret ABI verification tests
vbxq Feb 26, 2026
1a8fd38
fix(codegen): add noreturn attribute to __aelys_panic
vbxq Feb 26, 2026
aa02a1a
codegen: enforce AIR offsets as source of truth
vbxq Feb 26, 2026
3ee3848
refactor(air): simplify last_block_is_terminated logic
vbxq Feb 26, 2026
754d987
fix(air): seal loop exit blocks when they are pending at function end
vbxq Feb 26, 2026
ef13ce6
feat(syntax): add `str` as alias to string
vbxq Feb 26, 2026
c5d5cfe
feat(sema): f32 narrowing with proper validation
vbxq Feb 26, 2026
dee7a4c
legal: add NOTICE file
vbxq Feb 27, 2026
ef8475a
dynamic LLVM optimization levels (-O0/O1/O2/O3)
vbxq Feb 27, 2026
3bc2bd3
feat(syntax): add ArraySized fill_value and [T; N] type annotation
vbxq Feb 28, 2026
1957c1d
feat(parser): support [val; N] fill syntax and [T; N] type annotations
vbxq Feb 28, 2026
1960dc4
feat(sema): track compile-time array lengths in type system
vbxq Feb 28, 2026
0635483
refactor(opt): handle fill_value field in all optimization passes
vbxq Feb 28, 2026
bf66d01
feat(air): lower fixed-size arrays to stack alloca+stores
vbxq Feb 28, 2026
c701614
tests: add array syntax tests, update codegen and sema tests
vbxq Feb 28, 2026
8038317
chore: cargo fmt
vbxq Feb 28, 2026
e01ed4d
chore: v0.21.8-a, pure llvm array update
vbxq Feb 28, 2026
af418da
delete old Array<T> VM constructors
vbxq Feb 28, 2026
dc77023
feat(sema): dozens of critical bug fixed, adversarial hardening
vbxq Mar 1, 2026
7076525
feat(air): add validation pass, replace panics with errors
vbxq Mar 2, 2026
a715085
tests: AIR validation pass
vbxq Mar 2, 2026
06e4766
fix(sema): locals override captures in for_closure()
vbxq Mar 2, 2026
ae2ab73
tests(sema): closure regression tests
vbxq Mar 2, 2026
72fae3a
fix(sema): prevent narrowing from corrupting non-literal operand types
vbxq Mar 2, 2026
5ad651a
tests(sema): narrowing stress tests
vbxq Mar 2, 2026
f10dd76
fix(sema): always push constraint after narrowing
vbxq Mar 2, 2026
5e4ddf8
fix(sema): rollback substitution on failed unification
vbxq Mar 2, 2026
6ad8b0b
tests(sema): rollback substitution tests
vbxq Mar 2, 2026
eaa7802
fix(sema): rollback substitution part 2
vbxq Mar 2, 2026
0762d18
tests(sema): limit force_dynamic to top-level type variables
vbxq Mar 2, 2026
6e868be
feat(air): replace dynamic->i64 with opaque type
vbxq Mar 2, 2026
c6a979a
null lowered to ptr(void), tuple/range produce opaque && replace dyna…
vbxq Mar 2, 2026
130b48b
Merge remote-tracking branch 'origin/feat/llvm' into feat/llvm
vbxq Mar 2, 2026
994b522
fix(sema): apply substitution to VecLiteral.element_type
vbxq Mar 2, 2026
fc9dab0
tests(sema): VecLiteral.element_type tests
vbxq Mar 2, 2026
e129ab6
fix(sema): member access and for-each on unresolved var return fresh var
vbxq Mar 2, 2026
99cbaa7
fix(sema): stop collecting function signatures from inside if/while/for
vbxq Mar 2, 2026
2e66d7f
tests(sema): sema regression scope tests
vbxq Mar 2, 2026
f047698
fix(sema): push/pop scope around if/else branches
vbxq Mar 2, 2026
b222b94
this should be in aelys/tests but i'll do that later
vbxq Mar 2, 2026
457f820
fix(sema): report all errors, positive type param filter
vbxq Mar 2, 2026
ca13583
tests(sema): sema err tests + fatal error filter tests
vbxq Mar 2, 2026
d0a40fb
fix(sema): cycle detection in substitution, reject index-assign on no…
vbxq Mar 2, 2026
30f17ff
tests: regression tests for OneOf constraint improvements.
vbxq Mar 2, 2026
66997e3
chore: remove dead code
vbxq Mar 2, 2026
e9b5581
there's no .cpp stuff so why does github says there is
vbxq Mar 2, 2026
2e20066
fix(sema): identifier lookup undefined
vbxq Mar 2, 2026
6991df8
fix(sema): narrowing wassn't operating on resolved Var
vbxq Mar 2, 2026
e2c78c4
tests(sema): regression tests for narrowing
vbxq Mar 2, 2026
79204e0
fix(sema): if/else always created a frehsh Var, preventing narrowing
vbxq Mar 2, 2026
d8db9e8
fix(sema): atomic subst replacement instead of merge-by-key
vbxq Mar 2, 2026
41e96c4
tests(sema): more sema tests
vbxq Mar 2, 2026
589df42
fix(sema): bin-op overflow weren't detected if operand was not narrow…
vbxq Mar 2, 2026
d87a5a3
sema: use self.report error instead of panic
vbxq Mar 3, 2026
9a526fe
fix(sema): error filter type param, false positive if the struct shar…
vbxq Mar 3, 2026
7c416ce
fix(sema): non-existant types in struct fields are now rejected even …
vbxq Mar 3, 2026
aa03153
tests(sema): regression tests
vbxq Mar 3, 2026
9d0841d
this should never happen
vbxq Mar 3, 2026
5f775a6
fix(sema): mutability wasn't scope aware
vbxq Mar 3, 2026
4b09c87
fix(sema): isolation of `literal_init_vars` per scope/fonction/lambda…
vbxq Mar 3, 2026
2c48db3
fix(sema): now vec<T>[...] verifies types
vbxq Mar 3, 2026
cea5dc5
tests(sema): bug fixes tests
vbxq Mar 3, 2026
b4b32a0
compiler shouldn't panic if AIR lowering has an error
vbxq Mar 3, 2026
d395ece
fix(sema): mutability of capture with lexical shadowing
vbxq Mar 3, 2026
9009ec5
fix(sema): unknown struct in literal rejected
vbxq Mar 3, 2026
f1f3689
fix(sema): function signature leak from blocks
vbxq Mar 3, 2026
a638315
tests: more sema tests
vbxq Mar 3, 2026
4c60522
test(sema): add regressions for var-index, var-cast, var-foreach, and…
vbxq Mar 4, 2026
93e95ee
fix(sema): major bugs fix, read description for details
vbxq Mar 4, 2026
658a208
sema: block generic type-param escapes in member/call returns
vbxq Mar 4, 2026
77a53ed
sema/air: avoid backend type-param leaks from generic structs
vbxq Mar 4, 2026
c707eca
sema: reject string index assignment before backend
vbxq Mar 4, 2026
6b00d4b
sema: reject unsupported slice/range expressions early
vbxq Mar 4, 2026
c2ca5c2
sema: restore generic struct literal acceptance in inference
vbxq Mar 4, 2026
a55a688
sema: make generic mismatch errors fatal in full pipeline
vbxq Mar 4, 2026
c51c803
sema: harden member access typing for vars and generics
vbxq Mar 4, 2026
3fff933
sema: narrow non-fatal generic annotation mismatch filtering
vbxq Mar 4, 2026
3c3f2fd
sema: reject casts from unconstrained generic type params
vbxq Mar 5, 2026
4bb3861
sema: reject calls on unconstrained generic type params
vbxq Mar 5, 2026
7fdafd0
NFC: formatting
vbxq Mar 5, 2026
9675921
air: lower function values as fn pointers and fn refs
vbxq Mar 5, 2026
443eb6e
sema: reject lambdas using active generic type params
vbxq Mar 5, 2026
f3e0683
sema: type bootstrap print builtins as null-returning functions
vbxq Mar 5, 2026
3c7f843
sema: fix expected/found ordering for return constraints
vbxq Mar 5, 2026
b3e7f46
driver: preserve sema diagnostics through llvm compile path
vbxq Mar 5, 2026
87e584e
sema: honor guaranteed return in constant non-empty for loops
vbxq Mar 5, 2026
342cc87
diagnostics: sort and dedupe sema errors with structured notes
vbxq Mar 5, 2026
884a810
diagnostics: unify compile/runtime/warning rendering with structured …
vbxq Mar 5, 2026
9d2eb11
cli: surface warnings and enforce -Werror with category filtering
vbxq Mar 5, 2026
39a84fa
NFC: clean up legacy vm scripts + readme
vbxq Mar 5, 2026
68dad72
the definitive rustc-style error rendering
vbxq Mar 5, 2026
5871710
NFC: reduce duplication in binary.rs
vbxq Mar 5, 2026
6b80a71
NFC: cargo fmt
vbxq Mar 5, 2026
8827cbb
feat(air): add enum IR nodes and lower basic enum construction
vbxq Mar 10, 2026
31a6ce3
feat(codegen): generate LLVM IR for basic enum construction
vbxq Mar 10, 2026
5d4c34b
feat(syntax): add enum declarations and data variant AST nodes
vbxq Mar 10, 2026
b67e8e2
feat(frontend): parse enum declarations, data variants, and construct…
vbxq Mar 10, 2026
45c7ec2
feat(sema): type-check enum declarations and data variant construction
vbxq Mar 10, 2026
0d0e791
feat(air,codegen): tagged union layout and codegen for data variants
vbxq Mar 10, 2026
4c1c336
fix(air): account for alignment padding in enum payload size computation
vbxq Mar 10, 2026
fa6c8bd
feat(sema,frontend): parse and type-check match expressions
vbxq Mar 10, 2026
744ec2a
feat(air,codegen): lower match expressions to Switch + EnumTag/EnumPa…
vbxq Mar 10, 2026
7f29868
tests(sema,air): generic enum instantiation, monomorphization, and Op…
vbxq Mar 10, 2026
eb14d55
fix(air): handle unit variant monomorphization with multiple enum ins…
vbxq Mar 10, 2026
24f8c71
fix(codegen,air,sema): enum println support, mono partial resolution,…
vbxq Mar 10, 2026
4f21df9
fix(sema,air,codegen): enum types in struct fields + struct types in …
vbxq Mar 10, 2026
b0d1187
fix(sema): call return type + enum types in function type annotations
vbxq Mar 10, 2026
e02e5d3
fix(parser,air): >> splitting in type annotations + enum layout + mon…
vbxq Mar 10, 2026
4d94264
feat(parser): block expressions as first-class values
vbxq Mar 10, 2026
99506b9
fix: nested generic enum monomorphization (3 bugs)
vbxq Mar 10, 2026
1d62ae6
fix(sema): if-else branches with same enum name but different type vars
vbxq Mar 10, 2026
abf4bd7
fix: nested generic enum type param substitution (3 bugs)
vbxq Mar 10, 2026
ea7a173
fix(opt): recurse into EnumVariant args in all optimizer passes
vbxq Mar 10, 2026
94b00e4
fix: monomorphize EnumTag/EnumPayload names + finalize EnumDecl types
vbxq Mar 10, 2026
4cda151
fix(sema): apply substitution to EnumDecl variant payload types
vbxq Mar 10, 2026
9dd1d16
fix(sema): has_vars() now checks enum type arguments
vbxq Mar 10, 2026
397a25f
fix: compute enum layouts before structs + declare enum LLVM types first
vbxq Mar 10, 2026
7c3b456
fix(sema): reject comparison on data enums at type-check time
vbxq Mar 10, 2026
0358fca
fix(sema): resolve enum types inside array/vec type annotations
vbxq Mar 10, 2026
f48cac6
fix(sema): require type annotation for generic enum unit variants
vbxq Mar 10, 2026
01d991c
fix(codegen): cap enum payload store/load alignment to 4
vbxq Mar 10, 2026
bc01299
fix(globals): lower file-scope lets without closure env
vbxq Mar 10, 2026
1b8aa68
fix(globals): allow simple enum const initializers
vbxq Mar 10, 2026
84c85a0
fix(globals): allow data enum unit initializers
vbxq Mar 10, 2026
2793184
fix(codegen): honor sret for indirect C fnptr returns
vbxq Mar 10, 2026
1d94d70
fix(codegen): map fnref names to backend symbols
vbxq Mar 10, 2026
4fa50a9
fix(mono): harden enum resolution for fnptr ABI
vbxq Mar 10, 2026
f9d8ae5
fix(globals): allow fnptr constant initializers
vbxq Mar 10, 2026
fc75b8b
fix(lower): call fnptr struct fields indirectly
vbxq Mar 11, 2026
e559ec3
fix(lower): fold fnptr global aliases to symbols
vbxq Mar 11, 2026
0f53c51
fix(lower): clone constant global enum aliases
vbxq Mar 11, 2026
d1224df
fix(globals): allow data enum payload const initializers
vbxq Mar 11, 2026
0683b76
fix(driver): make emit-llvm-ir skip linking
vbxq Mar 11, 2026
5b898fe
fix(lower): reject unsupported global enum payload constants
vbxq Mar 11, 2026
6aabb00
fix(codegen): mark indirect sret callsites explicitly
vbxq Mar 11, 2026
f588ee4
fix(codegen): reject by-value aggregates on C functions
vbxq Mar 11, 2026
3df28b9
fix(lower): handle void-typed match/if-else branches
vbxq Mar 12, 2026
733dde0
fix(sema): prevent user-defined types from being shadowed by builtins
vbxq Mar 12, 2026
f46d455
fix(sema): reject struct equality and narrow float literals in binops
vbxq Mar 13, 2026
0f83023
parse if-without-else inside block expressions
vbxq Mar 15, 2026
b761bcc
fix for-each on strings calling non-existent __aelys_len
vbxq Mar 15, 2026
e60a0ee
fix field assign on array-indexed structs losing the write
vbxq Mar 15, 2026
41f33c6
fix field assign on nested structs losing the write
vbxq Mar 15, 2026
07ad7f6
fix inline analysis skipping calls inside match/block/struct/enum/cast
vbxq Mar 15, 2026
b38fb76
fix field assign on chains deeper than 2 levels (a.b.c.d = val)
vbxq Mar 15, 2026
280e2b2
allow returning arrays by value from functions
vbxq Mar 15, 2026
6174fad
fix index assign on struct field arrays (buf.data[i] = val no-op)
vbxq Mar 15, 2026
9bc5856
fix block-scope let bindings leaking into the enclosing scope
vbxq Mar 15, 2026
6f8d332
fix cycle-detection tests broken by debug_assert in release mode
vbxq Mar 15, 2026
7e3ce33
fix let initializer reading its own uninitialized local (let x = x + 1)
vbxq Mar 15, 2026
a955a3e
fix local_const_prop incorrectly propagating into match arm pattern b…
vbxq Mar 15, 2026
c7bfb11
fix global_const_prop incorrectly propagating into match arm pattern …
vbxq Mar 15, 2026
f9c8c12
fix local_const_prop propagating outer constants into for/foreach loo…
vbxq Mar 15, 2026
8dad0ea
fix global_const_prop propagating global constants into for/foreach l…
vbxq Mar 15, 2026
0217b7b
fix global_const_prop substituting into local let bindings that shado…
vbxq Mar 15, 2026
81bc496
fix both propagators substituting outer constants into function/lambd…
vbxq Mar 15, 2026
47bd7d6
fix constant folder using i64 arithmetic for narrower integer types
vbxq Mar 15, 2026
759762a
fix unary fold type/wrapping and closure capture mutation write-back
vbxq Mar 15, 2026
e0cbf0b
fix for-loop range/step evaluating after iterator local is registered
vbxq Mar 15, 2026
8528173
fix copy_elim aliasing mutable params and LLVM dominance on param rea…
vbxq Mar 15, 2026
b787560
fix closure missing env write-back after struct-field assignment
vbxq Mar 15, 2026
cda6b08
fix FnPtr layout size: fat pointer is 16 bytes not 8
vbxq Mar 15, 2026
45e99d3
fix struct literal rejecting multi-line field values ending with bloc…
vbxq Mar 15, 2026
e1ea311
fix closure missing env write-back after array index assignment
vbxq Mar 15, 2026
9365524
fix global array literal initializer support (AirConst::Array)
vbxq Mar 15, 2026
aa2d922
fix global array/struct index and field assign missing write-back
vbxq Mar 15, 2026
d3eb8ee
add global struct literal constant support (AirConst::Struct)
vbxq Mar 15, 2026
dd9381b
fix non-capturing lambda allowed as global constant initializer
vbxq Mar 15, 2026
8dd398f
fix while-match loop: last_block_is_terminated ignored pending block
vbxq Mar 15, 2026
c62d06d
fix for-loop with negative step using wrong comparison direction
vbxq Mar 15, 2026
0c1ea8c
fix nested index assignment arr[i][j] = val losing the write
vbxq Mar 15, 2026
177584b
fix const propagation incorrectly substituting outer constant through…
vbxq Mar 15, 2026
c82e80f
fix if-expression parser rejecting else-if chains
vbxq Mar 15, 2026
8e8ea21
generalize nested index assignment to support arbitrary depth (3D+ ar…
vbxq Mar 15, 2026
413e373
rewrite field assign lowering to handle mixed field/index chains
vbxq Mar 15, 2026
6110714
fix index assign losing writes through Member chains (s.arr[i] = val)
vbxq Mar 15, 2026
9e3f853
rewrite lower_index_assign with unified path collection
vbxq Mar 15, 2026
732909b
fix auto-semicolon insertion inside blocks nested in parens/brackets
vbxq Mar 15, 2026
47f5a96
extend literal narrowing to match and block expressions
vbxq Mar 17, 2026
6256737
extend literal narrowing to ArraySized fill values
vbxq Mar 17, 2026
89a2468
fix match arm literal narrowing with deferred constraint approach
vbxq Mar 17, 2026
734b3ba
extend literal narrowing into generic enum variant construction
vbxq Mar 17, 2026
e56ace2
fix generic enum narrowing for unit variants (Option::None in arrays)
vbxq Mar 17, 2026
2e88dd1
extend if-else narrowing to generic enum targets
vbxq Mar 17, 2026
9613433
fix nested generic enum type resolution in match arms
vbxq Mar 17, 2026
e7f4ce0
fix substitution cycle detection to not panic in debug builds
vbxq Mar 17, 2026
829a9e0
suppress unused variable warning for Var id in release builds
vbxq Mar 17, 2026
62e1d48
support void function types in type annotations (fn() and fn(T))
vbxq Mar 17, 2026
f889961
fix is_concrete for generic enums and nested enum narrowing
vbxq Mar 17, 2026
5911730
mask shift amounts to prevent LLVM undefined behavior
vbxq Mar 17, 2026
96ddc78
seal AIR blocks for break/continue outside loop (error recovery)
vbxq Mar 17, 2026
406751a
fix empty struct literals and trailing commas in fn/enum calls
vbxq Mar 17, 2026
3d6b5aa
allow trailing commas in all comma-separated lists
vbxq Mar 17, 2026
df836d1
recognize while-true loops in return guarantee analysis
vbxq Mar 17, 2026
e43fb8e
fix for loop with runtime-negative step producing wrong comparison
vbxq Mar 17, 2026
b584e52
fix compound index assign evaluating index expression twice
vbxq Mar 17, 2026
f790f9a
fix compound field assign evaluating path expressions twice
vbxq Mar 17, 2026
48a0c44
fix compound index assign on nested paths re-evaluating object expres…
vbxq Mar 17, 2026
f436ec2
support ++/-- on array elements and struct fields
vbxq Mar 17, 2026
49da7ec
add implicit numeric widening for binary expressions
vbxq Mar 17, 2026
8465b68
add implicit numeric widening for all expression contexts
vbxq Mar 17, 2026
338fa58
extend implicit numeric widening to index/field assign and let initia…
vbxq Mar 17, 2026
4b58fc3
extend implicit numeric widening to struct literal field initialization
vbxq Mar 17, 2026
c5a84d0
extend implicit numeric widening to enum variant arguments
vbxq Mar 17, 2026
4ae49f8
extend implicit numeric widening to array literal elements
vbxq Mar 17, 2026
2739b4e
add implicit numeric widening between match arm bodies
vbxq Mar 17, 2026
accb726
support ArraySized ([val; N]) as global constant initializer
vbxq Mar 17, 2026
f153668
replace panics with proper errors for recursive struct/enum cycles
vbxq Mar 17, 2026
71071d8
fix local_const_prop: invalidate exposed outer constant through shadow
vbxq Mar 17, 2026
2a37c06
fix for-loop step re-evaluated on every iteration instead of once
vbxq Mar 17, 2026
deed896
fix for/foreach loop iterator leaks into enclosing scope
vbxq Mar 17, 2026
ecc3421
fix capture analysis: scoped bindings leaked into enclosing scope
vbxq Mar 17, 2026
5ed6379
fix capture analysis: assignment target not captured (write-only capt…
vbxq Mar 17, 2026
4c4082e
fix generic function returning generic enum: 3 interacting issues
vbxq Mar 17, 2026
642c9dc
fix mono substitute_type: Enum types not mangled during function mono
vbxq Mar 17, 2026
763781f
add Struct name mangling in substitute_type for consistency with Enum
vbxq Mar 17, 2026
36106bc
fix mismatched-type comparison crashes LLVM codegen (icmp type mismatch)
vbxq Mar 17, 2026
40cac9a
fix auto-semicolon inserted between } and else when comment in between
vbxq Mar 17, 2026
6c20601
update readme
vbxq Mar 15, 2026
c673ccd
aelys banner
vbxq Mar 16, 2026
2127147
banner version image change
vbxq Mar 16, 2026
4099083
so long nerds
vbxq Apr 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[env]
LLVM_SYS_181_PREFIX = "/usr/lib/llvm18"
28 changes: 28 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
* text=auto

*.rs text eol=lf
*.toml text eol=lf
*.md text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.json text eol=lf
*.aelys text eol=lf
*.aasm text eol=lf
*.sh text eol=lf

*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.pdf binary
*.dll binary
*.lib binary
*.a binary
*.so binary
*.dylib binary
*.exe binary

# exclude from github language detection
*.inc linguist-vendored
*.cpp linguist-vendored
15 changes: 14 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,17 @@ Cargo.lock
/aelys/target/
\target
.idea/
AELYS_TECHNICAL_REFERENCE.md
architecture.md
backend_status.md
aelys/tests/exploration/*
*.ps1
**/*.obj
**/*.exe
main.aelys
main.ll
torture/
audit/**
audit_tmp/**
.vs/**
.idea/**
tests_e2e/**
32 changes: 7 additions & 25 deletions ACKNOWLEDGEMENTS.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,17 @@
# Acknowledgements

## Helps and Contributions
## Helps and Indirect Contributions

**[Keggek](https://codeberg.org/gek)** - For the discussions about the project and language design <3
**[Lekebabiste](https://github.com/Lekebabiste)** - For helping with the UDP implementation <3
**[SpaceGame](https://github.com/SpaceGame-wq)** - For making an Aelys syntax highlighting [VSCode extension](https://marketplace.visualstudio.com/items?itemName=SpaceGame.aelys-lang) <3

## Inspirations

**Rust** - The syntax style, `let mut` for mutability, range expressions (`..` and `..=`).
Also happens to be what Aelys is written in lol

**Go** - Automatic semicolon insertion, the philosophy of simplicity, fast compilation.

**Lua** - Lightweight VM design, embeddability goals. The original inspiration for trying to build something small and fast.

**Python** - Readability focus. The `and`/`or`/`not` keywords.

Honestly I really want do make a language that feels like a blend of all these things, taking the best ideas from each.
Some sort of « python but that treats you as an adult »
**[Keggek](https://codeberg.org/gek)** - For the discussions about the project and language design. You are more than a mentor, thank you.

---

## Usage of AI

Debugging sessions, architectural discussions, and keeping me sane when the VM decides to just.. not work.
**[SpaceGame](https://github.com/SpaceGame-wq)** - For making an Aelys syntax highlighting [VSCode extension](https://marketplace.visualstudio.com/items?itemName=SpaceGame.aelys-lang)

AI also wrote most of the tests for Aelys, some stuff in the examples/ folder (notably the benchmarks), and also some parts of the stdlib, which saved a lot of time.
I prefer not to focus too much on that and instead work on the VM rather than anything else
## Inspirations

TODO:

Without AI assistance this would've taken 10x longer, maybe more.
## Usage of AI

This whole thing started as a way to actually understand how compilers work beyond just reading about them, and turns out building one is the best way to learn
TODO:
40 changes: 37 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,43 @@

All notable changes to Aelys, roughly grouped by version. I don't always tag releases perfectly, so this is reconstructed from git history

## 0.21.x - LLVM backend implementation

**0.21.5-a**
- LLVM codegen: Windows x64 MSVC sret ABI fix for struct returns (fixes bootstrap println segfault)
- string comparison (==, !=), logical not (!), println` accepts i64/f64/bool (bootstrap to_string)
- Delete the legacy VM backend

#### Note about that :

The previous VM served its purpose for prototyping, but Aelys is a systems programming language, not a scripting engine.

A compact alternative VM will return later once LLVM is mature enough (meta-programming?)

**0.21.4-a**
- LLVM codegen: SSA-aware local lowering, no more round-tripping with alloca/store/load
- LLVM backend hardening, no panic/todo path now, unsupported AIR node will give a compile time error
- Stable native entrypoint for LLVM: `__aelys_user_main` + C runtime main

**0.21.3-a**
- Hardened Aelys string ABI: `str` is now consistently lowered as `{ ptr, len }`
- Temporary `print/println` bootstrap, they're reserved during LLVM bootstrap and lowered to `__aelys_write(ptr, len)`; added regression tests for IR ABI and internal `\0` handling.
- Added `s.len` field access on `Str` (untiil proper bootstrapping)

**0.21.2-a**
- Added `core/` crate (`aelys-core`) as a C runtime static library built via `cc` (`build.rs` + `src/aelys_core.c`).
- LLVM native linking now auto-resolves and links `aelys-core` for `--backend llvm` executables.

**0.21.1-a**
- AIR pass `copy_elim`: élimination des copies paramètre -> local en single-assignment.
- AIR pass `dead_locals`: suppression des `AirLocal` jamais référencés.

**0.21.0-a**
- LLVM backend bootstrap: inkwell integration, AIR->LLVM type lowering, function declaration/body codegen, `module.verify()`, and `--backend llvm --emit-llvm-ir`.

## 0.20.x - Preparing for LLVM

Groundwork for LLVM: sized types, structs, generics, monomorphization, and a new intermediate representation (AIR) with System V AMD64 layout. Nothing implemented in the VM though. I'd rather focus on the new backend than on that.
Groundwork for LLVM: sized types, structs, generics, monomorphization, and a new intermediate representation (AIR) with System V AMD64 layout. Nothing implemented in the VM though. I'd rather focus on the new backend than on that. is mature enough.

**0.20.4-a**
- AIR pretty-printer, `--emit-air` CLI flag for `compile` command
Expand Down Expand Up @@ -60,7 +94,7 @@ Language maturity: arrays, vecs, compound operators, dot-syntax string methods,
- String indexing with `s[i]` (unicode-aware, returns single-character string)
- `for c in "hello" { }` iteration syntax

**0.19.10-a** (i'll squash all of these updates)
**0.19.10-a**
- fn foo(mut param: type) now working

**0.19.9-a** (not a "real" update again sorry, needed a new tag
Expand Down Expand Up @@ -109,7 +143,7 @@ Language maturity: arrays, vecs, compound operators, dot-syntax string methods,

## 0.18.x - Native Binary Data Manipulation

This update adds real memory manipulation for @no_gc mode
This update adds real memory manipulation for @no_gc mode & some bug fixes

**0.18.6-a**
- Fixed call site cache using stale entries after global mutation
Expand Down
12 changes: 4 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,20 @@
resolver = "3"
members = [
"aelys",
"core",
"common",
"syntax",
"frontend",
"sema",
"opt",
"air",
"bytecode",
"backend",
"runtime",
"modules",
"codegen",
"driver",
"cli",
"native",
"native-macros",
]

[workspace.package]
version = "0.20.3-a"
version = "0.21.8-a"

[profile.release]
lto = "fat"
Expand All @@ -30,4 +26,4 @@ strip = true
debug = false
overflow-checks = false
debug-assertions = false
rpath = false
rpath = false
4 changes: 4 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This project uses LLVM (https://llvm.org/).
Copyright (c) 2003-present, LLVM Contributors.
Licensed under the Apache License 2.0 with LLVM Exceptions.
See https://llvm.org/LICENSE.txt for license information.
128 changes: 109 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,29 +1,119 @@
<p align="center">
<img src="docs/aelys_banner.png?v=2" alt="aelys virtual machine" width="1000">
<img src="docs/aelys_banner.png?v=3" alt="aelys" width="1000">
</p>

<a href="https://github.com/vbxq/aelys_lang/actions/workflows/ci.yml"><img src="https://github.com/vbxq/aelys_lang/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
<a href="LICENSE"><img src="https://img.shields.io/github/license/vbxq/aelys_lang?color=8A2BE2" alt="License"></a>
<a href="https://github.com/vbxq/aelys_lang/releases/latest"><img src="https://img.shields.io/github/v/release/vbxq/aelys_lang?color=8A2BE2" alt="Release"></a>
# Aelys

# aelys 0.20.3-a
A programming language with garbage collection by default and explicit opt-out for performance-critical code.

Register-based VM with dual memory management: GC by default, `@no_gc` for performance-critical code.
Most languages force a single memory model on the entire program. GC'd languages pay for a runtime on every path; systems languages demand manual control everywhere.

You choose between comfort and performance on a per-function basis.
Aelys starts from a tracing GC and lets you leave it behind one function at a time. Default mode gives you heap allocation, type inference, and minimal annotation. `nogc` gives you compiler-enforced zero-allocation with statically checked references, no user-written lifetime annotations.

## Documentation
<!-- ```rust is used for syntax highlighting only — this is Aelys -->
```rust
fn load_mesh(path: str) -> Result<Mesh, IoError> {
let data = read_file(path) fail |e| IoError::from(e)
let points = parse_vertices(data) fail IoError::ParseFailed
Ok(Mesh { vertices: points })
}

- [Build Instructions](docs/installation.md)
- [Getting Started Guide](docs/getting-started.md)
- [Language Specification](docs/language-spec.md)
- [Standard Library Documentation](docs/standard-library.md)
nogc fn compute_normals(vertices: &[Vec3], normals: &mut [Vec3]) {
for i in range(0, vertices.len() - 2, step: 3) {
let e1 = vertices[i + 1] - vertices[i]
let e2 = vertices[i + 2] - vertices[i]
normals[i / 3] = cross(e1, e2).normalize()
}
}

## Additional Information
fn main() {
let mesh = match load_mesh("model.obj") or load_mesh("default.obj") {
Ok(m) => m,
Err(IoError::NotFound) => { println("no mesh found"); return },
Err(IoError::ParseFailed) => { println("mesh is corrupted"); return }
}

- [Performance Benchmarks](docs/performance-benchmarks.md)
- [Acknowledgements](ACKNOWLEDGEMENTS.md)
- [Changelog](CHANGELOG.md)
- [Examples](examples/README.md)
- [License](LICENSE)
- [FAQ](docs/faq.md)
let mut normals = Vec<Vec3>::new(mesh.vertices.len() / 3)
compute_normals(&mesh.vertices, &mut normals)
}
```

`load_mesh` is default mode: GC-backed allocation, `Result` for errors, `fail` for propagation, `or` for fallback. `compute_normals` is `nogc`, meaning no heap allocation, no GC containers, and references checked at compile time. In `main`, `&` at the call site marks the boundary where data is borrowed into `nogc` territory.

GC code calls `nogc` freely; the reverse is a compile error.

Beyond the memory model: inferred types, pattern matching, Result-based error handling with `fail` for propagation and `or` for fallback composition, direct C header imports through `needs`, and compilation to native code via LLVM.

## Memory model

The language provides three levels of control, each narrowing what the runtime provides.

**Default mode.** A tracing garbage collector manages the heap, types are inferred, and standard collections are GC-backed. Type annotations are optional. `fail` propagates errors, either through a closure for remapping or directly for a fixed error, and `or` provides fallback between results. This is the intended level for most code.

<br>

**`nogc` functions.** A function-level opt-out from GC allocation. Inside a `nogc` function, GC-backed allocation is rejected at compile time, GC-managed containers cannot be created, references are checked for escape and aliasing violations, and calls into GC code are rejected.

The compiler proves that the function satisfies these constraints or rejects it. No warnings, no user-written lifetime annotations. `unsafe {}` permits operations the checker cannot validate statically but does not re-enable GC allocation. FFI is handled through `needs`, which imports C headers directly.

```rust
needs "GL/glext.h"

nogc fn upload_normals(buffer_id: u32, normals: &[Vec3]) {
let byte_size = (normals.len() * size_of(Vec3)) as isize
unsafe {
glNamedBufferData(
buffer_id,
byte_size,
normals.as_ptr() as *const void,
GL_STATIC_DRAW
)
}
}
```

<br>

**`#![no_gc]` `#![no_std]` modules.** At the module level, these attributes remove the garbage collector, runtime, and standard library entirely. The language exposes raw pointers, `extern fn`, and inline assembly, while parsing, typing, and semantic analysis still apply. This mode is intended for kernels, boot code, and freestanding targets.

```rust
#![no_gc]
#![no_std]

extern {
static __bss_start: u8
static __bss_end: u8
}

fn zero_bss() {
let mut ptr = &__bss_start as *const u8 as *mut u8
let end = &__bss_end as *const u8
while ptr < end {
*ptr = 0u8
ptr = ptr + 1
}
}

#[no_mangle]
fn kernel_entry() -> ! {
zero_bss()
uart::write("boot ok\n")
loop { asm("wfi") }
}
```

## Status

Aelys is an experimental language and compiler project under active rewrite. It is not ready for use.

```
source → parser → semantic analysis → AIR (Aelys IR) → LLVM IR → native code
```

Parser and semantic analysis are partially implemented. The `nogc` checker rules are under active design. Codegen targets LLVM.

Language semantics, the IR, and parts of the standard library are not stable. Open design questions include the GC strategy, panic behavior in `#![no_std]`, iterator design, the GC / `nogc` boundary rules, and static guarantees in freestanding mode.

## Contributing

Bug reports, design feedback, and discussion around language semantics and compiler behavior are the most useful contributions right now. The codebase changes quickly, so if you want to contribute code, open an issue first so the work can be aligned with the current direction.
11 changes: 11 additions & 0 deletions _build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
$vs = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath
$vc = "$vs\VC\Auxiliary\Build\vcvars64.bat"
cmd /c ('"' + $vc + '" >nul 2>&1 && set') | ForEach-Object {
if ($_ -match '^(.*?)=(.*)$') {
Set-Item -Path "Env:$($matches[1])" -Value $matches[2]
}
}
$env:LLVM_SYS_181_PREFIX = 'C:\llvm'
$env:PATH = "C:\llvm\bin;$env:PATH"
Set-Location 'C:\Users\admin\RustroverProjects\aelys_lang'
.\target\debug\aelys-cli.exe compile test.aelys
17 changes: 7 additions & 10 deletions aelys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,21 @@ edition = "2024"

[dependencies]
aelys-common = { path = "../common" }
aelys-syntax = { path = "../syntax" }
aelys-frontend = { path = "../frontend" }
aelys-sema = { path = "../sema" }
aelys-opt = { path = "../opt" }
aelys-bytecode = { path = "../bytecode" }
aelys-backend = { path = "../backend" }
aelys-runtime = { path = "../runtime" }
aelys-modules = { path = "../modules" }
aelys-driver = { path = "../driver" }

[dev-dependencies]
tempfile = "3"
aelys-opt = { path = "../opt" }
aelys-air = { path = "../air" }
aelys-bytecode = { path = "../bytecode" }
aelys-codegen = { path = "../codegen" }
aelys-driver = { path = "../driver" }
aelys-frontend = { path = "../frontend" }
aelys-sema = { path = "../sema" }
aelys-syntax = { path = "../syntax" }
inkwell = { git = "https://github.com/TheDan64/inkwell", branch = "master", default-features = false, features = ["llvm18-1", "target-x86"] }

[build-dependencies]
regex = "1"

[lib]
doctest = false
doctest = false
1 change: 0 additions & 1 deletion aelys/src/api/call.rs

This file was deleted.

Loading