Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize repository #526

Closed
2 tasks done
Tracked by #3595
turbolent opened this issue Jan 13, 2021 · 2 comments
Closed
2 tasks done
Tracked by #3595

Reorganize repository #526

turbolent opened this issue Jan 13, 2021 · 2 comments

Comments

@turbolent
Copy link
Member

turbolent commented Jan 13, 2021

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.
  • Rename parser2 to parser
@SupunS
Copy link
Member

SupunS commented Jan 14, 2021

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

@turbolent
Copy link
Member Author

To start with, maybe we can move the child packages under runtime one level up, so they are siblings to the runtime package, and leave the runtime package as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants