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.
File src/mark-compact.cc (right):
src/mark-compact.cc:1205: return function->code()->IsOld() &&
See comment below.
src/mark-compact.cc:1210: if (!shared_info->code()->IsOld()) return
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
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.