Software: Apache. PHP/8.3.27 uname -a: Linux pdx1-shared-a4-04 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64 uid=6659440(dh_z2jmpm) gid=2086089(pg10499364) groups=2086089(pg10499364) Safe-mode: OFF (not secure) /usr/share/nodejs/webassemblyjs/esm/interpreter/runtime/values/ drwxr-xr-x | |
| Viewing file: Select action/file-type: import { getType, typeEq } from "@webassemblyjs/validation";
var _require = require("../../partial-evaluation"),
evaluate = _require.evaluate;
var _require2 = require("../../../errors"),
CompileError = _require2.CompileError;
export function createInstance(allocator, node) {
var value;
var _node$globalType = node.globalType,
valtype = _node$globalType.valtype,
mutability = _node$globalType.mutability; // None or multiple constant expressions in the initializer seems not possible
// TODO(sven): find a specification reference for that
// FIXME(sven): +1 because of the implicit end, change the order of validations
if (node.init.length > 2 || node.init.length === 1) {
throw new CompileError("type mismatch");
} // Validate the type
var resultInferedType = getType(node.init);
if (resultInferedType != null && typeEq([node.globalType.valtype], resultInferedType) === false) {
throw new CompileError("type mismatch");
}
var res = evaluate(allocator, node.init);
if (res != null) {
value = res.value;
}
return {
type: valtype,
mutability: mutability,
value: value
};
} |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0132 ]-- |