| Index: test/mjsunit/regress/regress-embedded-cons-string.js
|
| diff --git a/test/mjsunit/regress/regress-embedded-cons-string.js b/test/mjsunit/regress/regress-embedded-cons-string.js
|
| index afb3835688565986e45452d038866025ae11b0f0..6a63da2fde0c332b58df653682c514670e3d1570 100644
|
| --- a/test/mjsunit/regress/regress-embedded-cons-string.js
|
| +++ b/test/mjsunit/regress/regress-embedded-cons-string.js
|
| @@ -34,19 +34,21 @@ if (!%IsParallelRecompilationSupported()) {
|
| quit();
|
| }
|
|
|
| -function assertUnoptimized(fun) {
|
| - assertTrue(%GetOptimizationStatus(fun) != 1);
|
| -}
|
| -
|
| function test(fun) {
|
| fun();
|
| fun();
|
| + // Mark for parallel optimization.
|
| %OptimizeFunctionOnNextCall(fun, "parallel");
|
| - fun(); // Trigger optimization in the background.
|
| - gc(); // Tenure cons string.
|
| - assertUnoptimized(fun); // Compilation not complete yet.
|
| - %CompleteOptimization(fun); // Compilation embeds tenured cons string.
|
| - gc(); // Visit embedded cons string during mark compact.
|
| + //Trigger optimization in the background.
|
| + fun();
|
| + //Tenure cons string.
|
| + gc();
|
| + // In the mean time, parallel recompiling is not complete yet.
|
| + assertUnoptimized(fun, "no sync");
|
| + // Parallel recompilation eventually finishes and embeds tenured cons string.
|
| + assertOptimized(fun, "sync");
|
| + //Visit embedded cons string during mark compact.
|
| + gc();
|
| }
|
|
|
| function f() {
|
|
|