Truly independent web browser
Tests/LibJS: Keep functions from inlining with a debugger statement
Andreas Kling646fb4442646
diff --git a/Tests/LibJS/JIT/ir/legacy-arguments-eligibility.js b/Tests/LibJS/JIT/ir/legacy-arguments-eligibility.jsindex b6779b8cb13..9d488571c15 100644--- a/Tests/LibJS/JIT/ir/legacy-arguments-eligibility.js+++ b/Tests/LibJS/JIT/ir/legacy-arguments-eligibility.js@@ -1,9 +1,8 @@// Only functions with legacy arguments properties expose their inlined arguments to calls.function opaque() {- // A for-in loop keeps this function from being inlined.- for (const key in {}) {- }+ // A debugger statement keeps this function from being inlined.+ debugger;}const arrow = object => {opaque();diff --git a/Tests/LibJS/Runtime/jit/regress/legacy-arguments-of-inlined-functions.js b/Tests/LibJS/Runtime/jit/regress/legacy-arguments-of-inlined-functions.jsindex 76b401f19a0..51be9d62193 100644--- a/Tests/LibJS/Runtime/jit/regress/legacy-arguments-of-inlined-functions.js+++ b/Tests/LibJS/Runtime/jit/regress/legacy-arguments-of-inlined-functions.js@@ -67,9 +67,8 @@ test("a function called by an inlined function adds a property to an object in iconst failures = compareCompiledWithInterpreter(() => {function addProperty(add) {- // A for-in loop keeps this function from being inlined.- for (const key in {}) {- }+ // A debugger statement keeps this function from being inlined.+ debugger;if (add) middle.arguments[0].z = 3;}function middle(object, add) {@@ -91,9 +90,8 @@ test("a function called by an inlined function changes a property of an object iconst failures = compareCompiledWithInterpreter(() => {function changeProperty(change) {- // A for-in loop keeps this function from being inlined.- for (const key in {}) {- }+ // A debugger statement keeps this function from being inlined.+ debugger;if (change) middle.arguments[0].x = 2;}function middle(object, change) {@@ -114,9 +112,8 @@ test("a function called by an inlined function reads its legacy arguments afterconst failures = compareCompiledWithInterpreter(() => {function readArguments(read) {- // A for-in loop keeps this function from being inlined.- for (const key in {}) {- }+ // A debugger statement keeps this function from being inlined.+ debugger;if (read) return [...middle.arguments];}function middle(value, flag, read) {@@ -136,9 +133,8 @@ test("functions called by the compiled function read a parameter it reassigned fconst failures = compareCompiledWithInterpreter(() => {function readArgument(read) {- // A for-in loop keeps this function from being inlined.- for (const key in {}) {- }+ // A debugger statement keeps this function from being inlined.+ debugger;if (read) return outer.arguments[0].x;}function middle(read) {