03:33
<ljharb>
psyched for a nonfictional plenary
16:55
<bakkot>
could we add a blocking version of await, only available off the main thread
16:55
<bakkot>
we already have atomics.wait
16:55
<bakkot>
is this a terrible idea
16:57
<Ashley Claymore>
the win being not worrying about red/blue functions? Or could there also be performance wins to blocking over using await mechanics ?
17:00
<shu>
bakkot: probably a terrible idea?
17:01
<shu>
what are the proposed semantics? remember Atomics.wait only gets woken up by another thread or timeout
17:01
<shu>
i don't think awaits are like that
17:05
<legendecas>
IIUC we can not resolve a promise off the thread, so blocking version of await sounds like a deadlock.
17:06
<shu>
it doesn't have to be, but you'd have to invent a radically different set of event loop semantics
17:06
<shu>
which makes me think it is probably an infeasible idea
22:58
<Richard Gibson>

GetSuperBase makes a supposedly fallible call ? _home_.[[GetPrototypeOf]](), but AFAICT every [[HomeObject]] is a code-inaccessible built-in object created by either ClassDefinitionEvaluation step 14–15 or §13.2.5.4 Evaluation of |ObjectLiteral|, in either case with an infallible (and ordinary) [[GetPrototypeOf]]. Can someone check me here, providing example source text where it fails—or even where GetSuperBase observes an undefined [[HomeObject]]?

MakeMethod($f, object) sets $f.[[HomeObject]] to object and is called from only

  • DefineMethod with argument object
  • MethodDefinitionEvaluation with argument object

MakeMethod($f, homeObject) sets $f.[[HomeObject]] to object and is called from only

  • ClassFieldDefinitionEvaluation with argument homeObject
  • ClassStaticBlockDefinitionEvaluation with argument homeObject

DefineMethod is called with argument object from only

  • MethodDefinitionEvaluation with argument object

DefineMethod is called with argument proto from only

  • ClassDefinitionEvaluation
    • for the ConstructorMethod of the class body
    • where proto is OrdinaryObjectCreate(protoParent), exposed as the "prototype" property of the returned class constructor
    • where protoParent is null for extends null, x.prototype for extends x where it is null or an object, and %Object.prototype% for missing extends

MethodDefinitionEvaluation is called with argument object from only

  • PropertyDefinitionEvaluation with argument object
  • ClassElementEvaluation with argument object

ClassFieldDefinitionEvaluation is called with argument object from only

  • ClassElementEvaluation with argument object

ClassStaticBlockDefinitionEvaluation is called with argument object from only

  • ClassElementEvaluation with argument object

ClassElementEvaluation is called with argument proto from only

  • ClassDefinitionEvaluation
    • for non-static class elements
    • where proto is OrdinaryObjectCreate(protoParent), exposed as the "prototype" property of the returned class constructor
    • where protoParent is null for extends null, x.prototype for extends x where it is null or an object, and %Object.prototype% for missing extends

ClassElementEvaluation is called with argument F from only

  • ClassDefinitionEvaluation
    • for static class elements
    • where F is the returned class constructor (and subject to later prototype mutation)

PropertyDefinitionEvaluation is called with argument obj from only

  • Evaluation of |ObjectLiteral|
    • where obj is OrdinaryObjectCreate(%Object.prototype%)
    • where obj is returned (and subject to later prototype mutation)
23:04
<bakkot>
Richard Gibson: your analysis sounds right to me
23:05
<bakkot>
I strongly suspect there's a number of remaining cases where there's a ! which should be a ?
23:05
<bakkot>
or, I should say the non-throwy-ness sounds right; I haven't looked for how it might be undefined