2015-03-27 12:04:12 +01: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
|
|
|
|
|
2019-08-16 11:32:46 +02:00
|
|
|
a = {
|
|
|
|
y: 1.5
|
|
|
|
};
|
2015-03-27 12:04:12 +01:00
|
|
|
a.y = 1093445778;
|
|
|
|
b = a.y;
|
2019-08-16 11:32:46 +02:00
|
|
|
c = {
|
|
|
|
y: {}
|
|
|
|
};
|
2015-03-27 12:04:12 +01:00
|
|
|
|
|
|
|
function f() {
|
|
|
|
return {y: b};
|
2019-08-16 11:32:46 +02:00
|
|
|
};
|
|
|
|
%PrepareFunctionForOptimization(f);
|
2015-03-27 12:04:12 +01:00
|
|
|
f();
|
|
|
|
f();
|
|
|
|
%OptimizeFunctionOnNextCall(f);
|
|
|
|
assertEquals(f().y, 1093445778);
|