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

31 lines
484 B
JavaScript
Raw Permalink Normal View History

2014-03-13 20:45:44 +04:00
// Copyright 2014 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
a = {
y: 1.5
};
2014-03-18 00:33:01 +04:00
a.y = 0;
b = a.y;
c = {
y: {}
};
2014-03-18 00:33:01 +04:00
2014-03-13 20:45:44 +04:00
function f() {
2014-03-18 00:33:01 +04:00
return 1;
}
function g() {
var e = {y: b};
var d = {x: f()};
var d = {x: f()};
2014-03-18 00:33:01 +04:00
return [e, d];
};
%PrepareFunctionForOptimization(g);
2014-03-18 00:33:01 +04:00
g();
g();
%OptimizeFunctionOnNextCall(g);
assertEquals(1, g()[1].x);