[asm.js] Re-enable lazy validation for asm.js modules.
The modules generated by translation from asm.js to WebAssembly are valid by construction, an eager sequential validation is not required. This behavior has been the default and recently broke by a refactoring, hence this just re-enables the path in question. R=ahaas@chromium.org BUG=chromium:969368 Change-Id: I29811a7f278aed0f34c09483394a60b4b865ab6b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1664335 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Cr-Commit-Position: refs/heads/master@{#62248}
This commit is contained in:
parent
6f7ebd0385
commit
b5fe1b4b4c
@ -860,7 +860,7 @@ bool CompileLazy(Isolate* isolate, NativeModule* native_module,
|
||||
// During lazy compilation, we can only get compilation errors when
|
||||
// {--wasm-lazy-validation} is enabled. Otherwise, the module was fully
|
||||
// verified before starting its execution.
|
||||
DCHECK_IMPLIES(result.failed(), FLAG_wasm_lazy_validation);
|
||||
CHECK_IMPLIES(result.failed(), FLAG_wasm_lazy_validation);
|
||||
const WasmFunction* func = &module->functions[func_index];
|
||||
if (result.failed()) {
|
||||
ErrorThrower thrower(isolate, nullptr);
|
||||
@ -1129,9 +1129,12 @@ void CompileNativeModule(Isolate* isolate, ErrorThrower* thrower,
|
||||
NativeModule* native_module) {
|
||||
ModuleWireBytes wire_bytes(native_module->wire_bytes());
|
||||
const bool lazy_module = IsLazyModule(wasm_module);
|
||||
if (!FLAG_wasm_lazy_validation &&
|
||||
if (!FLAG_wasm_lazy_validation && wasm_module->origin == kWasmOrigin &&
|
||||
MayCompriseLazyFunctions(wasm_module, native_module->enabled_features(),
|
||||
lazy_module)) {
|
||||
// Validate wasm modules for lazy compilation if requested. Never validate
|
||||
// asm.js modules as these are valid by construction (additionally a CHECK
|
||||
// will catch this during lazy compilation).
|
||||
ValidateSequentially(wasm_module, native_module, isolate->counters(),
|
||||
isolate->allocator(), thrower, lazy_module,
|
||||
kOnlyLazyFunctions);
|
||||
|
Loading…
Reference in New Issue
Block a user