Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include function name in built-in function toString (Intl functions) #3427

Closed
dilijev opened this issue Jul 25, 2017 · 0 comments
Closed

Include function name in built-in function toString (Intl functions) #3427

dilijev opened this issue Jul 25, 2017 · 0 comments

Comments

@dilijev
Copy link
Contributor

dilijev commented Jul 25, 2017

See: #3204 (comment)

The current spec (and proposed, see proposal also linked from the comment above) require that a the toString of a built-in function object matches the NativeFunction grammar, which states that the function name is optional (can be blank) or "the portion of the returned String that would be matched by IdentifierName must be the initial value of the name property of func"

Currently, we omit the name. But I would maintain that it would be a better developer experience if we included the name. Additionally, all the Intl constructors report their name while all (AFAICT) functions omit their name from the toString.

@bterlson: opinions?
/cc @atulkatti

@dilijev dilijev added this to the vNext milestone Jul 25, 2017
@dilijev dilijev self-assigned this Jul 25, 2017
@dilijev dilijev added the Intl label Mar 27, 2018
@dilijev dilijev assigned jackhorton and unassigned dilijev Mar 27, 2018
chakrabot pushed a commit that referenced this issue Aug 28, 2018
…t262 issues, add support for ICU 62.1

Merge pull request #5612 from jackhorton:intl/lots-of-fixes

Fixes #637
Fixes #5603
Fixes #3427
Fixes #3513
Fixes #3692

Adds build support for ICU 62.1 by enabling /utf-8 in all ICU files rather than just i18n

@rhuanjl's function.length PR took our pass rate from 486 to 530; this further increases it to 580 (compared to V8's 582 and SpiderMonkey's 597). The remaining failures are all known, but slightly more complicated issues, where we shell out to ICU when the spec wants us to do something particularly snowflake-y -- V8 fails most of these tests as well. The remaining ~350 tests are for features that we don't implement and V8/SM either haven't implemented or have turned off by default.

For what its worth, some of the features we haven't implemented are extremely straightforward -- the Intl version of String.prototype.toLocale{Lower|Upper}Case and {Typed}Array.prototype.toLocaleString are tiny. Fixing those tests (by implementing those features) would bump us up to 596.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants