Fix assert by reordering the initialization of the arguments boilerplate.
authorfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 18 Oct 2011 11:32:57 +0000 (11:32 +0000)
committerfschneider@chromium.org <fschneider@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 18 Oct 2011 11:32:57 +0000 (11:32 +0000)
commit456e5e00c37bdff560ae619c14099eebf2b35cb4
tree3d9ec071cac198a70e944c03a1b2f882ca951d7e
parentb15cfedf3874babcd54fe0514c8f1cf9a0804cbc
Fix assert by reordering the initialization of the arguments boilerplate.

If a GC happened during initialization (when allocating the elements array)
of the non_strict_arguments_boilerplate, heap verification would fail with the following assert:

ASSERT_EQ((map()->has_fast_elements() || map()->has_fast_smi_only_elements()),
            (elements()->map() == GetHeap()->fixed_array_map() ||
             elements()->map() == GetHeap()->fixed_cow_array_map()));

This was not harmful since the boilerplate was setup
correctly immediatly afterwards.

Simplified the setup code by removing a call to GetElementsTransitionMap. It always return the same map as
the input object in this case and is therefore unnecessary.

Added more assertions to verify well-formed non-strict
arguments backing store.

BUG=v8:1520
TEST=no more flaky tests with failing this assert.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9678 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/bootstrapper.cc
src/objects-debug.cc
src/objects-inl.h