wind
Compiled language. Custom C++ compiler, x86-64 backend.
C++ / AST / IR / x86-64GitHub
- Source
.w - Lexer / parser
Tokens → AST - Generation
IR → Optimizer - Backend
x86-64
Inside wind
Compiler pipeline
Source passes through lexer and parser into an AST. Compiler visitors produce an intermediate representation; the repository includes an optimizer and an x86-64 backend.
src/core/wind/Type handling
The compiler infers types for binary expressions and handles coercion. Differently sized scalar types require an explicit cast; pointer and array types have separate handling.
compiler.cppLanguage examples
The feature-test source includes typed variables, pointers, guards, loops, try blocks and overflow handling. Benchmarks and feature tests are included in the repository.
base.wSource excerpt
testing/features/tests/dev/base.w · excerpt
func main(argc: int, argv: ptr<ptr<char>>): int {
var T: s16=30_000;
var i: int=0;
var tptr: ptr<int> = guard![malloc(sizeof<int>*8)];Read full source