Skip to content

Switch to initializer property #1220

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

Merged
merged 1 commit into from
Apr 13, 2020
Merged

Conversation

jtenner
Copy link
Contributor

@jtenner jtenner commented Apr 13, 2020

This pull request is more of a question than a suggestion.

EnumValueDeclaration extends VariableLikeDeclaration and the initializer property remains unused. This change simply removes the value property and switches to use the initializer property, reducing memory usage for each EnumValueDeclaration.

Thoughts?

Copy link
Member

@dcodeIO dcodeIO left a comment

Choose a reason for hiding this comment

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

For some reason this PR makes me particularly happy :)

@@ -694,7 +694,7 @@ export abstract class Node {
node.range = range;
node.flags = flags;
node.name = name;
node.value = value;
node.initializer = initializer;
Copy link
Member

Choose a reason for hiding this comment

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

Nice!

@dcodeIO dcodeIO merged commit c2949e2 into AssemblyScript:master Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants