ECMAScript Edition 3 Errata

up

Monday, June 9, 2003

The following errors are known in the ECMAScript Edition 3 standard:

Section Description
4.2.1 Replace Cfp by CFp in the figure.
Replace
  (but not by cf)
with
  (but not by CF)
in the first paragraph below the figure.
5.1.2 Change section 7.8.5 to section 7.9.
5.1.5 After the line “which is merely a convenient abbreviation for:”, change:
  NonZeroDigit :: one of
to:
  NonZeroDigit ::
7.1 Remove extraneous period in the phrase
  one must use a. Unicode escape sequence
in the last paragraph.
7.3 Change section 7.8.5 to section 7.9.
8.6.2 Change described in described in to described in in the penultimate paragraph.
9.8 Add step numbers 1, 2, and 3 to the 2nd, 3rd, and 4th lines of the last box of the table.
10.1.4 Change property to property name in step 2 of the algorithm.
10.2.3 Change (including the case where it is null) to (note that null is not an object) in the last bullet point.
12.6.3 Change step 1 of the first algorithm from:
  If the first Expression is not present, go to step 4.
to:
  If ExpressionNoIn is not present, go to step 4.
Change step 7 of the second algorithm from:
  If Result(6) is false, go to step 14.
to:
  If Result(6) is false, go to step 17.
12.11 The second algorithm has many errors: the logic of its step 14 is incorrect, the middle element of the result value triple is incorrect in most cases, the algorithm does not account for missing StatementLists, and there is no algorithm for the CaseBlock : { CaseClauses } production. Replace the second algorithm with the following couple of algorithms:

The production CaseBlock : { CaseClausesopt } is given an input parameter, input, and is evaluated as follows:

1. Let V = empty.
2. Let A be the list of CaseClause items in source text order.
3. Let C be the next CaseClause in A. If there is no such CaseClause, then go to step 16.
4. Evaluate C.
5. If input is not equal to Result(4) as defined by the !== operator, then go to step 3.
6. If C does not have a StatementList, then go to step 10.
7. Evaluate C’s StatementList and let R be the result.
8. If R is an abrupt completion, then return R.
9. Let V = R.value.
10. Let C be the next CaseClause in A. If there is no such CaseClause, then go to step 16.
11. If C does not have a StatementList, then go to step 10.
12. Evaluate C’s StatementList and let R be the result.
13. If R.value is not empty, then let V = R.value.
14. If R is an abrupt completion, then return (R.type, VR.target).
15. Go to step 10.
16. Return (normal, V, empty).

The production CaseBlock : { CaseClausesopt DefaultClause CaseClausesopt } is given an input parameter, input, and is evaluated as follows:

1. Let V = empty.
2. Let A be the list of CaseClause items in the first CaseClauses, in source text order.
3. Let C be the next CaseClause in A. If there is no such CaseClause, then go to step 11.
4. Evaluate C.
5. If input is not equal to Result(4) as defined by the !== operator, then go to step 3.
6. If C does not have a StatementList, then go to step 20.
7. Evaluate C’s StatementList and let R be the result.
8. If R is an abrupt completion, then return R.
9. Let V = R.value.
10. Go to step 20.
11. Let B be the list of CaseClause items in the second CaseClauses, in source text order.
12. Let C be the next CaseClause in B. If there is no such CaseClause, then go to step 26.
13. Evaluate C.
14. If input is not equal to Result(13) as defined by the !== operator, then go to step 12.
15. If C does not have a StatementList, then go to step 31.
16. Evaluate C’s StatementList and let R be the result.
17. If R is an abrupt completion, then return R.
18. Let V = R.value.
19. Go to step 31.
20. Let C be the next CaseClause in A. If there is no such CaseClause, then go to step 26.
21. If C does not have a StatementList, then go to step 20.
22. Evaluate C’s StatementList and let R be the result.
23. If R.value is not empty, then let V = R.value.
24. If R is an abrupt completion, then return (R.type, VR.target).
25. Go to step 20.
26. If the DefaultClause does not have a StatementList, then go to step 30.
27. Evaluate the DefaultClause’s StatementList and let R be the result.
28. If R.value is not empty, then let V = R.value.
29. If R is an abrupt completion, then return (R.type, VR.target).
30. Let B be the list of CaseClause items in the second CaseClauses, in source text order.
31. Let C be the next CaseClause in B. If there is no such CaseClause, then go to step 37.
32. If C does not have a StatementList, then go to step 31.
33. Evaluate C’s StatementList and let R be the result.
34. If R.value is not empty, then let V = R.value.
35. If R is an abrupt completion, then return (R.type, VR.target).
36. Go to step 31.
37. Return (normal, V, empty).

12.14 Change step 5 of the TryStatementtry Block Catch Finally algorithm from:
  If Result(4).type is not normal, Let C = Result(4)
to:
  Let C = Result(4)
13 Replace FormalParameterList by FormalParameterListopt in step 1 of the first algorithm.
Replace Result(2) by Result(1) in step 2 of the second algorithm.
13.2.2 Change the F to F in step 3.
15.2.4.3 The standard is correct but unclear here. “the result of calling toString()” means the result of calling the function that is found by looking up the toString property in the this object, which is not necessarily the implementation of toString in section 15.2.4.2.
15.5.4.10  Change the last sentence of the second bullet from:
  The value returned is an array with the length property set to n and properties 0 through n–1 corresponding to the first elements of the results of all matching invocations of RegExp.prototype.exec.
to:
  If n=0, then the value returned is null; otherwise, the value returned is an array with the length property set to n and properties 0 through n–1 corresponding to the first elements of the results of all matching invocations of RegExp.prototype.exec.
15.9.5.2   Change last paragraph from:
  NOTE  It is intended that for any Date value d, the result of Date.prototype.parse(d.toString()) (section 15.9.4.2) is equal to d.
to:
  NOTE  For any Date value d whose milliseconds amount is zero, the result of Date.parse(d.toString()) is equal to d.valueOf(). See section 15.9.4.2.
A.1 Change section 6 to section 7 in the InputElementDiv and InputElementRegExp productions.
Change
   UnicodeEscapeSequence
to
  \ UnicodeEscapeSequence
in the IdentifierStart and IdentifierPart productions.
Add grammar production (from 7.8.4):
NonEscapeCharacter ::
    SourceCharacter but not EscapeCharacter or LineTerminator
Delete the UnicodeEscapeSequence production referring to section 7.6:
  UnicodeEscapeSequence ::                       See section 7.6
      \u 
HexDigit HexDigit HexDigit HexDigit
Note that the UnicodeEscapeSequence production referring to section 7.8.4 should stay:
  UnicodeEscapeSequence ::                       See section 7.8.4
      u 
HexDigit HexDigit HexDigit HexDigit
B.1.1 Add grammar production:
OctalDigit :: one of
    0 1 2 3 4 5 6 7

Waldemar Horwat
Last modified Tuesday, January 15, 2008
up