Yzena
/
Yc
2
1
Fork 0
Browse Source

Change the Yvm requirement from C11 backend to C99

Signed-off-by: Gavin Howard <gavin@yzena.com>
afl_persistent_mode
Gavin Howard 2 months ago
parent
commit
5a63f24ed7
Signed by: gavin
GPG Key ID: C08038BDF280D33E
  1. 20
      docs/yvm/design.md

20
docs/yvm/design.md

@ -641,19 +641,17 @@ TODO: Will be done in a future subproject.
* Must be able to parse YIR.
* Must be able to parse YIR bitcode or bytecode.
* To be decided and designed later, in a separate subproject.
* Must have a backend to generate C11.
* The C11 must have no undefined behavior in C.
* The C11 must use the safe arithmetic in `yc/arith.h`.
* The C11 will use scopes with jumps as basic blocks.
* Must have a backend to generate C99.
* The C99 must have no undefined behavior in C.
* The C99 must use the safe arithmetic in `yc/arith.h`.
* The C99 will use scopes with jumps as basic blocks.
* All registers in a basic block that only appear in that basic block
will be `const` variables local to the corresponding scope.
* Basic block arguments will be implemented as function-level
non-`const` variables. Before jumping to the next scope, all of the
variables will be assigned to.
* I can do this because YIR demands that a function have only one
instance of every register name.
* The C11 must include full source information (debug info).
* However, any debug info that cannot be represented with portable C11
non-`const` variables with a prefix matching the basic block. Before
jumping to the next scope, all of the variables will be assigned to.
* The C99 must include full source information (debug info).
* However, any debug info that cannot be represented with portable C99
should be excluded. I think only the `#line` directive works.
* The bootstrapped compiler must have a Language Server Protocol mode.
@ -718,7 +716,7 @@ TODO: Will be done in a future subproject.
* Bootstrap compiler:
* Must not crash on compiling bootstrapped compiler.
* Must not miscompile on compiling bootstrapped compiler.
* Must not generate C11 with undefined behavior.
* Must not generate C99 with undefined behavior.
## Glossary

Loading…
Cancel
Save