1// Copyright 2019 the V8 project authors. All rights reserved. 2// Use of this source code is governed by a BSD-style license that can be 3// found in the LICENSE file. 4 5// This file is executed separately before the correctness test case. Add here 6// checking of global properties that should never differ in any configuration. 7// A difference found in the prints below will prevent any further correctness 8// comparison for the selected configurations to avoid flooding bugs. 9 10print("https://crbug.com/932656"); 11print(Object.getOwnPropertyNames(this)); 12 13print("https://crbug.com/935800"); 14(function () { 15 function foo() { 16 "use asm"; 17 function baz() {} 18 return {bar: baz}; 19 } 20 print(Object.getOwnPropertyNames(foo().bar)); 21})(); 22 23print("https://crbug.com/985154"); 24(function () { 25 "use strict"; 26 function foo() { 27 "use asm"; 28 function baz() {} 29 return {bar: baz}; 30 } 31 print(Object.getOwnPropertyNames(foo().bar)); 32})(); 33 34print("Sensitive runtime functions are neutered"); 35(function () { 36 function foo() {} 37 %PrepareFunctionForOptimization(foo); 38 foo(); 39 foo(); 40 %OptimizeFunctionOnNextCall(foo); 41 foo(); 42 print(%GetOptimizationStatus(foo)); 43 const fun = new Function("f", "return %GetOptimizationStatus(f);"); 44 print(fun(foo)); 45})(); 46