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

Add a Context and use it for interning strings and Rules. #4

Merged
merged 7 commits into from
May 20, 2019
Merged

Conversation

eddyb
Copy link
Member

@eddyb eddyb commented May 16, 2019

(The names IStr and IRule were suggested by @Centril)

Among other advantages, this will get rid of Rc usage, and make "rule-keyed maps" much cheaper (as they will no longer compare/hash entire "rule trees").

Copy link
Collaborator

@CAD97 CAD97 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few suggestions inline but otherwise this looks good.

src/context.rs Show resolved Hide resolved
src/context.rs Show resolved Hide resolved
src/lib.rs Show resolved Hide resolved
src/rule.rs Show resolved Hide resolved
@eddyb eddyb merged commit eb47b51 into master May 20, 2019
@eddyb eddyb deleted the intern branch May 20, 2019 14:19
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

Successfully merging this pull request may close these issues.

2 participants