[Liftoff] Ensure that asm.js code is compiled with Turbofan
Liftoff currently does not support all asm.js code, and tier-up does not work with lazy compilation. Hence, disable Liftoff for asm.js in general. We will look at this later, when we have better tier-up. R=titzer@chromium.org Bug: v8:6600 Change-Id: I00d9e27d861067b22c0738ade7070538ee8c919c Reviewed-on: https://chromium-review.googlesource.com/1047245 Reviewed-by: Ben Titzer <titzer@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#53158}
This commit is contained in:
parent
cf4b5a999a
commit
db8bc0adbc
@ -53,6 +53,10 @@ WasmCompilationUnit::WasmCompilationUnit(Isolate* isolate, ModuleEnv* env,
|
||||
mode_(mode) {
|
||||
DCHECK_GE(index, env->module->num_imported_functions);
|
||||
DCHECK_LT(index, env->module->functions.size());
|
||||
// Always disable Liftoff for asm.js, for two reasons:
|
||||
// 1) asm-specific opcodes are not implemented, and
|
||||
// 2) tier-up does not work with lazy compilation.
|
||||
if (env->module->is_asm_js()) mode = CompilationMode::kTurbofan;
|
||||
SwitchMode(mode);
|
||||
}
|
||||
|
||||
|
@ -3398,8 +3398,10 @@ CompilationState::CompilationState(internal::Isolate* isolate, ModuleEnv& env)
|
||||
: isolate_(isolate),
|
||||
module_env_(env),
|
||||
max_memory_(GetMaxUsableMemorySize(isolate) / 2),
|
||||
compile_mode_(FLAG_wasm_tier_up ? CompileMode::kTiering
|
||||
: CompileMode::kRegular),
|
||||
// TODO(clemensh): Fix fuzzers such that {env.module} is always non-null.
|
||||
compile_mode_(FLAG_wasm_tier_up && (!env.module || env.module->is_wasm())
|
||||
? CompileMode::kTiering
|
||||
: CompileMode::kRegular),
|
||||
wire_bytes_(ModuleWireBytes(nullptr, nullptr)),
|
||||
max_background_tasks_(std::max(
|
||||
1, std::min(FLAG_wasm_num_compilation_tasks,
|
||||
|
Loading…
Reference in New Issue
Block a user