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

[MSFT 12313182] Detect assignment to const in nested functions that were originally deferred. #3645

Merged
merged 1 commit into from
Sep 6, 2017

Conversation

pleath
Copy link
Contributor

@pleath pleath commented Sep 6, 2017

Add symbol-is-const flag to Symbol and to ScopeInfo to allow us to detect this case. Don't rely on having access to a parse node for the declaration.

@@ -29,6 +29,7 @@ namespace Js {
Field(SymbolType) symbolType;
Field(bool) hasFuncAssignment;
Field(bool) isBlockVariable;
Field(bool) isConst;
Field(bool) isFuncExpr;
Field(bool) isModuleExportStorage;
Field(bool) isModuleImport;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we make these bit fields. Saves 4 bytes on x86.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure.

…ere originally deferred. Add symbol-is-const flag to Symbol and to ScopeInfo to allow us to detect this case. Don't rely on having access to a parse node for the declaration.
@chakrabot chakrabot merged commit 8f40df4 into chakra-core:master Sep 6, 2017
chakrabot pushed a commit that referenced this pull request Sep 6, 2017
…ested functions that were originally deferred.

Merge pull request #3645 from pleath:12313128

Add symbol-is-const flag to Symbol and to ScopeInfo to allow us to detect this case. Don't rely on having access to a parse node for the declaration.
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.

None yet

4 participants