Second round with some follow-up comments, now that I am working on the
incremental code flushing. Also as discussed offline, this CL will require
rebasing after I land one of my CLs.
https://codereview.chromium.org/10837037/diff/16023/src/mark-compact.cc
File src/mark-compact.cc (right):
https://codereview.chromium.org/10837037/diff/16023/src/mark-compact....
src/mark-compact.cc:1205: return function->code()->IsOld() &&
IsFlushable(heap, shared_info);
See comment below.
https://codereview.chromium.org/10837037/diff/16023/src/mark-compact....
src/mark-compact.cc:1210: if (!shared_info->code()->IsOld()) return
false;
1) We shouldn't remove the check for the marking bit of the code,
because it makes sure that we don't throw away un-optimized code that is
required for bailout from optimized code.
2) Also I don't think it makes much sense to flush code that is strongly
reachable through other paths, that will rather lead to increased memory
consumption because we keep recompiling code without actually collecting
it.
3) Also it might be better to move this check further to the bottom,
because it is more expensive than the others I guess. But I don't have a
strong opinion about this last point.
https://codereview.chromium.org/10837037/