You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additionally, I'm aware of the following statement:
Unless specified otherwise, the initial value of an internal slot is the value undefined.
which is specified in 6.1.7.2 Object Internal Methods and Internal Slots. Does this statement mean that the value of uninitialized field should be considered as undefined in case of type determination of an object?
The text was updated successfully, but these errors were encountered:
I'm unsure if we can interpret the actual argument above as a Promise.
I agree that this is unclear. We're going to try to clear up the initialisation of internal slots for objects created this way as part of #3399.
I'll leave this open as a reminder for us to update our description of the various types of objects that are created in this way to define them in terms of their essential internal slots. I think those two changes together should resolve your concerns.
I have a question about how to determine the type of an object with uninitialized fields, as a continuation of the discussion in PR #3383.
Let’s assume the execution process of the program below:
This program follows the step of 27.2.3.1 Promise ( executor ) during execution. In step 8, it calls 27.2.1.3 CreateResolvingFunctions( promise ) with an argument
_promise_
, whose[[PromiseResult]]
field is uninitialized. In this example, the annotated parameter type of the callee is a Promise, and 27.2.6 Properties of Promise Instances says the[[PromiseResult]]
field of a promise instance should hold an ECMAScript language value.I'm unsure if we can interpret the actual argument above as a Promise.
Similarly, the same JavaScript program also follows the steps of 27.5.3.8 CreateIteratorFromClosure ( closure, generatorBrand, generatorPrototype [ , extraSlots ] ). It calls27.5.3.1 GeneratorStart ( generator, generatorBody ) in step 14. The passed argument
_generator_
has an uninitialized[[GeneratorContext]]
field, which should be initialized in this case.Additionally, I'm aware of the following statement:
which is specified in 6.1.7.2 Object Internal Methods and Internal Slots. Does this statement mean that the value of uninitialized field should be considered as
undefined
in case of type determination of an object?The text was updated successfully, but these errors were encountered: