Skip to content

Instantly share code, notes, and snippets.

@bakkot
Created September 11, 2018 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bakkot/85611eccde8c8ca425e1d6c86741194c to your computer and use it in GitHub Desktop.
Save bakkot/85611eccde8c8ca425e1d6c86741194c to your computer and use it in GitHub Desktop.
Intersection semantics on common case:
- No proxies in inheritance chain : lol
- Inheritance chain does not change during iteration : prototype-changes-during.js
- If a property is present on two different things in the inheritance chain, then
- a non-enumerable property never shadows an enumerable one at any point during iteration : JSC / V8, enumerable-shadowed.js
- shadowing properties are never deleted during iteration : CH / XS / ref, delete-shadowed.js
- No property is added to something in the prototype chain during iteration (but may be added to the object itself) : CH / XS / ref, list-build-order.js
- No property is ever reconfigured from enumerable to non-enumerable during iteration : XS / reference, made-nonenum.js
- No property is deleted and then re-added during iteration : SM; deleted-readded.js
@bakkot
Copy link
Author

bakkot commented Sep 11, 2018

The semantics in this case match the reference implementation.

(This is not quite true because of an open ChakraCore bug, but I think we can get away with it.)

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