Lasse,
I've added a test as you suggested. It's pretty weak---only checks if we
don't
crash.
I could expose additional apt to query cache status, just let me know if you
think it's worth it.
Not submitting, waiting for another LGTM
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)
On 2010/04/29 07:14:19, Lasse Reichstein wrote:
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).
Done.
Do you want to add Verify logic into HeapObject::HeapObjectVerify?
But to be honest, I am not sure it's a good idea--other classes
extending FixedArray do not do that and those checks are just
heuristics, but you should know better.
http://codereview.chromium.org/1780001/show
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev