Speed up quoting of JSON strings by allocating a string that is big enough
authorerik.corry@gmail.com <erik.corry@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 8 Dec 2010 16:23:25 +0000 (16:23 +0000)
committererik.corry@gmail.com <erik.corry@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 8 Dec 2010 16:23:25 +0000 (16:23 +0000)
commita5c8cab793b4359b193a3ebe77c0231ca00b5dbf
treedaff5e342e7d41477b2d2c4cc31b00ee7c6c83fe
parent5423649f0af2c3fabe5f76fe1643e1ea8e922729
Speed up quoting of JSON strings by allocating a string that is big enough
and then trimming it when the length is known.  This way we only have to
traverse the input once.
Review URL: http://codereview.chromium.org/5556012

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5951 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/runtime.cc
src/spaces-inl.h
src/spaces.h