151cad81cf
The int64-lowering lowers return nodes which return one int64 value into a return node which returns two int32 values. For this lowering it has to adjust the input count of the return operator. The existing code assumed that if the signature of a function said that the return type is int64, then all return nodes have int64 inputs. However, with a recent CL we also introduced void returns. With this CL I check if the number of inputs of a return node changes with the DefaultLowering, and only if the number of inputs changes, then I check if I also have to change the operator of the return node. R=mstarzinger@chromium.org TEST=mjsunit/regress/wasm/regression-6164 BUG=v8:6164 Change-Id: I004ab1b4be942cc045719f306705d95b48707a1c Reviewed-on: https://chromium-review.googlesource.com/461941 Reviewed-by: Michael Starzinger <mstarzinger@chromium.org> Commit-Queue: Andreas Haas <ahaas@chromium.org> Cr-Commit-Position: refs/heads/master@{#44232}
20 lines
540 B
JavaScript
20 lines
540 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.
|
|
|
|
load('test/mjsunit/wasm/wasm-constants.js');
|
|
load('test/mjsunit/wasm/wasm-module-builder.js');
|
|
|
|
(function() {
|
|
var builder = new WasmModuleBuilder();
|
|
builder.addMemory(31, 31, false);
|
|
builder.addFunction('test', kSig_l_v)
|
|
.addBodyWithEnd([
|
|
// body:
|
|
kExprUnreachable,
|
|
kExprEnd, // @374
|
|
])
|
|
.exportFunc();
|
|
var module = builder.instantiate();
|
|
})();
|