Reviewers: antonm,

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

Please review this at http://codereview.chromium.org/2223003/show

Affected files:
  M src/arm/codegen-arm.cc
  M src/ia32/codegen-ia32.cc
  M src/runtime.h
  M src/runtime.cc
  M src/x64/codegen-x64.cc
  M test/mjsunit/string-charat.js


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to