Commit 71bf2762 authored by Mythri A's avatar Mythri A Committed by Commit Bot

[mjsunit] Fix elements-kind test to not call %NeverOptimizeFunction

test/mjsunit/elements-kind.js calls %NeverOptimizeFunction followed by
%OptimizeFunctionOnNextCall later. If NeverOptimize marker is set, the
funciton would not be optimized even when requested through
%OptimizeFunctionOnNextCall

Change-Id: I37307fee7afd083953699026a82bbf12c85581ac
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1533865
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60503}
parent 80061615
......@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// Flags: --allow-natives-syntax --expose-gc --nostress-opt --typed-array-max-size-in-heap=2048
// Flags: --allow-natives-syntax --expose-gc --nostress-opt
var elements_kind = {
fast_smi_only : 'fast smi only elements',
......@@ -202,7 +202,6 @@ function construct_objects() {
// Test crankshafted transition SMI->DOUBLE.
%EnsureFeedbackVectorForFunction(convert_to_double);
%NeverOptimizeFunction(convert_to_double);
function convert_to_double(array) {
array[1] = 2.5;
assertKind(elements_kind.fast_double, array);
......@@ -215,7 +214,6 @@ smis = construct_smis();
convert_to_double(smis);
// Test crankshafted transitions SMI->FAST and DOUBLE->FAST.
%EnsureFeedbackVectorForFunction(convert_to_fast);
%NeverOptimizeFunction(convert_to_fast);
function convert_to_fast(array) {
array[1] = "two";
assertKind(elements_kind.fast, array);
......@@ -233,7 +231,6 @@ convert_to_fast(doubles);
// Test transition chain SMI->DOUBLE->FAST (crankshafted function will
// transition to FAST directly).
%EnsureFeedbackVectorForFunction(convert_mixed);
%NeverOptimizeFunction(convert_mixed);
function convert_mixed(array, value, kind) {
array[1] = value;
assertKind(kind, array);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment