LGTM (with a few comments). This is a maintenance nightmare.
https://codereview.chromium.org/21042004/diff/17001/src/global-handles.cc
File src/global-handles.cc (right):
https://codereview.chromium.org/21042004/diff/17001/src/global-handles.cc#newcode61
src/global-handles.cc:61: LAST_STATE = NEAR_DEATH
Let just rename this to STATE_COUNT or NUMBER_OF_STATES and drop the
explicit assignment of this constant.
https://codereview.chromium.org/21042004/diff/17001/src/global-handles.cc#newcode554
src/global-handles.cc:554: int total_slots =
global_handles->number_of_blocks_*NodeBlock::kSize;
nit: Whitespace around operators. Here and several other occurrences
throughout the file.
https://codereview.chromium.org/21042004/diff/17001/src/global-handles.cc#newcode640
src/global-handles.cc:640: static const int kCountArraySize =
Node::LAST_STATE + 1;
This constant is obsolete, see comment at the top of this file.
https://codereview.chromium.org/21042004/diff/17001/src/global-handles.h
File src/global-handles.h (right):
https://codereview.chromium.org/21042004/diff/17001/src/global-handles.h#newcode159
src/global-handles.h:159: int block_count() const { return
number_of_blocks_; }
nit: Let's add a short one-liner comment to the accessor as well.
https://codereview.chromium.org/21042004/diff/17001/test/cctest/test-global-handles.cc
File test/cctest/test-global-handles.cc (right):
https://codereview.chromium.org/21042004/diff/17001/test/cctest/test-global-handles.cc#newcode362
test/cctest/test-global-handles.cc:362: for (int i = 0; i <
kBlockSize*100; i++) {
nit: Whitespace around the multiplication operator.
https://codereview.chromium.org/21042004/diff/17001/test/cctest/test-global-handles.cc#newcode371
test/cctest/test-global-handles.cc:371: #ifdef DEBUG
nit: The C macro pragmas should not be indented.
https://codereview.chromium.org/21042004/
--
--
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.