2016-04-07 14:06:55 -07:00
|
|
|
// Copyright 2016 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.
|
|
|
|
|
2022-09-21 13:28:42 +02:00
|
|
|
// Flags: --allow-natives-syntax --turbofan
|
2016-04-07 14:06:55 -07:00
|
|
|
|
|
|
|
function foo(a) {
|
|
|
|
for (var d in a) {
|
|
|
|
delete a[1];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-08-01 08:38:30 +02:00
|
|
|
%PrepareFunctionForOptimization(foo);
|
2016-04-07 14:06:55 -07:00
|
|
|
foo([1,2,3]);
|
|
|
|
foo([2,3,4]);
|
|
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
|
|
foo([1,2,3]);
|
|
|
|
assertOptimized(foo);
|