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

Use control-flow instead of runtime state for the choice of Or arm. #24

Open
eddyb opened this issue Aug 23, 2018 · 0 comments
Open

Use control-flow instead of runtime state for the choice of Or arm. #24

eddyb opened this issue Aug 23, 2018 · 0 comments

Comments

@eddyb
Copy link
Member

eddyb commented Aug 23, 2018

These two are isomorphic:

{ code: constant, state: per-arm }
{ code: per-arm, state: constant }

So we should be generating more code instead of trying to keep it all in the state.

EDIT: Heh, I just remembered that we ended up here trying to keep down the number of (old) "labels", long before any of the Rc<Rule> -> ParseLabel or CPS stuff.


Only problem is that, currently, the {push,pop}_state machinery enforces that the parallel of the Or happens in its own separate function, and the input range of the whole stack frame can thus be used, as the range of the whole Or rule (guarded by an assert_eq).

So this is blocked on #10 replacing the {push,pop}_state machinery with a proper analysis.
(Ideally also being able to understand constant rule lengths)

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

No branches or pull requests

1 participant