Generalized the EvalCache into a CompilationCache and enabled
authorkasperl@chromium.org <kasperl@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 11 Sep 2008 10:51:52 +0000 (10:51 +0000)
committerkasperl@chromium.org <kasperl@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 11 Sep 2008 10:51:52 +0000 (10:51 +0000)
commitb5a72a1645a9d97bc33d40f1d65043a23a7c0ece
treec8f0ca80a83a6e544d533af8cfde91061466a924
parent6063e76cec98e059a31617155e9aad5a4b9d7a58
Generalized the EvalCache into a CompilationCache and enabled
it for scripts too. In the context of Chromium, this should
have a very positive impact on memory consumption for web apps
that run multiple tabs from the same domain with a lot of the
same JavaScript code.

For now, the cache retirement policy is really simple:
Whenever a mark-sweep collection is started we clear the
cache. This guarantees that this change will not have a
huge negative impact on memory consumption, but it may
not be ideal. We should consider a more sophisticated LRU
scheme.
Review URL: http://codereview.chromium.org/1933

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@270 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
15 files changed:
src/SConscript
src/compilation-cache.cc [new file with mode: 0644]
src/compilation-cache.h [new file with mode: 0644]
src/compiler.cc
src/handles.cc
src/heap-inl.h
src/heap.cc
src/heap.h
src/objects-inl.h
src/objects.cc
src/objects.h
src/runtime.cc
src/v8-counters.h
test/cctest/test-api.cc
tools/visual_studio/v8_base.vcproj