e27deb72c7
The streaming compilation pipeline did not parse the names section and this is also not longer needed for getting function or local names. However, the module name still needs to be set eagerly. Change-Id: I1ac12e98b970ea0781302dc44ee684510bdf2d69 Reviewed-on: https://chromium-review.googlesource.com/962452 Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Stephan Herhut <herhut@chromium.org> Cr-Commit-Position: refs/heads/master@{#51979}
21 lines
639 B
JavaScript
21 lines
639 B
JavaScript
// Copyright 2018 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: --expose-wasm --no-stress-opt
|
|
|
|
load('test/mjsunit/mjsunit.js');
|
|
load('test/mjsunit/wasm/wasm-constants.js');
|
|
load('test/mjsunit/wasm/wasm-module-builder.js');
|
|
|
|
var builder = new WasmModuleBuilder();
|
|
builder.addFunction('main', kSig_i_v).addBody([kExprUnreachable]).exportFunc();
|
|
let buffer = builder.toBuffer();
|
|
assertPromiseResult(WebAssembly.instantiate(buffer), pair => {
|
|
try {
|
|
pair.instance.exports.main();
|
|
} catch (e) {
|
|
print(e.stack);
|
|
}
|
|
});
|