ecma262 icon indicating copy to clipboard operation
ecma262 copied to clipboard

Editorial: GetValue and PutValue do not need to unwrap Completion Records

Open bakkot opened this issue 2 years ago • 1 comments

https://github.com/tc39/ecma262/pull/2744 removed almost every case where GetValue or PutValue was passed a completion record, instead explicitly unwrapping on the previous line or lines. This removes the final three cases and then updates the definitions of those algorithms so that they do not need to handle being passed Completion Records.

bakkot avatar Aug 03 '22 21:08 bakkot

InitializeReferencedBinding also calls ReturnIfAbrupt on its 2 parameters, so it might make sense to include it in this PR.

Done. In the process I marked initialization of let x; and let x = 0; as infallible (in https://github.com/tc39/ecma262/pull/2842/commits/73f2743ebb27e462bc5f922bf2aa34508e474fef), which I am pretty sure is true.

bakkot avatar Aug 04 '22 05:08 bakkot