cadence icon indicating copy to clipboard operation
cadence copied to clipboard

Reorganize repository

Open turbolent opened this issue 4 years ago • 1 comments

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 runtime directory to the root of the repository, e.g. ast, sema, etc.
  • [x] Rename parser2 to parser

turbolent avatar Jan 13 '21 22:01 turbolent

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

SupunS avatar Jan 14 '21 04:01 SupunS