Commit Graph

7 Commits

Author SHA1 Message Date
vitalyr@chromium.org
6c74d30f83 Fix double to integer conversions in runtime string indexing.
Review URL: http://codereview.chromium.org/2577001

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4791 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-03 11:31:19 +00:00
vitalyr@chromium.org
3ec0b86495 Make StringCharCodeAt runtime function do what it name implies and not
just indexed string access.

The difference is that String.prototype.charCodeAt accepts any number
as an index, whereas string[] only accepts array indices.

Review URL: http://codereview.chromium.org/2467006

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4790 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-06-03 09:32:07 +00:00
vitalyr@chromium.org
64bc39a726 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

Review URL: http://codereview.chromium.org/2223003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4734 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 16:11:30 +00:00
vitalyr@chromium.org
ad0e38909f Custom call IC-s for String.prototype.{charAt,charCodeAt}.
These string methods can be composed from two basic blocks: charCodeAt
and fromCharCode, both of which have fast cases for certain types of
inputs. In this patch these two blocks are refactored to allow
generating the fast cases without having to jump around the slow
cases. In the slow cases since they can now be invoked both from
inline runtime functions and from IC stubs we either have to
save/restore state of the current frame or enter/leave a new internal
frame. This is handled by new RuntimeCallHelper interface. Its
implementation for virtual frame is based on FrameRegisterState class
extracted from DeferredCode class.

Review URL: http://codereview.chromium.org/2087009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4733 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-05-26 14:23:19 +00:00
vitalyr@chromium.org
dd7b55eb9f Implemented one-char cache lookup in generated code.
This speeds up string,charAt(n) and string[n].

Review URL: http://codereview.chromium.org/660184

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3980 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-02-26 20:14:20 +00:00
christian.plesner.hansen@gmail.com
9bed566bdb Changed copyright header from google inc. to v8 project authors.
Added presubmit step to check copyright.



git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-09-09 20:08:45 +00:00
christian.plesner.hansen
c42f5829a1 Included mjsunit JavaScript test suite and C++ unit tests.
In the shell sample don't print the result of executing a script, only
evaluating expressions.

Fixed issue when building samples on Windows using a shared V8
library.  Added visibility option on Linux build which makes the
generated library 18% smaller.

Changed build system to accept multiple build modes in one build and
generate seperate objects, libraries and executables for each mode.

Removed deferred negation optimization (a * -b => -(a * b)) since this
visibly changes operand conversion order.

Improved parsing performance by introducing stack guard in preparsing.
Without a stack guard preparsing always bails out with stack overflow.


git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2008-08-22 13:33:59 +00:00