Repository navigation
Refactoring Property flags #497
Copy link
Copy link
Closed
Labels
A-EnhancementNew feature or requestNew feature or requestA-Technical DebtChanges related to technical debtChanges related to technical debtHelp WantedExtra attention is neededExtra attention is neededR-DiscussionIssues needing more discussionIssues needing more discussion
Milestone
Description
Activity
- addedA-EnhancementNew feature or requestNew feature or requestA-Technical DebtChanges related to technical debtChanges related to technical debtBlockedWaiting for another code changeWaiting for another code change
on Jun 15, 2020 - changed the title
[-]Refactoring `Property` (`getters` /setters)[/-][+]Refactoring `Property` (`getters` and `setters`)[/+]on Jun 15, 2020 - addedR-DiscussionIssues needing more discussionIssues needing more discussionHelp WantedExtra attention is neededExtra attention is needed
on Jun 15, 2020 - changed the title
[-]Refactoring `Property` (`getters` and `setters`)[/-][+]Refactoring `Property` (adding `getters` and `setters`)[/+]on Jun 15, 2020 For the flags, we can use
bitflags, as we do with the regex lexer.Reacted by Haled OdatThe spec has the concept of a default property which we can surface with
Default:
https://tc39.es/ecma262/#table-default-attribute-valuesMake Accessor getter and setter store a Function instead of Value because there always going to be functions
I don't think this will work because those functions are exposed to the outside world, so if someone does a
typeofcheck it would fail.const object1 = { property1: 42 }; Object.defineProperty(object1, 'prop2', { get: () => {return "blah"}}); typeof Object.getOwnPropertyDescriptor(object1, 'prop2').get; // function
Reacted by Haled Odat- removedBlockedWaiting for another code changeWaiting for another code change
on Jul 19, 2020 - changed the title
[-]Refactoring `Property` (adding `getters` and `setters`)[/-][+]Refactoring `Property` flags[/+]on Jul 19, 2020
Metadata
Metadata
Assignees
Labels
A-EnhancementNew feature or requestNew feature or requestA-Technical DebtChanges related to technical debtChanges related to technical debtHelp WantedExtra attention is neededExtra attention is neededR-DiscussionIssues needing more discussionIssues needing more discussion
Make the flags instead of Option we combine all the flags into one
u8and store and access the bits this should shrink the size ofProperty.