Skip to content

Refactoring Property flags #497

Description

@HalidOdat

Make the flags instead of Option we combine all the flags into one u8 and store and access the bits this should shrink the size of Property.

Activity

  1. added this to the v0.9.0 milestone on Jun 15, 2020
  2. self-assigned this
    on Jun 15, 2020
  3. changed the title [-]Refactoring `Property` (`getters` /setters)[/-] [+]Refactoring `Property` (`getters` and `setters`)[/+] on Jun 15, 2020
  4. changed the title [-]Refactoring `Property` (`getters` and `setters`)[/-] [+]Refactoring `Property` (adding `getters` and `setters`)[/+] on Jun 15, 2020
  5. Razican commented on Jun 15, 2020

    @Razican
    Member

    For the flags, we can use bitflags, as we do with the regex lexer.

  6. jasonwilliams commented on Jun 17, 2020

    @jasonwilliams
    Member

    The spec has the concept of a default property which we can surface with Default:
    https://tc39.es/ecma262/#table-default-attribute-values

  7. jasonwilliams commented on Jun 17, 2020

    @jasonwilliams
    Member

    Make 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 typeof check it would fail.

    const object1 = { property1: 42 };
    Object.defineProperty(object1, 'prop2', { get: () => {return "blah"}});
    typeof Object.getOwnPropertyDescriptor(object1, 'prop2').get; // function
  8. modified the milestones: v0.9.0, v0.10.0 on Jun 17, 2020
  9. changed the title [-]Refactoring `Property` (adding `getters` and `setters`)[/-] [+]Refactoring `Property` flags[/+] on Jul 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-EnhancementNew feature or requestA-Technical DebtChanges related to technical debtHelp WantedExtra attention is neededR-DiscussionIssues needing more discussion

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions