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

Redesigning WyIL Bytecode #563

Closed
DavePearce opened this Issue Jan 11, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@DavePearce
Member

DavePearce commented Jan 11, 2016

At this stage, it is starting to become very apparent that we need to redesign the WyIL bytecode to help resolve a number of outstanding issues (#562,#502, #474, #473). The main points are:

  1. Variable Declarations (#562, #473). Variable declarations should be required for all registers used in a function, method, type and constant. Variable declarations should be split into variables and let-bindings. Variables could also potentially include versioning information.

  2. Flow Typing. A really helpful benefit would be to remove flow typing altogether from WyIL. For this to work, need to give thought to how references will be handled (e.g. do we allow references to local variables or not). If references to local variables are not permitted then it flow typing can be handled using "shadow" variables.

  3. Blocks (#474) (DONE). Blocks need to be refactored as being indexed rather than nested. Support for syntactic blocks which provide meta-information on the underlying structure of the program would be good. For example, so that we can reconstruct the original source code fairly accurately.

  4. Bytecodes (#502). Bytecodes should be refactored to dramatically reduce the number of distinct bytecodes. This can be done by using a generic format for bytecodes based on function/method calls.

Overall, this is quite a big operation but should definitely be worth it.

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