Looks good. Lemme see the iterator.
https://codereview.chromium.org/99133017/diff/60001/src/heap-inl.h
File src/heap-inl.h (right):
https://codereview.chromium.org/99133017/diff/60001/src/heap-inl.h#newcode497
src/heap-inl.h:497: add_to_scratchpad) {
put add_to_scratchpad first in the if expression.
https://codereview.chromium.org/99133017/diff/60001/src/heap-inl.h#newcode499
src/heap-inl.h:499: heap->allocation_sites_scratchpad_pointer] =
nit: I'd be into the more compact
heap->allocation_sites_scratchpad[heap->allocation_sites_scratchpad_pointer++]
= memento->GetAllocationSite(). But it's up to you!
https://codereview.chromium.org/99133017/diff/60001/src/heap.cc
File src/heap.cc (right):
https://codereview.chromium.org/99133017/diff/60001/src/heap.cc#newcode151
src/heap.cc:151: allocation_sites_scratchpad_pointer(0),
How about using the word count or length instead of pointer for the
name.
https://codereview.chromium.org/99133017/diff/60001/src/heap.cc#newcode518
src/heap.cc:518: if (use_scratchpad) {
On 2013/12/12 15:26:05, Hannes Payer wrote:
Should I make an Iterator for that duplicated piece of code?
Yep that is a good idea. Alternatively, a function that accepts an
AllocationSite, but I see it would have to accept all these statistics
variables which wouldn't be fun.
https://codereview.chromium.org/99133017/diff/60001/src/objects.h
File src/objects.h (right):
https://codereview.chromium.org/99133017/diff/60001/src/objects.h#newcode8138
src/objects.h:8138: inline bool IncrementMementoFoundCount();
I guess this needs a comment to explain the motivation and meaning of
the bool return.
https://codereview.chromium.org/99133017/
--
--
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/groups/opt_out.