Commit Graph

53 Commits

Author SHA1 Message Date
sandholm@chromium.org
3ed8c2f520 Remove scanner abstraction layer from JSON parsing.
Review URL: http://codereview.chromium.org/7020018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8147 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-06-01 14:06:30 +00:00
ricow@chromium.org
3f8a191725 Double allocation size for special json strings on every resize (fixes
crbug 83877)

The issue was that with the relatively small start and increment size of the string we created a ton of string handles when scanning a large string with special characters (500k+ in this case).

In addition, since we can not be sure the the newly allocated string
is in newspace a check is introduced and if not a filler object is
inserted instead of shrinking.
Review URL: http://codereview.chromium.org/7075009

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8082 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-26 14:03:30 +00:00
ricow@chromium.org
3c7e1d7015 Create stand-alone json parser (including scanner).
The current json parser and scanner inherits fromt he normal scanners and parsers,
which are more complicated than we need for parsing json.

The supplied scanner works directly on the string supplied and has a
fast case mode for scanning only ascii characters (it will simply
create a substring or a symbol directly from the existing string). To
allow for creating symbols from a substring I have added a
SubStringAsciiSymbolKey that creates the hash based from our string
without extracting the sub-string. In case we need to add the symbol
it simply creates the symbol directly from the characters inside the
given string.
Review URL: http://codereview.chromium.org/7039037

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@8029 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2011-05-24 12:16:23 +00:00