Skip to content

Commit 206a97c

Browse files
committed
initial minilang impl
1 parent 6a19ed2 commit 206a97c

File tree

4 files changed

+482
-11
lines changed

4 files changed

+482
-11
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ jobs:
9797
${{ matrix.cc }} -std=c11 -O2 -Isrc tests/test_harness_builder.c src/ctx.c -o jit_tests_builder
9898
./jit_tests_builder
9999
100+
- name: Build and run minilang example
101+
run: |
102+
${{ matrix.cc }} -std=c11 -O2 -Isrc examples/minilang.c src/ctx.c -o minilang_example
103+
timeout 5 ./minilang_example
104+
100105
- name: Build and run SIMD example
101106
run: |
102107
${{ matrix.cc }} -std=c11 -O2 -Isrc examples/simd.c src/ctx.c -o simd_example

examples/README.md

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,16 @@
22

33
Small programs that showcase `cj`:
44

5-
- `simple.c` – minimal
6-
program(nop &ret)
7-
.- `add.c` – adds a constant to the first argument and returns it;
8-
demonstrates register operands and constants.- `fibonacci.c` – full control -
9-
flow example(labels, branches, loops) emitted with the low-level API.
10-
- `hl_fibonacci.c` – fibonacci again, but built entirely with the builder helpers.
11-
- `simd.c` – x86 and arm simd vector addition loops, exercising memory operands and floating-point registers.
5+
- `simple.c`: minimal program(nop & ret).
6+
- `add.c`: adds a constant to the first argument and returns it; demonstrates
7+
register operands and constants.
8+
- `fibonacci.c`: full control-flow example(labels, branches, loops) emitted
9+
with the low-level API.
10+
- `hl_fibonacci.c` – fibonacci again, but built entirely with the builder
11+
helpers.
12+
- `simd.c` – x86 and arm simd vector addition loops, exercising memory operands
13+
and floating-point registers.
14+
- `minilang.c` – a minimal Lisp (has addition, subtraction, functions).
1215

1316
## building
1417

0 commit comments

Comments
 (0)