blob: 75d9970eed7d3af02432f82d592e3a55a32d2669 [file] [log] [blame]
// Copyright 2015 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
function bar(a) {
a.pop();
}
function foo(a) {
assertEquals(2, a.length);
var d;
for (d in a) {
bar(a);
}
// If this fails, bar was not called exactly once.
assertEquals(1, a.length);
}
foo([1,2]);
foo([2,3]);
%OptimizeFunctionOnNextCall(foo);
foo([1,2]);