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

Issue 2223003: Fix: make string indexing work with Infinity. (Closed)

Created:
10 years, 7 months ago by Vitaly Repeshko
Modified:
9 years, 7 months ago
Reviewers:
antonm
CC:
v8-dev
Visibility:
Public.

Description

Fix: make string indexing work with Infinity. NumberToUint32 that I was trying to use maps -0 to +0 (as desired) but also maps +/-Infinity to +0, which made +/-Infinity a valid string index. I fixed it by introducing a new runtime function with the right semantics. TEST=LayoutTests/fast/js/char-at.html,mjsunit/string-charat.js Committed: http://code.google.com/p/v8/source/detail?r=4734

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -15 lines) Patch
M src/arm/codegen-arm.cc View 1 chunk +1 line, -5 lines 0 comments Download
M src/ia32/codegen-ia32.cc View 1 chunk +1 line, -5 lines 0 comments Download
M src/runtime.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime.cc View 1 chunk +19 lines, -0 lines 0 comments Download
M src/x64/codegen-x64.cc View 1 chunk +1 line, -5 lines 0 comments Download
M test/mjsunit/string-charat.js View 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Vitaly Repeshko
10 years, 7 months ago (2010-05-26 15:26:16 UTC) #1
antonm
10 years, 7 months ago (2010-05-26 15:58:02 UTC) #2
LGTM.

I esp. liked if (value == 0) value = 0 part.

Powered by Google App Engine
This is Rietveld 408576698