70a43f4d3d
Validation normally happens while generating the turbofan graph of a wasm function. For lazy compilation (behind the flag --wasm-lazy-compilation), we skip this graph generation step during module generation. Thus we need to validate explicitely. R=ahaas@chromium.org BUG=chromium:724851 Change-Id: Ic70887c0d823460a272d0bb636dc98b2b7a7e55e Reviewed-on: https://chromium-review.googlesource.com/509574 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Clemens Hammacher <clemensh@chromium.org> Cr-Commit-Position: refs/heads/master@{#45478}
13 lines
466 B
JavaScript
13 lines
466 B
JavaScript
// Copyright 2017 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.
|
|
|
|
// Flags: --wasm-lazy-compilation
|
|
|
|
load('test/mjsunit/wasm/wasm-constants.js');
|
|
load('test/mjsunit/wasm/wasm-module-builder.js');
|
|
|
|
let builder = new WasmModuleBuilder();
|
|
builder.addFunction('f', kSig_i_v).addBody([kExprReturn]);
|
|
assertThrows(() => builder.instantiate(), WebAssembly.CompileError);
|