Skip to content

Replace the macro list with a hash table.#282

Merged
dvander merged 1 commit intomasterfrom
rm-substable
Dec 2, 2018
Merged

Replace the macro list with a hash table.#282
dvander merged 1 commit intomasterfrom
rm-substable

Conversation

@dvander
Copy link
Member

@dvander dvander commented Dec 2, 2018

This removes the last use of stringpair and along with it more manual
memory management and C-era linked list code. There is no performance
difference because, amazingly, there was a tiny open-coded lookup cache
in the macro code. Go figure.

Copy link
Member

@Headline Headline left a comment

Choose a reason for hiding this comment

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

Sweet, awesome changes here.

only nit is the TRUE/FALSE in lexer.cpp but it’s a small nit

This removes the last use of stringpair and along with it more manual
memory management and C-era linked list code. There is no performance
difference because, amazingly, there was a tiny open-coded lookup cache
in the macro code. Go figure.
@dvander
Copy link
Member Author

dvander commented Dec 2, 2018

Heh, good catch. delete_subst was returning TRUE/FALSE which I preserved, but command() does not return boolean. I have no idea why it was doing this and it was probably incorrect. Fixed now.

@dvander dvander merged commit efa4070 into master Dec 2, 2018
@dvander dvander deleted the rm-substable branch December 2, 2018 06:26
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