2016-08-04 14:41:09 +00:00
|
|
|
# Copyright 2016 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.
|
|
|
|
|
|
|
|
# Use this to run several variants of the tests.
|
|
|
|
ALL_VARIANT_FLAGS = {
|
2019-07-12 13:50:04 +00:00
|
|
|
"assert_types": [["--assert-types"]],
|
2018-02-12 12:09:48 +00:00
|
|
|
"code_serializer": [["--cache=code"]],
|
2016-08-04 14:41:09 +00:00
|
|
|
"default": [[]],
|
2017-11-20 12:43:01 +00:00
|
|
|
"future": [["--future"]],
|
2019-04-03 10:11:59 +00:00
|
|
|
"gc_stats": [["--gc-stats=1"]],
|
2018-01-15 09:45:38 +00:00
|
|
|
# Alias of exhaustive variants, but triggering new test framework features.
|
|
|
|
"infra_staging": [[]],
|
2019-01-24 18:04:42 +00:00
|
|
|
"interpreted_regexp": [["--regexp-interpret-all"]],
|
2019-02-04 10:24:00 +00:00
|
|
|
"jitless": [["--jitless"]],
|
2017-11-30 09:33:05 +00:00
|
|
|
"minor_mc": [["--minor-mc"]],
|
2017-04-28 13:33:43 +00:00
|
|
|
# No optimization means disable all optimizations. OptimizeFunctionOnNextCall
|
|
|
|
# would not force optimization too. It turns into a Nop. Please see
|
|
|
|
# https://chromium-review.googlesource.com/c/452620/ for more discussion.
|
2019-04-09 13:00:38 +00:00
|
|
|
# For WebAssembly, we test "Liftoff-only" in the nooptimization variant and
|
|
|
|
# "TurboFan-only" in the stress variant. The WebAssembly configuration is
|
|
|
|
# independent of JS optimizations, so we can combine those configs.
|
|
|
|
"nooptimization": [["--no-opt", "--liftoff", "--no-wasm-tier-up"]],
|
2018-01-15 09:45:38 +00:00
|
|
|
"slow_path": [["--force-slow-path"]],
|
2019-04-09 13:00:38 +00:00
|
|
|
"stress": [["--stress-opt", "--always-opt", "--no-liftoff",
|
2019-08-21 09:25:07 +00:00
|
|
|
"--no-wasm-tier-up", '--stress-lazy-source-positions']],
|
2019-05-02 09:16:12 +00:00
|
|
|
"stress_js_bg_compile_wasm_code_gc": [["--stress-background-compile",
|
|
|
|
"--wasm-code-gc",
|
|
|
|
"--stress-wasm-code-gc"]],
|
2018-01-15 09:45:38 +00:00
|
|
|
"stress_incremental_marking": [["--stress-incremental-marking"]],
|
2018-01-12 10:32:33 +00:00
|
|
|
# Trigger stress sampling allocation profiler with sample interval = 2^14
|
|
|
|
"stress_sampling": [["--stress-sampling-allocation-profiler=16384"]],
|
2018-01-05 09:41:12 +00:00
|
|
|
"trusted": [["--no-untrusted-code-mitigations"]],
|
2018-05-07 23:38:47 +00:00
|
|
|
"no_wasm_traps": [["--no-wasm-trap-handler"]],
|
2016-08-04 14:41:09 +00:00
|
|
|
}
|
|
|
|
|
2018-01-26 13:41:12 +00:00
|
|
|
SLOW_VARIANTS = set([
|
|
|
|
'stress',
|
|
|
|
'nooptimization',
|
|
|
|
])
|
|
|
|
|
|
|
|
FAST_VARIANTS = set([
|
|
|
|
'default'
|
|
|
|
])
|
|
|
|
|
|
|
|
|
|
|
|
def _variant_order_key(v):
|
|
|
|
if v in SLOW_VARIANTS:
|
|
|
|
return 0
|
|
|
|
if v in FAST_VARIANTS:
|
|
|
|
return 100
|
|
|
|
return 50
|
|
|
|
|
|
|
|
ALL_VARIANTS = sorted(ALL_VARIANT_FLAGS.keys(),
|
|
|
|
key=_variant_order_key)
|
|
|
|
|
|
|
|
# Check {SLOW,FAST}_VARIANTS entries
|
|
|
|
for variants in [SLOW_VARIANTS, FAST_VARIANTS]:
|
|
|
|
for v in variants:
|
|
|
|
assert v in ALL_VARIANT_FLAGS
|