Small improvement to String.fromCodePoint.
R=rossberg@chromium.org Review URL: https://codereview.chromium.org/390173004 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22506 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
3b9f5e86d4
commit
a5449405dd
@ -160,10 +160,8 @@ function StringFromCodePoint(_) { // length = 1
|
||||
result += %_StringCharFromCode(code);
|
||||
} else {
|
||||
code -= 0x10000;
|
||||
result += StringFromCharCode(
|
||||
code >>> 10 & 0x3FF | 0xD800,
|
||||
0xDC00 | code & 0x3FF
|
||||
);
|
||||
result += %_StringCharFromCode((code >>> 10) & 0x3FF | 0xD800);
|
||||
result += %_StringCharFromCode(code & 0x3FF | 0xDC00);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user