2015-08-26 09:37:46 +00:00
|
|
|
// 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
|
|
|
|
|
|
|
|
var v1 = [];
|
|
|
|
var v2 = [];
|
|
|
|
v1.__proto__ = v2;
|
|
|
|
|
2019-06-12 14:00:50 +00:00
|
|
|
function f() {
|
2015-08-26 09:37:46 +00:00
|
|
|
var a = [];
|
2019-06-12 14:00:50 +00:00
|
|
|
for (var i = 0; i < 2; i++) {
|
2015-08-26 09:37:46 +00:00
|
|
|
a.push([]);
|
|
|
|
a = v2;
|
|
|
|
}
|
2019-06-12 14:00:50 +00:00
|
|
|
};
|
|
|
|
%PrepareFunctionForOptimization(f);
|
2015-08-26 09:37:46 +00:00
|
|
|
f();
|
|
|
|
%OptimizeFunctionOnNextCall(f);
|
|
|
|
f();
|