Skip parallel recompilation tests if parallel recompilation is disabled.

Parallel recompilation is usually disabled on single-core systems.

R=jkummerow@chromium.org
BUG=v8:2733

Review URL: https://codereview.chromium.org/17261021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15231 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
yangguo@chromium.org 2013-06-20 11:01:33 +00:00
parent f7ba3a7bb1
commit 928cbcdc8d
5 changed files with 27 additions and 4 deletions

View File

@ -28,6 +28,11 @@
// Flags: --allow-natives-syntax
// Flags: --parallel-recompilation --parallel-recompilation-delay=50
if (!%IsParallelRecompilationSupported()) {
print("Parallel recompilation is disabled. Skipping this test.");
quit();
}
function assertUnoptimized(fun) {
assertTrue(%GetOptimizationStatus(fun) != 1);
}

View File

@ -28,6 +28,11 @@
// Flags: --allow-natives-syntax --expose-gc
// Flags: --parallel-recompilation --parallel-recompilation-delay=50
if (!%IsParallelRecompilationSupported()) {
print("Parallel recompilation is disabled. Skipping this test.");
quit();
}
function assertUnoptimized(fun) {
assertTrue(%GetOptimizationStatus(fun) != 1);
}
@ -60,10 +65,8 @@ assertUnoptimized(g);
%OptimizeFunctionOnNextCall(g, "parallel");
f(g(2)); // Trigger optimization.
if (%IsParallelRecompilationSupported()) {
assertUnoptimized(f); // Not yet optimized.
assertUnoptimized(g);
}
assertUnoptimized(f); // Not yet optimized.
assertUnoptimized(g);
%CompleteOptimization(f); // Wait till optimized code is installed.
%CompleteOptimization(g);

View File

@ -28,6 +28,11 @@
// Flags: --allow-natives-syntax
// Flags: --parallel-recompilation --parallel-recompilation-delay=50
if (!%IsParallelRecompilationSupported()) {
print("Parallel recompilation is disabled. Skipping this test.");
quit();
}
function assertUnoptimized(fun) {
assertTrue(%GetOptimizationStatus(fun) != 1);
}

View File

@ -28,6 +28,11 @@
// Flags: --track-fields --track-double-fields --allow-natives-syntax
// Flags: --parallel-recompilation --parallel-recompilation-delay=50
if (!%IsParallelRecompilationSupported()) {
print("Parallel recompilation is disabled. Skipping this test.");
quit();
}
function assertUnoptimized(fun) {
assertTrue(%GetOptimizationStatus(fun) != 1);
}

View File

@ -28,6 +28,11 @@
// Flags: --nodead-code-elimination --parallel-recompilation
// Flags: --allow-natives-syntax
if (!%IsParallelRecompilationSupported()) {
print("Parallel recompilation is disabled. Skipping this test.");
quit();
}
function g() { // g() cannot be optimized.
const x = 1;
x++;