Don't share function result caches between contexts.
authorvitalyr@chromium.org <vitalyr@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Sun, 25 Apr 2010 10:31:52 +0000 (10:31 +0000)
committervitalyr@chromium.org <vitalyr@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Sun, 25 Apr 2010 10:31:52 +0000 (10:31 +0000)
commit559ba2ccf01ab3f0ffe4b6d87dc4a2ebdf5cf0fc
treea8bcc554ff9a78b9270eb8590c2c59c2d1a7a0e4
parentc0f1f18f80bf6851a70b9077fa96f040a6fd1490
Don't share function result caches between contexts.

A reference to the caches array was embedded directly into the builtin
code and this allowed sharing objects between contexts.

Unfortunately, clearing the cache on GC won't prevent sharing so we
either have to have per-context builtin code or load the cache
indirectly from the current context. This change implements the second
approach. The first approach may be interesting to consider in the
future for some perfomance critical functions, and the current
approach can still be improved by putting the caches directly into the
global context (or even global objects).

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@4486 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/arm/codegen-arm.cc
src/ia32/codegen-ia32.cc
src/x64/codegen-x64.cc