[test] Fix mjsunit/getters-on-elements to reset function state

The function "foo" in "base_getter_test" was picking up a left-over
optimised code object from foo's code map, the third time that
base_getter_test was run, instead of optimising it itself. This
broke the assumptions of the test, that each case was functionally
independent from the others, and had started off with empty feedback
and no optimised code.

This breaks the test though, so we have to blacklist it pending a fix
to the root cause (http://crbug.com/v8/6101).

Review-Url: https://codereview.chromium.org/2750623004
Cr-Commit-Position: refs/heads/master@{#43828}
This commit is contained in:
leszeks 2017-03-15 06:31:01 -07:00 committed by Commit bot
parent 16796914cb
commit 2b1ed94464
2 changed files with 13 additions and 0 deletions

View File

@ -87,6 +87,7 @@ function base_getter_test(create_func) {
ap.__defineGetter__(0, function() { calls++; return 0; });
foo(a);
assertUnoptimized(foo);
foo(a);
foo(a);
delete a[0];
@ -165,6 +166,15 @@ function base_getter_test(create_func) {
bar(a);
assertOptimized(bar);
assertEquals(1, calls);
// Reset the state of foo and bar.
clearFunctionTypeFeedback(foo);
deoptimizeFunction(foo);
clearFunctionTypeFeedback(foo);
clearFunctionTypeFeedback(bar);
deoptimizeFunction(bar);
clearFunctionTypeFeedback(bar);
}
// Verify that map transitions don't confuse us.

View File

@ -188,6 +188,9 @@
# Investigate.
'regress/regress-105': [SKIP],
# BUG(v8:6101): This fails because of a hole deopt, need to investigate.
'getters-on-elements': [SKIP],
}], # ALWAYS
['novfp3 == True', {