2019-02-28 11:22:50 +00:00
|
|
|
// Copyright 2019 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.
|
|
|
|
|
|
|
|
// This file is executed separately before the correctness test case. Add here
|
|
|
|
// checking of global properties that should never differ in any configuration.
|
|
|
|
// A difference found in the prints below will prevent any further correctness
|
|
|
|
// comparison for the selected configurations to avoid flooding bugs.
|
|
|
|
|
|
|
|
print("https://crbug.com/932656");
|
|
|
|
print(Object.getOwnPropertyNames(this));
|
|
|
|
|
|
|
|
print("https://crbug.com/935800");
|
|
|
|
(function () {
|
|
|
|
function foo() {
|
|
|
|
"use asm";
|
|
|
|
function baz() {}
|
|
|
|
return {bar: baz};
|
|
|
|
}
|
2019-04-23 11:22:38 +00:00
|
|
|
print(Object.getOwnPropertyNames(foo().bar));
|
2019-02-28 11:22:50 +00:00
|
|
|
})();
|
2019-07-19 11:10:49 +00:00
|
|
|
|
|
|
|
print("https://crbug.com/985154");
|
|
|
|
(function () {
|
|
|
|
"use strict";
|
|
|
|
function foo() {
|
|
|
|
"use asm";
|
|
|
|
function baz() {}
|
|
|
|
return {bar: baz};
|
|
|
|
}
|
|
|
|
print(Object.getOwnPropertyNames(foo().bar));
|
|
|
|
})();
|
2020-05-06 11:41:07 +00:00
|
|
|
|
2020-11-27 13:29:37 +00:00
|
|
|
print("Sensitive runtime functions are neutered");
|
2020-05-06 11:41:07 +00:00
|
|
|
(function () {
|
|
|
|
function foo() {}
|
|
|
|
%PrepareFunctionForOptimization(foo);
|
|
|
|
foo();
|
|
|
|
foo();
|
|
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
|
|
foo();
|
|
|
|
print(%GetOptimizationStatus(foo));
|
|
|
|
const fun = new Function("f", "sync", "return %GetOptimizationStatus(f);");
|
|
|
|
print(fun(foo));
|
|
|
|
})();
|