raz / commit 84d5b6e8

commit
84d5b6e8f05d49cb46ffdb3650808f624f6a736f
author
Luis <42945842+ldiaz94@users.noreply.github.com>
date
parent
abf74c58
Bring the plan in line with the approved report

Step 5 keeps the core; errors join multiple results, and enumerations,
sets, record literals and defer get a step of their own. Generic
modules take procedures, and calling C shows the path to other
systems.

patch · log

1 file changed, +22 -16

PLAN.md (history) modified +22 -16

@@ -26,7 +26,7 @@
2626 - Work stops after every stage for review. A step starts only on an
2727 explicit go-ahead.
2828 - Not in scope for now: man pages, QEMU or bare metal tests, aarch64,
29- an optimizer.
29+ macOS and Windows (Mach-O, PE), an optimizer.
3030
3131 ## Decisions
3232
@@ -43,7 +43,7 @@
4343 6. Records are laid out as C lays them out.
4444 7. Modules are compiled together, from source, in one run: no symbol
4545 files, no separate compilation. A generic module is compiled once
46- per distinct list of type arguments.
46+ per distinct list of arguments, its types and its procedures.
4747 8. Tree shaking: the linker keeps only the procedures, variables and
4848 literals reachable from the entry point.
4949 9. Variadic arguments exist only to call C. jed code gets the same
@@ -70,31 +70,37 @@
7070
7171 - [x] 1. Language report, `doc/jed.md`. Reviewed and approved before
7272 any more code.
73-- [ ] 2. Scanner and symbol table, `scan.pas` and `sym.pas` (drafts
74- exist), brought in line with the report; they compile.
73+- [ ] 2. Scanner and symbol table, `scan.pas` and `sym.pas`, written
74+ against the report; they compile.
7575 - [ ] 3. Machine code, `x64.pas`.
7676 - [ ] 4. Linking and output, `link.pas` and `elf.pas`: tree shaking,
7777 static ELF, symbol table. A hand built chunk runs.
7878 - [ ] 5. Parser and code generator, `gen.pas` and `parse.pas`:
79- everything in the report except multiple results, `NEW`, generic
80- modules and `extern`.
81-- [ ] 6. `lib/Rt.jed`, `lib/Out.jed`; examples (hello, args, variants
82- and slices, volatile); `make check` runs them against expected
83- output; `make bench` times the compiler on generated jed.
79+ everything in the report except multiple results, errors,
80+ enumerations and sets, record literals, `defer`, `NEW`, generic
81+ modules and `extern`. Module bodies, per-target modules and their
82+ interface check, and code procedures are in.
83+- [ ] 6. `lib/Rt.jed`, `lib/Sys.linux-x86_64.jed`, `lib/Out.jed`;
84+ examples (hello, args, variants and slices, volatile, a code
85+ procedure); `make check` runs them against expected output;
86+ `make bench` times the compiler on generated jed.
8487
85-Stage 2: allocation, results, generics
88+Stage 2: the rest of the language
8689
87-- [ ] 7. Multiple results.
88-- [ ] 8. `NEW`; `lib/Mem.jed`, `lib/Arena.jed`, `lib/Heap.jed`.
89-- [ ] 9. Generic modules; `lib/Str.jed`, `lib/Buf.jed`, `lib/Fmt.jed`;
90- examples.
90+- [ ] 7. Multiple results and errors.
91+- [ ] 8. Enumerations and sets, record literals, `defer`; examples.
92+- [ ] 9. `NEW`; `lib/Mem.jed`, `lib/Arena.jed`, `lib/Heap.jed`.
93+- [ ] 10. Generic modules, with type and procedure arguments;
94+ `lib/Str.jed`, `lib/Buf.jed`, `lib/Fmt.jed`; examples.
9195
9296 Stage 3: calling C
9397
94-- [ ] 10. `extern`, `link`, dynamic ELF, start through
98+- [ ] 11. `extern`, `link`, dynamic ELF, start through
9599 `__libc_start_main`; examples with `printf` and an X11 window.
100+ A module whose per-target file calls the C library instead of
101+ `SYSCALL`, the way other systems would be reached.
96102
97103 Wrap up
98104
99-- [ ] 11. `README.md` and `doc/compiler.md`, a guide to reading the
105+- [ ] 12. `README.md` and `doc/compiler.md`, a guide to reading the
100106 compiler file by file.