Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Issue 9138016: Add regression test for r10451. (Closed)

Created:
8 years, 11 months ago by Michael Starzinger
Modified:
8 years, 11 months ago
CC:
v8-dev
Visibility:
Public.

Description

Add regression test for r10451. R=vegorov@chromium.org TEST=cctest/test-heap/PrototypeTransitionClearing Committed: https://code.google.com/p/v8/source/detail?r=10455

Patch Set 1 #

Total comments: 4

Patch Set 2 : Addressed comment by Vyacheslav Egorov. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -0 lines) Patch
M test/cctest/test-heap.cc View 1 1 chunk +19 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Michael Starzinger
8 years, 11 months ago (2012-01-20 11:49:41 UTC) #1
Vyacheslav Egorov (Chromium)
lgtm https://chromiumcodereview.appspot.com/9138016/diff/1/test/cctest/test-heap.cc File test/cctest/test-heap.cc (right): https://chromiumcodereview.appspot.com/9138016/diff/1/test/cctest/test-heap.cc#newcode1613 test/cctest/test-heap.cc:1613: FACTORY->NewJSArray(1, TENURED); This loop looks a bit spooky ...
8 years, 11 months ago (2012-01-20 12:17:39 UTC) #2
Michael Starzinger
8 years, 11 months ago (2012-01-20 12:41:53 UTC) #3
Added new patch set.

https://chromiumcodereview.appspot.com/9138016/diff/1/test/cctest/test-heap.cc
File test/cctest/test-heap.cc (right):

https://chromiumcodereview.appspot.com/9138016/diff/1/test/cctest/test-heap.c...
test/cctest/test-heap.cc:1613: FACTORY->NewJSArray(1, TENURED);
On 2012/01/20 12:17:39, Vyacheslav Egorov wrote:
> This loop looks a bit spooky because the fact that NewJSArray returns a handle
> is kinda hidden so one would expect that these arrays will die and this will
> cause infinite loop (but they don't because they actually are referenced from
> the local handles).
> 
> Please add a comment about this. Also it might sense to use bigger arrays to
> make this test complete faster.

Done. Now unnecessary due to second change.

https://chromiumcodereview.appspot.com/9138016/diff/1/test/cctest/test-heap.c...
test/cctest/test-heap.cc:1621:
CHECK(!space->LastPage()->Contains(map->prototype_transitions()->address()));
On 2012/01/20 12:17:39, Vyacheslav Egorov wrote:
> this check look suspicious. by accident there might be a hole on the first
page
> large enough for this object. You might consider changing the first loop into 
> 
> 
> Handle<JSObject> prototype;
> 
> do {
> prototype = FACTORY->NewJSArray(N, TENURED);
> } while (prototype is not on the second page);

Done. Yes, that is much simpler and I can arbitrarily increase the size of the
prototype without worrying about holes in the free-list. That makes the test
complete much faster. Nice idea!

Powered by Google App Engine
This is Rietveld 408576698