archives

« Bugzilla Issues Index

#4280 — 13.4.1 Array.prototype.toLocaleString: Unnecessary RequireObjectCoercible; Typos


13.4.1 Array.prototype.toLocaleString([locales [, options ]])

Steps 1-2 can be merged by removing RequireObjectCoercible:
> Let A be ToObject(this value)

Step 3 has a typo: "array" -> A

Steps 4-5 can be merged (Get + ToXXX calls are placed in a single step in ES2015):
> Let len be ToLength(Get(A, "length")).

Steps 12.a-b can be merged:
> Let R be ToString(Invoke(firstElement, "toLocaleString", «locales, options»)).

Steps 14.e.i-ii can be merged:
> Let R be ToString(Invoke(nextElement, "toLocaleString", «locales, options»)).


13.4.1 Array.prototype.toLocaleString([locales [, options ]])

Steps 1-2 can be merged by removing RequireObjectCoercible:
> Let A be ToObject(this value)


Fixed.

> Step 3 has a typo: "array" -> A

Fixed.

> Steps 4-5 can be merged (Get + ToXXX calls are placed in a single step in ES2015):
> Let len be ToLength(Get(A, "length")).

Fixed.

> Steps 12.a-b can be merged:
> Let R be ToString(Invoke(firstElement, "toLocaleString", «locales, options»)).

Fixed.

> Steps 14.e.i-ii can be merged:
> Let R be ToString(Invoke(nextElement, "toLocaleString", «locales, options»)).

Fixed.