mirror of
https://github.com/nodejs/node.git
synced 2025-05-15 17:23:43 +00:00

PR-URL: https://github.com/nodejs/node/pull/40178 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
21 lines
699 B
JavaScript
21 lines
699 B
JavaScript
// Copyright 2021 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: --gdbjit
|
|
|
|
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
|
|
|
|
// A simple test to ensure that passing the --gdbjit flag doesn't crash.
|
|
(function testGdbJitFlag() {
|
|
const builder = new WasmModuleBuilder();
|
|
builder.addFunction('i32_add', kSig_i_ii)
|
|
.addBody([kExprLocalGet, 0, kExprLocalGet, 1, kExprI32Add])
|
|
.exportFunc();
|
|
|
|
const module = new WebAssembly.Module(builder.toBuffer());
|
|
const instance = new WebAssembly.Instance(module);
|
|
|
|
assertEquals(instance.exports.i32_add(1, 2), 3);
|
|
}());
|