Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(312)

Issue 68133016: Implements ES6 String.prototype.normalize method. (Closed)

Created:
7 years, 1 month ago by mnita
Modified:
6 years, 8 months ago
CC:
v8-dev
Base URL:
git://github.com/v8/v8.git@master
Visibility:
Public.

Description

Implements ES6 String.prototype.normalize method. BUG=v8:2943 LOG=Y TEST=Unit tests for "real life" use cases, edge cases, various types of normalization. ========================== This is identical to the previous CL https://codereview.chromium.org/40133004/ with two differences: * Added a dummy implementation of String.prototype.normalize to be used when v8 is compiled without intl support * Rebased the the test files for webkit. That was the only reason for the previous failure (and revert). Thank you, Mihai R=svenpanne@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=18972

Patch Set 1 #

Total comments: 3

Patch Set 2 : Implemented review feedback: CHECK_OBJECT_COERCIBLE macro to check for null/undefined. #

Total comments: 8
Unified diffs Side-by-side diffs Delta from patch set Stats (+243 lines, -2 lines) Patch
M src/i18n.js View 1 2 chunks +39 lines, -0 lines 4 comments Download
M src/runtime.h View 1 1 chunk +3 lines, -0 lines 0 comments Download
M src/runtime.cc View 1 1 chunk +29 lines, -0 lines 0 comments Download
M src/string.js View 1 2 chunks +23 lines, -0 lines 4 comments Download
A test/intl/string/normalization.js View 1 chunk +145 lines, -0 lines 0 comments Download
M test/webkit/fast/js/Object-getOwnPropertyNames.js View 1 1 chunk +1 line, -1 line 0 comments Download
M test/webkit/fast/js/Object-getOwnPropertyNames-expected.txt View 1 1 chunk +1 line, -1 line 0 comments Download
M test/webkit/fast/js/kde/inbuilt_function_proto.js View 1 1 chunk +1 line, -0 lines 0 comments Download
M test/webkit/fast/js/kde/inbuilt_function_proto-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
mnita
I have rebased the webkit tests for String.prototype.normalize and added a dummy implementation for the ...
7 years, 1 month ago (2013-11-13 23:03:01 UTC) #1
Sven Panne
LGTM (rubberstamped)
7 years, 1 month ago (2013-11-18 14:14:16 UTC) #2
Sven Panne
What's the state of this CL? If it's not necessary anymore, let's close it, otherwise ...
6 years, 11 months ago (2014-01-28 07:13:12 UTC) #3
mathias
https://codereview.chromium.org/68133016/diff/1/src/i18n.js File src/i18n.js (right): https://codereview.chromium.org/68133016/diff/1/src/i18n.js#newcode2007 src/i18n.js:2007: if (IS_NULL_OR_UNDEFINED(this)) { You should use `CHECK_OBJECT_COERCIBLE` here as ...
6 years, 10 months ago (2014-01-29 09:03:38 UTC) #4
mathias
https://codereview.chromium.org/68133016/diff/1/src/string.js File src/string.js (right): https://codereview.chromium.org/68133016/diff/1/src/string.js#newcode212 src/string.js:212: if (IS_NULL_OR_UNDEFINED(this) && !IS_UNDETECTABLE(this)) { While this is correct, ...
6 years, 10 months ago (2014-01-29 09:05:54 UTC) #5
Sven Panne
Committed patchset #2 manually as r18972 (presubmit successful).
6 years, 10 months ago (2014-01-31 08:09:28 UTC) #6
arv (Not doing code reviews)
FYI https://codereview.chromium.org/68133016/diff/130001/src/i18n.js File src/i18n.js (right): https://codereview.chromium.org/68133016/diff/130001/src/i18n.js#newcode2004 src/i18n.js:2004: throw new $TypeError(ORDINARY_FUNCTION_CALLED_AS_CONSTRUCTOR); Does the spec really mandate ...
6 years, 8 months ago (2014-04-10 18:20:09 UTC) #7
mathiasb
Shouldn’t this have been behind a flag?
6 years, 8 months ago (2014-04-10 19:16:58 UTC) #8
mnita
On 2014/04/10 19:16:58, mathiasb wrote: > Shouldn’t this have been behind a flag? By "behind ...
6 years, 8 months ago (2014-04-10 20:54:20 UTC) #9
mnita
On 2014/04/10 20:54:20, mnita wrote: > On 2014/04/10 19:16:58, mathiasb wrote: > > Shouldn’t this ...
6 years, 8 months ago (2014-04-10 21:19:57 UTC) #10
mnita
https://codereview.chromium.org/68133016/diff/130001/src/i18n.js File src/i18n.js (right): https://codereview.chromium.org/68133016/diff/130001/src/i18n.js#newcode2004 src/i18n.js:2004: throw new $TypeError(ORDINARY_FUNCTION_CALLED_AS_CONSTRUCTOR); On 2014/04/10 18:20:10, arv wrote: > ...
6 years, 8 months ago (2014-04-10 21:20:29 UTC) #11
mnita
> It is very small, and it was very easily approved for ES6, nobody agreed ...
6 years, 8 months ago (2014-04-10 21:56:30 UTC) #12
mathiasb
On 2014/04/10 21:19:57, mnita wrote: > On 2014/04/10 20:54:20, mnita wrote: > > On 2014/04/10 ...
6 years, 8 months ago (2014-04-10 21:57:37 UTC) #13
mnita
6 years, 8 months ago (2014-04-10 22:23:29 UTC) #14
Message was sent while issue was closed.
> The same thing goes for `String.fromCodePoint` and
> `String.prototype.codePointAt` but for some reason the decision there was
> different: https://codereview.appspot.com/13816046#msg3
> 
> I’m just trying to understand the difference.

I don't know the details.

But the spec for code point access APIs went through several rounds of "fixes"
(at least 2 that I know of, one of the update cause by the harmony proposal)
(http://norbertlindenberg.com/2012/05/ecmascript-supplementary-characters/inde...)

Normalization had no objections, and was a separate feature.
(http://wiki.ecmascript.org/doku.php?id=strawman:unicode_normalization)

Powered by Google App Engine
This is Rietveld 408576698