LGTM.
Consider adding a threaded test that repeatedly uses the cache from
different
threads, causes occasional GC's, and checks that it gets the correct
results.
http://codereview.chromium.org/1780001/diff/6001/7004
File src/objects-inl.h (right):
http://codereview.chromium.org/1780001/diff/6001/7004#newcode575
src/objects-inl.h:575: return ((self->length() -
JSFunctionResultCache::kEntriesIndex)
Would accept a zero or one length FixedArray (depending on whether
kEntriesIndex is even or odd).
Check that length is at least kEntriesIndex.
Perhaps add an #ifdef DEBUG block that does thorough testing (e.g., that
both size and finger are smis that point inside the array and that the
function is a function).
http://codereview.chromium.org/1780001/show
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev