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
{{ message }}
This repository was archived by the owner on Jun 20, 2023. It is now read-only.
In "in reverse list order", "List" should be capitalised.
IsUsingAwaitDeclaration is missing a definition for ForDeclaration : LetOrConst ForBinding
I would probably try to have the definition of IsUsingDeclaration mirror the structure of IsUsingAwaitDeclaration, replacing some falses with trues. We don't need to take maximum advantage of the chain rule. I would also combine all the other productions into one big "Return false" case.
You're missing return types on your AOs. Please add them. All AO return types should be listed explicitly now.
AddDisposableResource always returns NormalCompletion(empty). AOs that always return normal completions should not use completion records.
Also, AOs whose value is never consumed should return ~unused~, not ~empty~. Ecmarkup will enforce that these AOs are treated like procedures.
Similarly, when completion records enter an algorithm, you must use the Completion AO. See for example the call of Dispose in DisposeResources or any of the calls of DisposeResources itself. If the AO return types were annotated, I believe ecmarkup would have reported this.
You can use the ? macro with SDOs (you already use it in some places), so you don't need to have a separate ReturnIfAbrupt step.
There's two separate, non-interacting Using flags introduced. One seems to mean "a using declaration is allowed here" and another seems to mean "this production is nested within a using declaration". I would probably try to name them two different things to communicate that they are distinct.
I would probably pull the undefined check out of DisposeResources. It appears that the first parameter of DisposeResources isn't something that just dynamically arrives at an undefined value; instead, the call sites are explicitly setting it to undefined. In those cases, I prefer the guard to be outside the AO.
lookahead ∉ { using }: we have a lookahead ≠ form that should be preferred when the set only contains 1 element
In the SuppressedError constructor, I don't like having an alias named message and a separate alias named msg. Please rename one or both.
I don't see the need for "DisposableStack adopt callback function". Why isn't this just a record? Why does it need to be a function object? Is one ever exposed to user code somewhere?
This is a strictly editorial review. I didn't review for correctness.
IsUsingAwaitDeclarationis missing a definition forForDeclaration : LetOrConst ForBindingIsUsingDeclarationmirror the structure ofIsUsingAwaitDeclaration, replacing somefalses withtrues. We don't need to take maximum advantage of the chain rule. I would also combine all the other productions into one big "Returnfalse" case.AddDisposableResourcealways returnsNormalCompletion(empty). AOs that always return normal completions should not use completion records.~unused~, not~empty~. Ecmarkup will enforce that these AOs are treated like procedures.NormalCompletion()wrappers around the returned values. See https://tc39.es/ecma262/#sec-implicit-normal-completion.DisposeinDisposeResourcesor any of the calls ofDisposeResourcesitself. If the AO return types were annotated, I believe ecmarkup would have reported this.?macro with SDOs (you already use it in some places), so you don't need to have a separateReturnIfAbruptstep.Usingflags introduced. One seems to mean "ausingdeclaration is allowed here" and another seems to mean "this production is nested within ausingdeclaration". I would probably try to name them two different things to communicate that they are distinct.undefinedcheck out ofDisposeResources. It appears that the first parameter ofDisposeResourcesisn't something that just dynamically arrives at anundefinedvalue; instead, the call sites are explicitly setting it toundefined. In those cases, I prefer the guard to be outside the AO.EvaluationSDO. See Editorial: MakeEvaluationmore like regular SDOs ecma262#2744.lookahead ∉ { using }: we have alookahead ≠form that should be preferred when the set only contains 1 elementSuppressedErrorconstructor, I don't like having an alias namedmessageand a separate alias namedmsg. Please rename one or both.