1
0
mirror of https://github.com/ruanyf/es6tutorial.git synced 2025-05-27 20:32:21 +00:00

Merge branch 'gh-pages' of github.com:ruanyf/es6tutorial into gh-pages

This commit is contained in:
ruanyf 2020-04-03 20:46:18 +08:00
commit 0849a77220

View File

@ -70,12 +70,12 @@ F.[[Call]](V, argumentsList)
抽象操作的运行流程,一般是下面这样。
> 1. Let `resultCompletionRecord` be `AbstractOp()`.
> 1. If `resultCompletionRecord` is an abrupt completion, return `resultCompletionRecord`.
> 1. Let `result` be `resultCompletionRecord.[[Value]]`.
> 1. Let `result` be `AbstractOp()`.
> 1. If `result` is an abrupt completion, return `result`.
> 1. Set `result` to `result.[[Value]]`.
> 1. return `result`.
上面的第一步调用抽象操作`AbstractOp()`,得到`resultCompletionRecord`,这是一个 Completion Record。第二步如果这个 Record 属于 abrupt completion就将`resultCompletionRecord`返回给用户。如果此处没有返回,就表示运行结果正常,所得的值存放在`resultCompletionRecord.[[Value]]`属性。第三步,将这个值记为`result`。第四步,将`result`返回给用户
上面的第一步调用抽象操作`AbstractOp()`,得到`result`,这是一个 Completion Record。第二步如果`result`属于 abrupt completion就直接返回。如果此处没有返回表示`result`属于 normal completion。第三步`result`的值设置为`resultCompletionRecord.[[Value]]`。第四步,返回`result`
ES6 规格将这个标准流程,使用简写的方式表达。