Fix map compact implementation.
authorantonm@chromium.org <antonm@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 21 Jan 2010 14:22:28 +0000 (14:22 +0000)
committerantonm@chromium.org <antonm@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 21 Jan 2010 14:22:28 +0000 (14:22 +0000)
commitd587851d7ff05f672daf6fc6afa176a21dbc71e5
tree0927840b34fd1cb2bc23929c09becfab57b0d0e0
parent3feb7e801f844a4e8383c5a7afbbd81f4fb9b356
Fix map compact implementation.

Always invoke HeapObjectIterator::has_next() before invoking HeapObjectIterator::next().
This is necessary as ::has_next() has an important side-effect of going to the next
page when current page is exhausted.

And to find if pointers are encodable use more precise data---top of map space, not a number
of pages, as pages might stay in map space due to chunking.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@3672 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/flag-definitions.h
src/mark-compact.cc
src/spaces.h
test/cctest/cctest.status