VM: return the loop, it is needed for best performance

char-rename
Björn Lindqvist 2016-09-26 05:16:33 +02:00
parent da670c053f
commit c6faf98c86
1 changed files with 7 additions and 4 deletions

View File

@ -14,10 +14,13 @@ struct nursery_copier : no_fixup {
return obj;
}
if (obj->forwarding_pointer_p()) {
object* dest = obj->forwarding_pointer();
FACTOR_ASSERT(!nursery->contains_p(dest));
return dest;
// The while-loop is a needed micro-optimization.
while (obj->forwarding_pointer_p()) {
obj = obj->forwarding_pointer();
}
if (!nursery->contains_p(obj)) {
return obj;
}
cell size = obj->size();