[heap] refactor inline allocation step code
authorofrobots <ofrobots@google.com>
Thu, 24 Sep 2015 18:22:09 +0000 (11:22 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 24 Sep 2015 18:22:24 +0000 (18:22 +0000)
commit1c5e511dc20fc7ff5f5b29ab4157a2143a3d1ede
treeffd222f7a15ef1a6bd48e010bab7d40d8e4fc1dc
parentd90fdd139b8306aaed350157e7a17e43bc75add4
[heap] refactor inline allocation step code

Once I improved byte accounting done for incremental mark in [1], there is some
code duplication that becomes apparent. This commit refactors the duplicated
code into a private method on NewSpace. This also makes it easy to add new
consumers of inline allocation steps in the future.

[1] https://codereview.chromium.org/1274453002/

R=hpayer@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1351983002

Cr-Commit-Position: refs/heads/master@{#30921}
src/heap/spaces.cc
src/heap/spaces.h