Commit a5449405 authored by yangguo@chromium.org's avatar yangguo@chromium.org

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
parent 3b9f5e86
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment