7d5e6b1516
This avoids a deopt loop. Bug: v8:7254 Change-Id: I3a676186bc52fd47b03f03c26cb07d9257993693 Reviewed-on: https://chromium-review.googlesource.com/968503 Reviewed-by: Jaroslav Sevcik <jarin@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#52036}
17 lines
378 B
JavaScript
17 lines
378 B
JavaScript
// Copyright 2018 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --allow-natives-syntax --opt
|
|
|
|
function foo(a) {
|
|
a[0];
|
|
a[1] = "";
|
|
}
|
|
|
|
foo([0,0].map(x => x));
|
|
foo([0,0].map(x => x));
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
foo([0,0].map(x => x));
|
|
assertOptimized(foo);
|