Make setting of accessors even more atomic.
authorsvenpanne@chromium.org <svenpanne@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 23 Mar 2012 09:51:56 +0000 (09:51 +0000)
committersvenpanne@chromium.org <svenpanne@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 23 Mar 2012 09:51:56 +0000 (09:51 +0000)
commit4cb600962f9ac3540e5266cbee0607604f442e6e
treea96bdddbed86eb8832aa039abb6467ca82edbe5b
parentb7dca5d5a78c8ac0b0cfdcdfced38c919066fe30
Make setting of accessors even more atomic.

Now the whole getter/setter/attributes triple gets created/set together,
avoiding any hacks regarding previous values/attributes, making things a lot
simpler.

While doing this, an interesting problem surfaced, which has been there for a
long time: After adding/changing acessors in slow mode, we could potentially
fail going back to fast mode because of a failed memory allocation, signaling
the need for a GC. But we have already changed the object in slow mode, so we
are not idempotent and the retry would trigger a newly inserted assertion
(namely, that the code obeys access restrictions). This has been solved by
splitting the transformation to fast mode from the actual setting of the
accessors.

Review URL: https://chromiumcodereview.appspot.com/9716035

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