Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Editorial: clarify ordinary and exotic object definitions and creation (
#1460) Closes #1453. * Defines ordinary objects as having the ordinary internal methods, and exotic objects as not having the ordinary internal methods. * Introduces AllocateBasicObject, which now is the only source of object creation, centralizing the undefined phrase "a newly created object" or "newly created X exotic object" into one location. * Introduces explicit definitions for every type of exotic object in terms of how they override the internal methods. This makes phrases like "x is an Array exotic object" well-defined. * Renames ObjectCreate to OrdinaryObjectCreate, and clarifies how it should be used. * Fixes immutable prototype exotic objects to not inaccurately state that they always have default internal methods besides [[SetPrototypeOf]]; this is not the case for web platform objects, for example. This involved then expanding the definition of %ObjectPrototype% a bit to be more explicit about its internal slots and methods. * Improves missing or contradictory internal slot installation, e.g. the introduction for function objects said they had "the same internal slots" as other ordinary objects, but FunctionAllocate installed a list of slots that was missing [[Prototype]] and [[Extensible]]. * Deduplicates setting [[Extensible]] to its default true value. * Clarifies with a note that CreateUnmappedArgumentsObject does not create an exotic object, despite being in the "Arguments Exotic Objects" clause. * Slightly reduces the coupling between IntegerIndexedObjectCreate and CreateTypedArray by changing how arguments are passed.* Uses the phrase "bound function exotic object" uniformly instead of sometimes "bound function" or "bound function object". * Gives "array index" a definition instead of just making it italicized. * Add requirement on caller of AllocateBasicObject per Allen's review * Remove proto argument, and assert more things on callers * AllocateBasicObject -> MakeBasicObject Co-authored-by: Domenic Denicola <d@domenic.me> Co-authored-by: Shu-yu Guo <syg@chromium.org>
- Loading branch information