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

Issue 11576069: Correctly handle negative codes in String.fromCharCode() (Closed)

Created:
8 years ago by ulan
Modified:
8 years ago
Reviewers:
Yang
CC:
v8-dev
Visibility:
Public.

Description

Correctly handle negative codes in String.fromCharCode() BUG=166553 R=yangguo@chromium.org Committed: https://code.google.com/p/v8/source/detail?r=13235

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -5 lines) Patch
M src/string.js View 1 chunk +1 line, -0 lines 0 comments Download
A + test/mjsunit/regress/regress-166553.js View 1 chunk +5 lines, -5 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
ulan
PTAL
8 years ago (2012-12-18 12:15:19 UTC) #1
Yang
LGTM, but its probably cheaper not to do the branch and just always do the ...
8 years ago (2012-12-18 12:28:22 UTC) #2
ulan
8 years ago (2012-12-18 12:36:42 UTC) #3
In most cases the code will be positive, so I guess sign check is cheaper as it
avoids store.

On 2012/12/18 12:28:22, Yang wrote:
> LGTM, but its probably cheaper not to do the branch and just always do the
> bitwise-and with 0xffff. You can combine that with the previous line that does
> the ToNumber conversion and also does the bitwise-and.

Powered by Google App Engine
This is Rietveld 408576698