v8/test
kaznacheev@chromium.org cfbc1eed9c Prevent modification of cached normalized maps.
Finally sovles the problem that r5342 attempted to solve.
When adding a stub to a map's code cache we need to make
sure that this map is not used by object that do not need
this stub.

Existing solution had 2 flaws:
1. It checked that the map is cached by asking the current context.
If the object escaped into another context then NormalizedMapCache::Contains
returns false negative.

2. If a map gets evicted from the cache we should not try to modify it
even though Contains returns false.

This patch implements much less fragile solution of the same problem:
A map now has a flag (is_shared) that is set once the map is added
to a cache, stays set even after the cache eviction, and is cleared
if the object goes back to fast mode.

Added a regression test.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5518 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2010-09-24 08:18:33 +00:00
..
cctest Prevent modification of cached normalized maps. 2010-09-24 08:18:33 +00:00
es5conform Refactor the tools/test.py script and related testcfg.py files. 2010-08-24 13:34:59 +00:00
message Refactor the tools/test.py script and related testcfg.py files. 2010-08-24 13:34:59 +00:00
mjsunit Fix copy-on-write assert by setting the new array map early. 2010-09-23 12:23:35 +00:00
mozilla Fix mozilla and debug check failures. 2010-08-31 07:31:25 +00:00
sputnik Refactor the tools/test.py script and related testcfg.py files. 2010-08-24 13:34:59 +00:00