archives

« Bugzilla Issues Index

#451 — 15.10.6.2: indirect reference to the result of another step


In 15.10.6.2 "RegExp.prototype.exec(string)",
in the definition of the abstract operation RegExpExec,
step 9 has steps of the form:

b. Call the [[Match]] internal method of R with arguments S and i.
c. If [[Match]] returned failure, then
i. Let i = i+1.
d. else
i. Let r be the State result of the call to [[Match]].
ii. Set matchSucceeded to true.

The phrasing in c and d.i smacks a little of the old "Result(n)" notation.
A better way to express it (more consistent with the rest of the spec)
would be:

b. Let r be the result of calling the [[Match]] internal method
of R with arguments S and i.
c. If r is failure, then
i. Let i = i+1.
d. else
i. Assert: r is a State.
ii. Set matchSucceeded to true.


corrected in editor's draft.