nodejs/deps/v8/test/mjsunit/regress/regress-crbug-217858.js

19 lines
424 B
JavaScript
Raw Permalink Normal View History

2013-04-08 20:25:29 +02:00
// Copyright 2013 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.
2013-04-08 20:25:29 +02:00
// Flags: --noanalyze-environment-liveness --allow-natives-syntax
2013-04-08 20:25:29 +02:00
var r = /r/;
function f() {
2013-07-02 17:11:31 +02:00
r[r] = function() {};
2013-04-08 20:25:29 +02:00
}
function g() {
for (var i = 0; i < 300; i++) {
f();
if (i == 150) %OptimizeOsr();
}
2013-07-02 17:11:31 +02:00
}
%PrepareFunctionForOptimization(g);