This looks good already. But I wonder if we can do even better and avoid
allocating the extra array for changes? It seems like it should be possible
to
just reuse the existing data table slots for that. In particular, you are
guaranteed that the changes index moves slower than the old_entry index, so
is
always less-or-equal to it. Hence you even should be able to read entries
and
write changes in the same iteration.
https://codereview.chromium.org/289503002/diff/20001/src/objects.cc
File src/objects.cc (right):
https://codereview.chromium.org/289503002/diff/20001/src/objects.cc#newcode16513
src/objects.cc:16513: if (entry_index < index) {
Instead, you can break the loop when reaching 'index', which saves some
time.
https://codereview.chromium.org/289503002/diff/20001/src/objects.h
File src/objects.h (right):
https://codereview.chromium.org/289503002/diff/20001/src/objects.h#newcode10026
src/objects.h:10026: Handle<TableType>
TransitionIterator(Handle<TableType> table);
Rename to just Transition (or Sync?).
Also, is this ever going to be called with anything other than
this->table()? If so, we should drop the parameter. Likewise for the
result, actually -- just make this void-to-void and call it in Next
before even looking at table().
https://codereview.chromium.org/289503002/
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.