Clarification on OrdinarySetWithOwnDescriptor, please?

7 views
Skip to first unread message

Alex Vincent

unread,
Sep 2, 2024, 9:13:57 PM9/2/24
to SES Strategy
Hi, all.  I'm revisiting details of the ECMAScript specification, and I see an ambiguity that I'd like clarification on.


Step 2.e.i is where I'm unclear.  It says to assert the receiver doesn't have a property P... but 2.c says receiver.getOwnProperty.  2.e.i doesn't say "own property", meaning we're asserting the receiver can't inherit the property either.

The receiver isn't used in the recursive algorithm until the recursion is over at 2.b.

I ran across this in my es-membrane rewrite, and the historical version of the ECMAScript standard (7.0) has the same vagueness without the assert.

Can someone get back to me on this, please?

--
"The first step in confirming there is a bug in someone else's work is confirming there are no bugs in your own."
-- Alexander J. Vincent, June 30, 2001

Jordan Harband

unread,
Sep 3, 2024, 12:01:28 AM9/3/24
to Alex Vincent, SES Strategy
"X does not have a property" implies an own property, because the prototype chain of X is not X. `[[Get]]` traverses the prototype chain, but `{}` does not have a `toString` property - it's just that a `[[Get]]` on it will retrieve one, because it has an inherited property.

--
You received this message because you are subscribed to the Google Groups "SES-strategy" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ses-strategy...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ses-strategy/CAEZ8441nhtWHckGwf9Wup6Sgkg%3DR9FgiYL3C7bxay7nodDnpWQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages