cadence
cadence copied to clipboard
Reorganize repository
Issue To Be Solved
Historically the bulk of the code for Cadence is located in a directory named runtime.
This is confusing from a language perspective, as it might be confused with a language's runtime.
Also, the parser is currently located in a package called parser2, as it is the second parser for Cadence. However, given the first parser was removed, the package should be renamed.
Suggested Solution
- [ ] Move all directories nested in the
runtimedirectory to the root of the repository, e.g.ast,sema, etc. - [x] Rename
parser2toparser
It would also be good to separate out the compiler front-end and the back-end. That leaves us the freedom to plug in different compiler back-ends needed for different runtimes in future.
A sample structure:
Cadence
|
|_compiler
| |_compiler_frontend
| | |_ast
| | |_parser
| | |_sema
| | |_...
| |_compiler_backend
| |_wasm_gen
| |_llvm_gen*
|_runtime
| |_values (runtime values / common code)
| |_intepreter
| |_vm*
*some hypothetical use-cases