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

Disable complex errors by default #7

Closed
marcioAlmada opened this issue Nov 3, 2015 · 0 comments
Closed

Disable complex errors by default #7

marcioAlmada opened this issue Nov 3, 2015 · 0 comments

Comments

@marcioAlmada
Copy link
Owner

This optimization was planned much earlier, by design, but was delayed until now for debugging purposes.

Macros are extremely non deterministic and will follow the error path 99% of the times. Unless a parser stack is below a commit (which may halt the parser execution and report syntax problems), Error objects are created and discarded immediately after backtracking, causing a significant GC cost for no real reason.

It's still useful to have complex error objects when doing deterministic incremental parsing, unit testing or other situation where errors always promote to halting.

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

1 participant