Skip to content

Internal List data structure semantics and its implications in section 9.5.11 #461

Closed

Description

I recently implemented section 9.5.11 of the spec inside JavaScriptCore (https://tc39.github.io/ecma262/#sec-proxy-object-internal-methods-and-internal-slots-ownpropertykeys).
Sections 17 and 19 perform the Remove operation on the List type.
I couldn't find documentation on the formal semantics of the List data structure.
Specifically, how is the Remove operation defined? Is it defined to just delete the first instance of something in the List or all instances?

Also, depending on the semantics, the algorithm defined in 9.5.11 allows for duplicate entries to be returned by this trap under certain circumstances. Is this intended? I think this would be the only place where [[OwnPropertyKeys]] has duplicate entries. Maybe we should guarantee the items are unique?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    normative changeAffects behavior required to correctly evaluate some ECMAScript source textspec bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions