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

Move specialization of nodes to parse time #88

Merged
merged 6 commits into from
Jan 18, 2017
Merged

Conversation

smarr
Copy link
Owner

@smarr smarr commented Jan 13, 2017

The goal is to do the specialization of + and similar nodes already at parse time.
This should avoid the need for an extra specialization at run time, and minimally improve startup.
Furthermore, it means we already have a chance after AST construction to know likely tags in the AST. This is helping with tooling support.

This is a fix for #75.

@smarr smarr added the enhancement Improves the implementation with something noteworthy label Jan 13, 2017
@smarr smarr self-assigned this Jan 13, 2017
@smarr smarr force-pushed the in-parser-specialization branch 2 times, most recently from cabe135 to ec23b6c Compare January 18, 2017 14:45
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.04%) to 78.637% when pulling 83df3b0 on in-parser-specialization into 45b07d0 on master.

When creating the AST nodes, we use the symbol and the child nodes
to determine whether we can create already a specialized node.
This avoids creating uninitialized message send nodes,
which do the specialization at run time.

A primitive defines with the `inParser` property whether it supports this.

- make sure the arguments are marked for eager primitives
- make inParser flag true by default

Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
…isspeculation

Signed-off-by: Stefan Marr <git@stefan-marr.de>
Signed-off-by: Stefan Marr <git@stefan-marr.de>
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.02%) to 78.657% when pulling dda69ad on in-parser-specialization into 45b07d0 on master.

@smarr smarr merged commit cd43950 into master Jan 18, 2017
@smarr smarr deleted the in-parser-specialization branch January 18, 2017 19:00
@smarr smarr mentioned this pull request Jan 18, 2017
@smarr smarr added this to the v0.2.0 milestone Mar 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improves the implementation with something noteworthy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants