59 lines
2.6 KiB
Markdown
59 lines
2.6 KiB
Markdown
# "quick"/"easy" fixes
|
|
|
|
- for global initialization cycles, report also starting and ending lines
|
|
|
|
# compiler hardening follow-ups
|
|
|
|
- migrate spans, AST/HIR/IR ids, and diagnostics from `int` to compact integer types
|
|
- prune unreachable function specializations before HIR construction and emission
|
|
- support unary minus, including the signed i64 minimum literal boundary
|
|
- move ignored example binaries into a dedicated build directory and remove `.review_tmp`
|
|
|
|
# milestones
|
|
|
|
1. interop type foundation
|
|
- unsigned integers, floats, and target-dependent c scalar types
|
|
- keep binding mutability (`::` / `=`) separate from element or pointee mutability (`mut`)
|
|
- arrays and indexing
|
|
- `[N]T`: array with `N` logical elements
|
|
- `[N;S]T`: array with `N` logical elements followed by sentinel `S`
|
|
- pointers
|
|
- `@T` / `@mut T`: non-null single-item pointer without arithmetic
|
|
- `*T` / `*mut T`: non-null many-item pointer with arithmetic
|
|
- optional pointers represent nullable pointers
|
|
- slices and slicing
|
|
- `[]T`: pointer and length
|
|
- `[;S]T`: pointer and length with a sentinel invariant
|
|
- ordinary slices do not guarantee null termination
|
|
- string literals as immutable sentinel slices backed by static arrays
|
|
- character literals
|
|
- optionals with trapping unwrap and fallback operations
|
|
- native structs with compiler-controlled layout
|
|
- pointer-only `c struct` support with target c layout
|
|
- `Some :: c struct { ... }`: defined c-layout struct
|
|
- `Some :: c struct`: opaque c-layout struct
|
|
- defer passing c structs by value until target ABI classification exists
|
|
|
|
2. restricted c header imports
|
|
- treat an imported header as a synthetic, file-local package namespace
|
|
- `import "relative/path/to/header.h"`
|
|
- `other :: import "relative/path/to/header.h"`
|
|
- import functions, typedefs, scalar types, and pointers to opaque records
|
|
- keep implementation linking separate from header imports
|
|
- cache imports by canonical header path and target/include/define configuration
|
|
- diagnose unsupported declarations when referenced
|
|
- research libclang's c API behind a replaceable c importer boundary
|
|
|
|
3. c variadic calls
|
|
- represent c variadics as a fixed parameter count plus a variadic flag
|
|
- apply c default argument promotions at call sites
|
|
- emit LLVM c-variadic declarations and calls
|
|
- keep native brolang variadics and tuple design separate
|
|
|
|
4. advanced c interop
|
|
- by-value records and unions
|
|
- function pointers and callbacks
|
|
- external variables
|
|
- macros and static inline functions
|
|
- exporting brolang functions to c
|