Drastically reduce the number of created strings in d8, 2nd attempt.
authorsvenpanne@chromium.org <svenpanne@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 20 Nov 2012 14:47:56 +0000 (14:47 +0000)
committersvenpanne@chromium.org <svenpanne@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 20 Nov 2012 14:47:56 +0000 (14:47 +0000)
commit7e6dd6db1e20a9550149f8fac512b613380f0fc4
treeea7e04db419f63b49811210ef294cc07f9d222fb
parent6a6012c0e7c05fa6de80ad3eebbc1fcd2f3c2f0e
Drastically reduce the number of created strings in d8, 2nd attempt.

This also reduces the number of TLS accesses, so it is a double-win. We have
230k less TLS accesses while running Octane now, so we are down to 23% now
compared to the start of these TLS-related CLs.

To get things right in the presence of multiple Isolates, we have to thread the
correct Isolate through several layers. This threading wasn't that bad after
all, it keeps one honest about the real depdencies. The only ugly thing is that
in ExternalArrayWeakCallback we have to conjure up the current Isolate from the
TLS, but this is a know API deficiency.

Introduced a tiny helper function for throwing on the way.

Review URL: https://codereview.chromium.org/11418088

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13018 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/d8.cc
src/d8.h