mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-09 13:01:26 +00:00
Second pass on the programmatic asc API; Make compiler tests use asc directly
This commit is contained in:
parent
349de60129
commit
819d79889d
@ -1 +1,41 @@
|
||||
Compiler frontend for node.js.
|
||||
Compiler frontend for node.js
|
||||
=============================
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
For an up to date list of available command line options, see:
|
||||
|
||||
```
|
||||
$> asc --help
|
||||
```
|
||||
|
||||
API
|
||||
---
|
||||
|
||||
The API accepts the same options as the CLI but also lets you override stdout and stderr and/or provide a callback. Example:
|
||||
|
||||
```js
|
||||
const asc = require("assemblyscript/bin/asc.js");
|
||||
asc.main([
|
||||
"myModule.ts",
|
||||
"-b", "myModule.wasm",
|
||||
"-O",
|
||||
"--sourceMap",
|
||||
"--measure"
|
||||
], {
|
||||
stdout: process.stdout,
|
||||
stderr: process.stderr
|
||||
}, function(err) {
|
||||
if (err)
|
||||
throw err;
|
||||
...
|
||||
});
|
||||
```
|
||||
|
||||
Available command line options can also be obtained programmatically:
|
||||
|
||||
```js
|
||||
const options = require("assemblyscript/bin/asc.json");
|
||||
...
|
||||
```
|
||||
|
2
bin/asc
2
bin/asc
@ -1,2 +1,2 @@
|
||||
#!/usr/bin/env node
|
||||
require("./asc.js").main(process.argv.slice(2));
|
||||
process.exitCode = require("./asc.js").main(process.argv.slice(2));
|
||||
|
331
bin/asc.js
331
bin/asc.js
@ -1,5 +1,6 @@
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const os = require("os");
|
||||
|
||||
// Use distribution files if present, otherwise run the sources directly
|
||||
var assemblyscript;
|
||||
@ -24,20 +25,42 @@ const DEFAULT_SHRINK_LEVEL = 1;
|
||||
|
||||
exports.VERSION = VERSION;
|
||||
|
||||
function main(argv, callback) {
|
||||
function main(argv, options, callback) {
|
||||
if (typeof options === "function") {
|
||||
callback = options;
|
||||
options = {};
|
||||
} else if (!options)
|
||||
options = {};
|
||||
|
||||
const stdout = options.stdout || process.stdout;
|
||||
const stderr = options.stderr || process.stderr;
|
||||
|
||||
// Record compilation times
|
||||
var stats = createStats();
|
||||
|
||||
const args = parseArguments(argv);
|
||||
const indent = 24;
|
||||
|
||||
// Use default callback is none is provided
|
||||
if (!callback) callback = function defaultCallback(err) {
|
||||
var code = 0;
|
||||
if (err) {
|
||||
stderr.write(err + os.EOL);
|
||||
code = 1;
|
||||
} else if (args.measure)
|
||||
printStats(stats, stderr);
|
||||
return code;
|
||||
};
|
||||
|
||||
// Just print the version if requested
|
||||
if (args.version) {
|
||||
console.log("Version " + VERSION);
|
||||
if (callback) return callback(null);
|
||||
process.exit(0);
|
||||
stdout.write("Version " + VERSION + os.EOL);
|
||||
return callback(null);
|
||||
}
|
||||
|
||||
// Print the help message if requested or no source files are provided
|
||||
if (args.help || args._.length < 1) {
|
||||
const options = [];
|
||||
const opts = [];
|
||||
Object.keys(OPTIONS).forEach(name => {
|
||||
var option = OPTIONS[name];
|
||||
var text = " ";
|
||||
@ -47,16 +70,16 @@ function main(argv, callback) {
|
||||
while (text.length < indent)
|
||||
text += " ";
|
||||
if (Array.isArray(option.desc)) {
|
||||
options.push(text + option.desc[0] + option.desc.slice(1).map(line => {
|
||||
opts.push(text + option.desc[0] + option.desc.slice(1).map(line => {
|
||||
for (var i = 0; i < indent; ++i)
|
||||
line = " " + line;
|
||||
return "\n" + line;
|
||||
return os.EOL + line;
|
||||
}).join(""));
|
||||
} else
|
||||
options.push(text + option.desc);
|
||||
opts.push(text + option.desc);
|
||||
});
|
||||
|
||||
(args.help ? console.log : console.error)([
|
||||
(args.help ? stdout : stderr).write([
|
||||
"Version " + VERSION,
|
||||
"Syntax: asc [entryFile ...] [options]",
|
||||
"",
|
||||
@ -65,13 +88,12 @@ function main(argv, callback) {
|
||||
" asc hello1.ts hello2.ts -b -O > hello.wasm",
|
||||
"",
|
||||
"Options:"
|
||||
].concat(options).join("\n"));
|
||||
if (callback) return callback(args.help ? null : Error("usage"));
|
||||
process.exit(args.help ? 0 : 1);
|
||||
].concat(opts).join(os.EOL) + os.EOL);
|
||||
return callback(null);
|
||||
}
|
||||
|
||||
// Record compilation times
|
||||
var stats = createStats();
|
||||
// Set up base directory
|
||||
const baseDir = args.baseDir != null ? path.resolve(args.baseDir) : process.cwd();
|
||||
|
||||
// Include standard library if --noLib isn't set
|
||||
const libDirs = args.noLib ? [] : [ path.join(__dirname, "..", "std", "assembly") ];
|
||||
@ -87,22 +109,6 @@ function main(argv, callback) {
|
||||
// Begin parsing
|
||||
var parser = null;
|
||||
|
||||
// Include library components
|
||||
libDirs.forEach(libDir => {
|
||||
var notReadTime = 0;
|
||||
stats.readTime += measure(() => {
|
||||
require("glob").sync("*.ts", { cwd: libDir }).forEach(file => {
|
||||
var nextText = fs.readFileSync(path.join(libDir, file), { encoding: "utf8" });
|
||||
++stats.readCount;
|
||||
var time = measure(() => {
|
||||
parser = assemblyscript.parseFile(nextText, LIBRARY_PREFIX + file, parser, false);
|
||||
});
|
||||
stats.parseTime += time;
|
||||
notReadTime += time;
|
||||
});
|
||||
}) - notReadTime;
|
||||
});
|
||||
|
||||
// Include entry files
|
||||
for (let i = 0, k = args._.length; i < k; ++i) {
|
||||
const filename = args._[i];
|
||||
@ -113,22 +119,20 @@ function main(argv, callback) {
|
||||
// Try entryPath.ts, then entryPath/index.ts
|
||||
try {
|
||||
stats.readTime += measure(() => {
|
||||
entryText = fs.readFileSync(entryPath + ".ts", { encoding: "utf8" });
|
||||
entryText = fs.readFileSync(path.join(baseDir, entryPath) + ".ts", { encoding: "utf8" });
|
||||
entryPath += ".ts";
|
||||
});
|
||||
++stats.readCount;
|
||||
} catch (e) {
|
||||
try {
|
||||
stats.readTime += measure(() => {
|
||||
entryText = fs.readFileSync(entryPath + "/index.ts", { encoding: "utf8" });
|
||||
entryText = fs.readFileSync(path.join(baseDir, entryPath, "index.ts"), { encoding: "utf8" });
|
||||
entryPath += "/index.ts";
|
||||
});
|
||||
++stats.readCount;
|
||||
entryPath = entryPath + "/index";
|
||||
} catch (e) {
|
||||
console.error("File '" + entryPath + ".ts' not found.");
|
||||
if (callback) return callback(Error("file not found"));
|
||||
process.exit(1);
|
||||
return callback(Error("Entry file '" + entryPath + ".ts' not found."));
|
||||
}
|
||||
}
|
||||
|
||||
@ -161,7 +165,7 @@ function main(argv, callback) {
|
||||
} else {
|
||||
stats.readTime += measure(() => {
|
||||
try {
|
||||
nextText = fs.readFileSync(nextFile + ".ts", { encoding: "utf8" });
|
||||
nextText = fs.readFileSync(path.join(baseDir, nextFile + ".ts"), { encoding: "utf8" });
|
||||
nextFile = nextFile + ".ts";
|
||||
found = true;
|
||||
} catch (e) {}
|
||||
@ -170,44 +174,70 @@ function main(argv, callback) {
|
||||
if (!found) {
|
||||
stats.readTime += measure(() => {
|
||||
try {
|
||||
nextText = fs.readFileSync(nextFile + "/index.ts", { encoding: "utf8" });
|
||||
nextText = fs.readFileSync(path.join(baseDir, nextFile, "index.ts"), { encoding: "utf8" });
|
||||
nextFile = nextFile + "/index.ts";
|
||||
found = true;
|
||||
} catch (e) {}
|
||||
});
|
||||
++stats.readCount;
|
||||
}
|
||||
if (!found) {
|
||||
for (let i = 0; i < libDirs.length; ++i) {
|
||||
stats.readTime += measure(() => {
|
||||
try {
|
||||
nextText = fs.readFileSync(path.join(libDirs[i], nextFile + ".ts"), { encoding: "utf8" });
|
||||
nextFile = LIBRARY_PREFIX + nextFile + ".ts";
|
||||
found = true;
|
||||
} catch (e) {}
|
||||
});
|
||||
++stats.readCount;
|
||||
if (found)
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
console.error("Imported file '" + nextFile + ".ts' not found.");
|
||||
process.exit(1);
|
||||
}
|
||||
if (!found)
|
||||
return callback(Error("Import file '" + nextFile + ".ts' not found."));
|
||||
stats.parseTime += measure(() => {
|
||||
assemblyscript.parseFile(nextText, nextFile, parser);
|
||||
});
|
||||
}
|
||||
if (checkDiagnostics(parser)) {
|
||||
if (callback) return callback(Error("compilation error"));
|
||||
process.exit(1);
|
||||
}
|
||||
if (checkDiagnostics(parser, stderr))
|
||||
return callback(Error("Parse error"));
|
||||
}
|
||||
|
||||
// Include library components
|
||||
for (let i = 0, k = libDirs.length; i < k; ++i) {
|
||||
let libDir = libDirs[i];
|
||||
let notReadTime = 0;
|
||||
stats.readTime += measure(() => {
|
||||
require("glob").sync("*.ts", { cwd: libDir }).forEach(file => {
|
||||
var nextText = fs.readFileSync(path.join(libDir, file), { encoding: "utf8" });
|
||||
++stats.readCount;
|
||||
var time = measure(() => {
|
||||
parser = assemblyscript.parseFile(nextText, LIBRARY_PREFIX + file, parser, false);
|
||||
});
|
||||
stats.parseTime += time;
|
||||
notReadTime += time;
|
||||
});
|
||||
}) - notReadTime;
|
||||
}
|
||||
|
||||
// Begin compilation
|
||||
const options = assemblyscript.createOptions();
|
||||
assemblyscript.setTarget(options, 0);
|
||||
assemblyscript.setNoTreeShaking(options, args.noTreeShaking);
|
||||
assemblyscript.setNoAssert(options, args.noAssert);
|
||||
assemblyscript.setNoMemory(options, args.noMemory);
|
||||
assemblyscript.setSourceMap(options, args.sourceMap != null);
|
||||
const compilerOptions = assemblyscript.createOptions();
|
||||
assemblyscript.setTarget(compilerOptions, 0);
|
||||
assemblyscript.setNoTreeShaking(compilerOptions, !!args.noTreeShaking);
|
||||
assemblyscript.setNoAssert(compilerOptions, !!args.noAssert);
|
||||
assemblyscript.setNoMemory(compilerOptions, !!args.noMemory);
|
||||
assemblyscript.setSourceMap(compilerOptions, args.sourceMap != null);
|
||||
|
||||
var module;
|
||||
stats.compileTime += measure(() => {
|
||||
module = assemblyscript.compile(parser, options);
|
||||
module = assemblyscript.compile(parser, compilerOptions);
|
||||
});
|
||||
if (checkDiagnostics(parser)) {
|
||||
if (checkDiagnostics(parser, stderr)) {
|
||||
if (module) module.dispose();
|
||||
if (callback) return callback(Error("errored"));
|
||||
process.exit(1);
|
||||
return callback(Error("Compile error"));
|
||||
}
|
||||
|
||||
// Validate the module if requested
|
||||
@ -215,9 +245,7 @@ function main(argv, callback) {
|
||||
stats.validateTime += measure(() => {
|
||||
if (!module.validate()) {
|
||||
module.dispose();
|
||||
if (callback) return callback(Error("validation failed"));
|
||||
console.error("Validation failed");
|
||||
process.exit(1);
|
||||
return callback(Error("Validate error"));
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -229,9 +257,7 @@ function main(argv, callback) {
|
||||
stats.optimizeTime += measure(() => module.runPasses([ "trap-mode-js" ]));
|
||||
} else if (args.trapMode !== "allow") {
|
||||
module.dispose();
|
||||
console.error("Unsupported trap mode");
|
||||
if (callback) return callback(Error("unsupported trap mode"));
|
||||
process.exit(1);
|
||||
return callback(Error("Unsupported trap mode"));
|
||||
}
|
||||
|
||||
var optimizeLevel = -1;
|
||||
@ -294,7 +320,7 @@ function main(argv, callback) {
|
||||
|
||||
// Prepare output
|
||||
if (!args.noEmit) {
|
||||
var hasOutput = false;
|
||||
let hasStdout = false;
|
||||
|
||||
if (args.outFile != null) {
|
||||
if (/\.wast$/.test(args.outFile) && args.textFile == null)
|
||||
@ -305,71 +331,91 @@ function main(argv, callback) {
|
||||
args.binaryFile = args.outFile;
|
||||
}
|
||||
|
||||
if (args.binaryFile != null && args.binaryFile.length) {
|
||||
var sourceMapURL = args.sourceMap != null
|
||||
// Write binary
|
||||
if (args.binaryFile != null) {
|
||||
let sourceMapURL = args.sourceMap != null
|
||||
? args.sourceMap.length
|
||||
? args.sourceMap
|
||||
: path.basename(args.binaryFile) + ".map"
|
||||
: null;
|
||||
var binary;
|
||||
stats.writeTime += measure(() => {
|
||||
// FIXME: 'not a valid URL' in FF (wants http(s)://.../url)
|
||||
binary = module.toBinary(sourceMapURL);
|
||||
fs.writeFileSync(args.binaryFile, binary.output);
|
||||
});
|
||||
++stats.writeCount;
|
||||
if (binary.sourceMap != null) {
|
||||
postProcessSourceMap(binary.sourceMap, sourceMapURL, libDirs, stats).then(sourceMap => {
|
||||
stats.writeTime += measure(() => {
|
||||
fs.writeFileSync(path.join(path.dirname(args.binaryFile), path.basename(sourceMapURL)), sourceMap, { encoding: "utf8" });
|
||||
}, err => {
|
||||
throw err;
|
||||
});
|
||||
++stats.writeCount;
|
||||
}).catch(err => {
|
||||
// FIXME: as this is asynchronous, we cannot properly terminate main
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
hasOutput = true;
|
||||
}
|
||||
|
||||
if (args.textFile != null && args.textFile.length) {
|
||||
stats.writeTime += measure(() => fs.writeFileSync(args.textFile, module.toText(), { encoding: "utf8" }));
|
||||
++stats.writeCount;
|
||||
hasOutput = true;
|
||||
}
|
||||
let binary;
|
||||
stats.writeTime += measure(() => binary = module.toBinary(sourceMapURL));
|
||||
|
||||
if (args.asmjsFile != null && args.asmjsFile.length) {
|
||||
stats.writeTime += measure(() => fs.writeFileSync(args.asmjsFile, module.toAsmjs(), { encoding: "utf8" }));
|
||||
++stats.writeCount;
|
||||
hasOutput = true;
|
||||
}
|
||||
|
||||
if (!hasOutput) {
|
||||
if (args.binaryFile === "") {
|
||||
stats.writeTime += measure(() => process.stdout.write(Buffer.from(module.toBinary().output)));
|
||||
++stats.writeCount;
|
||||
} else if (args.asmjsFile === "") {
|
||||
stats.writeTime += measure(() => module.printAsmjs());
|
||||
if (args.binaryFile.length) {
|
||||
stats.writeTime += measure(() => fs.writeFileSync(path.join(baseDir, args.binaryFile), binary.output));
|
||||
++stats.writeCount;
|
||||
} else {
|
||||
stats.writeTime += measure(() => module.print());
|
||||
stats.writeTime += measure(() => stdout.write(Buffer.from(binary.output)));
|
||||
++stats.writeCount;
|
||||
hasStdout = true;
|
||||
}
|
||||
|
||||
// Post-process source map
|
||||
if (binary.sourceMap != null) {
|
||||
if (args.binaryFile.length) {
|
||||
let sourceMap = JSON.parse(binary.sourceMap);
|
||||
sourceMap.sourceRoot = SOURCEMAP_ROOT;
|
||||
sourceMap.sources.forEach((name, index) => {
|
||||
var text, found = false;
|
||||
if (name.startsWith(LIBRARY_PREFIX)) {
|
||||
for (var i = 0, k = libDirs.length; i < k; ++i) {
|
||||
stats.readTime += measure(() => {
|
||||
try {
|
||||
text = fs.readFileSync(path.join(libDirs[i], name.substring(LIBRARY_PREFIX.length)), { encoding: "utf8" });
|
||||
found = true;
|
||||
} catch (e) {}
|
||||
});
|
||||
++stats.readCount;
|
||||
}
|
||||
} else {
|
||||
stats.readTime += measure(() => {
|
||||
try {
|
||||
text = fs.readFileSync(path.join(baseDir, name), { encoding: "utf8" });
|
||||
found = true;
|
||||
} catch (e) {}
|
||||
});
|
||||
++stats.readCount;
|
||||
}
|
||||
if (!found)
|
||||
return callback(Error("Source file '" + name + "' not found."));
|
||||
(sourceMap.sourceContents || (sourceMap.sourceContents = []))[index] = text;
|
||||
});
|
||||
stats.writeTime += measure(() => fs.writeFileSync(path.join(baseDir, path.dirname(args.binaryFile), path.basename(sourceMapURL)), JSON.stringify(sourceMap), { encoding: "utf8" }));
|
||||
++stats.writeCount;
|
||||
} else {
|
||||
stderr.write("Cannot write source map because binary already uses stdout." + os.EOL);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Write text
|
||||
if (args.textFile != null) {
|
||||
if (args.textFile.length) {
|
||||
stats.writeTime += measure(() => fs.writeFileSync(path.join(baseDir, args.textFile), module.toText(), { encoding: "utf8" }));
|
||||
++stats.writeCount;
|
||||
} else if (!hasStdout) {
|
||||
stats.writeTime += measure(() => stdout.write(module.toText()));
|
||||
++stats.writeCount;
|
||||
hasStdout = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Write asm.js
|
||||
if (args.asmjsFile != null && args.asmjsFile.length) {
|
||||
if (args.asmjsFile.length) {
|
||||
stats.writeTime += measure(() => fs.writeFileSync(path.join(baseDir, args.asmjsFile), module.toAsmjs(), { encoding: "utf8" }));
|
||||
++stats.writeCount;
|
||||
} else if (!hasStdout) {
|
||||
stats.writeTime += measure(() => stdout.write(Buffer.from(module.toBinary().output)));
|
||||
++stats.writeCount;
|
||||
hasStdout = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.dispose();
|
||||
|
||||
if (args.measure) process.on("beforeExit", () => console.error([
|
||||
"I/O Read : " + (stats.readTime ? (stats.readTime / 1e6).toFixed(3) + " ms (" + stats.readCount + " files)" : "N/A"),
|
||||
"I/O Write : " + (stats.writeTime ? (stats.writeTime / 1e6).toFixed(3) + " ms (" + stats.writeCount + " files)" : "N/A"),
|
||||
"Parse : " + (stats.parseTime ? (stats.parseTime / 1e6).toFixed(3) + " ms" : "N/A"),
|
||||
"Compile : " + (stats.compileTime ? (stats.compileTime / 1e6).toFixed(3) + " ms" : "N/A"),
|
||||
"Validate : " + (stats.validateTime ? (stats.validateTime / 1e6).toFixed(3) + " ms" : "N/A"),
|
||||
"Optimize : " + (stats.optimizeTime ? (stats.optimizeTime / 1e6).toFixed(3) + " ms" : "N/A")
|
||||
].join("\n")));
|
||||
return callback(null);
|
||||
}
|
||||
|
||||
exports.main = main;
|
||||
@ -392,11 +438,11 @@ function parseArguments(argv) {
|
||||
|
||||
exports.parseArguments = parseArguments;
|
||||
|
||||
function checkDiagnostics(parser) {
|
||||
function checkDiagnostics(parser, stderr) {
|
||||
var diagnostic;
|
||||
var hasErrors = false;
|
||||
while ((diagnostic = assemblyscript.nextDiagnostic(parser)) != null) {
|
||||
console.error(assemblyscript.formatDiagnostic(diagnostic, process.stderr.isTTY, true));
|
||||
stderr.write(assemblyscript.formatDiagnostic(diagnostic, stderr.isTTY, true) + os.EOL + os.EOL);
|
||||
if (assemblyscript.isError(diagnostic)) hasErrors = true;
|
||||
}
|
||||
return hasErrors;
|
||||
@ -404,44 +450,6 @@ function checkDiagnostics(parser) {
|
||||
|
||||
exports.checkDiagnostics = checkDiagnostics;
|
||||
|
||||
function postProcessSourceMap(sourceMap, sourceMapURL, libDirs, stats) {
|
||||
const { SourceMapConsumer, SourceMapGenerator } = require("source-map");
|
||||
const json = JSON.parse(sourceMap);
|
||||
json.sourceRoot = SOURCEMAP_ROOT;
|
||||
return SourceMapConsumer.with(json, undefined, consumer => {
|
||||
const generator = SourceMapGenerator.fromSourceMap(consumer);
|
||||
json.sources.forEach(name => {
|
||||
var text, found = false;
|
||||
if (name.startsWith(LIBRARY_PREFIX)) {
|
||||
for (var i = 0, k = libDirs.length; i < k; ++i) {
|
||||
stats.readTime += measure(() => {
|
||||
try {
|
||||
text = fs.readFileSync(path.join(libDirs[i], name.substring(LIBRARY_PREFIX.length)), { encoding: "utf8" });
|
||||
found = true;
|
||||
} catch (e) {}
|
||||
});
|
||||
++stats.readCount;
|
||||
}
|
||||
} else {
|
||||
stats.readTime += measure(() => {
|
||||
try {
|
||||
text = fs.readFileSync(name, { encoding: "utf8" });
|
||||
found = true;
|
||||
} catch (e) {}
|
||||
});
|
||||
++stats.readCount;
|
||||
}
|
||||
if (found)
|
||||
generator.setSourceContent(name, text);
|
||||
else
|
||||
console.error("No source content found for file '" + name + "'.");
|
||||
});
|
||||
return Promise.resolve(generator.toString());
|
||||
});
|
||||
}
|
||||
|
||||
exports.processSourceMap = postProcessSourceMap;
|
||||
|
||||
function createStats() {
|
||||
return {
|
||||
readTime: 0,
|
||||
@ -455,9 +463,26 @@ function createStats() {
|
||||
};
|
||||
}
|
||||
|
||||
exports.createStats = createStats;
|
||||
|
||||
function measure(fn) {
|
||||
const start = process.hrtime();
|
||||
fn();
|
||||
const times = process.hrtime(start);
|
||||
return times[0] * 1e9 + times[1];
|
||||
}
|
||||
|
||||
exports.measure = measure;
|
||||
|
||||
function printStats(stats, output) {
|
||||
(output || process.stdout).write([
|
||||
"I/O Read : " + (stats.readTime ? (stats.readTime / 1e6).toFixed(3) + " ms (" + stats.readCount + " files)" : "N/A"),
|
||||
"I/O Write : " + (stats.writeTime ? (stats.writeTime / 1e6).toFixed(3) + " ms (" + stats.writeCount + " files)" : "N/A"),
|
||||
"Parse : " + (stats.parseTime ? (stats.parseTime / 1e6).toFixed(3) + " ms" : "N/A"),
|
||||
"Compile : " + (stats.compileTime ? (stats.compileTime / 1e6).toFixed(3) + " ms" : "N/A"),
|
||||
"Validate : " + (stats.validateTime ? (stats.validateTime / 1e6).toFixed(3) + " ms" : "N/A"),
|
||||
"Optimize : " + (stats.optimizeTime ? (stats.optimizeTime / 1e6).toFixed(3) + " ms" : "N/A")
|
||||
].join(os.EOL) + os.EOL);
|
||||
}
|
||||
|
||||
exports.printStats = printStats;
|
||||
|
@ -38,6 +38,10 @@
|
||||
"type": "boolean",
|
||||
"aliases": [ "c", "check" ]
|
||||
},
|
||||
"baseDir": {
|
||||
"desc": "Specifies the base directory of input and output files.",
|
||||
"type": "string"
|
||||
},
|
||||
"outFile": {
|
||||
"desc": "Specifies the output file. File extension indicates format.",
|
||||
"type": "string",
|
||||
|
11
package-lock.json
generated
11
package-lock.json
generated
@ -2538,9 +2538,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"long": {
|
||||
"version": "3.2.0",
|
||||
"resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz",
|
||||
"integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=",
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz",
|
||||
"integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==",
|
||||
"dev": true
|
||||
},
|
||||
"longest": {
|
||||
@ -3589,11 +3589,6 @@
|
||||
"integrity": "sha512-I2UmuJSRr/T8jisiROLU3A3ltr+swpniSmNPI4Ml3ZCX6tVnDsuZzK7F2hl5jTqbZBWCEKlj5HRQiPExXLgE8A==",
|
||||
"dev": true
|
||||
},
|
||||
"source-map": {
|
||||
"version": "0.7.0",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.0.tgz",
|
||||
"integrity": "sha512-JsXsCYrKzxA5kU8LanQJHIPoEY3fEH5WYSMJ8Z77ESByI18VFEoxB46H2eNHqK2nVqTRjUe5DYvNHmyT3JOd1w=="
|
||||
},
|
||||
"source-map-resolve": {
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.1.tgz",
|
||||
|
@ -13,13 +13,12 @@
|
||||
"dependencies": {
|
||||
"binaryen": "42.0.0-nightly.20180202",
|
||||
"glob": "^7.1.2",
|
||||
"minimist": "^1.2.0",
|
||||
"source-map": "^0.7.0"
|
||||
"minimist": "^1.2.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chalk": "^2.3.0",
|
||||
"diff": "^3.4.0",
|
||||
"long": "^3.2.0",
|
||||
"long": "^4.0.0",
|
||||
"source-map-support": "^0.5.3",
|
||||
"ts-loader": "^3.4.0",
|
||||
"ts-node": "^4.1.0",
|
||||
|
@ -161,7 +161,7 @@ export function formatDiagnosticContext(range: Range, useColors: bool = false):
|
||||
export abstract class DiagnosticEmitter {
|
||||
|
||||
diagnostics: DiagnosticMessage[];
|
||||
silentDiagnostics: bool = false;
|
||||
// silentDiagnostics: bool = false;
|
||||
|
||||
constructor(diagnostics: DiagnosticMessage[] | null = null) {
|
||||
this.diagnostics = diagnostics ? <DiagnosticMessage[]>diagnostics : new Array();
|
||||
@ -170,10 +170,10 @@ export abstract class DiagnosticEmitter {
|
||||
emitDiagnostic(code: DiagnosticCode, category: DiagnosticCategory, range: Range, arg0: string | null = null, arg1: string | null = null) {
|
||||
var message = DiagnosticMessage.create(code, category, arg0, arg1).withRange(range);
|
||||
this.diagnostics.push(message);
|
||||
if (!this.silentDiagnostics) {
|
||||
/* if (!this.silentDiagnostics) {
|
||||
console.log(formatDiagnosticMessage(message, true, true) + "\n"); // temporary
|
||||
// console.log(<string>new Error("stack").stack);
|
||||
}
|
||||
console.log(<string>new Error("stack").stack);
|
||||
} */
|
||||
}
|
||||
|
||||
error(code: DiagnosticCode, range: Range, arg0: string | null = null, arg1: string | null = null): void {
|
||||
|
@ -138,4 +138,3 @@ export function decompile(module: Module): string {
|
||||
decompiler.decompile(module);
|
||||
return decompiler.finish();
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ export class Parser extends DiagnosticEmitter {
|
||||
this.program.sources.push(source);
|
||||
|
||||
var tn = new Tokenizer(source, this.program.diagnostics);
|
||||
tn.silentDiagnostics = this.silentDiagnostics;
|
||||
// tn.silentDiagnostics = this.silentDiagnostics;
|
||||
source.tokenizer = tn;
|
||||
|
||||
while (!tn.skip(Token.ENDOFFILE)) {
|
||||
|
@ -1,170 +1,146 @@
|
||||
const fs = require("fs");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const os = require("os");
|
||||
const chalk = require("chalk");
|
||||
const glob = require("glob");
|
||||
const minimist = require("minimist");
|
||||
const diff = require("./util/diff");
|
||||
const asc = require("../bin/asc.js");
|
||||
|
||||
require("ts-node").register({ project: require("path").join(__dirname, "..", "src") });
|
||||
require("../src/glue/js");
|
||||
|
||||
const { Compiler, Options } = require("../src/compiler");
|
||||
const { Module } = require("../src/module");
|
||||
const { Parser } = require("../src/parser");
|
||||
const { ElementKind, LIBRARY_PREFIX } = require("../src/program");
|
||||
|
||||
var isCreate = process.argv[2] === "--create";
|
||||
var filter = process.argv.length > 2 && !isCreate ? "**/" + process.argv[2] + ".ts" : "**/*.ts";
|
||||
|
||||
var stdDir = path.join(__dirname, "..", "std", "assembly");
|
||||
var stdFiles = glob.sync("*.ts", { cwd: stdDir });
|
||||
|
||||
var success = 0;
|
||||
var failures = 0;
|
||||
|
||||
glob.sync(filter, { cwd: path.join(__dirname, "compiler") }).forEach(filename => {
|
||||
if (filename.charAt(0) == "_") return;
|
||||
console.log(chalk.whiteBright("Testing compiler/" + filename));
|
||||
|
||||
var fixture = path.basename(filename, ".ts");
|
||||
var startTime = process.hrtime();
|
||||
var parser = new Parser();
|
||||
var cwd = path.join(__dirname, "compiler");
|
||||
|
||||
// include stdlib in std/ tests only. doing this to reduce the sheer amount of
|
||||
// program elements listed at the bottom of the basic fixtures.
|
||||
if (filename.startsWith("std/")) {
|
||||
stdFiles.forEach(file => parser.parseFile(fs.readFileSync(path.join(stdDir, file), { encoding: "utf8" }), LIBRARY_PREFIX + path.basename(file), false));
|
||||
fixture = "std/" + fixture;
|
||||
}
|
||||
|
||||
var sourceText = fs.readFileSync(path.join(cwd, filename), { encoding: "utf8" });
|
||||
parser.parseFile(sourceText, filename, true);
|
||||
var nextFile;
|
||||
while ((nextFile = parser.nextFile()) !== null) {
|
||||
if (nextFile.startsWith(LIBRARY_PREFIX)) {
|
||||
sourceText = fs.readFileSync(path.join(stdDir, nextFile.substring(LIBRARY_PREFIX.length) + ".ts"), { encoding: "utf8" });
|
||||
nextFile = nextFile + ".ts";
|
||||
} else {
|
||||
try {
|
||||
sourceText = fs.readFileSync(path.join(cwd, nextFile + ".ts"), { encoding: "utf8" });
|
||||
nextFile += ".ts";
|
||||
} catch (e) {
|
||||
try {
|
||||
sourceText = fs.readFileSync(path.join(cwd, nextFile, "index.ts"), { encoding: "utf8" });
|
||||
nextFile += "/index.ts";
|
||||
} catch (e) {
|
||||
sourceText = fs.readFileSync(path.join(stdDir, nextFile + ".ts"), { encoding: "utf8" });
|
||||
nextFile = LIBRARY_PREFIX + nextFile + ".ts";
|
||||
// FIXME: what exactly is swallowing the error here?
|
||||
}
|
||||
}
|
||||
}
|
||||
parser.parseFile(sourceText, nextFile, false);
|
||||
}
|
||||
var program = parser.finish();
|
||||
var options = new Options();
|
||||
options.sourceMap = true;
|
||||
var parseTime = process.hrtime(startTime);
|
||||
startTime = process.hrtime();
|
||||
var module;
|
||||
try {
|
||||
module = Compiler.compile(program, options);
|
||||
} catch (e) {
|
||||
failed = true;
|
||||
module = Module.create();
|
||||
console.log(chalk.red("compile ERROR: ") + e.stack);
|
||||
}
|
||||
var compileTime = process.hrtime(startTime);
|
||||
var actual = module.toText() + "(;\n[program.elements]\n " + elements(program.elements)
|
||||
+ "\n[program.exports]\n " + elements(program.exports)
|
||||
+ "\n;)\n";
|
||||
var actualOptimized = null;
|
||||
|
||||
console.log("parse incl. I/O: " + ((parseTime[0] * 1e9 + parseTime[1]) / 1e6).toFixed(3) + "ms / compile: " + ((compileTime[0] * 1e9 + compileTime[1]) / 1e6).toFixed(3) + "ms");
|
||||
|
||||
var failed = false;
|
||||
if (module.validate()) {
|
||||
console.log(chalk.green("validate OK"));
|
||||
try {
|
||||
var binary = module.toBinary();
|
||||
var wasmModule = new WebAssembly.Module(binary.output);
|
||||
var wasmInstance = new WebAssembly.Instance(wasmModule, {
|
||||
env: {
|
||||
abort: function(msg, file, line, column) {
|
||||
throw new Error("Assertion failed");
|
||||
},
|
||||
externalFunc: function(arg0, arg1, arg2) {
|
||||
console.log("env.externalFunc called with: " + arg0 + ", " + arg1 + ", " + arg2);
|
||||
},
|
||||
externalConst: 1,
|
||||
allocate_memory: function(size) {
|
||||
console.log("env.allocate_memory called with: " + size);
|
||||
return 0;
|
||||
},
|
||||
free_memory: function(ptr) {
|
||||
console.log("env.free_memory called with: " + ptr);
|
||||
}
|
||||
},
|
||||
external: {
|
||||
externalFunc: function(arg0, arg1, arg2) {
|
||||
console.log("external.externalFunc called with: " + arg0 + ", " + arg1 + ", " + arg2);
|
||||
},
|
||||
externalConst: 2
|
||||
}
|
||||
});
|
||||
console.log(chalk.green("instantiate OK"));
|
||||
} catch (e) {
|
||||
failed = true;
|
||||
console.log(chalk.red("instantiate ERROR: ") + e.stack);
|
||||
}
|
||||
module.optimize();
|
||||
actualOptimized = module.toText();
|
||||
if (isCreate) {
|
||||
var binary = module.toBinary(fixture + ".optimized.wasm.map");
|
||||
fs.writeFileSync(__dirname + "/compiler/" + fixture + ".optimized.wasm", binary.output);
|
||||
if (binary.sourceMap != null)
|
||||
fs.writeFileSync(__dirname + "/compiler/" + fixture + ".optimized.wasm.map", binary.sourceMap, { encoding: "utf8" });
|
||||
}
|
||||
} else {
|
||||
failed = true;
|
||||
console.log(chalk.red("validate ERROR"));
|
||||
}
|
||||
|
||||
if (isCreate) {
|
||||
fs.writeFileSync(__dirname + "/compiler/" + fixture + ".wast", actual, { encoding: "utf8" });
|
||||
console.log("Created");
|
||||
if (actualOptimized != null) {
|
||||
fs.writeFileSync(__dirname + "/compiler/" + fixture + ".optimized.wast", actualOptimized, { encoding: "utf8" });
|
||||
console.log("Created optimized");
|
||||
}
|
||||
} else {
|
||||
var expected;
|
||||
try {
|
||||
expected = fs.readFileSync(__dirname + "/compiler/" + fixture + ".wast", { encoding: "utf8" });
|
||||
} catch (e) {
|
||||
expected = e.message + "\n";
|
||||
}
|
||||
var diffs = diff(filename + ".wast", expected, actual);
|
||||
if (diffs !== null) {
|
||||
console.log(diffs);
|
||||
console.log(chalk.red("diff ERROR"));
|
||||
failed = true;
|
||||
} else
|
||||
console.log(chalk.green("diff OK"));
|
||||
}
|
||||
|
||||
module.dispose();
|
||||
console.log();
|
||||
if (failed)
|
||||
++failures;
|
||||
const args = minimist(process.argv.slice(2), {
|
||||
boolean: [ "create", "help" ],
|
||||
alias: { h: "help" }
|
||||
});
|
||||
|
||||
function elements(map) {
|
||||
var arr = [];
|
||||
map.forEach((value, key) => {
|
||||
arr.push(ElementKind[value.kind] + ": " + key);
|
||||
if (args.help) {
|
||||
console.log("Usage: npm run test:compiler -- [test1, test2 ...] [--create]\n");
|
||||
console.log("Runs all tests if no tests have been specified.");
|
||||
console.log("Recreates affected fixtures if --create is specified.");
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
var successes = 0;
|
||||
var failures = 0;
|
||||
|
||||
const basedir = path.join(__dirname, "compiler");
|
||||
|
||||
// Get a list of all tests
|
||||
var tests = glob.sync("**/!(_)*.ts", { cwd: basedir });
|
||||
|
||||
// Run specific tests only if arguments are provided
|
||||
if (args._.length) {
|
||||
tests = tests.filter(filename => args._.indexOf(filename.replace(/\.ts$/, "")) >= 0);
|
||||
if (!tests.length) {
|
||||
console.error("No matching tests: " + args._.join(" "));
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: asc's callback is synchronous here. This might change.
|
||||
tests.forEach(filename => {
|
||||
console.log(chalk.whiteBright("Testing compiler/" + filename));
|
||||
|
||||
const basename = filename.replace(/\.ts$/, "");
|
||||
|
||||
const stdout = createMemoryStream();
|
||||
const stderr = createMemoryStream(true);
|
||||
|
||||
var failed = false;
|
||||
|
||||
// TODO: also stdout/stderr and diff it (-> expected failures)
|
||||
|
||||
// Build unoptimized
|
||||
asc.main([
|
||||
filename,
|
||||
"--baseDir", basedir,
|
||||
"-t", // -> stdout
|
||||
"--sourceMap"
|
||||
], {
|
||||
stdout: stdout,
|
||||
stderr: stderr
|
||||
}, err => {
|
||||
if (err)
|
||||
stderr.write(err + os.EOL);
|
||||
if (args.create) {
|
||||
fs.writeFileSync(path.join(basedir, basename + ".wast"), stdout.toString(), { encoding: "utf8" });
|
||||
console.log("Recreated fixture.");
|
||||
} else {
|
||||
let actual = stdout.toString();
|
||||
let expected = fs.readFileSync(path.join(basedir, basename + ".wast"), { encoding: "utf8" });
|
||||
let diffs = diff(basename + ".wast", expected, actual);
|
||||
if (diffs !== null) {
|
||||
console.log(diffs);
|
||||
console.log(chalk.red("diff ERROR"));
|
||||
failed = true;
|
||||
} else
|
||||
console.log(chalk.green("diff OK"));
|
||||
}
|
||||
|
||||
stdout.length = 0;
|
||||
stderr.length = 0;
|
||||
stderr.print = false;
|
||||
|
||||
// Build optimized
|
||||
asc.main([
|
||||
filename,
|
||||
"--baseDir", basedir,
|
||||
"-t", basename + ".optimized.wast",
|
||||
"-b", // -> stdout
|
||||
"-O"
|
||||
], {
|
||||
stdout: stdout,
|
||||
stderr: stderr
|
||||
}, err => {
|
||||
if (err)
|
||||
stderr.write(err + os.EOL);
|
||||
|
||||
// Instantiate
|
||||
try {
|
||||
let exports = new WebAssembly.Instance(new WebAssembly.Module(stdout.toBuffer()), {
|
||||
env: {
|
||||
abort: function(msg, file, line, column) {
|
||||
// TODO
|
||||
},
|
||||
externalFunction: function() { },
|
||||
externalConstant: 1
|
||||
},
|
||||
my: {
|
||||
externalFunction: function() { },
|
||||
externalConstant: 2
|
||||
}
|
||||
});
|
||||
console.log(chalk.green("instantiate OK"));
|
||||
} catch (e) {
|
||||
console.log(chalk.red("instantiate ERROR: ") + e);
|
||||
failed = true;
|
||||
}
|
||||
|
||||
if (failed) ++failures;
|
||||
else ++successes;
|
||||
console.log();
|
||||
});
|
||||
});
|
||||
return arr.join("\n ");
|
||||
});
|
||||
|
||||
function createMemoryStream(print) {
|
||||
var stream = [];
|
||||
if (stream.print = print)
|
||||
stream.isTTY = process.stderr.isTTY;
|
||||
stream.write = function(chunk) {
|
||||
if (typeof chunk === "string") {
|
||||
this.push(Buffer.from(chunk, "utf8"));
|
||||
if (stream.print)
|
||||
process.stderr.write(chunk);
|
||||
} else
|
||||
this.push(chunk);
|
||||
};
|
||||
stream.toBuffer = function() {
|
||||
return Buffer.concat(this);
|
||||
};
|
||||
stream.toString = function() {
|
||||
return this.toBuffer().toString("utf8");
|
||||
};
|
||||
return stream;
|
||||
}
|
||||
|
||||
if (failures) {
|
||||
|
@ -1,25 +1,32 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\t\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s")
|
||||
(data (i32.const 32) "\0c\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(local $0 i32)
|
||||
;;@ assert.ts:10:0
|
||||
(if
|
||||
;;@ assert.ts:10:4
|
||||
(i32.eqz
|
||||
;;@ assert.ts:10:5
|
||||
(if (result i32)
|
||||
(tee_local $0
|
||||
;;@ assert.ts:10:12
|
||||
(i32.const 1)
|
||||
)
|
||||
(get_local $0)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 32)
|
||||
(i32.const 8)
|
||||
(i32.const 10)
|
||||
(i32.const 5)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ assert.ts:11:2
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
|
@ -1,10 +1,14 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $HEAP_BASE i32 (i32.const 60))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\t\00\00\00a\00s\00s\00e\00r\00t\00.\00t\00s\00")
|
||||
(data (i32.const 32) "\0c\00\00\00m\00u\00s\00t\00 \00b\00e\00 \00t\00r\00u\00e\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(local $0 i32)
|
||||
;;@ assert.ts:1:0
|
||||
(if
|
||||
@ -12,7 +16,15 @@
|
||||
;;@ assert.ts:1:7
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 1)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ assert.ts:2:0
|
||||
(if
|
||||
@ -20,7 +32,15 @@
|
||||
;;@ assert.ts:2:7
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 2)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ assert.ts:3:0
|
||||
(if
|
||||
@ -32,7 +52,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 3)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ assert.ts:4:0
|
||||
(if
|
||||
@ -41,7 +69,15 @@
|
||||
(f64.const 0.5)
|
||||
(f64.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 4)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ assert.ts:5:0
|
||||
(if
|
||||
@ -53,7 +89,15 @@
|
||||
(f64.const 0.4)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 5)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ assert.ts:6:0
|
||||
(if
|
||||
@ -61,7 +105,15 @@
|
||||
;;@ assert.ts:6:7
|
||||
(i64.const 4294967296)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 6)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ assert.ts:7:0
|
||||
(if
|
||||
@ -73,7 +125,15 @@
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 7)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ assert.ts:10:0
|
||||
(if
|
||||
@ -87,7 +147,16 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
;;@ assert.ts:10:18
|
||||
(i32.const 32)
|
||||
(i32.const 8)
|
||||
(i32.const 10)
|
||||
(i32.const 5)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
@ -96,51 +165,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -9,729 +9,507 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
;;@ binary.ts:14:0
|
||||
(drop
|
||||
(i32.div_s
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:14:4
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:15:0
|
||||
(drop
|
||||
(i32.rem_s
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:15:4
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:23:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:23:4
|
||||
(i32.lt_s
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:23:8
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:24:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:24:4
|
||||
(i32.gt_s
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:24:8
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:25:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:25:4
|
||||
(i32.le_s
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:25:9
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:26:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:26:4
|
||||
(i32.ge_s
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:26:9
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:27:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:27:4
|
||||
(i32.eq
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:27:9
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:28:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:28:4
|
||||
(i32.eq
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:28:10
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:29:0
|
||||
(set_global $binary/i
|
||||
;;@ binary.ts:29:4
|
||||
(i32.add
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:29:8
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:30:0
|
||||
(set_global $binary/i
|
||||
;;@ binary.ts:30:4
|
||||
(i32.sub
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:30:8
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:31:0
|
||||
(set_global $binary/i
|
||||
;;@ binary.ts:31:4
|
||||
(i32.mul
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:31:8
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:32:0
|
||||
(set_global $binary/i
|
||||
;;@ binary.ts:32:4
|
||||
(i32.div_s
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:32:8
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:33:0
|
||||
(set_global $binary/i
|
||||
;;@ binary.ts:33:4
|
||||
(i32.rem_s
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:33:8
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:34:0
|
||||
(set_global $binary/i
|
||||
;;@ binary.ts:34:4
|
||||
(i32.shl
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:34:9
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:35:0
|
||||
(set_global $binary/i
|
||||
;;@ binary.ts:35:4
|
||||
(i32.shr_s
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:35:9
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:36:0
|
||||
(set_global $binary/i
|
||||
;;@ binary.ts:36:4
|
||||
(i32.shr_u
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:36:10
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:37:0
|
||||
(set_global $binary/i
|
||||
;;@ binary.ts:37:4
|
||||
(i32.and
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:37:8
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:38:0
|
||||
(set_global $binary/i
|
||||
;;@ binary.ts:38:4
|
||||
(i32.or
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:38:8
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:39:0
|
||||
(set_global $binary/i
|
||||
;;@ binary.ts:39:4
|
||||
(i32.xor
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:39:8
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:41:0
|
||||
(set_global $binary/i
|
||||
(i32.add
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:41:5
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:42:0
|
||||
(set_global $binary/i
|
||||
(i32.sub
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:42:5
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:43:0
|
||||
(set_global $binary/i
|
||||
(i32.mul
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:43:5
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:44:0
|
||||
(set_global $binary/i
|
||||
(i32.rem_s
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:44:5
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:45:0
|
||||
(set_global $binary/i
|
||||
(i32.shl
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:45:6
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:46:0
|
||||
(set_global $binary/i
|
||||
(i32.shr_s
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:46:6
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:47:0
|
||||
(set_global $binary/i
|
||||
(i32.shr_u
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:47:7
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:48:0
|
||||
(set_global $binary/i
|
||||
(i32.and
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:48:5
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:49:0
|
||||
(set_global $binary/i
|
||||
(i32.or
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:49:5
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:50:0
|
||||
(set_global $binary/i
|
||||
(i32.xor
|
||||
(get_global $binary/i)
|
||||
;;@ binary.ts:50:5
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:63:0
|
||||
(drop
|
||||
(i64.div_s
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:63:4
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:64:0
|
||||
(drop
|
||||
(i64.rem_s
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:64:4
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:72:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:72:4
|
||||
(i64.lt_s
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:72:8
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:73:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:73:4
|
||||
(i64.gt_s
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:73:8
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:74:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:74:4
|
||||
(i64.le_s
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:74:9
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:75:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:75:4
|
||||
(i64.ge_s
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:75:9
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:76:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:76:4
|
||||
(i64.eq
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:76:9
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:77:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:77:4
|
||||
(i64.eq
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:77:10
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:78:0
|
||||
(set_global $binary/I
|
||||
;;@ binary.ts:78:4
|
||||
(i64.add
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:78:8
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:79:0
|
||||
(set_global $binary/I
|
||||
;;@ binary.ts:79:4
|
||||
(i64.sub
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:79:8
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:80:0
|
||||
(set_global $binary/I
|
||||
;;@ binary.ts:80:4
|
||||
(i64.mul
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:80:8
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:81:0
|
||||
(set_global $binary/I
|
||||
;;@ binary.ts:81:4
|
||||
(i64.div_s
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:81:8
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:82:0
|
||||
(set_global $binary/I
|
||||
;;@ binary.ts:82:4
|
||||
(i64.rem_s
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:82:8
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:83:0
|
||||
(set_global $binary/I
|
||||
;;@ binary.ts:83:4
|
||||
(i64.shl
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:83:9
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:84:0
|
||||
(set_global $binary/I
|
||||
;;@ binary.ts:84:4
|
||||
(i64.shr_s
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:84:9
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:85:0
|
||||
(set_global $binary/I
|
||||
;;@ binary.ts:85:4
|
||||
(i64.shr_u
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:85:10
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:86:0
|
||||
(set_global $binary/I
|
||||
;;@ binary.ts:86:4
|
||||
(i64.and
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:86:8
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:87:0
|
||||
(set_global $binary/I
|
||||
;;@ binary.ts:87:4
|
||||
(i64.or
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:87:8
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:88:0
|
||||
(set_global $binary/I
|
||||
;;@ binary.ts:88:4
|
||||
(i64.xor
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:88:8
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:90:0
|
||||
(set_global $binary/I
|
||||
(i64.add
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:90:5
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:91:0
|
||||
(set_global $binary/I
|
||||
(i64.sub
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:91:5
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:92:0
|
||||
(set_global $binary/I
|
||||
(i64.mul
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:92:5
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:93:0
|
||||
(set_global $binary/I
|
||||
(i64.rem_s
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:93:5
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:94:0
|
||||
(set_global $binary/I
|
||||
(i64.shl
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:94:6
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:95:0
|
||||
(set_global $binary/I
|
||||
(i64.shr_s
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:95:6
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:96:0
|
||||
(set_global $binary/I
|
||||
(i64.shr_u
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:96:7
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:97:0
|
||||
(set_global $binary/I
|
||||
(i64.and
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:97:5
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:98:0
|
||||
(set_global $binary/I
|
||||
(i64.or
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:98:5
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:99:0
|
||||
(set_global $binary/I
|
||||
(i64.xor
|
||||
(get_global $binary/I)
|
||||
;;@ binary.ts:99:5
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:115:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:115:4
|
||||
(f32.lt
|
||||
(get_global $binary/f)
|
||||
;;@ binary.ts:115:8
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:116:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:116:4
|
||||
(f32.gt
|
||||
(get_global $binary/f)
|
||||
;;@ binary.ts:116:8
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:117:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:117:4
|
||||
(f32.le
|
||||
(get_global $binary/f)
|
||||
;;@ binary.ts:117:9
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:118:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:118:4
|
||||
(f32.ge
|
||||
(get_global $binary/f)
|
||||
;;@ binary.ts:118:9
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:119:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:119:4
|
||||
(f32.eq
|
||||
(get_global $binary/f)
|
||||
;;@ binary.ts:119:9
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:120:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:120:4
|
||||
(f32.eq
|
||||
(get_global $binary/f)
|
||||
;;@ binary.ts:120:10
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:121:0
|
||||
(set_global $binary/f
|
||||
;;@ binary.ts:121:4
|
||||
(f32.add
|
||||
(get_global $binary/f)
|
||||
;;@ binary.ts:121:8
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:122:0
|
||||
(set_global $binary/f
|
||||
;;@ binary.ts:122:4
|
||||
(f32.sub
|
||||
(get_global $binary/f)
|
||||
;;@ binary.ts:122:8
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:123:0
|
||||
(set_global $binary/f
|
||||
;;@ binary.ts:123:4
|
||||
(f32.mul
|
||||
(get_global $binary/f)
|
||||
;;@ binary.ts:123:8
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:124:0
|
||||
(set_global $binary/f
|
||||
;;@ binary.ts:124:4
|
||||
(f32.div
|
||||
(get_global $binary/f)
|
||||
;;@ binary.ts:124:8
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:127:0
|
||||
(set_global $binary/f
|
||||
(f32.add
|
||||
(get_global $binary/f)
|
||||
;;@ binary.ts:127:5
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:128:0
|
||||
(set_global $binary/f
|
||||
(f32.sub
|
||||
(get_global $binary/f)
|
||||
;;@ binary.ts:128:5
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:129:0
|
||||
(set_global $binary/f
|
||||
(f32.mul
|
||||
(get_global $binary/f)
|
||||
;;@ binary.ts:129:5
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:146:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:146:4
|
||||
(f64.lt
|
||||
(get_global $binary/F)
|
||||
;;@ binary.ts:146:8
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:147:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:147:4
|
||||
(f64.gt
|
||||
(get_global $binary/F)
|
||||
;;@ binary.ts:147:8
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:148:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:148:4
|
||||
(f64.le
|
||||
(get_global $binary/F)
|
||||
;;@ binary.ts:148:9
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:149:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:149:4
|
||||
(f64.ge
|
||||
(get_global $binary/F)
|
||||
;;@ binary.ts:149:9
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:150:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:150:4
|
||||
(f64.eq
|
||||
(get_global $binary/F)
|
||||
;;@ binary.ts:150:9
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:151:0
|
||||
(set_global $binary/b
|
||||
;;@ binary.ts:151:4
|
||||
(f64.eq
|
||||
(get_global $binary/F)
|
||||
;;@ binary.ts:151:10
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:152:0
|
||||
(set_global $binary/F
|
||||
;;@ binary.ts:152:4
|
||||
(f64.add
|
||||
(get_global $binary/F)
|
||||
;;@ binary.ts:152:8
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:153:0
|
||||
(set_global $binary/F
|
||||
;;@ binary.ts:153:4
|
||||
(f64.sub
|
||||
(get_global $binary/F)
|
||||
;;@ binary.ts:153:8
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:154:0
|
||||
(set_global $binary/F
|
||||
;;@ binary.ts:154:4
|
||||
(f64.mul
|
||||
(get_global $binary/F)
|
||||
;;@ binary.ts:154:8
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:155:0
|
||||
(set_global $binary/F
|
||||
;;@ binary.ts:155:4
|
||||
(f64.div
|
||||
(get_global $binary/F)
|
||||
;;@ binary.ts:155:8
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:158:0
|
||||
(set_global $binary/F
|
||||
(f64.add
|
||||
(get_global $binary/F)
|
||||
;;@ binary.ts:158:5
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:159:0
|
||||
(set_global $binary/F
|
||||
(f64.sub
|
||||
(get_global $binary/F)
|
||||
;;@ binary.ts:159:5
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ binary.ts:160:0
|
||||
(set_global $binary/F
|
||||
(f64.mul
|
||||
(get_global $binary/F)
|
||||
;;@ binary.ts:160:5
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
|
@ -1138,56 +1138,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: binary/b
|
||||
GLOBAL: binary/i
|
||||
GLOBAL: binary/I
|
||||
GLOBAL: binary/f
|
||||
GLOBAL: binary/F
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,8 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $i (func (result i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $builtins/b (mut i32) (i32.const 0))
|
||||
(global $builtins/i (mut i32) (i32.const 0))
|
||||
(global $builtins/I (mut i64) (i64.const 0))
|
||||
@ -38,14 +40,15 @@
|
||||
(global $f64.MIN_SAFE_INTEGER f64 (f64.const -9007199254740991))
|
||||
(global $f64.MAX_SAFE_INTEGER f64 (f64.const 9007199254740991))
|
||||
(global $f64.EPSILON f64 (f64.const 2.220446049250313e-16))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 36))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\0b\00\00\00b\00u\00i\00l\00t\00i\00n\00s\00.\00t\00s\00")
|
||||
(export "test" (func $builtins/test))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $builtins/test (; 0 ;) (type $v)
|
||||
(func $builtins/test (; 1 ;) (type $v)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
(local $2 i64)
|
||||
@ -222,7 +225,15 @@
|
||||
(i32.const 42)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 21)
|
||||
(i32.const 19)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:22:0
|
||||
(set_global $builtins/i
|
||||
@ -252,7 +263,15 @@
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 22)
|
||||
(i32.const 20)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:23:0
|
||||
(set_global $builtins/i
|
||||
@ -282,7 +301,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 23)
|
||||
(i32.const 20)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:27:0
|
||||
(drop
|
||||
@ -420,7 +447,15 @@
|
||||
(i64.const 42)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 39)
|
||||
(i32.const 19)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:40:0
|
||||
(set_global $builtins/I
|
||||
@ -450,7 +485,15 @@
|
||||
(i64.const 2)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 40)
|
||||
(i32.const 20)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:41:0
|
||||
(set_global $builtins/I
|
||||
@ -480,7 +523,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 41)
|
||||
(i32.const 20)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:47:0
|
||||
(drop
|
||||
@ -1607,7 +1658,15 @@
|
||||
(f64.const nan:0x8000000000000)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 221)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:222:0
|
||||
(if
|
||||
@ -1621,7 +1680,15 @@
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 222)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:223:0
|
||||
(if
|
||||
@ -1635,7 +1702,15 @@
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 223)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:224:0
|
||||
(if
|
||||
@ -1661,7 +1736,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 224)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:225:0
|
||||
(if
|
||||
@ -1687,7 +1770,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 225)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:226:0
|
||||
(if
|
||||
@ -1713,7 +1804,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 226)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:227:0
|
||||
(if
|
||||
@ -1739,7 +1838,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 227)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:228:0
|
||||
(if
|
||||
@ -1762,7 +1869,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 228)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:229:0
|
||||
(if
|
||||
@ -1785,7 +1900,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 229)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:242:0
|
||||
(if
|
||||
@ -1797,7 +1920,15 @@
|
||||
(i32.const -128)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 242)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:243:0
|
||||
(if
|
||||
@ -1809,7 +1940,15 @@
|
||||
(i32.const 127)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 243)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:244:0
|
||||
(if
|
||||
@ -1821,7 +1960,15 @@
|
||||
(i32.const -32768)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 244)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:245:0
|
||||
(if
|
||||
@ -1833,7 +1980,15 @@
|
||||
(i32.const 32767)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 245)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:246:0
|
||||
(if
|
||||
@ -1845,7 +2000,15 @@
|
||||
(i32.const -2147483648)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 246)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:247:0
|
||||
(if
|
||||
@ -1857,7 +2020,15 @@
|
||||
(i32.const 2147483647)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 247)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:248:0
|
||||
(if
|
||||
@ -1869,7 +2040,15 @@
|
||||
(i64.const -9223372036854775808)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 248)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:249:0
|
||||
(if
|
||||
@ -1881,7 +2060,15 @@
|
||||
(i64.const 9223372036854775807)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 249)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:251:0
|
||||
(if
|
||||
@ -1893,7 +2080,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 251)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:252:0
|
||||
(if
|
||||
@ -1905,7 +2100,15 @@
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 252)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:253:0
|
||||
(if
|
||||
@ -1917,7 +2120,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 253)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:254:0
|
||||
(if
|
||||
@ -1929,7 +2140,15 @@
|
||||
(i32.const 65535)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 254)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:255:0
|
||||
(if
|
||||
@ -1941,7 +2160,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 255)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:256:0
|
||||
(if
|
||||
@ -1953,7 +2180,15 @@
|
||||
(i32.const -1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 256)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:257:0
|
||||
(if
|
||||
@ -1965,7 +2200,15 @@
|
||||
(i64.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 257)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:258:0
|
||||
(if
|
||||
@ -1977,7 +2220,15 @@
|
||||
(i64.const -1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 258)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:259:0
|
||||
(if
|
||||
@ -1989,7 +2240,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 259)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:259:29
|
||||
(if
|
||||
@ -2001,7 +2260,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 259)
|
||||
(i32.const 29)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:260:0
|
||||
(if
|
||||
@ -2013,7 +2280,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 260)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:260:29
|
||||
(if
|
||||
@ -2025,7 +2300,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 260)
|
||||
(i32.const 29)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:262:0
|
||||
(if
|
||||
@ -2040,7 +2323,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 262)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:263:0
|
||||
(if
|
||||
@ -2052,7 +2343,15 @@
|
||||
(f32.const 3402823466385288598117041e14)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 263)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:264:0
|
||||
(if
|
||||
@ -2067,7 +2366,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 264)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:265:0
|
||||
(if
|
||||
@ -2079,7 +2386,15 @@
|
||||
(f32.const 16777215)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 265)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:266:0
|
||||
(if
|
||||
@ -2091,7 +2406,15 @@
|
||||
(f32.const 1.1920928955078125e-07)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 266)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:267:0
|
||||
(if
|
||||
@ -2106,7 +2429,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 267)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:268:0
|
||||
(if
|
||||
@ -2118,7 +2449,15 @@
|
||||
(f64.const 1797693134862315708145274e284)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 268)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:269:0
|
||||
(if
|
||||
@ -2133,7 +2472,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 269)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:270:0
|
||||
(if
|
||||
@ -2145,7 +2492,15 @@
|
||||
(f64.const 9007199254740991)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 270)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ builtins.ts:271:0
|
||||
(if
|
||||
@ -2157,65 +2512,15 @@
|
||||
(f64.const 2.220446049250313e-16)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 271)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: builtins/b
|
||||
GLOBAL: builtins/i
|
||||
GLOBAL: builtins/I
|
||||
GLOBAL: builtins/f
|
||||
GLOBAL: builtins/F
|
||||
GLOBAL: builtins/constantOffset
|
||||
GLOBAL: builtins/u
|
||||
GLOBAL: builtins/U
|
||||
GLOBAL: builtins/s
|
||||
FUNCTION_PROTOTYPE: builtins/test
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: builtins/test
|
||||
;)
|
||||
|
@ -4,28 +4,22 @@
|
||||
(export "test" (func $class-extends/test))
|
||||
(export "memory" (memory $0))
|
||||
(func $class-extends/test (; 0 ;) (type $iv) (param $0 i32)
|
||||
;;@ class-extends.ts:10:2
|
||||
(drop
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
;;@ class-extends.ts:11:2
|
||||
(drop
|
||||
(i32.load16_s offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
;;@ class-extends.ts:12:2
|
||||
(i32.store
|
||||
(get_local $0)
|
||||
;;@ class-extends.ts:12:8
|
||||
(i32.const 2)
|
||||
)
|
||||
;;@ class-extends.ts:13:2
|
||||
(i32.store16 offset=4
|
||||
(get_local $0)
|
||||
;;@ class-extends.ts:13:8
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
|
@ -31,54 +31,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
CLASS_PROTOTYPE: class-extends/A
|
||||
CLASS_PROTOTYPE: class-extends/B
|
||||
FUNCTION_PROTOTYPE: class-extends/test
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: class-extends/test
|
||||
;)
|
||||
|
@ -1,50 +1,112 @@
|
||||
(module
|
||||
(type $iii (func (param i32 i32) (result i32)))
|
||||
(type $fff (func (param f32 f32) (result f32)))
|
||||
(type $iiii (func (param i32 i32 i32) (result i32)))
|
||||
(type $ifff (func (param i32 f32 f32) (result f32)))
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $v (func))
|
||||
(global $class/Animal.ONE (mut i32) (i32.const 1))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\08\00\00\00c\00l\00a\00s\00s\00.\00t\00s")
|
||||
(export "test" (func $class/test))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $class/test (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
;;@ class.ts:23:2
|
||||
(func $class/Animal.add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(get_global $class/Animal.ONE)
|
||||
)
|
||||
)
|
||||
(func $class/Animal.sub<f32> (; 1 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
(f32.add
|
||||
(f32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
(f32.convert_s/i32
|
||||
(get_global $class/Animal.ONE)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $class/Animal#instanceAdd (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
(get_global $class/Animal.ONE)
|
||||
)
|
||||
)
|
||||
(func $class/Animal#instanceSub<f32> (; 3 ;) (type $ifff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32)
|
||||
(f32.add
|
||||
(f32.sub
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
)
|
||||
(f32.convert_s/i32
|
||||
(get_global $class/Animal.ONE)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $class/test (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(drop
|
||||
(call $class/Animal#instanceAdd
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call $class/Animal#instanceSub<f32>
|
||||
(get_local $0)
|
||||
(f32.const 1)
|
||||
(f32.const 2)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
;;@ class.ts:24:2
|
||||
(drop
|
||||
(i32.load16_s offset=4
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
;;@ class.ts:25:2
|
||||
(drop
|
||||
(i32.load8_s offset=6
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
;;@ class.ts:27:2
|
||||
(i32.store
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ class.ts:28:2
|
||||
(i32.store16 offset=4
|
||||
(get_local $0)
|
||||
;;@ class.ts:28:19
|
||||
(i32.const 2)
|
||||
)
|
||||
;;@ class.ts:29:2
|
||||
(i32.store8 offset=6
|
||||
(get_local $0)
|
||||
;;@ class.ts:29:25
|
||||
(i32.const 3)
|
||||
)
|
||||
;;@ class.ts:31:12
|
||||
(get_local $0)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(nop)
|
||||
(func $start (; 5 ;) (type $v)
|
||||
(drop
|
||||
(call $class/Animal.add
|
||||
(i32.const 1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call $class/Animal.sub<f32>
|
||||
(f32.const 1)
|
||||
(f32.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1,17 +1,20 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $iii (func (param i32 i32) (result i32)))
|
||||
(type $fff (func (param f32 f32) (result f32)))
|
||||
(type $iiii (func (param i32 i32 i32) (result i32)))
|
||||
(type $ifff (func (param i32 f32 f32) (result f32)))
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $class/Animal.ONE (mut i32) (i32.const 1))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 28))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\08\00\00\00c\00l\00a\00s\00s\00.\00t\00s\00")
|
||||
(export "test" (func $class/test))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $class/Animal.add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(func $class/Animal.add (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
;;@ class.ts:3:58
|
||||
(return
|
||||
;;@ class.ts:3:43
|
||||
@ -26,7 +29,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $class/Animal.sub<f32> (; 1 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
(func $class/Animal.sub<f32> (; 2 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
;;@ class.ts:4:58
|
||||
(return
|
||||
;;@ class.ts:4:40
|
||||
@ -43,7 +46,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $class/Animal#instanceAdd (; 2 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $class/Animal#instanceAdd (; 3 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
;;@ class.ts:9:59
|
||||
(return
|
||||
;;@ class.ts:9:44
|
||||
@ -58,7 +61,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $class/Animal#instanceSub<f32> (; 3 ;) (type $ifff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32)
|
||||
(func $class/Animal#instanceSub<f32> (; 4 ;) (type $ifff) (param $0 i32) (param $1 f32) (param $2 f32) (result f32)
|
||||
;;@ class.ts:10:59
|
||||
(return
|
||||
;;@ class.ts:10:41
|
||||
@ -75,7 +78,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $class/test (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func $class/test (; 5 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
;;@ class.ts:20:9
|
||||
@ -179,7 +182,7 @@
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $start (; 5 ;) (type $v)
|
||||
(func $start (; 6 ;) (type $v)
|
||||
;;@ class.ts:13:0
|
||||
(if
|
||||
(i32.eqz
|
||||
@ -190,7 +193,15 @@
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 13)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ class.ts:15:0
|
||||
(drop
|
||||
@ -216,56 +227,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
CLASS_PROTOTYPE: class/Animal
|
||||
GLOBAL: class/Animal.ONE
|
||||
FUNCTION_PROTOTYPE: class/Animal.add
|
||||
FUNCTION_PROTOTYPE: class/Animal.sub
|
||||
FUNCTION_PROTOTYPE: class/test
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: class/test
|
||||
;)
|
||||
|
@ -1,15 +1,16 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $comma/a (mut i32) (i32.const 0))
|
||||
(global $comma/b (mut i32) (i32.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\08\00\00\00c\00o\00m\00m\00a\00.\00t\00s")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(local $0 i32)
|
||||
;;@ comma.ts:3:0
|
||||
(set_global $comma/b
|
||||
;;@ comma.ts:3:4
|
||||
(block (result i32)
|
||||
(set_global $comma/a
|
||||
(i32.add
|
||||
@ -22,105 +23,123 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:4:0
|
||||
(if
|
||||
;;@ comma.ts:4:7
|
||||
(i32.ne
|
||||
(get_global $comma/a)
|
||||
;;@ comma.ts:4:12
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 4)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:5:0
|
||||
(if
|
||||
;;@ comma.ts:5:7
|
||||
(get_global $comma/b)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 5)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:7:0
|
||||
(set_global $comma/a
|
||||
(i32.add
|
||||
(get_global $comma/a)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:7:5
|
||||
(set_global $comma/b
|
||||
;;@ comma.ts:7:9
|
||||
(get_global $comma/a)
|
||||
)
|
||||
;;@ comma.ts:8:0
|
||||
(if
|
||||
;;@ comma.ts:8:7
|
||||
(i32.ne
|
||||
(get_global $comma/a)
|
||||
;;@ comma.ts:8:12
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:9:0
|
||||
(if
|
||||
;;@ comma.ts:9:7
|
||||
(i32.ne
|
||||
(get_global $comma/b)
|
||||
;;@ comma.ts:9:12
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 9)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:11:0
|
||||
(set_global $comma/a
|
||||
;;@ comma.ts:11:4
|
||||
(block (result i32)
|
||||
(set_global $comma/b
|
||||
;;@ comma.ts:11:8
|
||||
(i32.const 0)
|
||||
)
|
||||
(get_global $comma/b)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:13:0
|
||||
(set_global $comma/b
|
||||
;;@ comma.ts:13:4
|
||||
(block (result i32)
|
||||
;;@ comma.ts:13:5
|
||||
(set_global $comma/a
|
||||
(i32.add
|
||||
(get_global $comma/a)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:13:10
|
||||
(get_global $comma/a)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:14:0
|
||||
(if
|
||||
;;@ comma.ts:14:7
|
||||
(i32.ne
|
||||
(get_global $comma/a)
|
||||
;;@ comma.ts:14:12
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 14)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:15:0
|
||||
(if
|
||||
;;@ comma.ts:15:7
|
||||
(i32.ne
|
||||
(get_global $comma/b)
|
||||
;;@ comma.ts:15:12
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 15)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:17:0
|
||||
(set_global $comma/a
|
||||
;;@ comma.ts:17:4
|
||||
(block (result i32)
|
||||
;;@ comma.ts:17:5
|
||||
(set_global $comma/a
|
||||
(i32.add
|
||||
(get_global $comma/a)
|
||||
@ -128,54 +147,57 @@
|
||||
)
|
||||
)
|
||||
(set_global $comma/b
|
||||
;;@ comma.ts:17:14
|
||||
(get_global $comma/a)
|
||||
)
|
||||
(get_global $comma/b)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:18:0
|
||||
(if
|
||||
;;@ comma.ts:18:7
|
||||
(i32.ne
|
||||
(get_global $comma/a)
|
||||
;;@ comma.ts:18:12
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 18)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:19:0
|
||||
(if
|
||||
;;@ comma.ts:19:7
|
||||
(i32.ne
|
||||
(get_global $comma/b)
|
||||
;;@ comma.ts:19:12
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 19)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:21:5
|
||||
(set_local $0
|
||||
;;@ comma.ts:21:13
|
||||
(i32.const 0)
|
||||
)
|
||||
(loop $continue|0
|
||||
(if
|
||||
;;@ comma.ts:21:16
|
||||
(i32.lt_u
|
||||
(get_local $0)
|
||||
;;@ comma.ts:21:20
|
||||
(get_global $comma/a)
|
||||
)
|
||||
(block
|
||||
;;@ comma.ts:21:23
|
||||
(set_global $comma/a
|
||||
(i32.sub
|
||||
(get_global $comma/a)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:21:28
|
||||
(set_local $0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
@ -186,15 +208,20 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:22:0
|
||||
(if
|
||||
;;@ comma.ts:22:7
|
||||
(i32.ne
|
||||
(get_local $0)
|
||||
;;@ comma.ts:22:12
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 22)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1,12 +1,15 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $comma/a (mut i32) (i32.const 0))
|
||||
(global $comma/b (mut i32) (i32.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 28))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\08\00\00\00c\00o\00m\00m\00a\00.\00t\00s\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
;;@ comma.ts:3:0
|
||||
@ -41,7 +44,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 4)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:5:0
|
||||
(if
|
||||
@ -53,7 +64,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 5)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:7:0
|
||||
(block
|
||||
@ -79,7 +98,15 @@
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:9:0
|
||||
(if
|
||||
@ -91,7 +118,15 @@
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 9)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:11:0
|
||||
(set_global $comma/a
|
||||
@ -129,7 +164,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 14)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:15:0
|
||||
(if
|
||||
@ -141,7 +184,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 15)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:17:0
|
||||
(set_global $comma/a
|
||||
@ -174,7 +225,15 @@
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 18)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:19:0
|
||||
(if
|
||||
@ -186,7 +245,15 @@
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 19)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:21:0
|
||||
(block $break|0
|
||||
@ -237,7 +304,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 22)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ comma.ts:24:0
|
||||
(block
|
||||
@ -255,53 +330,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: comma/a
|
||||
GLOBAL: comma/b
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -1,14 +1,47 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(import "env" "externalFunc" (func $declare/externalFunc))
|
||||
(import "external" "externalFunc" (func $declare/external.externalFunc))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(import "env" "externalConstant" (global $declare/externalConstant i32))
|
||||
(import "env" "externalFunction" (func $declare/externalFunction))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(import "my" "externalFunction" (func $declare/my.externalFunction))
|
||||
(import "my" "externalConstant" (global $declare/my.externalConstant i32))
|
||||
(memory $0 1)
|
||||
(export "test" (func $declare/test))
|
||||
(data (i32.const 8) "\n\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s")
|
||||
(export "memory" (memory $0))
|
||||
(func $declare/test (; 2 ;) (type $v)
|
||||
;;@ declare.ts:11:2
|
||||
(call $declare/externalFunc)
|
||||
;;@ declare.ts:13:11
|
||||
(call $declare/external.externalFunc)
|
||||
(start $start)
|
||||
(func $start (; 3 ;) (type $v)
|
||||
(call $declare/externalFunction)
|
||||
(if
|
||||
(i32.ne
|
||||
(get_global $declare/externalConstant)
|
||||
(i32.const 1)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 5)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(call $declare/my.externalFunction)
|
||||
(if
|
||||
(i32.ne
|
||||
(get_global $declare/my.externalConstant)
|
||||
(i32.const 2)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 13)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1,15 +1,13 @@
|
||||
declare function externalFunc(): void;
|
||||
declare const externalConst: i32;
|
||||
declare function externalFunction(): void;
|
||||
declare const externalConstant: i32;
|
||||
|
||||
namespace external {
|
||||
export declare function externalFunc(): void;
|
||||
export declare const externalConst: i32;
|
||||
externalFunction();
|
||||
assert(externalConstant == 1);
|
||||
|
||||
namespace my {
|
||||
export declare function externalFunction(): void;
|
||||
export declare const externalConstant: i32;
|
||||
}
|
||||
|
||||
export function test(): void {
|
||||
// cannot be interpreted
|
||||
externalFunc();
|
||||
externalConst;
|
||||
external.externalFunc();
|
||||
external.externalConst;
|
||||
}
|
||||
my.externalFunction();
|
||||
assert(my.externalConstant == 2);
|
||||
|
@ -1,79 +1,60 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(import "env" "externalConst" (global $declare/externalConst i32))
|
||||
(import "env" "externalFunc" (func $declare/externalFunc))
|
||||
(import "external" "externalFunc" (func $declare/external.externalFunc))
|
||||
(import "external" "externalConst" (global $declare/external.externalConst i32))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(import "env" "externalConstant" (global $declare/externalConstant i32))
|
||||
(import "env" "externalFunction" (func $declare/externalFunction))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(import "my" "externalFunction" (func $declare/my.externalFunction))
|
||||
(import "my" "externalConstant" (global $declare/my.externalConstant i32))
|
||||
(global $HEAP_BASE i32 (i32.const 32))
|
||||
(memory $0 1)
|
||||
(export "test" (func $declare/test))
|
||||
(data (i32.const 8) "\n\00\00\00d\00e\00c\00l\00a\00r\00e\00.\00t\00s\00")
|
||||
(export "memory" (memory $0))
|
||||
(func $declare/test (; 2 ;) (type $v)
|
||||
;;@ declare.ts:11:2
|
||||
(call $declare/externalFunc)
|
||||
;;@ declare.ts:12:2
|
||||
(drop
|
||||
(get_global $declare/externalConst)
|
||||
(start $start)
|
||||
(func $start (; 3 ;) (type $v)
|
||||
;;@ declare.ts:4:0
|
||||
(call $declare/externalFunction)
|
||||
;;@ declare.ts:5:0
|
||||
(if
|
||||
(i32.eqz
|
||||
;;@ declare.ts:5:7
|
||||
(i32.eq
|
||||
(get_global $declare/externalConstant)
|
||||
;;@ declare.ts:5:27
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 5)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ declare.ts:13:11
|
||||
(call $declare/external.externalFunc)
|
||||
;;@ declare.ts:14:2
|
||||
(drop
|
||||
(get_global $declare/external.externalConst)
|
||||
;;@ declare.ts:12:3
|
||||
(call $declare/my.externalFunction)
|
||||
;;@ declare.ts:13:0
|
||||
(if
|
||||
(i32.eqz
|
||||
;;@ declare.ts:13:7
|
||||
(i32.eq
|
||||
(get_global $declare/my.externalConstant)
|
||||
;;@ declare.ts:13:30
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 13)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: declare/externalFunc
|
||||
GLOBAL: declare/externalConst
|
||||
NAMESPACE: declare/external
|
||||
FUNCTION_PROTOTYPE: declare/external.externalFunc
|
||||
GLOBAL: declare/external.externalConst
|
||||
FUNCTION_PROTOTYPE: declare/test
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: declare/test
|
||||
;)
|
||||
|
@ -1,22 +1,23 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $do/n (mut i32) (i32.const 10))
|
||||
(global $do/m (mut i32) (i32.const 0))
|
||||
(global $do/o (mut i32) (i32.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\05\00\00\00d\00o\00.\00t\00s")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(loop $continue|0
|
||||
;;@ do.ts:4:2
|
||||
(set_global $do/n
|
||||
(i32.sub
|
||||
(get_global $do/n)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:5:2
|
||||
(set_global $do/m
|
||||
(i32.add
|
||||
(get_global $do/m)
|
||||
@ -24,36 +25,43 @@
|
||||
)
|
||||
)
|
||||
(br_if $continue|0
|
||||
;;@ do.ts:6:9
|
||||
(get_global $do/n)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:7:0
|
||||
(if
|
||||
;;@ do.ts:7:7
|
||||
(get_global $do/n)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 7)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:8:0
|
||||
(if
|
||||
;;@ do.ts:8:7
|
||||
(i32.ne
|
||||
(get_global $do/m)
|
||||
;;@ do.ts:8:12
|
||||
(i32.const 10)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:10:0
|
||||
(set_global $do/n
|
||||
;;@ do.ts:10:4
|
||||
(i32.const 10)
|
||||
)
|
||||
(loop $continue|1
|
||||
(set_global $do/n
|
||||
(i32.sub
|
||||
(tee_local $0
|
||||
;;@ do.ts:11:10
|
||||
(get_global $do/n)
|
||||
)
|
||||
(i32.const 1)
|
||||
@ -63,34 +71,34 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:12:0
|
||||
(if
|
||||
;;@ do.ts:12:7
|
||||
(i32.ne
|
||||
(get_global $do/n)
|
||||
(i32.const -1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 12)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:14:0
|
||||
(set_global $do/n
|
||||
;;@ do.ts:14:4
|
||||
(i32.const 10)
|
||||
)
|
||||
;;@ do.ts:15:0
|
||||
(set_global $do/m
|
||||
;;@ do.ts:15:4
|
||||
(i32.const 0)
|
||||
)
|
||||
(loop $continue|2
|
||||
;;@ do.ts:18:2
|
||||
(set_global $do/n
|
||||
(i32.sub
|
||||
(get_global $do/n)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:19:2
|
||||
(set_global $do/m
|
||||
(i32.add
|
||||
(get_global $do/m)
|
||||
@ -98,14 +106,12 @@
|
||||
)
|
||||
)
|
||||
(loop $continue|3
|
||||
;;@ do.ts:21:4
|
||||
(set_global $do/n
|
||||
(i32.sub
|
||||
(get_global $do/n)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:22:4
|
||||
(set_global $do/o
|
||||
(i32.add
|
||||
(get_global $do/o)
|
||||
@ -113,56 +119,81 @@
|
||||
)
|
||||
)
|
||||
(br_if $continue|3
|
||||
;;@ do.ts:23:11
|
||||
(get_global $do/n)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:24:2
|
||||
(if
|
||||
;;@ do.ts:24:9
|
||||
(get_global $do/n)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 24)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:25:2
|
||||
(if
|
||||
;;@ do.ts:25:9
|
||||
(i32.ne
|
||||
(get_global $do/o)
|
||||
;;@ do.ts:25:14
|
||||
(i32.const 9)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 25)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(br_if $continue|2
|
||||
(get_global $do/n)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(get_global $do/n)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 27)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(br_if $continue|2
|
||||
;;@ do.ts:26:9
|
||||
(get_global $do/n)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:27:0
|
||||
(if
|
||||
;;@ do.ts:27:7
|
||||
(get_global $do/n)
|
||||
(unreachable)
|
||||
)
|
||||
;;@ do.ts:28:0
|
||||
(if
|
||||
;;@ do.ts:28:7
|
||||
(i32.ne
|
||||
(get_global $do/m)
|
||||
;;@ do.ts:28:12
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 28)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:29:0
|
||||
(if
|
||||
;;@ do.ts:29:7
|
||||
(i32.ne
|
||||
(get_global $do/o)
|
||||
;;@ do.ts:29:12
|
||||
(i32.const 9)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 29)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1,13 +1,16 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $do/n (mut i32) (i32.const 10))
|
||||
(global $do/m (mut i32) (i32.const 0))
|
||||
(global $do/o (mut i32) (i32.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 24))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\05\00\00\00d\00o\00.\00t\00s\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(local $0 i32)
|
||||
;;@ do.ts:3:0
|
||||
(block $break|0
|
||||
@ -45,7 +48,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 7)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:8:0
|
||||
(if
|
||||
@ -57,7 +68,15 @@
|
||||
(i32.const 10)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:10:0
|
||||
(set_global $do/n
|
||||
@ -100,7 +119,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 12)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:14:0
|
||||
(set_global $do/n
|
||||
@ -167,7 +194,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 24)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:25:2
|
||||
(if
|
||||
@ -179,7 +214,15 @@
|
||||
(i32.const 9)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 25)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
(br_if $continue|2
|
||||
@ -198,7 +241,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 27)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:28:0
|
||||
(if
|
||||
@ -210,7 +261,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 28)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ do.ts:29:0
|
||||
(if
|
||||
@ -222,58 +281,15 @@
|
||||
(i32.const 9)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 29)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: do/n
|
||||
GLOBAL: do/m
|
||||
GLOBAL: do/o
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -3,51 +3,3 @@
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -1,4 +1,5 @@
|
||||
(module
|
||||
(type $i (func (result i32)))
|
||||
(type $v (func))
|
||||
(global $enum/Implicit.ZERO i32 (i32.const 0))
|
||||
(global $enum/Implicit.ONE i32 (i32.const 1))
|
||||
@ -33,9 +34,12 @@
|
||||
(export "enum/SelfReference.ONE" (global $enum/SelfReference.ONE))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $enum/getZero (; 0 ;) (type $i) (result i32)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(set_global $enum/NonConstant.ZERO
|
||||
(i32.const 0)
|
||||
(call $enum/getZero)
|
||||
)
|
||||
(set_global $enum/NonConstant.ONE
|
||||
(i32.add
|
||||
|
@ -54,61 +54,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
ENUM: enum/Implicit
|
||||
ENUM: enum/Explicit
|
||||
ENUM: enum/Mixed
|
||||
FUNCTION_PROTOTYPE: enum/getZero
|
||||
ENUM: enum/NonConstant
|
||||
ENUM: enum/SelfReference
|
||||
[program.exports]
|
||||
ENUM: enum/Implicit
|
||||
ENUM: enum/Explicit
|
||||
ENUM: enum/Mixed
|
||||
ENUM: enum/NonConstant
|
||||
ENUM: enum/SelfReference
|
||||
;)
|
||||
|
@ -14,26 +14,20 @@
|
||||
(export "two" (func $export/ns.two))
|
||||
(export "memory" (memory $0))
|
||||
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
;;@ export.ts:2:9
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ export.ts:2:13
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
;;@ export.ts:6:9
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
;;@ export.ts:6:13
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
;;@ export.ts:12:9
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
;;@ export.ts:12:13
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
|
@ -50,66 +50,3 @@
|
||||
(func $export/ns.two (; 3 ;) (type $v)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: export/add
|
||||
FUNCTION_PROTOTYPE: export/sub
|
||||
FUNCTION_PROTOTYPE: export/mul
|
||||
GLOBAL: export/a
|
||||
GLOBAL: export/b
|
||||
GLOBAL: export/c
|
||||
NAMESPACE: export/ns
|
||||
FUNCTION_PROTOTYPE: export/ns.one
|
||||
FUNCTION_PROTOTYPE: export/ns.two
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: export/add
|
||||
FUNCTION_PROTOTYPE: export/sub
|
||||
FUNCTION_PROTOTYPE: export/renamed_mul
|
||||
GLOBAL: export/a
|
||||
GLOBAL: export/b
|
||||
GLOBAL: export/renamed_c
|
||||
NAMESPACE: export/ns
|
||||
;)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,16 +1,19 @@
|
||||
(module
|
||||
(type $FFF (func (param f64 f64) (result f64)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $fff (func (param f32 f32) (result f32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $f64.EPSILON f64 (f64.const 2.220446049250313e-16))
|
||||
(global $f32.EPSILON f32 (f32.const 1.1920928955078125e-07))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 28))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\07\00\00\00f\00m\00o\00d\00.\00t\00s\00")
|
||||
(export "fmod" (func $fmod/fmod))
|
||||
(export "fmodf" (func $fmod/fmodf))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $fmod/fmod (; 0 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
(func $fmod/fmod (; 1 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
(local $2 i64)
|
||||
(local $3 i64)
|
||||
(local $4 i32)
|
||||
@ -649,7 +652,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $fmod/fmodf (; 1 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
(func $fmod/fmodf (; 2 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
@ -1268,7 +1271,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(func $start (; 3 ;) (type $v)
|
||||
(local $0 f64)
|
||||
(local $1 f32)
|
||||
;;@ fmod.ts:65:0
|
||||
@ -1288,7 +1291,15 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 65)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ fmod.ts:66:0
|
||||
(if
|
||||
@ -1305,7 +1316,15 @@
|
||||
(f64.const 0.5)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 66)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ fmod.ts:67:0
|
||||
(if
|
||||
@ -1326,7 +1345,15 @@
|
||||
(f64.const 2.220446049250313e-16)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 67)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ fmod.ts:68:0
|
||||
(if
|
||||
@ -1347,7 +1374,15 @@
|
||||
(f64.const 2.220446049250313e-16)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 68)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ fmod.ts:134:0
|
||||
(if
|
||||
@ -1366,7 +1401,15 @@
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 134)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ fmod.ts:135:0
|
||||
(if
|
||||
@ -1383,7 +1426,15 @@
|
||||
(f32.const 0.5)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 135)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ fmod.ts:136:0
|
||||
(if
|
||||
@ -1404,7 +1455,15 @@
|
||||
(f32.const 1.1920928955078125e-07)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 136)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ fmod.ts:137:0
|
||||
(if
|
||||
@ -1425,58 +1484,15 @@
|
||||
(f32.const 1.1920928955078125e-07)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 137)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: fmod/fmod
|
||||
FUNCTION_PROTOTYPE: fmod/fmodf
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: fmod/fmod
|
||||
FUNCTION_PROTOTYPE: fmod/fmodf
|
||||
;)
|
||||
|
@ -1,29 +1,26 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $for/i (mut i32) (i32.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\06\00\00\00f\00o\00r\00.\00t\00s")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(local $0 i32)
|
||||
;;@ for.ts:2:5
|
||||
(set_global $for/i
|
||||
;;@ for.ts:2:9
|
||||
(i32.const 0)
|
||||
)
|
||||
(loop $continue|0
|
||||
(if
|
||||
;;@ for.ts:2:12
|
||||
(i32.lt_s
|
||||
(get_global $for/i)
|
||||
;;@ for.ts:2:16
|
||||
(i32.const 10)
|
||||
)
|
||||
(block
|
||||
;;@ for.ts:2:20
|
||||
(set_global $for/i
|
||||
(i32.add
|
||||
;;@ for.ts:2:22
|
||||
(get_global $for/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -32,29 +29,30 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ for.ts:5:0
|
||||
(if
|
||||
;;@ for.ts:5:7
|
||||
(i32.ne
|
||||
(get_global $for/i)
|
||||
;;@ for.ts:5:12
|
||||
(i32.const 10)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 5)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(loop $continue|1
|
||||
(if
|
||||
;;@ for.ts:7:21
|
||||
(i32.lt_s
|
||||
(get_local $0)
|
||||
;;@ for.ts:7:25
|
||||
(i32.const 10)
|
||||
)
|
||||
(block
|
||||
;;@ for.ts:7:29
|
||||
(set_local $0
|
||||
(i32.add
|
||||
;;@ for.ts:7:31
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -65,17 +63,13 @@
|
||||
)
|
||||
(loop $continue|2
|
||||
(if
|
||||
;;@ for.ts:11:7
|
||||
(i32.gt_s
|
||||
(get_global $for/i)
|
||||
;;@ for.ts:11:11
|
||||
(i32.const 0)
|
||||
)
|
||||
(block
|
||||
;;@ for.ts:11:14
|
||||
(set_global $for/i
|
||||
(i32.sub
|
||||
;;@ for.ts:11:16
|
||||
(get_global $for/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -84,28 +78,28 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ for.ts:12:0
|
||||
(if
|
||||
;;@ for.ts:12:7
|
||||
(get_global $for/i)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 12)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ for.ts:14:0
|
||||
(block $break|3
|
||||
(loop $continue|3
|
||||
;;@ for.ts:16:4
|
||||
(br_if $break|3
|
||||
;;@ for.ts:15:6
|
||||
(i32.eq
|
||||
(get_global $for/i)
|
||||
;;@ for.ts:15:11
|
||||
(i32.const 10)
|
||||
)
|
||||
)
|
||||
;;@ for.ts:14:8
|
||||
(set_global $for/i
|
||||
(i32.add
|
||||
;;@ for.ts:14:10
|
||||
(get_global $for/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -116,12 +110,10 @@
|
||||
(loop $continue|4
|
||||
(set_global $for/i
|
||||
(i32.sub
|
||||
;;@ for.ts:19:8
|
||||
(get_global $for/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ for.ts:20:4
|
||||
(br_if $continue|4
|
||||
(get_global $for/i)
|
||||
)
|
||||
|
@ -1,11 +1,14 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $for/i (mut i32) (i32.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 24))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\06\00\00\00f\00o\00r\00.\00t\00s\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(local $0 i32)
|
||||
;;@ for.ts:2:0
|
||||
(block $break|0
|
||||
@ -50,7 +53,15 @@
|
||||
(i32.const 10)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 5)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ for.ts:7:0
|
||||
(block $break|1
|
||||
@ -122,7 +133,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 12)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ for.ts:14:0
|
||||
(block $break|3
|
||||
@ -190,52 +209,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: for/i
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -1,9 +1,145 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(type $i (func (result i32)))
|
||||
(type $I (func (result i64)))
|
||||
(type $f (func (result f32)))
|
||||
(type $F (func (result f64)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $II (func (param i64) (result i64)))
|
||||
(type $ff (func (param f32) (result f32)))
|
||||
(type $FF (func (param f64) (result f64)))
|
||||
(type $iiv (func (param i32 i32)))
|
||||
(type $iii (func (param i32 i32) (result i32)))
|
||||
(type $IiI (func (param i64 i32) (result i64)))
|
||||
(type $fff (func (param f32 f32) (result f32)))
|
||||
(type $FFF (func (param f64 f64) (result f64)))
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $function/v (; 0 ;) (type $v)
|
||||
(nop)
|
||||
)
|
||||
(func $function/i (; 1 ;) (type $i) (result i32)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $function/I (; 2 ;) (type $I) (result i64)
|
||||
(i64.const 0)
|
||||
)
|
||||
(func $function/f (; 3 ;) (type $f) (result f32)
|
||||
(f32.const 0)
|
||||
)
|
||||
(func $function/F (; 4 ;) (type $F) (result f64)
|
||||
(f64.const 0)
|
||||
)
|
||||
(func $function/iv (; 5 ;) (type $iv) (param $0 i32)
|
||||
(nop)
|
||||
)
|
||||
(func $function/ii (; 6 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $function/II (; 7 ;) (type $II) (param $0 i64) (result i64)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $function/ff (; 8 ;) (type $ff) (param $0 f32) (result f32)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $function/FF (; 9 ;) (type $FF) (param $0 f64) (result f64)
|
||||
(get_local $0)
|
||||
)
|
||||
(func $function/iiv (; 10 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(nop)
|
||||
)
|
||||
(func $function/iii (; 11 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $function/III (; 12 ;) (type $IiI) (param $0 i64) (param $1 i32) (result i64)
|
||||
(i64.add
|
||||
(get_local $0)
|
||||
(i64.extend_s/i32
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $function/fff (; 13 ;) (type $fff) (param $0 f32) (param $1 f32) (result f32)
|
||||
(f32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $function/FFF (; 14 ;) (type $FFF) (param $0 f64) (param $1 f64) (result f64)
|
||||
(f64.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $start (; 15 ;) (type $v)
|
||||
(call $function/v)
|
||||
(drop
|
||||
(call $function/i)
|
||||
)
|
||||
(drop
|
||||
(call $function/I)
|
||||
)
|
||||
(drop
|
||||
(call $function/f)
|
||||
)
|
||||
(drop
|
||||
(call $function/F)
|
||||
)
|
||||
(call $function/iv
|
||||
(i32.const 0)
|
||||
)
|
||||
(drop
|
||||
(call $function/ii
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call $function/II
|
||||
(i64.const 0)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call $function/ff
|
||||
(f32.const 0)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call $function/FF
|
||||
(f64.const 0)
|
||||
)
|
||||
)
|
||||
(call $function/iiv
|
||||
(i32.const 1)
|
||||
(i32.const 2)
|
||||
)
|
||||
(drop
|
||||
(call $function/iii
|
||||
(i32.const 1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call $function/III
|
||||
(i64.const 1)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call $function/fff
|
||||
(f32.const 1)
|
||||
(f32.const 2)
|
||||
)
|
||||
)
|
||||
(drop
|
||||
(call $function/FFF
|
||||
(f64.const 1)
|
||||
(f64.const 2)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -215,66 +215,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: function/v
|
||||
FUNCTION_PROTOTYPE: function/i
|
||||
FUNCTION_PROTOTYPE: function/I
|
||||
FUNCTION_PROTOTYPE: function/f
|
||||
FUNCTION_PROTOTYPE: function/F
|
||||
FUNCTION_PROTOTYPE: function/iv
|
||||
FUNCTION_PROTOTYPE: function/ii
|
||||
FUNCTION_PROTOTYPE: function/II
|
||||
FUNCTION_PROTOTYPE: function/ff
|
||||
FUNCTION_PROTOTYPE: function/FF
|
||||
FUNCTION_PROTOTYPE: function/iiv
|
||||
FUNCTION_PROTOTYPE: function/iii
|
||||
FUNCTION_PROTOTYPE: function/III
|
||||
FUNCTION_PROTOTYPE: function/fff
|
||||
FUNCTION_PROTOTYPE: function/FFF
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -9,22 +9,15 @@
|
||||
(export "step" (func $../../examples/game-of-life/assembly/game-of-life/step))
|
||||
(export "memory" (memory $0))
|
||||
(func $../../examples/game-of-life/assembly/game-of-life/init (; 0 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:9:2
|
||||
(set_global $../../examples/game-of-life/assembly/game-of-life/w
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:9:6
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:10:2
|
||||
(set_global $../../examples/game-of-life/assembly/game-of-life/h
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:10:6
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:11:2
|
||||
(set_global $../../examples/game-of-life/assembly/game-of-life/s
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:11:6
|
||||
(i32.mul
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:11:10
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/h)
|
||||
)
|
||||
)
|
||||
@ -39,83 +32,59 @@
|
||||
(local $6 i32)
|
||||
(local $7 i32)
|
||||
(set_local $6
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:16:12
|
||||
(i32.sub
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/h)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:16:16
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_local $7
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:17:12
|
||||
(i32.sub
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:17:16
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(loop $continue|0
|
||||
(if
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:23
|
||||
(i32.lt_u
|
||||
(get_local $0)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:27
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/h)
|
||||
)
|
||||
(block
|
||||
(set_local $4
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:14
|
||||
(select
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:31
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:35
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:26
|
||||
(get_local $6)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:19:38
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(set_local $5
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:14
|
||||
(select
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:26
|
||||
(i32.const 0)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:29
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:33
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:36
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:20:41
|
||||
(get_local $6)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:9
|
||||
(set_local $1
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:22
|
||||
(i32.const 0)
|
||||
)
|
||||
(loop $continue|1
|
||||
(if
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:25
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:29
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
|
||||
)
|
||||
(block
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:24:6
|
||||
(set_local $2
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:24:14
|
||||
(i32.add
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:8
|
||||
(i32.add
|
||||
(i32.add
|
||||
(i32.add
|
||||
@ -123,68 +92,48 @@
|
||||
(i32.add
|
||||
(i32.add
|
||||
(i32.load8_u
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:17
|
||||
(i32.add
|
||||
(i32.mul
|
||||
(get_local $4)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:23
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
|
||||
)
|
||||
(tee_local $2
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:16
|
||||
(select
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:33
|
||||
(i32.sub
|
||||
(get_local $1)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:37
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:28
|
||||
(get_local $7)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:22:40
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:34
|
||||
(i32.load8_u
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:43
|
||||
(i32.add
|
||||
(i32.mul
|
||||
(get_local $4)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:49
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:53
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:58
|
||||
(i32.load8_u
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:67
|
||||
(i32.add
|
||||
(i32.mul
|
||||
(get_local $4)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:25:73
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
|
||||
)
|
||||
(tee_local $3
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:16
|
||||
(select
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:28
|
||||
(i32.const 0)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:31
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:35
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:38
|
||||
(i32.eq
|
||||
(get_local $1)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:23:43
|
||||
(get_local $7)
|
||||
)
|
||||
)
|
||||
@ -192,167 +141,120 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:8
|
||||
(i32.load8_u
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:17
|
||||
(i32.add
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:23
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:27
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:58
|
||||
(i32.load8_u
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:67
|
||||
(i32.add
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:73
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:26:77
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:8
|
||||
(i32.load8_u
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:17
|
||||
(i32.add
|
||||
(i32.mul
|
||||
(get_local $5)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:23
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:27
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:34
|
||||
(i32.load8_u
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:43
|
||||
(i32.add
|
||||
(i32.mul
|
||||
(get_local $5)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:49
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:53
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:58
|
||||
(i32.load8_u
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:67
|
||||
(i32.add
|
||||
(i32.mul
|
||||
(get_local $5)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:73
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:27:77
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:6
|
||||
(if
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:10
|
||||
(i32.load8_u
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:19
|
||||
(i32.add
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:23
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:29:27
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:8
|
||||
(if
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:12
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $3
|
||||
(i32.lt_s
|
||||
(get_local $2)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:16
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(get_local $3)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:21
|
||||
(i32.gt_s
|
||||
(get_local $2)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:30:25
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:10
|
||||
(i32.store8
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:20
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/s)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:24
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:28
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:32
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:31:35
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:32:13
|
||||
(if
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:32:17
|
||||
(i32.eq
|
||||
(get_local $2)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:32:22
|
||||
(i32.const 3)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:8
|
||||
(i32.store8
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:18
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/s)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:22
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:26
|
||||
(get_global $../../examples/game-of-life/assembly/game-of-life/w)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:30
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:33:33
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:32
|
||||
(set_local $1
|
||||
(i32.add
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:21:34
|
||||
(get_local $1)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -361,10 +263,8 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:30
|
||||
(set_local $0
|
||||
(i32.add
|
||||
;;@ ../../examples/game-of-life/assembly/game-of-life.ts:18:32
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
)
|
||||
|
@ -415,59 +415,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: ../../examples/game-of-life/assembly/game-of-life/w
|
||||
GLOBAL: ../../examples/game-of-life/assembly/game-of-life/h
|
||||
GLOBAL: ../../examples/game-of-life/assembly/game-of-life/s
|
||||
FUNCTION_PROTOTYPE: ../../examples/game-of-life/assembly/game-of-life/init
|
||||
FUNCTION_PROTOTYPE: ../../examples/game-of-life/assembly/game-of-life/step
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: ../../examples/game-of-life/assembly/game-of-life/init
|
||||
FUNCTION_PROTOTYPE: ../../examples/game-of-life/assembly/game-of-life/step
|
||||
FUNCTION_PROTOTYPE: game-of-life/init
|
||||
FUNCTION_PROTOTYPE: game-of-life/step
|
||||
;)
|
||||
|
@ -1,54 +1,72 @@
|
||||
(module
|
||||
(type $i (func (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $getter-setter/Foo._bar (mut i32) (i32.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\10\00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $getter-setter/Foo.set:bar (; 0 ;) (type $iv) (param $0 i32)
|
||||
;;@ getter-setter.ts:9:4
|
||||
(func $getter-setter/Foo.get:bar (; 1 ;) (type $i) (result i32)
|
||||
(get_global $getter-setter/Foo._bar)
|
||||
)
|
||||
(func $getter-setter/Foo.set:bar (; 2 ;) (type $iv) (param $0 i32)
|
||||
(set_global $getter-setter/Foo._bar
|
||||
;;@ getter-setter.ts:9:15
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
;;@ getter-setter.ts:13:0
|
||||
(func $start (; 3 ;) (type $v)
|
||||
(if
|
||||
(get_global $getter-setter/Foo._bar)
|
||||
(unreachable)
|
||||
(call $getter-setter/Foo.get:bar)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 13)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ getter-setter.ts:14:0
|
||||
(call $getter-setter/Foo.set:bar
|
||||
;;@ getter-setter.ts:14:10
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ getter-setter.ts:15:0
|
||||
(if
|
||||
;;@ getter-setter.ts:15:7
|
||||
(i32.ne
|
||||
(get_global $getter-setter/Foo._bar)
|
||||
;;@ getter-setter.ts:15:18
|
||||
(call $getter-setter/Foo.get:bar)
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 15)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ getter-setter.ts:16:0
|
||||
(if
|
||||
;;@ getter-setter.ts:16:7
|
||||
(block (result i32)
|
||||
(call $getter-setter/Foo.set:bar
|
||||
;;@ getter-setter.ts:16:18
|
||||
(i32.const 2)
|
||||
)
|
||||
;;@ getter-setter.ts:16:7
|
||||
(i32.ne
|
||||
(get_global $getter-setter/Foo._bar)
|
||||
;;@ getter-setter.ts:16:24
|
||||
(call $getter-setter/Foo.get:bar)
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 16)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1,27 +1,30 @@
|
||||
(module
|
||||
(type $i (func (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $getter-setter/Foo._bar (mut i32) (i32.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 44))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\10\00\00\00g\00e\00t\00t\00e\00r\00-\00s\00e\00t\00t\00e\00r\00.\00t\00s\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $getter-setter/Foo.get:bar (; 0 ;) (type $i) (result i32)
|
||||
(func $getter-setter/Foo.get:bar (; 1 ;) (type $i) (result i32)
|
||||
;;@ getter-setter.ts:5:15
|
||||
(return
|
||||
;;@ getter-setter.ts:5:11
|
||||
(get_global $getter-setter/Foo._bar)
|
||||
)
|
||||
)
|
||||
(func $getter-setter/Foo.set:bar (; 1 ;) (type $iv) (param $0 i32)
|
||||
(func $getter-setter/Foo.set:bar (; 2 ;) (type $iv) (param $0 i32)
|
||||
;;@ getter-setter.ts:9:4
|
||||
(set_global $getter-setter/Foo._bar
|
||||
;;@ getter-setter.ts:9:15
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(func $start (; 3 ;) (type $v)
|
||||
;;@ getter-setter.ts:13:0
|
||||
(if
|
||||
(i32.eqz
|
||||
@ -32,7 +35,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 13)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ getter-setter.ts:14:0
|
||||
(call $getter-setter/Foo.set:bar
|
||||
@ -49,7 +60,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 15)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ getter-setter.ts:16:0
|
||||
(if
|
||||
@ -67,58 +86,15 @@
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 16)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
CLASS_PROTOTYPE: getter-setter/Foo
|
||||
GLOBAL: getter-setter/Foo._bar
|
||||
PROPERTY: getter-setter/Foo.bar
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1526,145 +1526,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: ../../examples/i64-polyfill/assembly/i64/lo
|
||||
GLOBAL: ../../examples/i64-polyfill/assembly/i64/hi
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/getLo
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/getHi
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/clz_
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/ctz_
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/popcnt_
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/eqz
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/add
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/sub
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/mul
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/div_s
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/div_u
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/rem_s
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/rem_u
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/and
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/or
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/xor
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/shl
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/shr_s
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/shr_u
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/rotl_
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/rotr_
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/eq
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/ne
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/lt_s
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/lt_u
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/le_s
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/le_u
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/gt_s
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/gt_u
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/ge_s
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/ge_u
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/getLo
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/getHi
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/clz
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/ctz
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/popcnt
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/eqz
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/add
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/sub
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/mul
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/div_s
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/div_u
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/rem_s
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/rem_u
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/and
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/or
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/xor
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/shl
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/shr_s
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/shr_u
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/rotl
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/rotr
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/eq
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/ne
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/lt_s
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/lt_u
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/le_s
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/le_u
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/gt_s
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/gt_u
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/ge_s
|
||||
FUNCTION_PROTOTYPE: ../../examples/i64-polyfill/assembly/i64/ge_u
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/getHi
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/getLo
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/clz
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/ctz
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/popcnt
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/eqz
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/add
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/sub
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/mul
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/div_s
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/div_u
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/rem_s
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/rem_u
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/and
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/or
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/xor
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/shl
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/shr_s
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/shr_u
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/rotl
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/rotr
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/eq
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/ne
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/lt_s
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/lt_u
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/le_s
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/le_u
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/gt_s
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/gt_u
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/ge_s
|
||||
FUNCTION_PROTOTYPE: i64-polyfill/ge_u
|
||||
;)
|
||||
|
@ -1,115 +1,134 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\05\00\00\00i\00f\00.\00t\00s")
|
||||
(export "ifThenElse" (func $if/ifThenElse))
|
||||
(export "ifThen" (func $if/ifThen))
|
||||
(export "ifThenElseBlock" (func $if/ifThenElse))
|
||||
(export "ifAlwaysReturns" (func $if/ifAlwaysReturns))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $if/ifThenElse (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func $if/ifThenElse (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(select
|
||||
;;@ if.ts:3:11
|
||||
(i32.const 1)
|
||||
;;@ if.ts:5:11
|
||||
(i32.const 0)
|
||||
;;@ if.ts:2:6
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $if/ifThen (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
;;@ if.ts:12:2
|
||||
(func $if/ifThen (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(if
|
||||
;;@ if.ts:12:6
|
||||
(get_local $0)
|
||||
;;@ if.ts:13:11
|
||||
(return
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ if.ts:14:9
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $if/ifAlwaysReturns (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
;;@ if.ts:34:2
|
||||
(func $if/ifAlwaysReturns (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(if
|
||||
;;@ if.ts:34:6
|
||||
(get_local $0)
|
||||
;;@ if.ts:35:11
|
||||
(return
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ if.ts:37:4
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $start (; 3 ;) (type $v)
|
||||
;;@ if.ts:8:0
|
||||
(func $start (; 4 ;) (type $v)
|
||||
(if
|
||||
;;@ if.ts:8:7
|
||||
(call $if/ifThenElse
|
||||
;;@ if.ts:8:18
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ if.ts:9:0
|
||||
(if
|
||||
;;@ if.ts:9:7
|
||||
(i32.ne
|
||||
(call $if/ifThenElse
|
||||
;;@ if.ts:9:18
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ if.ts:9:24
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 9)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ if.ts:17:0
|
||||
(if
|
||||
;;@ if.ts:17:7
|
||||
(call $if/ifThen
|
||||
;;@ if.ts:17:14
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 17)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ if.ts:18:0
|
||||
(if
|
||||
;;@ if.ts:18:7
|
||||
(i32.ne
|
||||
(call $if/ifThen
|
||||
;;@ if.ts:18:14
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ if.ts:18:20
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 18)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ if.ts:30:0
|
||||
(if
|
||||
;;@ if.ts:30:7
|
||||
(call $if/ifThenElse
|
||||
;;@ if.ts:30:23
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 30)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ if.ts:31:0
|
||||
(if
|
||||
;;@ if.ts:31:7
|
||||
(i32.ne
|
||||
(call $if/ifThenElse
|
||||
;;@ if.ts:31:23
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ if.ts:31:29
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 31)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1,15 +1,18 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $HEAP_BASE i32 (i32.const 24))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\05\00\00\00i\00f\00.\00t\00s\00")
|
||||
(export "ifThenElse" (func $if/ifThenElse))
|
||||
(export "ifThen" (func $if/ifThen))
|
||||
(export "ifThenElseBlock" (func $if/ifThenElseBlock))
|
||||
(export "ifAlwaysReturns" (func $if/ifAlwaysReturns))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $if/ifThenElse (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func $if/ifThenElse (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
;;@ if.ts:2:2
|
||||
(if
|
||||
;;@ if.ts:2:6
|
||||
@ -24,7 +27,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $if/ifThen (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func $if/ifThen (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
;;@ if.ts:12:2
|
||||
(if
|
||||
;;@ if.ts:12:6
|
||||
@ -39,7 +42,7 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(func $if/ifThenElseBlock (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func $if/ifThenElseBlock (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
;;@ if.ts:21:2
|
||||
(if
|
||||
;;@ if.ts:21:6
|
||||
@ -64,7 +67,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $if/ifAlwaysReturns (; 3 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func $if/ifAlwaysReturns (; 4 ;) (type $ii) (param $0 i32) (result i32)
|
||||
;;@ if.ts:34:2
|
||||
(if
|
||||
;;@ if.ts:34:6
|
||||
@ -77,7 +80,7 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(func $start (; 4 ;) (type $v)
|
||||
(func $start (; 5 ;) (type $v)
|
||||
;;@ if.ts:8:0
|
||||
(if
|
||||
(i32.eqz
|
||||
@ -91,7 +94,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ if.ts:9:0
|
||||
(if
|
||||
@ -106,7 +117,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 9)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ if.ts:17:0
|
||||
(if
|
||||
@ -121,7 +140,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 17)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ if.ts:18:0
|
||||
(if
|
||||
@ -136,7 +163,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 18)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ if.ts:30:0
|
||||
(if
|
||||
@ -151,7 +186,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 30)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ if.ts:31:0
|
||||
(if
|
||||
@ -166,62 +209,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 31)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: if/ifThenElse
|
||||
FUNCTION_PROTOTYPE: if/ifThen
|
||||
FUNCTION_PROTOTYPE: if/ifThenElseBlock
|
||||
FUNCTION_PROTOTYPE: if/ifAlwaysReturns
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: if/ifThenElse
|
||||
FUNCTION_PROTOTYPE: if/ifThen
|
||||
FUNCTION_PROTOTYPE: if/ifThenElseBlock
|
||||
FUNCTION_PROTOTYPE: if/ifAlwaysReturns
|
||||
;)
|
||||
|
@ -1,9 +1,49 @@
|
||||
(module
|
||||
(type $iii (func (param i32 i32) (result i32)))
|
||||
(type $v (func))
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/ns.two (; 3 ;) (type $v)
|
||||
(nop)
|
||||
)
|
||||
(func $start (; 4 ;) (type $v)
|
||||
(drop
|
||||
(i32.add
|
||||
(i32.add
|
||||
(call $export/add
|
||||
(i32.const 1)
|
||||
(i32.const 2)
|
||||
)
|
||||
(call $export/sub
|
||||
(i32.const 2)
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
(call $export/mul
|
||||
(i32.const 3)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
(call $export/ns.two)
|
||||
)
|
||||
)
|
||||
|
@ -75,73 +75,3 @@
|
||||
(call $export/ns.two)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: export/add
|
||||
FUNCTION_PROTOTYPE: export/sub
|
||||
FUNCTION_PROTOTYPE: export/mul
|
||||
GLOBAL: export/a
|
||||
GLOBAL: export/b
|
||||
GLOBAL: export/c
|
||||
NAMESPACE: export/ns
|
||||
FUNCTION_PROTOTYPE: export/ns.one
|
||||
FUNCTION_PROTOTYPE: export/ns.two
|
||||
FUNCTION_PROTOTYPE: import/add
|
||||
FUNCTION_PROTOTYPE: import/sub
|
||||
FUNCTION_PROTOTYPE: import/mul
|
||||
GLOBAL: import/a
|
||||
GLOBAL: import/b
|
||||
GLOBAL: import/c
|
||||
NAMESPACE: import/renamed_ns
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: export/add
|
||||
FUNCTION_PROTOTYPE: export/sub
|
||||
FUNCTION_PROTOTYPE: export/renamed_mul
|
||||
GLOBAL: export/a
|
||||
GLOBAL: export/b
|
||||
GLOBAL: export/renamed_c
|
||||
NAMESPACE: export/ns
|
||||
;)
|
||||
|
@ -1,5 +1,9 @@
|
||||
(module
|
||||
(type $v (func))
|
||||
(type $i (func (result i32)))
|
||||
(type $I (func (result i64)))
|
||||
(type $f (func (result f32)))
|
||||
(type $F (func (result f64)))
|
||||
(global $infer-type/ri (mut i32) (i32.const 0))
|
||||
(global $infer-type/rI (mut i64) (i64.const 0))
|
||||
(global $infer-type/rf (mut f32) (f32.const 0))
|
||||
@ -7,32 +11,49 @@
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $infer-type/locals (; 0 ;) (type $v)
|
||||
(nop)
|
||||
)
|
||||
(func $infer-type/reti (; 1 ;) (type $i) (result i32)
|
||||
(i32.const 0)
|
||||
)
|
||||
(func $infer-type/retI (; 2 ;) (type $I) (result i64)
|
||||
(i64.const 0)
|
||||
)
|
||||
(func $infer-type/retf (; 3 ;) (type $f) (result f32)
|
||||
(f32.const 0)
|
||||
)
|
||||
(func $infer-type/refF (; 4 ;) (type $F) (result f64)
|
||||
(f64.const 0)
|
||||
)
|
||||
(func $start (; 5 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
(call $infer-type/locals)
|
||||
(set_global $infer-type/ri
|
||||
(i32.const 0)
|
||||
(call $infer-type/reti)
|
||||
)
|
||||
(set_global $infer-type/rI
|
||||
(i64.const 0)
|
||||
(call $infer-type/retI)
|
||||
)
|
||||
(set_global $infer-type/rf
|
||||
(f32.const 0)
|
||||
(call $infer-type/retf)
|
||||
)
|
||||
(set_global $infer-type/rF
|
||||
(f64.const 0)
|
||||
(call $infer-type/refF)
|
||||
)
|
||||
(set_local $1
|
||||
(i32.const 10)
|
||||
)
|
||||
(loop $continue|0
|
||||
(if
|
||||
;;@ infer-type.ts:44:24
|
||||
(i32.lt_u
|
||||
(get_local $0)
|
||||
(i32.const 10)
|
||||
(get_local $1)
|
||||
)
|
||||
(block
|
||||
;;@ infer-type.ts:44:31
|
||||
(set_local $0
|
||||
(i32.add
|
||||
;;@ infer-type.ts:44:33
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
)
|
||||
|
@ -166,63 +166,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: infer-type/i
|
||||
GLOBAL: infer-type/I
|
||||
GLOBAL: infer-type/F
|
||||
FUNCTION_PROTOTYPE: infer-type/locals
|
||||
FUNCTION_PROTOTYPE: infer-type/reti
|
||||
GLOBAL: infer-type/ri
|
||||
FUNCTION_PROTOTYPE: infer-type/retI
|
||||
GLOBAL: infer-type/rI
|
||||
FUNCTION_PROTOTYPE: infer-type/retf
|
||||
GLOBAL: infer-type/rf
|
||||
FUNCTION_PROTOTYPE: infer-type/refF
|
||||
GLOBAL: infer-type/rF
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -1,15 +1,31 @@
|
||||
(module
|
||||
(type $i (func (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\0b\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s")
|
||||
(export "test" (func $inlining/test))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $inlining/test (; 0 ;) (type $i) (result i32)
|
||||
(func $inlining/test (; 1 ;) (type $i) (result i32)
|
||||
(i32.const 3)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
;;@ inlining.ts:8:0
|
||||
(nop)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(if
|
||||
(i32.ne
|
||||
(call $inlining/test)
|
||||
(i32.const 3)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1,13 +1,16 @@
|
||||
(module
|
||||
(type $i (func (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $inlining/constantGlobal i32 (i32.const 1))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 36))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\0b\00\00\00i\00n\00l\00i\00n\00i\00n\00g\00.\00t\00s\00")
|
||||
(export "test" (func $inlining/test))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $inlining/test (; 0 ;) (type $i) (result i32)
|
||||
(func $inlining/test (; 1 ;) (type $i) (result i32)
|
||||
;;@ inlining.ts:4:2
|
||||
(nop)
|
||||
;;@ inlining.ts:5:26
|
||||
@ -20,7 +23,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
;;@ inlining.ts:8:0
|
||||
(if
|
||||
(i32.eqz
|
||||
@ -31,57 +34,15 @@
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: inlining/constantGlobal
|
||||
FUNCTION_PROTOTYPE: inlining/test
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: inlining/test
|
||||
;)
|
||||
|
@ -133,51 +133,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -183,51 +183,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -1,13 +1,16 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $logical/i (mut i32) (i32.const 0))
|
||||
(global $logical/I (mut i64) (i64.const 0))
|
||||
(global $logical/f (mut f32) (f32.const 0))
|
||||
(global $logical/F (mut f64) (f64.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\n\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(local $1 f64)
|
||||
(if
|
||||
@ -16,7 +19,6 @@
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:6:10
|
||||
(unreachable)
|
||||
)
|
||||
(if
|
||||
@ -26,120 +28,151 @@
|
||||
)
|
||||
(f64.const 0)
|
||||
)
|
||||
;;@ logical.ts:7:14
|
||||
(unreachable)
|
||||
)
|
||||
;;@ logical.ts:11:0
|
||||
(set_global $logical/i
|
||||
(i32.const 2)
|
||||
)
|
||||
;;@ logical.ts:12:0
|
||||
(if
|
||||
;;@ logical.ts:12:7
|
||||
(i32.ne
|
||||
(get_global $logical/i)
|
||||
;;@ logical.ts:12:12
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 12)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:14:0
|
||||
(set_global $logical/i
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ logical.ts:15:0
|
||||
(if
|
||||
;;@ logical.ts:15:7
|
||||
(i32.ne
|
||||
(get_global $logical/i)
|
||||
;;@ logical.ts:15:12
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 15)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:19:0
|
||||
(set_global $logical/I
|
||||
(i64.const 2)
|
||||
)
|
||||
;;@ logical.ts:20:0
|
||||
(if
|
||||
;;@ logical.ts:20:7
|
||||
(i64.ne
|
||||
(get_global $logical/I)
|
||||
;;@ logical.ts:20:12
|
||||
(i64.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 20)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:22:0
|
||||
(set_global $logical/I
|
||||
(i64.const 1)
|
||||
)
|
||||
;;@ logical.ts:23:0
|
||||
(if
|
||||
;;@ logical.ts:23:7
|
||||
(i64.ne
|
||||
(get_global $logical/I)
|
||||
;;@ logical.ts:23:12
|
||||
(i64.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 23)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:27:0
|
||||
(set_global $logical/f
|
||||
(f32.const 2)
|
||||
)
|
||||
;;@ logical.ts:28:0
|
||||
(if
|
||||
;;@ logical.ts:28:7
|
||||
(f32.ne
|
||||
(get_global $logical/f)
|
||||
;;@ logical.ts:28:12
|
||||
(f32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 28)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:30:0
|
||||
(set_global $logical/f
|
||||
(f32.const 1)
|
||||
)
|
||||
;;@ logical.ts:31:0
|
||||
(if
|
||||
;;@ logical.ts:31:7
|
||||
(f32.ne
|
||||
(get_global $logical/f)
|
||||
;;@ logical.ts:31:12
|
||||
(f32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 31)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:35:0
|
||||
(set_global $logical/F
|
||||
(f64.const 2)
|
||||
)
|
||||
;;@ logical.ts:36:0
|
||||
(if
|
||||
;;@ logical.ts:36:7
|
||||
(f64.ne
|
||||
(get_global $logical/F)
|
||||
;;@ logical.ts:36:12
|
||||
(f64.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 36)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:38:0
|
||||
(set_global $logical/F
|
||||
(f64.const 1)
|
||||
)
|
||||
;;@ logical.ts:39:0
|
||||
(if
|
||||
;;@ logical.ts:39:7
|
||||
(f64.ne
|
||||
(get_global $logical/F)
|
||||
;;@ logical.ts:39:12
|
||||
(f64.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 39)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1,14 +1,17 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $logical/i (mut i32) (i32.const 0))
|
||||
(global $logical/I (mut i64) (i64.const 0))
|
||||
(global $logical/f (mut f32) (f32.const 0))
|
||||
(global $logical/F (mut f64) (f64.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 32))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\n\00\00\00l\00o\00g\00i\00c\00a\00l\00.\00t\00s\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(local $1 f64)
|
||||
;;@ logical.ts:1:0
|
||||
@ -126,7 +129,15 @@
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 12)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:14:0
|
||||
(set_global $logical/i
|
||||
@ -151,7 +162,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 15)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:19:0
|
||||
(set_global $logical/I
|
||||
@ -176,7 +195,15 @@
|
||||
(i64.const 2)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 20)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:22:0
|
||||
(set_global $logical/I
|
||||
@ -201,7 +228,15 @@
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 23)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:27:0
|
||||
(set_global $logical/f
|
||||
@ -226,7 +261,15 @@
|
||||
(f32.const 2)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 28)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:30:0
|
||||
(set_global $logical/f
|
||||
@ -251,7 +294,15 @@
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 31)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:35:0
|
||||
(set_global $logical/F
|
||||
@ -276,7 +327,15 @@
|
||||
(f64.const 2)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 36)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ logical.ts:38:0
|
||||
(set_global $logical/F
|
||||
@ -301,59 +360,15 @@
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 39)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: logical/i
|
||||
GLOBAL: logical/I
|
||||
GLOBAL: logical/f
|
||||
GLOBAL: logical/F
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +1,17 @@
|
||||
(module
|
||||
(type $iiii (func (param i32 i32 i32) (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $memcpy/base i32 (i32.const 8))
|
||||
(global $memcpy/dest (mut i32) (i32.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 32))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\t\00\00\00m\00e\00m\00c\00p\00y\00.\00t\00s\00")
|
||||
(export "memcpy" (func $memcpy/memcpy))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $memcpy/memcpy (; 0 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $memcpy/memcpy (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(local $5 i32)
|
||||
@ -2265,7 +2268,7 @@
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
;;@ memcpy.ts:144:0
|
||||
(i64.store
|
||||
;;@ memcpy.ts:144:11
|
||||
@ -2340,7 +2343,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 151)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memcpy.ts:152:0
|
||||
(if
|
||||
@ -2355,7 +2366,15 @@
|
||||
(i64.const 1229783084848853777)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 152)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memcpy.ts:154:0
|
||||
(set_global $memcpy/dest
|
||||
@ -2379,7 +2398,15 @@
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 155)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memcpy.ts:156:0
|
||||
(if
|
||||
@ -2394,7 +2421,15 @@
|
||||
(i64.const 1229783084848853777)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 156)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memcpy.ts:157:0
|
||||
(if
|
||||
@ -2413,7 +2448,15 @@
|
||||
(i64.const 2459565876494606882)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 157)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memcpy.ts:158:0
|
||||
(if
|
||||
@ -2432,7 +2475,15 @@
|
||||
(i64.const 3689348814741910323)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 158)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memcpy.ts:159:0
|
||||
(if
|
||||
@ -2451,7 +2502,15 @@
|
||||
(i64.const 4919131752989213764)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 159)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memcpy.ts:161:0
|
||||
(set_global $memcpy/dest
|
||||
@ -2486,7 +2545,15 @@
|
||||
(i64.const 4919131679688438545)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 162)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memcpy.ts:164:0
|
||||
(set_global $memcpy/dest
|
||||
@ -2521,7 +2588,15 @@
|
||||
(i64.const 4919131679688438545)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 165)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memcpy.ts:166:0
|
||||
(if
|
||||
@ -2540,7 +2615,15 @@
|
||||
(i64.const 3689348814741910323)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 166)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memcpy.ts:167:0
|
||||
(if
|
||||
@ -2559,7 +2642,15 @@
|
||||
(i64.const 3694152654344438852)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 167)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memcpy.ts:168:0
|
||||
(if
|
||||
@ -2578,58 +2669,15 @@
|
||||
(i64.const 4919131752989213764)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 168)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: memcpy/memcpy
|
||||
GLOBAL: memcpy/base
|
||||
GLOBAL: memcpy/dest
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: memcpy/memcpy
|
||||
;)
|
||||
|
@ -1,84 +1,63 @@
|
||||
(module
|
||||
(type $iiii (func (param i32 i32 i32) (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $memmove/dest (mut i32) (i32.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\n\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $memmove/memmove (; 0 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $memmove/memmove (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
;;@ memmove.ts:2:2
|
||||
(set_local $4
|
||||
;;@ memmove.ts:2:12
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ memmove.ts:3:2
|
||||
(if
|
||||
;;@ memmove.ts:3:6
|
||||
(i32.eq
|
||||
(get_local $0)
|
||||
;;@ memmove.ts:3:14
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memmove.ts:4:11
|
||||
(return
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:9:2
|
||||
(if
|
||||
;;@ memmove.ts:9:6
|
||||
(i32.lt_u
|
||||
(get_local $0)
|
||||
;;@ memmove.ts:9:13
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memmove.ts:9:18
|
||||
(block
|
||||
;;@ memmove.ts:10:4
|
||||
(if
|
||||
;;@ memmove.ts:10:8
|
||||
(i32.eq
|
||||
(i32.rem_u
|
||||
(get_local $1)
|
||||
;;@ memmove.ts:10:14
|
||||
(i32.const 8)
|
||||
)
|
||||
;;@ memmove.ts:10:19
|
||||
(i32.rem_u
|
||||
(get_local $0)
|
||||
;;@ memmove.ts:10:26
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:10:29
|
||||
(block
|
||||
(loop $continue|0
|
||||
(if
|
||||
;;@ memmove.ts:11:13
|
||||
(i32.rem_u
|
||||
(get_local $0)
|
||||
;;@ memmove.ts:11:20
|
||||
(i32.const 8)
|
||||
)
|
||||
(block
|
||||
;;@ memmove.ts:12:8
|
||||
(if
|
||||
;;@ memmove.ts:12:12
|
||||
(i32.eqz
|
||||
;;@ memmove.ts:12:13
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ memmove.ts:13:17
|
||||
(return
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:14:8
|
||||
(set_local $2
|
||||
(i32.sub
|
||||
;;@ memmove.ts:14:10
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -86,16 +65,13 @@
|
||||
(set_local $0
|
||||
(i32.add
|
||||
(tee_local $3
|
||||
;;@ memmove.ts:15:18
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:15:8
|
||||
(i32.store8
|
||||
(get_local $3)
|
||||
;;@ memmove.ts:15:35
|
||||
(block (result i32)
|
||||
(set_local $1
|
||||
(i32.add
|
||||
@ -105,7 +81,6 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:15:26
|
||||
(i32.load8_u
|
||||
(get_local $3)
|
||||
)
|
||||
@ -117,44 +92,32 @@
|
||||
)
|
||||
(loop $continue|1
|
||||
(if
|
||||
;;@ memmove.ts:17:13
|
||||
(i32.ge_u
|
||||
(get_local $2)
|
||||
;;@ memmove.ts:17:18
|
||||
(i32.const 8)
|
||||
)
|
||||
(block
|
||||
;;@ memmove.ts:18:8
|
||||
(i64.store
|
||||
;;@ memmove.ts:18:19
|
||||
(get_local $0)
|
||||
;;@ memmove.ts:18:25
|
||||
(i64.load
|
||||
;;@ memmove.ts:18:35
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:19:8
|
||||
(set_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
;;@ memmove.ts:19:13
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:20:8
|
||||
(set_local $0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memmove.ts:20:16
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:21:8
|
||||
(set_local $1
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
;;@ memmove.ts:21:15
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
@ -166,22 +129,18 @@
|
||||
)
|
||||
(loop $continue|2
|
||||
(if
|
||||
;;@ memmove.ts:24:11
|
||||
(get_local $2)
|
||||
(block
|
||||
(set_local $0
|
||||
(i32.add
|
||||
(tee_local $3
|
||||
;;@ memmove.ts:25:16
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:25:6
|
||||
(i32.store8
|
||||
(get_local $3)
|
||||
;;@ memmove.ts:25:33
|
||||
(block (result i32)
|
||||
(set_local $1
|
||||
(i32.add
|
||||
@ -191,16 +150,13 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:25:24
|
||||
(i32.load8_u
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:26:6
|
||||
(set_local $2
|
||||
(i32.sub
|
||||
;;@ memmove.ts:26:8
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -210,72 +166,50 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:28:9
|
||||
(block
|
||||
;;@ memmove.ts:29:4
|
||||
(if
|
||||
;;@ memmove.ts:29:8
|
||||
(i32.eq
|
||||
(i32.rem_u
|
||||
(get_local $1)
|
||||
;;@ memmove.ts:29:14
|
||||
(i32.const 8)
|
||||
)
|
||||
;;@ memmove.ts:29:19
|
||||
(i32.rem_u
|
||||
(get_local $0)
|
||||
;;@ memmove.ts:29:26
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:29:29
|
||||
(block
|
||||
(loop $continue|3
|
||||
(if
|
||||
;;@ memmove.ts:30:13
|
||||
(i32.rem_u
|
||||
(i32.add
|
||||
;;@ memmove.ts:30:14
|
||||
(get_local $0)
|
||||
;;@ memmove.ts:30:21
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ memmove.ts:30:26
|
||||
(i32.const 8)
|
||||
)
|
||||
(block
|
||||
;;@ memmove.ts:31:8
|
||||
(if
|
||||
;;@ memmove.ts:31:12
|
||||
(i32.eqz
|
||||
;;@ memmove.ts:31:13
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ memmove.ts:32:17
|
||||
(return
|
||||
(get_local $4)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:33:8
|
||||
(i32.store8
|
||||
;;@ memmove.ts:33:18
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memmove.ts:33:25
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
;;@ memmove.ts:33:27
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:33:30
|
||||
(i32.load8_u
|
||||
;;@ memmove.ts:33:39
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
;;@ memmove.ts:33:45
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
@ -286,33 +220,24 @@
|
||||
)
|
||||
(loop $continue|4
|
||||
(if
|
||||
;;@ memmove.ts:35:13
|
||||
(i32.ge_u
|
||||
(get_local $2)
|
||||
;;@ memmove.ts:35:18
|
||||
(i32.const 8)
|
||||
)
|
||||
(block
|
||||
;;@ memmove.ts:37:8
|
||||
(i64.store
|
||||
;;@ memmove.ts:37:19
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memmove.ts:36:8
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
;;@ memmove.ts:36:13
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:37:29
|
||||
(i64.load
|
||||
;;@ memmove.ts:37:39
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
;;@ memmove.ts:37:45
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
@ -325,29 +250,21 @@
|
||||
)
|
||||
(loop $continue|5
|
||||
(if
|
||||
;;@ memmove.ts:40:11
|
||||
(get_local $2)
|
||||
(block
|
||||
;;@ memmove.ts:41:6
|
||||
(i32.store8
|
||||
;;@ memmove.ts:41:16
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memmove.ts:41:23
|
||||
(tee_local $2
|
||||
(i32.sub
|
||||
;;@ memmove.ts:41:25
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:41:28
|
||||
(i32.load8_u
|
||||
;;@ memmove.ts:41:37
|
||||
(i32.add
|
||||
(get_local $1)
|
||||
;;@ memmove.ts:41:43
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
@ -358,235 +275,252 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:44:9
|
||||
(get_local $4)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
;;@ memmove.ts:48:0
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(i64.store
|
||||
;;@ memmove.ts:48:11
|
||||
(i32.const 8)
|
||||
;;@ memmove.ts:48:22
|
||||
(i64.const 1229782938247303441)
|
||||
)
|
||||
;;@ memmove.ts:49:0
|
||||
(i64.store
|
||||
;;@ memmove.ts:49:18
|
||||
(i32.const 16)
|
||||
;;@ memmove.ts:49:22
|
||||
(i64.const 2459565876494606882)
|
||||
)
|
||||
;;@ memmove.ts:50:0
|
||||
(i64.store
|
||||
;;@ memmove.ts:50:18
|
||||
(i32.const 24)
|
||||
;;@ memmove.ts:50:22
|
||||
(i64.const 3689348814741910323)
|
||||
)
|
||||
;;@ memmove.ts:51:0
|
||||
(i64.store
|
||||
;;@ memmove.ts:51:18
|
||||
(i32.const 32)
|
||||
;;@ memmove.ts:51:22
|
||||
(i64.const 4919131752989213764)
|
||||
)
|
||||
;;@ memmove.ts:54:0
|
||||
(set_global $memmove/dest
|
||||
;;@ memmove.ts:54:7
|
||||
(call $memmove/memmove
|
||||
;;@ memmove.ts:54:22
|
||||
(i32.const 9)
|
||||
;;@ memmove.ts:54:32
|
||||
(i32.const 24)
|
||||
;;@ memmove.ts:54:36
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:55:0
|
||||
(if
|
||||
;;@ memmove.ts:55:7
|
||||
(i32.ne
|
||||
(get_global $memmove/dest)
|
||||
;;@ memmove.ts:55:22
|
||||
(i32.const 9)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 55)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:56:0
|
||||
(if
|
||||
;;@ memmove.ts:56:7
|
||||
(i64.ne
|
||||
(i64.load
|
||||
;;@ memmove.ts:56:17
|
||||
(i32.const 8)
|
||||
)
|
||||
;;@ memmove.ts:56:26
|
||||
(i64.const 1229783084848853777)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 56)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:58:0
|
||||
(set_global $memmove/dest
|
||||
;;@ memmove.ts:58:7
|
||||
(call $memmove/memmove
|
||||
;;@ memmove.ts:58:15
|
||||
(i32.const 8)
|
||||
;;@ memmove.ts:58:21
|
||||
(i32.const 8)
|
||||
;;@ memmove.ts:58:27
|
||||
(i32.const 32)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:59:0
|
||||
(if
|
||||
;;@ memmove.ts:59:7
|
||||
(i32.ne
|
||||
(get_global $memmove/dest)
|
||||
;;@ memmove.ts:59:15
|
||||
(i32.const 8)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 59)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:60:0
|
||||
(if
|
||||
;;@ memmove.ts:60:7
|
||||
(i64.ne
|
||||
(i64.load
|
||||
;;@ memmove.ts:60:17
|
||||
(i32.const 8)
|
||||
)
|
||||
;;@ memmove.ts:60:26
|
||||
(i64.const 1229783084848853777)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 60)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:61:0
|
||||
(if
|
||||
;;@ memmove.ts:61:7
|
||||
(i64.ne
|
||||
(i64.load
|
||||
;;@ memmove.ts:61:24
|
||||
(i32.const 16)
|
||||
)
|
||||
;;@ memmove.ts:61:30
|
||||
(i64.const 2459565876494606882)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 61)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:62:0
|
||||
(if
|
||||
;;@ memmove.ts:62:7
|
||||
(i64.ne
|
||||
(i64.load
|
||||
;;@ memmove.ts:62:24
|
||||
(i32.const 24)
|
||||
)
|
||||
;;@ memmove.ts:62:31
|
||||
(i64.const 3689348814741910323)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 62)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:63:0
|
||||
(if
|
||||
;;@ memmove.ts:63:7
|
||||
(i64.ne
|
||||
(i64.load
|
||||
;;@ memmove.ts:63:24
|
||||
(i32.const 32)
|
||||
)
|
||||
;;@ memmove.ts:63:31
|
||||
(i64.const 4919131752989213764)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 63)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:65:0
|
||||
(set_global $memmove/dest
|
||||
;;@ memmove.ts:65:7
|
||||
(call $memmove/memmove
|
||||
;;@ memmove.ts:65:22
|
||||
(i32.const 13)
|
||||
;;@ memmove.ts:65:32
|
||||
(i32.const 36)
|
||||
;;@ memmove.ts:65:36
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:66:0
|
||||
(if
|
||||
;;@ memmove.ts:66:7
|
||||
(i64.ne
|
||||
(i64.load
|
||||
;;@ memmove.ts:66:17
|
||||
(i32.const 8)
|
||||
)
|
||||
;;@ memmove.ts:66:26
|
||||
(i64.const 4919131679688438545)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 66)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:68:0
|
||||
(set_global $memmove/dest
|
||||
;;@ memmove.ts:68:7
|
||||
(call $memmove/memmove
|
||||
;;@ memmove.ts:68:22
|
||||
(i32.const 16)
|
||||
;;@ memmove.ts:68:32
|
||||
(i32.const 24)
|
||||
;;@ memmove.ts:68:36
|
||||
(i32.const 15)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:69:0
|
||||
(if
|
||||
;;@ memmove.ts:69:7
|
||||
(i64.ne
|
||||
(i64.load
|
||||
;;@ memmove.ts:69:17
|
||||
(i32.const 8)
|
||||
)
|
||||
;;@ memmove.ts:69:26
|
||||
(i64.const 4919131679688438545)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 69)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:70:0
|
||||
(if
|
||||
;;@ memmove.ts:70:7
|
||||
(i64.ne
|
||||
(i64.load
|
||||
;;@ memmove.ts:70:24
|
||||
(i32.const 16)
|
||||
)
|
||||
;;@ memmove.ts:70:30
|
||||
(i64.const 3689348814741910323)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 70)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:71:0
|
||||
(if
|
||||
;;@ memmove.ts:71:7
|
||||
(i64.ne
|
||||
(i64.load
|
||||
;;@ memmove.ts:71:24
|
||||
(i32.const 24)
|
||||
)
|
||||
;;@ memmove.ts:71:31
|
||||
(i64.const 3694152654344438852)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 71)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:72:0
|
||||
(if
|
||||
;;@ memmove.ts:72:7
|
||||
(i64.ne
|
||||
(i64.load
|
||||
;;@ memmove.ts:72:24
|
||||
(i32.const 32)
|
||||
)
|
||||
;;@ memmove.ts:72:31
|
||||
(i64.const 4919131752989213764)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 72)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1,13 +1,16 @@
|
||||
(module
|
||||
(type $iiii (func (param i32 i32 i32) (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $memmove/base i32 (i32.const 8))
|
||||
(global $memmove/dest (mut i32) (i32.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 32))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\n\00\00\00m\00e\00m\00m\00o\00v\00e\00.\00t\00s\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $memmove/memmove (; 0 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $memmove/memmove (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
;;@ memmove.ts:2:2
|
||||
@ -403,7 +406,7 @@
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
;;@ memmove.ts:48:0
|
||||
(i64.store
|
||||
;;@ memmove.ts:48:11
|
||||
@ -478,7 +481,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 55)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:56:0
|
||||
(if
|
||||
@ -493,7 +504,15 @@
|
||||
(i64.const 1229783084848853777)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 56)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:58:0
|
||||
(set_global $memmove/dest
|
||||
@ -517,7 +536,15 @@
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 59)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:60:0
|
||||
(if
|
||||
@ -532,7 +559,15 @@
|
||||
(i64.const 1229783084848853777)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 60)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:61:0
|
||||
(if
|
||||
@ -551,7 +586,15 @@
|
||||
(i64.const 2459565876494606882)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 61)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:62:0
|
||||
(if
|
||||
@ -570,7 +613,15 @@
|
||||
(i64.const 3689348814741910323)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 62)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:63:0
|
||||
(if
|
||||
@ -589,7 +640,15 @@
|
||||
(i64.const 4919131752989213764)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 63)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:65:0
|
||||
(set_global $memmove/dest
|
||||
@ -624,7 +683,15 @@
|
||||
(i64.const 4919131679688438545)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 66)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:68:0
|
||||
(set_global $memmove/dest
|
||||
@ -659,7 +726,15 @@
|
||||
(i64.const 4919131679688438545)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 69)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:70:0
|
||||
(if
|
||||
@ -678,7 +753,15 @@
|
||||
(i64.const 3689348814741910323)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 70)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:71:0
|
||||
(if
|
||||
@ -697,7 +780,15 @@
|
||||
(i64.const 3694152654344438852)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 71)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memmove.ts:72:0
|
||||
(if
|
||||
@ -716,58 +807,15 @@
|
||||
(i64.const 4919131752989213764)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 72)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: memmove/memmove
|
||||
GLOBAL: memmove/base
|
||||
GLOBAL: memmove/dest
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -1,489 +1,338 @@
|
||||
(module
|
||||
(type $iiii (func (param i32 i32 i32) (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $memset/dest (mut i32) (i32.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 32))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\t\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $memset/memset (; 0 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $memset/memset (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(local $4 i64)
|
||||
(local $5 i32)
|
||||
(block $folding-inner0
|
||||
;;@ memset.ts:2:2
|
||||
(set_local $3
|
||||
;;@ memset.ts:2:12
|
||||
(get_local $0)
|
||||
)
|
||||
(br_if $folding-inner0
|
||||
;;@ memset.ts:5:6
|
||||
(i32.eqz
|
||||
;;@ memset.ts:5:7
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:7:2
|
||||
(i32.store8
|
||||
;;@ memset.ts:7:12
|
||||
(get_local $0)
|
||||
;;@ memset.ts:7:18
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:8:2
|
||||
(i32.store8
|
||||
;;@ memset.ts:8:12
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:8:19
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ memset.ts:8:23
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ memset.ts:8:26
|
||||
(get_local $1)
|
||||
)
|
||||
(br_if $folding-inner0
|
||||
;;@ memset.ts:9:6
|
||||
(i32.le_u
|
||||
(get_local $2)
|
||||
;;@ memset.ts:9:11
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:12:2
|
||||
(i32.store8
|
||||
;;@ memset.ts:12:12
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:12:19
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ memset.ts:12:22
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:13:2
|
||||
(i32.store8
|
||||
;;@ memset.ts:13:12
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:13:19
|
||||
(i32.const 2)
|
||||
)
|
||||
;;@ memset.ts:13:22
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:14:2
|
||||
(i32.store8
|
||||
;;@ memset.ts:14:12
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:14:19
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ memset.ts:14:23
|
||||
(i32.const 2)
|
||||
)
|
||||
;;@ memset.ts:14:26
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:15:2
|
||||
(i32.store8
|
||||
;;@ memset.ts:15:12
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:15:19
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ memset.ts:15:23
|
||||
(i32.const 3)
|
||||
)
|
||||
;;@ memset.ts:15:26
|
||||
(get_local $1)
|
||||
)
|
||||
(br_if $folding-inner0
|
||||
;;@ memset.ts:16:6
|
||||
(i32.le_u
|
||||
(get_local $2)
|
||||
;;@ memset.ts:16:11
|
||||
(i32.const 6)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:18:2
|
||||
(i32.store8
|
||||
;;@ memset.ts:18:12
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:18:19
|
||||
(i32.const 3)
|
||||
)
|
||||
;;@ memset.ts:18:22
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:19:2
|
||||
(i32.store8
|
||||
;;@ memset.ts:19:12
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:19:19
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ memset.ts:19:23
|
||||
(i32.const 4)
|
||||
)
|
||||
;;@ memset.ts:19:26
|
||||
(get_local $1)
|
||||
)
|
||||
(br_if $folding-inner0
|
||||
;;@ memset.ts:20:6
|
||||
(i32.le_u
|
||||
(get_local $2)
|
||||
;;@ memset.ts:20:11
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:32:2
|
||||
(i32.store
|
||||
;;@ memset.ts:25:2
|
||||
(tee_local $0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:24:2
|
||||
(tee_local $5
|
||||
;;@ memset.ts:24:17
|
||||
(i32.and
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
;;@ memset.ts:24:18
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ memset.ts:24:25
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:29:2
|
||||
(tee_local $1
|
||||
;;@ memset.ts:29:17
|
||||
(i32.mul
|
||||
;;@ memset.ts:29:28
|
||||
(get_local $1)
|
||||
(i32.const 16843009)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:33:2
|
||||
(i32.store
|
||||
;;@ memset.ts:33:13
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:27:2
|
||||
(tee_local $2
|
||||
(i32.and
|
||||
(i32.sub
|
||||
;;@ memset.ts:26:2
|
||||
(get_local $2)
|
||||
;;@ memset.ts:26:7
|
||||
(get_local $5)
|
||||
)
|
||||
(i32.const -4)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:33:24
|
||||
(i32.const 4)
|
||||
)
|
||||
;;@ memset.ts:33:27
|
||||
(get_local $1)
|
||||
)
|
||||
(br_if $folding-inner0
|
||||
;;@ memset.ts:34:6
|
||||
(i32.le_u
|
||||
(get_local $2)
|
||||
;;@ memset.ts:34:11
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:36:2
|
||||
(i32.store
|
||||
;;@ memset.ts:36:13
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:36:20
|
||||
(i32.const 4)
|
||||
)
|
||||
;;@ memset.ts:36:23
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:37:2
|
||||
(i32.store
|
||||
;;@ memset.ts:37:13
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:37:20
|
||||
(i32.const 8)
|
||||
)
|
||||
;;@ memset.ts:37:23
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:38:2
|
||||
(i32.store
|
||||
;;@ memset.ts:38:13
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:38:20
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ memset.ts:38:24
|
||||
(i32.const 12)
|
||||
)
|
||||
;;@ memset.ts:38:28
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:39:2
|
||||
(i32.store
|
||||
;;@ memset.ts:39:13
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:39:20
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ memset.ts:39:24
|
||||
(i32.const 8)
|
||||
)
|
||||
;;@ memset.ts:39:27
|
||||
(get_local $1)
|
||||
)
|
||||
(br_if $folding-inner0
|
||||
;;@ memset.ts:40:6
|
||||
(i32.le_u
|
||||
(get_local $2)
|
||||
;;@ memset.ts:40:11
|
||||
(i32.const 24)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:42:2
|
||||
(i32.store
|
||||
;;@ memset.ts:42:13
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:42:20
|
||||
(i32.const 12)
|
||||
)
|
||||
;;@ memset.ts:42:24
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:43:2
|
||||
(i32.store
|
||||
;;@ memset.ts:43:13
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:43:20
|
||||
(i32.const 16)
|
||||
)
|
||||
;;@ memset.ts:43:24
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:44:2
|
||||
(i32.store
|
||||
;;@ memset.ts:44:13
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:44:20
|
||||
(i32.const 20)
|
||||
)
|
||||
;;@ memset.ts:44:24
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:45:2
|
||||
(i32.store
|
||||
;;@ memset.ts:45:13
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:45:20
|
||||
(i32.const 24)
|
||||
)
|
||||
;;@ memset.ts:45:24
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:46:2
|
||||
(i32.store
|
||||
;;@ memset.ts:46:13
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:46:20
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ memset.ts:46:24
|
||||
(i32.const 28)
|
||||
)
|
||||
;;@ memset.ts:46:28
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:47:2
|
||||
(i32.store
|
||||
;;@ memset.ts:47:13
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:47:20
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ memset.ts:47:24
|
||||
(i32.const 24)
|
||||
)
|
||||
;;@ memset.ts:47:28
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:48:2
|
||||
(i32.store
|
||||
;;@ memset.ts:48:13
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:48:20
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ memset.ts:48:24
|
||||
(i32.const 20)
|
||||
)
|
||||
;;@ memset.ts:48:28
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:49:2
|
||||
(i32.store
|
||||
;;@ memset.ts:49:13
|
||||
(i32.sub
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:49:20
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ memset.ts:49:24
|
||||
(i32.const 16)
|
||||
)
|
||||
;;@ memset.ts:49:28
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:53:2
|
||||
(set_local $0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:52:2
|
||||
(tee_local $5
|
||||
;;@ memset.ts:52:6
|
||||
(i32.add
|
||||
;;@ memset.ts:52:11
|
||||
(i32.and
|
||||
;;@ memset.ts:52:12
|
||||
(get_local $0)
|
||||
;;@ memset.ts:52:19
|
||||
(i32.const 4)
|
||||
)
|
||||
;;@ memset.ts:52:6
|
||||
(i32.const 24)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:54:2
|
||||
(set_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
;;@ memset.ts:54:7
|
||||
(get_local $5)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:57:2
|
||||
(set_local $4
|
||||
;;@ memset.ts:57:17
|
||||
(i64.or
|
||||
(i64.extend_u/i32
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:57:28
|
||||
(i64.shl
|
||||
;;@ memset.ts:57:29
|
||||
(i64.extend_u/i32
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ memset.ts:57:41
|
||||
(i64.const 32)
|
||||
)
|
||||
)
|
||||
)
|
||||
(loop $continue|0
|
||||
(if
|
||||
;;@ memset.ts:58:9
|
||||
(i32.ge_u
|
||||
(get_local $2)
|
||||
;;@ memset.ts:58:14
|
||||
(i32.const 32)
|
||||
)
|
||||
(block
|
||||
;;@ memset.ts:59:4
|
||||
(i64.store
|
||||
;;@ memset.ts:59:15
|
||||
(get_local $0)
|
||||
;;@ memset.ts:59:21
|
||||
(get_local $4)
|
||||
)
|
||||
;;@ memset.ts:60:4
|
||||
(i64.store
|
||||
;;@ memset.ts:60:15
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:60:22
|
||||
(i32.const 8)
|
||||
)
|
||||
;;@ memset.ts:60:25
|
||||
(get_local $4)
|
||||
)
|
||||
;;@ memset.ts:61:4
|
||||
(i64.store
|
||||
;;@ memset.ts:61:15
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:61:22
|
||||
(i32.const 16)
|
||||
)
|
||||
;;@ memset.ts:61:26
|
||||
(get_local $4)
|
||||
)
|
||||
;;@ memset.ts:62:4
|
||||
(i64.store
|
||||
;;@ memset.ts:62:15
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:62:22
|
||||
(i32.const 24)
|
||||
)
|
||||
;;@ memset.ts:62:26
|
||||
(get_local $4)
|
||||
)
|
||||
;;@ memset.ts:63:4
|
||||
(set_local $2
|
||||
(i32.sub
|
||||
(get_local $2)
|
||||
;;@ memset.ts:63:9
|
||||
(i32.const 32)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:64:4
|
||||
(set_local $0
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ memset.ts:64:12
|
||||
(i32.const 32)
|
||||
)
|
||||
)
|
||||
@ -492,137 +341,145 @@
|
||||
)
|
||||
)
|
||||
(return
|
||||
;;@ memset.ts:66:9
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:6:11
|
||||
(get_local $3)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(set_global $memset/dest
|
||||
;;@ memset.ts:69:11
|
||||
(get_global $HEAP_BASE)
|
||||
)
|
||||
;;@ memset.ts:70:0
|
||||
(drop
|
||||
(call $memset/memset
|
||||
;;@ memset.ts:70:7
|
||||
(get_global $memset/dest)
|
||||
;;@ memset.ts:70:13
|
||||
(i32.const 1)
|
||||
;;@ memset.ts:70:16
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:72:0
|
||||
(if
|
||||
;;@ memset.ts:72:7
|
||||
(i32.ne
|
||||
(i32.load8_u
|
||||
;;@ memset.ts:72:16
|
||||
(get_global $memset/dest)
|
||||
)
|
||||
;;@ memset.ts:72:25
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 72)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:73:0
|
||||
(if
|
||||
;;@ memset.ts:73:7
|
||||
(i32.ne
|
||||
(i32.load8_u
|
||||
;;@ memset.ts:73:16
|
||||
(i32.add
|
||||
(get_global $memset/dest)
|
||||
;;@ memset.ts:73:23
|
||||
(i32.const 15)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:73:30
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 73)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:75:0
|
||||
(drop
|
||||
(call $memset/memset
|
||||
;;@ memset.ts:75:7
|
||||
(i32.add
|
||||
(get_global $memset/dest)
|
||||
;;@ memset.ts:75:14
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ memset.ts:75:17
|
||||
(i32.const 2)
|
||||
;;@ memset.ts:75:20
|
||||
(i32.const 14)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:77:0
|
||||
(if
|
||||
;;@ memset.ts:77:7
|
||||
(i32.ne
|
||||
(i32.load8_u
|
||||
;;@ memset.ts:77:16
|
||||
(get_global $memset/dest)
|
||||
)
|
||||
;;@ memset.ts:77:25
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 77)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:78:0
|
||||
(if
|
||||
;;@ memset.ts:78:7
|
||||
(i32.ne
|
||||
(i32.load8_u
|
||||
;;@ memset.ts:78:16
|
||||
(i32.add
|
||||
(get_global $memset/dest)
|
||||
;;@ memset.ts:78:23
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:78:29
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 78)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:79:0
|
||||
(if
|
||||
;;@ memset.ts:79:7
|
||||
(i32.ne
|
||||
(i32.load8_u
|
||||
;;@ memset.ts:79:16
|
||||
(i32.add
|
||||
(get_global $memset/dest)
|
||||
;;@ memset.ts:79:23
|
||||
(i32.const 14)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:79:30
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 79)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:80:0
|
||||
(if
|
||||
;;@ memset.ts:80:7
|
||||
(i32.ne
|
||||
(i32.load8_u
|
||||
;;@ memset.ts:80:16
|
||||
(i32.add
|
||||
(get_global $memset/dest)
|
||||
;;@ memset.ts:80:23
|
||||
(i32.const 15)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:80:30
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 80)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1,12 +1,15 @@
|
||||
(module
|
||||
(type $iiii (func (param i32 i32 i32) (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $memset/dest (mut i32) (i32.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 32))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\t\00\00\00m\00e\00m\00s\00e\00t\00.\00t\00s\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $memset/memset (; 0 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(func $memset/memset (; 1 ;) (type $iiii) (param $0 i32) (param $1 i32) (param $2 i32) (result i32)
|
||||
(local $3 i32)
|
||||
(local $4 i32)
|
||||
(local $5 i32)
|
||||
@ -556,7 +559,7 @@
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(set_global $memset/dest
|
||||
;;@ memset.ts:69:11
|
||||
(get_global $HEAP_BASE)
|
||||
@ -585,7 +588,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 72)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:73:0
|
||||
(if
|
||||
@ -604,7 +615,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 73)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:75:0
|
||||
(drop
|
||||
@ -634,7 +653,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 77)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:78:0
|
||||
(if
|
||||
@ -653,7 +680,15 @@
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 78)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:79:0
|
||||
(if
|
||||
@ -672,7 +707,15 @@
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 79)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ memset.ts:80:0
|
||||
(if
|
||||
@ -691,57 +734,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 80)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: memset/memset
|
||||
GLOBAL: memset/dest
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -1,9 +1,22 @@
|
||||
(module
|
||||
(type $i (func (result i32)))
|
||||
(type $v (func))
|
||||
(global $namespace/Outer.Inner.aVar (mut i32) (i32.const 0))
|
||||
(memory $0 1)
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(nop)
|
||||
(func $namespace/Outer.Inner.aFunc (; 0 ;) (type $i) (result i32)
|
||||
(get_global $namespace/Outer.Inner.aVar)
|
||||
)
|
||||
(func $namespace/Joined.anotherFunc (; 1 ;) (type $i) (result i32)
|
||||
(i32.const 3)
|
||||
)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(drop
|
||||
(call $namespace/Outer.Inner.aFunc)
|
||||
)
|
||||
(drop
|
||||
(call $namespace/Joined.anotherFunc)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -41,58 +41,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
NAMESPACE: namespace/Outer
|
||||
NAMESPACE: namespace/Outer.Inner
|
||||
GLOBAL: namespace/Outer.Inner.aVar
|
||||
FUNCTION_PROTOTYPE: namespace/Outer.Inner.aFunc
|
||||
ENUM: namespace/Outer.Inner.anEnum
|
||||
ENUM: namespace/Joined
|
||||
FUNCTION_PROTOTYPE: namespace/Joined.anotherFunc
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -6,145 +6,111 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
;;@ portable-conversions.ts:8:0
|
||||
(drop
|
||||
(i32.trunc_s/f32
|
||||
(get_global $portable-conversions/f)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:9:0
|
||||
(drop
|
||||
(i32.trunc_s/f64
|
||||
(get_global $portable-conversions/F)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:13:0
|
||||
(drop
|
||||
(i32.trunc_s/f32
|
||||
(get_global $portable-conversions/f)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:14:0
|
||||
(drop
|
||||
(i32.trunc_s/f64
|
||||
(get_global $portable-conversions/F)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:18:0
|
||||
(drop
|
||||
;;@ portable-conversions.ts:18:4
|
||||
(i32.trunc_s/f32
|
||||
(get_global $portable-conversions/f)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:19:0
|
||||
(drop
|
||||
;;@ portable-conversions.ts:19:4
|
||||
(i32.trunc_s/f64
|
||||
(get_global $portable-conversions/F)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:23:0
|
||||
(drop
|
||||
;;@ portable-conversions.ts:23:4
|
||||
(i64.trunc_s/f32
|
||||
(get_global $portable-conversions/f)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:24:0
|
||||
(drop
|
||||
;;@ portable-conversions.ts:24:4
|
||||
(i64.trunc_s/f64
|
||||
(get_global $portable-conversions/F)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:28:0
|
||||
(drop
|
||||
;;@ portable-conversions.ts:28:6
|
||||
(i32.trunc_s/f32
|
||||
(get_global $portable-conversions/f)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:29:0
|
||||
(drop
|
||||
;;@ portable-conversions.ts:29:6
|
||||
(i32.trunc_s/f64
|
||||
(get_global $portable-conversions/F)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:33:0
|
||||
(drop
|
||||
(i32.trunc_u/f32
|
||||
(get_global $portable-conversions/f)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:34:0
|
||||
(drop
|
||||
(i32.trunc_u/f64
|
||||
(get_global $portable-conversions/F)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:38:0
|
||||
(drop
|
||||
(i32.trunc_u/f32
|
||||
(get_global $portable-conversions/f)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:39:0
|
||||
(drop
|
||||
(i32.trunc_u/f64
|
||||
(get_global $portable-conversions/F)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:43:0
|
||||
(drop
|
||||
;;@ portable-conversions.ts:43:4
|
||||
(i32.trunc_u/f32
|
||||
(get_global $portable-conversions/f)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:44:0
|
||||
(drop
|
||||
;;@ portable-conversions.ts:44:4
|
||||
(i32.trunc_u/f64
|
||||
(get_global $portable-conversions/F)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:48:0
|
||||
(drop
|
||||
;;@ portable-conversions.ts:48:4
|
||||
(i64.trunc_u/f32
|
||||
(get_global $portable-conversions/f)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:49:0
|
||||
(drop
|
||||
;;@ portable-conversions.ts:49:4
|
||||
(i64.trunc_u/f64
|
||||
(get_global $portable-conversions/F)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:53:0
|
||||
(drop
|
||||
;;@ portable-conversions.ts:53:6
|
||||
(i32.trunc_u/f32
|
||||
(get_global $portable-conversions/f)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:54:0
|
||||
(drop
|
||||
;;@ portable-conversions.ts:54:6
|
||||
(i32.trunc_u/f64
|
||||
(get_global $portable-conversions/F)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:58:0
|
||||
(drop
|
||||
(i32.trunc_u/f32
|
||||
(get_global $portable-conversions/f)
|
||||
)
|
||||
)
|
||||
;;@ portable-conversions.ts:59:0
|
||||
(drop
|
||||
(i32.trunc_u/f64
|
||||
(get_global $portable-conversions/F)
|
||||
|
@ -433,55 +433,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: portable-conversions/i
|
||||
GLOBAL: portable-conversions/I
|
||||
GLOBAL: portable-conversions/f
|
||||
GLOBAL: portable-conversions/F
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -4,35 +4,25 @@
|
||||
(export "fib" (func $recursive/fib))
|
||||
(export "memory" (memory $0))
|
||||
(func $recursive/fib (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
;;@ recursive.ts:2:2
|
||||
(if
|
||||
;;@ recursive.ts:2:6
|
||||
(i32.le_s
|
||||
(get_local $0)
|
||||
;;@ recursive.ts:2:11
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ recursive.ts:2:21
|
||||
(return
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ recursive.ts:3:9
|
||||
(i32.add
|
||||
(call $recursive/fib
|
||||
;;@ recursive.ts:3:13
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
;;@ recursive.ts:3:17
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ recursive.ts:3:22
|
||||
(call $recursive/fib
|
||||
;;@ recursive.ts:3:26
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
;;@ recursive.ts:3:30
|
||||
(i32.const 2)
|
||||
)
|
||||
)
|
||||
|
@ -43,52 +43,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: recursive/fib
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: recursive/fib
|
||||
;)
|
||||
|
@ -18,44 +18,32 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $export/add (; 0 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
;;@ export.ts:2:9
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ export.ts:2:13
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/sub (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
;;@ export.ts:6:9
|
||||
(i32.sub
|
||||
(get_local $0)
|
||||
;;@ export.ts:6:13
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $export/mul (; 2 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
;;@ export.ts:12:9
|
||||
(i32.mul
|
||||
(get_local $0)
|
||||
;;@ export.ts:12:13
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $start (; 3 ;) (type $v)
|
||||
;;@ reexport.ts:24:0
|
||||
(drop
|
||||
(i32.add
|
||||
(call $export/add
|
||||
;;@ reexport.ts:24:13
|
||||
(i32.const 1)
|
||||
;;@ reexport.ts:24:16
|
||||
(i32.const 2)
|
||||
)
|
||||
;;@ reexport.ts:24:21
|
||||
(call $export/mul
|
||||
;;@ reexport.ts:24:34
|
||||
(i32.const 3)
|
||||
;;@ reexport.ts:24:37
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
|
@ -74,80 +74,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: export/add
|
||||
FUNCTION_PROTOTYPE: export/sub
|
||||
FUNCTION_PROTOTYPE: export/mul
|
||||
GLOBAL: export/a
|
||||
GLOBAL: export/b
|
||||
GLOBAL: export/c
|
||||
NAMESPACE: export/ns
|
||||
FUNCTION_PROTOTYPE: export/ns.one
|
||||
FUNCTION_PROTOTYPE: export/ns.two
|
||||
FUNCTION_PROTOTYPE: reexport/imported_add
|
||||
FUNCTION_PROTOTYPE: reexport/imported_sub
|
||||
NAMESPACE: reexport/imported_ns
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: export/add
|
||||
FUNCTION_PROTOTYPE: export/sub
|
||||
FUNCTION_PROTOTYPE: export/renamed_mul
|
||||
GLOBAL: export/a
|
||||
GLOBAL: export/b
|
||||
GLOBAL: export/renamed_c
|
||||
NAMESPACE: export/ns
|
||||
FUNCTION_PROTOTYPE: reexport/add
|
||||
FUNCTION_PROTOTYPE: reexport/renamed_sub
|
||||
FUNCTION_PROTOTYPE: reexport/renamed_mul
|
||||
FUNCTION_PROTOTYPE: reexport/rerenamed_mul
|
||||
GLOBAL: reexport/a
|
||||
GLOBAL: reexport/renamed_b
|
||||
GLOBAL: reexport/renamed_c
|
||||
GLOBAL: reexport/rerenamed_c
|
||||
FUNCTION_PROTOTYPE: reexport/renamed_add
|
||||
FUNCTION_PROTOTYPE: reexport/rerenamed_sub
|
||||
NAMESPACE: reexport/renamed_ns
|
||||
;)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,8 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $iiv (func (param i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $i8.MAX_VALUE i32 (i32.const 127))
|
||||
(global $i8.MIN_VALUE i32 (i32.const -128))
|
||||
(global $u8.MAX_VALUE i32 (i32.const 255))
|
||||
@ -12,11 +14,12 @@
|
||||
(global $u32.MAX_VALUE i32 (i32.const -1))
|
||||
(global $retain-i32/si (mut i32) (i32.const 0))
|
||||
(global $retain-i32/ui (mut i32) (i32.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 40))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\0d\00\00\00r\00e\00t\00a\00i\00n\00-\00i\003\002\00.\00t\00s\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $retain-i32/test (; 0 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(func $retain-i32/test (; 1 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
;;@ retain-i32.ts:4:2
|
||||
(if
|
||||
(i32.eqz
|
||||
@ -61,7 +64,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 4)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:5:2
|
||||
(if
|
||||
@ -107,7 +118,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 5)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:6:2
|
||||
(if
|
||||
@ -153,7 +172,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 6)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:7:2
|
||||
(if
|
||||
@ -199,7 +226,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 7)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:8:2
|
||||
(if
|
||||
@ -245,7 +280,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:9:2
|
||||
(if
|
||||
@ -291,7 +334,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 9)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:10:2
|
||||
(if
|
||||
@ -337,7 +388,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 10)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:13:2
|
||||
(if
|
||||
@ -371,7 +430,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 13)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:14:2
|
||||
(if
|
||||
@ -405,7 +472,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 14)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:15:2
|
||||
(if
|
||||
@ -439,7 +514,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 15)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:16:2
|
||||
(if
|
||||
@ -473,7 +556,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 16)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:17:2
|
||||
(if
|
||||
@ -507,7 +598,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 17)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:18:2
|
||||
(if
|
||||
@ -541,7 +640,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 18)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:19:2
|
||||
(if
|
||||
@ -575,10 +682,18 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 19)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(local $0 i32)
|
||||
;;@ retain-i32.ts:23:0
|
||||
(call $retain-i32/test
|
||||
@ -923,7 +1038,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 78)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:80:0
|
||||
(set_global $retain-i32/si
|
||||
@ -964,7 +1087,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 81)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:83:0
|
||||
(set_global $retain-i32/si
|
||||
@ -1001,7 +1132,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 84)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:86:0
|
||||
(set_global $retain-i32/si
|
||||
@ -1048,7 +1187,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 87)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:89:0
|
||||
(set_global $retain-i32/si
|
||||
@ -1093,7 +1240,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 90)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:92:0
|
||||
(set_global $retain-i32/si
|
||||
@ -1140,7 +1295,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 93)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:95:0
|
||||
(set_global $retain-i32/si
|
||||
@ -1197,7 +1360,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 96)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:98:0
|
||||
(set_global $retain-i32/si
|
||||
@ -1218,7 +1389,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 99)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:101:0
|
||||
(set_global $retain-i32/si
|
||||
@ -1239,7 +1418,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 102)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:104:0
|
||||
(set_global $retain-i32/si
|
||||
@ -1270,7 +1457,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 105)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:107:0
|
||||
(set_global $retain-i32/si
|
||||
@ -1301,7 +1496,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 108)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:112:0
|
||||
(set_global $retain-i32/ui
|
||||
@ -1329,7 +1532,15 @@
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 113)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:115:0
|
||||
(set_global $retain-i32/ui
|
||||
@ -1357,7 +1568,15 @@
|
||||
(i32.const 255)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 116)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:118:0
|
||||
(set_global $retain-i32/ui
|
||||
@ -1381,7 +1600,15 @@
|
||||
(i32.const 254)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 119)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:121:0
|
||||
(set_global $retain-i32/ui
|
||||
@ -1405,7 +1632,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 122)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:124:0
|
||||
(set_global $retain-i32/ui
|
||||
@ -1429,7 +1664,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 125)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:127:0
|
||||
(set_global $retain-i32/ui
|
||||
@ -1450,7 +1693,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 128)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ retain-i32.ts:130:0
|
||||
(set_global $retain-i32/ui
|
||||
@ -1471,58 +1722,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 131)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: retain-i32/test
|
||||
GLOBAL: retain-i32/si
|
||||
GLOBAL: retain-i32/ui
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -7,17 +7,13 @@
|
||||
(local $0 i32)
|
||||
(loop $continue|0
|
||||
(if
|
||||
;;@ scoped.ts:5:45
|
||||
(i32.lt_s
|
||||
(get_local $0)
|
||||
;;@ scoped.ts:5:73
|
||||
(i32.const 1)
|
||||
)
|
||||
(block
|
||||
;;@ scoped.ts:5:76
|
||||
(set_local $0
|
||||
(i32.add
|
||||
;;@ scoped.ts:5:78
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -26,24 +22,18 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ scoped.ts:6:5
|
||||
(set_local $0
|
||||
;;@ scoped.ts:6:43
|
||||
(i32.const 0)
|
||||
)
|
||||
(loop $continue|1
|
||||
(if
|
||||
;;@ scoped.ts:6:46
|
||||
(i32.lt_s
|
||||
(get_local $0)
|
||||
;;@ scoped.ts:6:56
|
||||
(i32.const 1)
|
||||
)
|
||||
(block
|
||||
;;@ scoped.ts:6:59
|
||||
(set_local $0
|
||||
(i32.add
|
||||
;;@ scoped.ts:6:61
|
||||
(get_local $0)
|
||||
(i32.const 1)
|
||||
)
|
||||
|
@ -94,54 +94,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: scoped/aGlobal
|
||||
GLOBAL: scoped/aConstant
|
||||
GLOBAL: scoped/aStartFunctionLocal
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -3692,142 +3692,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
CLASS_PROTOTYPE: (lib)/array/Array
|
||||
PROPERTY: (lib)/array/Array#length
|
||||
CLASS_PROTOTYPE: Array
|
||||
CLASS_PROTOTYPE: (lib)/array/CArray
|
||||
CLASS_PROTOTYPE: CArray
|
||||
CLASS_PROTOTYPE: (lib)/error/Error
|
||||
CLASS_PROTOTYPE: Error
|
||||
CLASS_PROTOTYPE: (lib)/error/RangeError
|
||||
CLASS_PROTOTYPE: RangeError
|
||||
CLASS_PROTOTYPE: (lib)/map/Map
|
||||
PROPERTY: (lib)/map/Map#size
|
||||
CLASS_PROTOTYPE: Map
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/copy_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/move_memory
|
||||
FUNCTION_PROTOTYPE: move_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/set_memory
|
||||
FUNCTION_PROTOTYPE: set_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/compare_memory
|
||||
FUNCTION_PROTOTYPE: compare_memory
|
||||
CLASS_PROTOTYPE: (lib)/regexp/RegExp
|
||||
CLASS_PROTOTYPE: RegExp
|
||||
CLASS_PROTOTYPE: (lib)/set/Set
|
||||
PROPERTY: (lib)/set/Set#size
|
||||
CLASS_PROTOTYPE: Set
|
||||
GLOBAL: (lib)/string/EMPTY
|
||||
GLOBAL: (lib)/string/HEAD
|
||||
FUNCTION_PROTOTYPE: (lib)/string/allocate
|
||||
CLASS_PROTOTYPE: (lib)/string/String
|
||||
FUNCTION_PROTOTYPE: (lib)/string/String.__concat
|
||||
FUNCTION_PROTOTYPE: (lib)/string/String.__eq
|
||||
CLASS_PROTOTYPE: String
|
||||
FUNCTION_PROTOTYPE: (lib)/string/isWhiteSpaceOrLineTerminator
|
||||
ENUM: (lib)/string/CharCode
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseInt
|
||||
FUNCTION_PROTOTYPE: parseInt
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI32
|
||||
FUNCTION_PROTOTYPE: parseI32
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI64
|
||||
FUNCTION_PROTOTYPE: parseI64
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parse
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseFloat
|
||||
FUNCTION_PROTOTYPE: parseFloat
|
||||
GLOBAL: std/allocator_arena/size
|
||||
GLOBAL: std/allocator_arena/ptr1
|
||||
GLOBAL: std/allocator_arena/ptr2
|
||||
GLOBAL: std/allocator_arena/i
|
||||
GLOBAL: (lib)/allocator/arena/ALIGN_LOG2
|
||||
GLOBAL: (lib)/allocator/arena/ALIGN_SIZE
|
||||
GLOBAL: (lib)/allocator/arena/ALIGN_MASK
|
||||
GLOBAL: (lib)/allocator/arena/HEAP_OFFSET
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory
|
||||
FUNCTION_PROTOTYPE: allocate_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory
|
||||
FUNCTION_PROTOTYPE: free_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory
|
||||
FUNCTION_PROTOTYPE: reset_memory
|
||||
[program.exports]
|
||||
CLASS_PROTOTYPE: (lib)/array/Array
|
||||
CLASS_PROTOTYPE: Array
|
||||
CLASS_PROTOTYPE: (lib)/array/CArray
|
||||
CLASS_PROTOTYPE: CArray
|
||||
CLASS_PROTOTYPE: (lib)/error/Error
|
||||
CLASS_PROTOTYPE: Error
|
||||
CLASS_PROTOTYPE: (lib)/error/RangeError
|
||||
CLASS_PROTOTYPE: RangeError
|
||||
CLASS_PROTOTYPE: (lib)/map/Map
|
||||
CLASS_PROTOTYPE: Map
|
||||
FUNCTION_PROTOTYPE: move_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/move_memory
|
||||
FUNCTION_PROTOTYPE: set_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/set_memory
|
||||
FUNCTION_PROTOTYPE: compare_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/compare_memory
|
||||
CLASS_PROTOTYPE: (lib)/regexp/RegExp
|
||||
CLASS_PROTOTYPE: RegExp
|
||||
CLASS_PROTOTYPE: (lib)/set/Set
|
||||
CLASS_PROTOTYPE: Set
|
||||
CLASS_PROTOTYPE: (lib)/string/String
|
||||
CLASS_PROTOTYPE: String
|
||||
FUNCTION_PROTOTYPE: parseInt
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseInt
|
||||
FUNCTION_PROTOTYPE: parseI32
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI32
|
||||
FUNCTION_PROTOTYPE: parseI64
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI64
|
||||
FUNCTION_PROTOTYPE: parseFloat
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseFloat
|
||||
FUNCTION_PROTOTYPE: allocate_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory
|
||||
FUNCTION_PROTOTYPE: free_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory
|
||||
FUNCTION_PROTOTYPE: reset_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory
|
||||
;)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -5714,140 +5714,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
CLASS_PROTOTYPE: (lib)/array/Array
|
||||
PROPERTY: (lib)/array/Array#length
|
||||
CLASS_PROTOTYPE: Array
|
||||
CLASS_PROTOTYPE: (lib)/array/CArray
|
||||
CLASS_PROTOTYPE: CArray
|
||||
CLASS_PROTOTYPE: (lib)/error/Error
|
||||
CLASS_PROTOTYPE: Error
|
||||
CLASS_PROTOTYPE: (lib)/error/RangeError
|
||||
CLASS_PROTOTYPE: RangeError
|
||||
CLASS_PROTOTYPE: (lib)/map/Map
|
||||
PROPERTY: (lib)/map/Map#size
|
||||
CLASS_PROTOTYPE: Map
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/copy_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/move_memory
|
||||
FUNCTION_PROTOTYPE: move_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/set_memory
|
||||
FUNCTION_PROTOTYPE: set_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/compare_memory
|
||||
FUNCTION_PROTOTYPE: compare_memory
|
||||
CLASS_PROTOTYPE: (lib)/regexp/RegExp
|
||||
CLASS_PROTOTYPE: RegExp
|
||||
CLASS_PROTOTYPE: (lib)/set/Set
|
||||
PROPERTY: (lib)/set/Set#size
|
||||
CLASS_PROTOTYPE: Set
|
||||
GLOBAL: (lib)/string/EMPTY
|
||||
GLOBAL: (lib)/string/HEAD
|
||||
FUNCTION_PROTOTYPE: (lib)/string/allocate
|
||||
CLASS_PROTOTYPE: (lib)/string/String
|
||||
FUNCTION_PROTOTYPE: (lib)/string/String.__concat
|
||||
FUNCTION_PROTOTYPE: (lib)/string/String.__eq
|
||||
CLASS_PROTOTYPE: String
|
||||
FUNCTION_PROTOTYPE: (lib)/string/isWhiteSpaceOrLineTerminator
|
||||
ENUM: (lib)/string/CharCode
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseInt
|
||||
FUNCTION_PROTOTYPE: parseInt
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI32
|
||||
FUNCTION_PROTOTYPE: parseI32
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI64
|
||||
FUNCTION_PROTOTYPE: parseI64
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parse
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseFloat
|
||||
FUNCTION_PROTOTYPE: parseFloat
|
||||
GLOBAL: std/array/arr
|
||||
GLOBAL: std/array/i
|
||||
GLOBAL: (lib)/allocator/arena/ALIGN_LOG2
|
||||
GLOBAL: (lib)/allocator/arena/ALIGN_SIZE
|
||||
GLOBAL: (lib)/allocator/arena/ALIGN_MASK
|
||||
GLOBAL: (lib)/allocator/arena/HEAP_OFFSET
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory
|
||||
FUNCTION_PROTOTYPE: allocate_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory
|
||||
FUNCTION_PROTOTYPE: free_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory
|
||||
FUNCTION_PROTOTYPE: reset_memory
|
||||
[program.exports]
|
||||
CLASS_PROTOTYPE: (lib)/array/Array
|
||||
CLASS_PROTOTYPE: Array
|
||||
CLASS_PROTOTYPE: (lib)/array/CArray
|
||||
CLASS_PROTOTYPE: CArray
|
||||
CLASS_PROTOTYPE: (lib)/error/Error
|
||||
CLASS_PROTOTYPE: Error
|
||||
CLASS_PROTOTYPE: (lib)/error/RangeError
|
||||
CLASS_PROTOTYPE: RangeError
|
||||
CLASS_PROTOTYPE: (lib)/map/Map
|
||||
CLASS_PROTOTYPE: Map
|
||||
FUNCTION_PROTOTYPE: move_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/move_memory
|
||||
FUNCTION_PROTOTYPE: set_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/set_memory
|
||||
FUNCTION_PROTOTYPE: compare_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/compare_memory
|
||||
CLASS_PROTOTYPE: (lib)/regexp/RegExp
|
||||
CLASS_PROTOTYPE: RegExp
|
||||
CLASS_PROTOTYPE: (lib)/set/Set
|
||||
CLASS_PROTOTYPE: Set
|
||||
CLASS_PROTOTYPE: (lib)/string/String
|
||||
CLASS_PROTOTYPE: String
|
||||
FUNCTION_PROTOTYPE: parseInt
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseInt
|
||||
FUNCTION_PROTOTYPE: parseI32
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI32
|
||||
FUNCTION_PROTOTYPE: parseI64
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI64
|
||||
FUNCTION_PROTOTYPE: parseFloat
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseFloat
|
||||
FUNCTION_PROTOTYPE: allocate_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory
|
||||
FUNCTION_PROTOTYPE: free_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory
|
||||
FUNCTION_PROTOTYPE: reset_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory
|
||||
;)
|
||||
|
@ -11,70 +11,49 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func "$(lib)/array/CArray#__get" (; 1 ;) (type $iii) (param $0 i32) (param $1 i32) (result i32)
|
||||
;;@ (lib)/array.ts:173:4
|
||||
(if
|
||||
;;@ (lib)/array.ts:173:8
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
;;@ (lib)/array.ts:173:16
|
||||
(i32.const 0)
|
||||
)
|
||||
;;@ (lib)/array.ts:174:6
|
||||
(unreachable)
|
||||
)
|
||||
;;@ (lib)/array.ts:175:11
|
||||
(i32.load
|
||||
;;@ (lib)/array.ts:175:19
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ (lib)/array.ts:175:45
|
||||
(i32.mul
|
||||
(get_local $1)
|
||||
;;@ (lib)/array.ts:175:60
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(func "$(lib)/array/CArray#__set" (; 2 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
;;@ (lib)/array.ts:180:4
|
||||
(if
|
||||
;;@ (lib)/array.ts:180:8
|
||||
(i32.lt_s
|
||||
(get_local $1)
|
||||
;;@ (lib)/array.ts:180:16
|
||||
(i32.const 0)
|
||||
)
|
||||
;;@ (lib)/array.ts:181:6
|
||||
(unreachable)
|
||||
)
|
||||
;;@ (lib)/array.ts:182:4
|
||||
(i32.store
|
||||
;;@ (lib)/array.ts:182:13
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ (lib)/array.ts:182:39
|
||||
(i32.mul
|
||||
(get_local $1)
|
||||
;;@ (lib)/array.ts:182:54
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/array.ts:182:67
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $start (; 3 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(set_global $std/carray/arr
|
||||
;;@ std/carray.ts:6:23
|
||||
(get_global $HEAP_BASE)
|
||||
)
|
||||
;;@ std/carray.ts:8:0
|
||||
(if
|
||||
;;@ std/carray.ts:8:7
|
||||
(i32.load
|
||||
;;@ std/carray.ts:8:17
|
||||
(get_global $HEAP_BASE)
|
||||
)
|
||||
(block
|
||||
@ -87,14 +66,10 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ std/carray.ts:9:0
|
||||
(if
|
||||
;;@ std/carray.ts:9:7
|
||||
(i32.load
|
||||
;;@ std/carray.ts:9:17
|
||||
(i32.add
|
||||
(get_global $HEAP_BASE)
|
||||
;;@ std/carray.ts:9:29
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
@ -108,12 +83,9 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ std/carray.ts:11:0
|
||||
(if
|
||||
;;@ std/carray.ts:11:7
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(get_global $std/carray/arr)
|
||||
;;@ std/carray.ts:11:11
|
||||
(i32.const 0)
|
||||
)
|
||||
(block
|
||||
@ -126,12 +98,9 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ std/carray.ts:12:0
|
||||
(if
|
||||
;;@ std/carray.ts:12:7
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(get_global $std/carray/arr)
|
||||
;;@ std/carray.ts:12:11
|
||||
(i32.const 1)
|
||||
)
|
||||
(block
|
||||
@ -144,31 +113,21 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ std/carray.ts:14:0
|
||||
(call "$(lib)/array/CArray#__set"
|
||||
(get_global $std/carray/arr)
|
||||
;;@ std/carray.ts:14:4
|
||||
(i32.const 0)
|
||||
;;@ std/carray.ts:14:9
|
||||
(i32.const 42)
|
||||
)
|
||||
;;@ std/carray.ts:15:0
|
||||
(call "$(lib)/array/CArray#__set"
|
||||
(get_global $std/carray/arr)
|
||||
;;@ std/carray.ts:15:4
|
||||
(i32.const 1)
|
||||
;;@ std/carray.ts:15:9
|
||||
(i32.const 24)
|
||||
)
|
||||
;;@ std/carray.ts:17:0
|
||||
(if
|
||||
;;@ std/carray.ts:17:7
|
||||
(i32.ne
|
||||
(i32.load
|
||||
;;@ std/carray.ts:17:17
|
||||
(get_global $HEAP_BASE)
|
||||
)
|
||||
;;@ std/carray.ts:17:31
|
||||
(i32.const 42)
|
||||
)
|
||||
(block
|
||||
@ -181,19 +140,14 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ std/carray.ts:18:0
|
||||
(if
|
||||
;;@ std/carray.ts:18:7
|
||||
(i32.ne
|
||||
(i32.load
|
||||
;;@ std/carray.ts:18:17
|
||||
(i32.add
|
||||
(get_global $HEAP_BASE)
|
||||
;;@ std/carray.ts:18:29
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
;;@ std/carray.ts:18:35
|
||||
(i32.const 24)
|
||||
)
|
||||
(block
|
||||
@ -206,16 +160,12 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ std/carray.ts:20:0
|
||||
(if
|
||||
;;@ std/carray.ts:20:7
|
||||
(i32.ne
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(get_global $std/carray/arr)
|
||||
;;@ std/carray.ts:20:11
|
||||
(i32.const 0)
|
||||
)
|
||||
;;@ std/carray.ts:20:17
|
||||
(i32.const 42)
|
||||
)
|
||||
(block
|
||||
@ -228,16 +178,12 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ std/carray.ts:21:0
|
||||
(if
|
||||
;;@ std/carray.ts:21:7
|
||||
(i32.ne
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(get_global $std/carray/arr)
|
||||
;;@ std/carray.ts:21:11
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ std/carray.ts:21:17
|
||||
(i32.const 24)
|
||||
)
|
||||
(block
|
||||
@ -250,24 +196,17 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ std/carray.ts:23:0
|
||||
(if
|
||||
;;@ std/carray.ts:23:7
|
||||
(block (result i32)
|
||||
(call "$(lib)/array/CArray#__set"
|
||||
;;@ std/carray.ts:23:8
|
||||
(get_global $std/carray/arr)
|
||||
;;@ std/carray.ts:23:12
|
||||
(i32.const 3)
|
||||
(tee_local $0
|
||||
;;@ std/carray.ts:23:17
|
||||
(i32.const 9000)
|
||||
)
|
||||
)
|
||||
;;@ std/carray.ts:23:7
|
||||
(i32.ne
|
||||
(get_local $0)
|
||||
;;@ std/carray.ts:23:26
|
||||
(i32.const 9000)
|
||||
)
|
||||
)
|
||||
@ -281,19 +220,14 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ std/carray.ts:25:0
|
||||
(if
|
||||
;;@ std/carray.ts:25:7
|
||||
(i32.ne
|
||||
(i32.load
|
||||
;;@ std/carray.ts:25:17
|
||||
(i32.add
|
||||
(get_global $HEAP_BASE)
|
||||
;;@ std/carray.ts:25:29
|
||||
(i32.const 12)
|
||||
)
|
||||
)
|
||||
;;@ std/carray.ts:25:36
|
||||
(i32.const 9000)
|
||||
)
|
||||
(block
|
||||
@ -306,16 +240,12 @@
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ std/carray.ts:26:0
|
||||
(if
|
||||
;;@ std/carray.ts:26:7
|
||||
(i32.ne
|
||||
(call "$(lib)/array/CArray#__get"
|
||||
(get_global $std/carray/arr)
|
||||
;;@ std/carray.ts:26:11
|
||||
(i32.const 3)
|
||||
)
|
||||
;;@ std/carray.ts:26:17
|
||||
(i32.const 9000)
|
||||
)
|
||||
(block
|
||||
|
@ -370,123 +370,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
CLASS_PROTOTYPE: (lib)/array/Array
|
||||
PROPERTY: (lib)/array/Array#length
|
||||
CLASS_PROTOTYPE: Array
|
||||
CLASS_PROTOTYPE: (lib)/array/CArray
|
||||
CLASS_PROTOTYPE: CArray
|
||||
CLASS_PROTOTYPE: (lib)/error/Error
|
||||
CLASS_PROTOTYPE: Error
|
||||
CLASS_PROTOTYPE: (lib)/error/RangeError
|
||||
CLASS_PROTOTYPE: RangeError
|
||||
CLASS_PROTOTYPE: (lib)/map/Map
|
||||
PROPERTY: (lib)/map/Map#size
|
||||
CLASS_PROTOTYPE: Map
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/copy_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/move_memory
|
||||
FUNCTION_PROTOTYPE: move_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/set_memory
|
||||
FUNCTION_PROTOTYPE: set_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/compare_memory
|
||||
FUNCTION_PROTOTYPE: compare_memory
|
||||
CLASS_PROTOTYPE: (lib)/regexp/RegExp
|
||||
CLASS_PROTOTYPE: RegExp
|
||||
CLASS_PROTOTYPE: (lib)/set/Set
|
||||
PROPERTY: (lib)/set/Set#size
|
||||
CLASS_PROTOTYPE: Set
|
||||
GLOBAL: (lib)/string/EMPTY
|
||||
GLOBAL: (lib)/string/HEAD
|
||||
FUNCTION_PROTOTYPE: (lib)/string/allocate
|
||||
CLASS_PROTOTYPE: (lib)/string/String
|
||||
FUNCTION_PROTOTYPE: (lib)/string/String.__concat
|
||||
FUNCTION_PROTOTYPE: (lib)/string/String.__eq
|
||||
CLASS_PROTOTYPE: String
|
||||
FUNCTION_PROTOTYPE: (lib)/string/isWhiteSpaceOrLineTerminator
|
||||
ENUM: (lib)/string/CharCode
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseInt
|
||||
FUNCTION_PROTOTYPE: parseInt
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI32
|
||||
FUNCTION_PROTOTYPE: parseI32
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI64
|
||||
FUNCTION_PROTOTYPE: parseI64
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parse
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseFloat
|
||||
FUNCTION_PROTOTYPE: parseFloat
|
||||
GLOBAL: std/carray/arr
|
||||
[program.exports]
|
||||
CLASS_PROTOTYPE: (lib)/array/Array
|
||||
CLASS_PROTOTYPE: Array
|
||||
CLASS_PROTOTYPE: (lib)/array/CArray
|
||||
CLASS_PROTOTYPE: CArray
|
||||
CLASS_PROTOTYPE: (lib)/error/Error
|
||||
CLASS_PROTOTYPE: Error
|
||||
CLASS_PROTOTYPE: (lib)/error/RangeError
|
||||
CLASS_PROTOTYPE: RangeError
|
||||
CLASS_PROTOTYPE: (lib)/map/Map
|
||||
CLASS_PROTOTYPE: Map
|
||||
FUNCTION_PROTOTYPE: move_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/move_memory
|
||||
FUNCTION_PROTOTYPE: set_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/set_memory
|
||||
FUNCTION_PROTOTYPE: compare_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/compare_memory
|
||||
CLASS_PROTOTYPE: (lib)/regexp/RegExp
|
||||
CLASS_PROTOTYPE: RegExp
|
||||
CLASS_PROTOTYPE: (lib)/set/Set
|
||||
CLASS_PROTOTYPE: Set
|
||||
CLASS_PROTOTYPE: (lib)/string/String
|
||||
CLASS_PROTOTYPE: String
|
||||
FUNCTION_PROTOTYPE: parseInt
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseInt
|
||||
FUNCTION_PROTOTYPE: parseI32
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI32
|
||||
FUNCTION_PROTOTYPE: parseI64
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI64
|
||||
FUNCTION_PROTOTYPE: parseFloat
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseFloat
|
||||
;)
|
||||
|
@ -1,5 +1,6 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $ifv (func (param i32 f32)))
|
||||
(type $v (func))
|
||||
(global "$(lib)/allocator/arena/HEAP_OFFSET" (mut i32) (i32.const 0))
|
||||
(global $std/new/aClass (mut i32) (i32.const 0))
|
||||
@ -11,89 +12,62 @@
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
;;@ (lib)/allocator/arena.ts:14:2
|
||||
(if
|
||||
;;@ (lib)/allocator/arena.ts:14:6
|
||||
(i32.eqz
|
||||
;;@ (lib)/allocator/arena.ts:14:7
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:14:20
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:18:2
|
||||
(if
|
||||
;;@ (lib)/allocator/arena.ts:18:6
|
||||
(i32.and
|
||||
(if (result i32)
|
||||
(tee_local $0
|
||||
(i32.gt_u
|
||||
;;@ (lib)/allocator/arena.ts:16:2
|
||||
(tee_local $2
|
||||
;;@ (lib)/allocator/arena.ts:16:12
|
||||
(i32.and
|
||||
(i32.add
|
||||
;;@ (lib)/allocator/arena.ts:16:13
|
||||
(i32.add
|
||||
;;@ (lib)/allocator/arena.ts:15:2
|
||||
(tee_local $3
|
||||
;;@ (lib)/allocator/arena.ts:15:12
|
||||
(get_global "$(lib)/allocator/arena/HEAP_OFFSET")
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:16:19
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:16:26
|
||||
(i32.const 7)
|
||||
)
|
||||
(i32.const -8)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:17:2
|
||||
(tee_local $1
|
||||
;;@ (lib)/allocator/arena.ts:17:14
|
||||
(i32.shl
|
||||
(current_memory)
|
||||
;;@ (lib)/allocator/arena.ts:17:41
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:18:21
|
||||
(i32.lt_s
|
||||
(grow_memory
|
||||
;;@ (lib)/allocator/arena.ts:19:4
|
||||
(select
|
||||
(tee_local $0
|
||||
;;@ (lib)/allocator/arena.ts:20:6
|
||||
(i32.shr_u
|
||||
(i32.sub
|
||||
;;@ (lib)/allocator/arena.ts:20:7
|
||||
(i32.and
|
||||
;;@ (lib)/allocator/arena.ts:20:8
|
||||
(i32.add
|
||||
;;@ (lib)/allocator/arena.ts:20:9
|
||||
(get_local $2)
|
||||
;;@ (lib)/allocator/arena.ts:20:15
|
||||
(i32.const 65535)
|
||||
)
|
||||
(i32.const -65536)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:20:36
|
||||
(get_local $1)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:20:46
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
(tee_local $1
|
||||
;;@ (lib)/allocator/arena.ts:21:6
|
||||
(i32.shr_u
|
||||
(get_local $1)
|
||||
;;@ (lib)/allocator/arena.ts:21:46
|
||||
(i32.const 16)
|
||||
)
|
||||
)
|
||||
@ -103,33 +77,40 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:23:6
|
||||
(i32.const 0)
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:23:9
|
||||
(unreachable)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:24:2
|
||||
(set_global "$(lib)/allocator/arena/HEAP_OFFSET"
|
||||
;;@ (lib)/allocator/arena.ts:24:16
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ (lib)/allocator/arena.ts:25:9
|
||||
(get_local $3)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(func $std/new/AClass#constructor (; 1 ;) (type $ifv) (param $0 i32) (param $1 f32)
|
||||
(i32.store
|
||||
(get_local $0)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(f32.store offset=4
|
||||
(get_local $0)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $start (; 2 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(local $1 i32)
|
||||
(set_global "$(lib)/allocator/arena/HEAP_OFFSET"
|
||||
;;@ (lib)/allocator/arena.ts:11:25
|
||||
(get_global $HEAP_BASE)
|
||||
)
|
||||
(set_global $std/new/aClass
|
||||
;;@ std/new.ts:13:13
|
||||
(block (result i32)
|
||||
(i32.store
|
||||
(tee_local $0
|
||||
@ -137,27 +118,14 @@
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
;;@ std/new.ts:5:16
|
||||
(i32.const 1)
|
||||
)
|
||||
(f32.store offset=4
|
||||
(get_local $0)
|
||||
;;@ std/new.ts:6:22
|
||||
(f32.const 2)
|
||||
)
|
||||
(i32.store
|
||||
(tee_local $1
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.add
|
||||
(i32.load
|
||||
(get_local $1)
|
||||
)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(f32.store offset=4
|
||||
(get_local $1)
|
||||
(call $std/new/AClass#constructor
|
||||
(get_local $0)
|
||||
(f32.const 3)
|
||||
)
|
||||
(get_local $0)
|
||||
|
@ -200,141 +200,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
CLASS_PROTOTYPE: (lib)/array/Array
|
||||
PROPERTY: (lib)/array/Array#length
|
||||
CLASS_PROTOTYPE: Array
|
||||
CLASS_PROTOTYPE: (lib)/array/CArray
|
||||
CLASS_PROTOTYPE: CArray
|
||||
CLASS_PROTOTYPE: (lib)/error/Error
|
||||
CLASS_PROTOTYPE: Error
|
||||
CLASS_PROTOTYPE: (lib)/error/RangeError
|
||||
CLASS_PROTOTYPE: RangeError
|
||||
CLASS_PROTOTYPE: (lib)/map/Map
|
||||
PROPERTY: (lib)/map/Map#size
|
||||
CLASS_PROTOTYPE: Map
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/copy_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/move_memory
|
||||
FUNCTION_PROTOTYPE: move_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/set_memory
|
||||
FUNCTION_PROTOTYPE: set_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/compare_memory
|
||||
FUNCTION_PROTOTYPE: compare_memory
|
||||
CLASS_PROTOTYPE: (lib)/regexp/RegExp
|
||||
CLASS_PROTOTYPE: RegExp
|
||||
CLASS_PROTOTYPE: (lib)/set/Set
|
||||
PROPERTY: (lib)/set/Set#size
|
||||
CLASS_PROTOTYPE: Set
|
||||
GLOBAL: (lib)/string/EMPTY
|
||||
GLOBAL: (lib)/string/HEAD
|
||||
FUNCTION_PROTOTYPE: (lib)/string/allocate
|
||||
CLASS_PROTOTYPE: (lib)/string/String
|
||||
FUNCTION_PROTOTYPE: (lib)/string/String.__concat
|
||||
FUNCTION_PROTOTYPE: (lib)/string/String.__eq
|
||||
CLASS_PROTOTYPE: String
|
||||
FUNCTION_PROTOTYPE: (lib)/string/isWhiteSpaceOrLineTerminator
|
||||
ENUM: (lib)/string/CharCode
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseInt
|
||||
FUNCTION_PROTOTYPE: parseInt
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI32
|
||||
FUNCTION_PROTOTYPE: parseI32
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI64
|
||||
FUNCTION_PROTOTYPE: parseI64
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parse
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseFloat
|
||||
FUNCTION_PROTOTYPE: parseFloat
|
||||
CLASS_PROTOTYPE: std/new/AClass
|
||||
GLOBAL: std/new/AClass.aStaticField
|
||||
GLOBAL: std/new/aClass
|
||||
GLOBAL: (lib)/allocator/arena/ALIGN_LOG2
|
||||
GLOBAL: (lib)/allocator/arena/ALIGN_SIZE
|
||||
GLOBAL: (lib)/allocator/arena/ALIGN_MASK
|
||||
GLOBAL: (lib)/allocator/arena/HEAP_OFFSET
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory
|
||||
FUNCTION_PROTOTYPE: allocate_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory
|
||||
FUNCTION_PROTOTYPE: free_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory
|
||||
FUNCTION_PROTOTYPE: reset_memory
|
||||
[program.exports]
|
||||
CLASS_PROTOTYPE: (lib)/array/Array
|
||||
CLASS_PROTOTYPE: Array
|
||||
CLASS_PROTOTYPE: (lib)/array/CArray
|
||||
CLASS_PROTOTYPE: CArray
|
||||
CLASS_PROTOTYPE: (lib)/error/Error
|
||||
CLASS_PROTOTYPE: Error
|
||||
CLASS_PROTOTYPE: (lib)/error/RangeError
|
||||
CLASS_PROTOTYPE: RangeError
|
||||
CLASS_PROTOTYPE: (lib)/map/Map
|
||||
CLASS_PROTOTYPE: Map
|
||||
FUNCTION_PROTOTYPE: move_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/move_memory
|
||||
FUNCTION_PROTOTYPE: set_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/set_memory
|
||||
FUNCTION_PROTOTYPE: compare_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/compare_memory
|
||||
CLASS_PROTOTYPE: (lib)/regexp/RegExp
|
||||
CLASS_PROTOTYPE: RegExp
|
||||
CLASS_PROTOTYPE: (lib)/set/Set
|
||||
CLASS_PROTOTYPE: Set
|
||||
CLASS_PROTOTYPE: (lib)/string/String
|
||||
CLASS_PROTOTYPE: String
|
||||
FUNCTION_PROTOTYPE: parseInt
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseInt
|
||||
FUNCTION_PROTOTYPE: parseI32
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI32
|
||||
FUNCTION_PROTOTYPE: parseI64
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI64
|
||||
FUNCTION_PROTOTYPE: parseFloat
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseFloat
|
||||
FUNCTION_PROTOTYPE: allocate_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory
|
||||
FUNCTION_PROTOTYPE: free_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory
|
||||
FUNCTION_PROTOTYPE: reset_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory
|
||||
;)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -3606,139 +3606,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
CLASS_PROTOTYPE: (lib)/array/Array
|
||||
PROPERTY: (lib)/array/Array#length
|
||||
CLASS_PROTOTYPE: Array
|
||||
CLASS_PROTOTYPE: (lib)/array/CArray
|
||||
CLASS_PROTOTYPE: CArray
|
||||
CLASS_PROTOTYPE: (lib)/error/Error
|
||||
CLASS_PROTOTYPE: Error
|
||||
CLASS_PROTOTYPE: (lib)/error/RangeError
|
||||
CLASS_PROTOTYPE: RangeError
|
||||
CLASS_PROTOTYPE: (lib)/map/Map
|
||||
PROPERTY: (lib)/map/Map#size
|
||||
CLASS_PROTOTYPE: Map
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/copy_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/move_memory
|
||||
FUNCTION_PROTOTYPE: move_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/set_memory
|
||||
FUNCTION_PROTOTYPE: set_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/compare_memory
|
||||
FUNCTION_PROTOTYPE: compare_memory
|
||||
CLASS_PROTOTYPE: (lib)/regexp/RegExp
|
||||
CLASS_PROTOTYPE: RegExp
|
||||
CLASS_PROTOTYPE: (lib)/set/Set
|
||||
PROPERTY: (lib)/set/Set#size
|
||||
CLASS_PROTOTYPE: Set
|
||||
GLOBAL: (lib)/string/EMPTY
|
||||
GLOBAL: (lib)/string/HEAD
|
||||
FUNCTION_PROTOTYPE: (lib)/string/allocate
|
||||
CLASS_PROTOTYPE: (lib)/string/String
|
||||
FUNCTION_PROTOTYPE: (lib)/string/String.__concat
|
||||
FUNCTION_PROTOTYPE: (lib)/string/String.__eq
|
||||
CLASS_PROTOTYPE: String
|
||||
FUNCTION_PROTOTYPE: (lib)/string/isWhiteSpaceOrLineTerminator
|
||||
ENUM: (lib)/string/CharCode
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseInt
|
||||
FUNCTION_PROTOTYPE: parseInt
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI32
|
||||
FUNCTION_PROTOTYPE: parseI32
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI64
|
||||
FUNCTION_PROTOTYPE: parseI64
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parse
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseFloat
|
||||
FUNCTION_PROTOTYPE: parseFloat
|
||||
GLOBAL: std/set/set
|
||||
GLOBAL: (lib)/allocator/arena/ALIGN_LOG2
|
||||
GLOBAL: (lib)/allocator/arena/ALIGN_SIZE
|
||||
GLOBAL: (lib)/allocator/arena/ALIGN_MASK
|
||||
GLOBAL: (lib)/allocator/arena/HEAP_OFFSET
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory
|
||||
FUNCTION_PROTOTYPE: allocate_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory
|
||||
FUNCTION_PROTOTYPE: free_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory
|
||||
FUNCTION_PROTOTYPE: reset_memory
|
||||
[program.exports]
|
||||
CLASS_PROTOTYPE: (lib)/array/Array
|
||||
CLASS_PROTOTYPE: Array
|
||||
CLASS_PROTOTYPE: (lib)/array/CArray
|
||||
CLASS_PROTOTYPE: CArray
|
||||
CLASS_PROTOTYPE: (lib)/error/Error
|
||||
CLASS_PROTOTYPE: Error
|
||||
CLASS_PROTOTYPE: (lib)/error/RangeError
|
||||
CLASS_PROTOTYPE: RangeError
|
||||
CLASS_PROTOTYPE: (lib)/map/Map
|
||||
CLASS_PROTOTYPE: Map
|
||||
FUNCTION_PROTOTYPE: move_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/move_memory
|
||||
FUNCTION_PROTOTYPE: set_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/set_memory
|
||||
FUNCTION_PROTOTYPE: compare_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/compare_memory
|
||||
CLASS_PROTOTYPE: (lib)/regexp/RegExp
|
||||
CLASS_PROTOTYPE: RegExp
|
||||
CLASS_PROTOTYPE: (lib)/set/Set
|
||||
CLASS_PROTOTYPE: Set
|
||||
CLASS_PROTOTYPE: (lib)/string/String
|
||||
CLASS_PROTOTYPE: String
|
||||
FUNCTION_PROTOTYPE: parseInt
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseInt
|
||||
FUNCTION_PROTOTYPE: parseI32
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI32
|
||||
FUNCTION_PROTOTYPE: parseI64
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI64
|
||||
FUNCTION_PROTOTYPE: parseFloat
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseFloat
|
||||
FUNCTION_PROTOTYPE: allocate_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/allocate_memory
|
||||
FUNCTION_PROTOTYPE: free_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/free_memory
|
||||
FUNCTION_PROTOTYPE: reset_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/allocator/arena/reset_memory
|
||||
;)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2168,125 +2168,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
CLASS_PROTOTYPE: (lib)/array/Array
|
||||
PROPERTY: (lib)/array/Array#length
|
||||
CLASS_PROTOTYPE: Array
|
||||
CLASS_PROTOTYPE: (lib)/array/CArray
|
||||
CLASS_PROTOTYPE: CArray
|
||||
CLASS_PROTOTYPE: (lib)/error/Error
|
||||
CLASS_PROTOTYPE: Error
|
||||
CLASS_PROTOTYPE: (lib)/error/RangeError
|
||||
CLASS_PROTOTYPE: RangeError
|
||||
CLASS_PROTOTYPE: (lib)/map/Map
|
||||
PROPERTY: (lib)/map/Map#size
|
||||
CLASS_PROTOTYPE: Map
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/copy_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/move_memory
|
||||
FUNCTION_PROTOTYPE: move_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/set_memory
|
||||
FUNCTION_PROTOTYPE: set_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/compare_memory
|
||||
FUNCTION_PROTOTYPE: compare_memory
|
||||
CLASS_PROTOTYPE: (lib)/regexp/RegExp
|
||||
CLASS_PROTOTYPE: RegExp
|
||||
CLASS_PROTOTYPE: (lib)/set/Set
|
||||
PROPERTY: (lib)/set/Set#size
|
||||
CLASS_PROTOTYPE: Set
|
||||
GLOBAL: (lib)/string/EMPTY
|
||||
GLOBAL: (lib)/string/HEAD
|
||||
FUNCTION_PROTOTYPE: (lib)/string/allocate
|
||||
CLASS_PROTOTYPE: (lib)/string/String
|
||||
FUNCTION_PROTOTYPE: (lib)/string/String.__concat
|
||||
FUNCTION_PROTOTYPE: (lib)/string/String.__eq
|
||||
CLASS_PROTOTYPE: String
|
||||
FUNCTION_PROTOTYPE: (lib)/string/isWhiteSpaceOrLineTerminator
|
||||
ENUM: (lib)/string/CharCode
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseInt
|
||||
FUNCTION_PROTOTYPE: parseInt
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI32
|
||||
FUNCTION_PROTOTYPE: parseI32
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI64
|
||||
FUNCTION_PROTOTYPE: parseI64
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parse
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseFloat
|
||||
FUNCTION_PROTOTYPE: parseFloat
|
||||
GLOBAL: std/string/str
|
||||
FUNCTION_PROTOTYPE: std/string/getString
|
||||
[program.exports]
|
||||
CLASS_PROTOTYPE: (lib)/array/Array
|
||||
CLASS_PROTOTYPE: Array
|
||||
CLASS_PROTOTYPE: (lib)/array/CArray
|
||||
CLASS_PROTOTYPE: CArray
|
||||
CLASS_PROTOTYPE: (lib)/error/Error
|
||||
CLASS_PROTOTYPE: Error
|
||||
CLASS_PROTOTYPE: (lib)/error/RangeError
|
||||
CLASS_PROTOTYPE: RangeError
|
||||
CLASS_PROTOTYPE: (lib)/map/Map
|
||||
CLASS_PROTOTYPE: Map
|
||||
FUNCTION_PROTOTYPE: move_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/move_memory
|
||||
FUNCTION_PROTOTYPE: set_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/set_memory
|
||||
FUNCTION_PROTOTYPE: compare_memory
|
||||
FUNCTION_PROTOTYPE: (lib)/memory/compare_memory
|
||||
CLASS_PROTOTYPE: (lib)/regexp/RegExp
|
||||
CLASS_PROTOTYPE: RegExp
|
||||
CLASS_PROTOTYPE: (lib)/set/Set
|
||||
CLASS_PROTOTYPE: Set
|
||||
CLASS_PROTOTYPE: (lib)/string/String
|
||||
CLASS_PROTOTYPE: String
|
||||
FUNCTION_PROTOTYPE: parseInt
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseInt
|
||||
FUNCTION_PROTOTYPE: parseI32
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI32
|
||||
FUNCTION_PROTOTYPE: parseI64
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseI64
|
||||
FUNCTION_PROTOTYPE: parseFloat
|
||||
FUNCTION_PROTOTYPE: (lib)/string/parseFloat
|
||||
FUNCTION_PROTOTYPE: std/string/getString
|
||||
;)
|
||||
|
@ -12,10 +12,8 @@
|
||||
(if
|
||||
(i32.ne
|
||||
(tee_local $1
|
||||
;;@ switch.ts:2:10
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ switch.ts:3:9
|
||||
(i32.const 1)
|
||||
)
|
||||
(block
|
||||
@ -28,12 +26,10 @@
|
||||
(i32.or
|
||||
(i32.eq
|
||||
(get_local $1)
|
||||
;;@ switch.ts:8:9
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.eq
|
||||
(get_local $1)
|
||||
;;@ switch.ts:9:9
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
@ -41,17 +37,14 @@
|
||||
(br $case2|0)
|
||||
)
|
||||
)
|
||||
;;@ switch.ts:4:13
|
||||
(return
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ switch.ts:7:13
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
;;@ switch.ts:10:13
|
||||
(i32.const 23)
|
||||
)
|
||||
(func $switch/doSwitchDefaultFirst (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
@ -60,10 +53,8 @@
|
||||
(if
|
||||
(i32.ne
|
||||
(tee_local $1
|
||||
;;@ switch.ts:15:10
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ switch.ts:18:9
|
||||
(i32.const 1)
|
||||
)
|
||||
(block
|
||||
@ -71,42 +62,34 @@
|
||||
(i32.or
|
||||
(i32.eq
|
||||
(get_local $1)
|
||||
;;@ switch.ts:20:9
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.eq
|
||||
(get_local $1)
|
||||
;;@ switch.ts:21:9
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ switch.ts:17:13
|
||||
(return
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ switch.ts:19:13
|
||||
(return
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ switch.ts:22:13
|
||||
(i32.const 23)
|
||||
)
|
||||
(func $switch/doSwitchDefaultOmitted (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(local $1 i32)
|
||||
;;@ switch.ts:27:2
|
||||
(block $break|0
|
||||
(block $case2|0
|
||||
(if
|
||||
(i32.ne
|
||||
(tee_local $1
|
||||
;;@ switch.ts:27:10
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ switch.ts:28:9
|
||||
(i32.const 1)
|
||||
)
|
||||
(block
|
||||
@ -114,12 +97,10 @@
|
||||
(i32.or
|
||||
(i32.eq
|
||||
(get_local $1)
|
||||
;;@ switch.ts:30:9
|
||||
(i32.const 2)
|
||||
)
|
||||
(i32.eq
|
||||
(get_local $1)
|
||||
;;@ switch.ts:31:9
|
||||
(i32.const 3)
|
||||
)
|
||||
)
|
||||
@ -127,17 +108,14 @@
|
||||
(br $break|0)
|
||||
)
|
||||
)
|
||||
;;@ switch.ts:29:13
|
||||
(return
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ switch.ts:32:13
|
||||
(return
|
||||
(i32.const 23)
|
||||
)
|
||||
)
|
||||
;;@ switch.ts:34:9
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
|
@ -170,56 +170,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: switch/doSwitch
|
||||
FUNCTION_PROTOTYPE: switch/doSwitchDefaultFirst
|
||||
FUNCTION_PROTOTYPE: switch/doSwitchDefaultOmitted
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: switch/doSwitch
|
||||
FUNCTION_PROTOTYPE: switch/doSwitchDefaultFirst
|
||||
FUNCTION_PROTOTYPE: switch/doSwitchDefaultOmitted
|
||||
;)
|
||||
|
@ -5,15 +5,12 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
;;@ ternary.ts:7:0
|
||||
(set_global $ternary/a
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ ternary.ts:8:0
|
||||
(set_global $ternary/a
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ ternary.ts:9:0
|
||||
(set_global $ternary/a
|
||||
(i32.const 1)
|
||||
)
|
||||
|
@ -85,52 +85,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: ternary/a
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -1,196 +1,191 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $iiv (func (param i32 i32)))
|
||||
(type $iiiv (func (param i32 i32 i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\07\00\00\00t\00l\00s\00f\00.\00t\00s")
|
||||
(export "control$construct" (func $tlsf/control$construct))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $tlsf/fls (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func $tlsf/fls (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(select
|
||||
;;@ tlsf.ts:7:21
|
||||
(i32.sub
|
||||
(i32.const 31)
|
||||
;;@ tlsf.ts:7:26
|
||||
(i32.clz
|
||||
;;@ tlsf.ts:7:35
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(i32.const -1)
|
||||
;;@ tlsf.ts:7:10
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $tlsf/ffs (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func $tlsf/ffs (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(select
|
||||
;;@ tlsf.ts:17:22
|
||||
(i32.ctz
|
||||
;;@ tlsf.ts:17:31
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const -1)
|
||||
;;@ tlsf.ts:17:10
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
(func $tlsf/control$set_block (; 2 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
|
||||
;;@ tlsf.ts:173:2
|
||||
(func $tlsf/block$set_next_free (; 3 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(i32.store
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 8)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $tlsf/block$set_prev_free (; 4 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(i32.store
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 12)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $tlsf/control$set_fl_bitmap (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(i32.store
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 16)
|
||||
)
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $tlsf/control$set_sl_bitmap (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(if
|
||||
;;@ tlsf.ts:173:9
|
||||
(i32.ge_u
|
||||
(get_local $1)
|
||||
;;@ tlsf.ts:173:19
|
||||
(i32.const 23)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
;;@ tlsf.ts:174:2
|
||||
(if
|
||||
;;@ tlsf.ts:174:9
|
||||
(i32.ge_u
|
||||
(get_local $2)
|
||||
;;@ tlsf.ts:174:19
|
||||
(i32.const 32)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 162)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
;;@ tlsf.ts:175:2
|
||||
(i32.store
|
||||
;;@ tlsf.ts:175:15
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
;;@ tlsf.ts:175:21
|
||||
(i32.const 112)
|
||||
(i32.const 20)
|
||||
)
|
||||
;;@ tlsf.ts:175:45
|
||||
(i32.mul
|
||||
(i32.add
|
||||
;;@ tlsf.ts:175:46
|
||||
(i32.mul
|
||||
(get_local $1)
|
||||
;;@ tlsf.ts:175:56
|
||||
(i32.const 32)
|
||||
)
|
||||
;;@ tlsf.ts:175:73
|
||||
(get_local $2)
|
||||
)
|
||||
;;@ tlsf.ts:175:84
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $tlsf/control$set_block (; 7 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
|
||||
(if
|
||||
(i32.ge_u
|
||||
(get_local $1)
|
||||
(i32.const 23)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 173)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(if
|
||||
(i32.ge_u
|
||||
(get_local $2)
|
||||
(i32.const 32)
|
||||
)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 174)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(i32.store
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $0)
|
||||
(i32.const 112)
|
||||
)
|
||||
(i32.mul
|
||||
(i32.add
|
||||
(i32.mul
|
||||
(get_local $1)
|
||||
(i32.const 32)
|
||||
)
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:175:101
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(func $tlsf/control$construct (; 3 ;) (type $iv) (param $0 i32)
|
||||
(func $tlsf/control$construct (; 8 ;) (type $iv) (param $0 i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
(local $3 i32)
|
||||
(i32.store
|
||||
(i32.add
|
||||
(tee_local $3
|
||||
;;@ tlsf.ts:180:22
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 8)
|
||||
)
|
||||
(tee_local $1
|
||||
;;@ tlsf.ts:180:27
|
||||
(get_local $0)
|
||||
)
|
||||
(call $tlsf/block$set_next_free
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.store
|
||||
(i32.add
|
||||
(tee_local $3
|
||||
;;@ tlsf.ts:181:22
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 12)
|
||||
)
|
||||
(tee_local $1
|
||||
;;@ tlsf.ts:181:27
|
||||
(get_local $0)
|
||||
)
|
||||
(call $tlsf/block$set_prev_free
|
||||
(get_local $0)
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.store
|
||||
(i32.add
|
||||
(tee_local $1
|
||||
;;@ tlsf.ts:182:24
|
||||
(get_local $0)
|
||||
)
|
||||
(i32.const 16)
|
||||
)
|
||||
(call $tlsf/control$set_fl_bitmap
|
||||
(get_local $0)
|
||||
(i32.const 0)
|
||||
)
|
||||
(loop $continue|0
|
||||
(if
|
||||
;;@ tlsf.ts:183:31
|
||||
(i32.lt_u
|
||||
(get_local $2)
|
||||
;;@ tlsf.ts:183:41
|
||||
(get_local $1)
|
||||
(i32.const 23)
|
||||
)
|
||||
(block
|
||||
(set_local $3
|
||||
;;@ tlsf.ts:184:26
|
||||
(call $tlsf/control$set_sl_bitmap
|
||||
(get_local $0)
|
||||
)
|
||||
(if
|
||||
(i32.ge_u
|
||||
(tee_local $1
|
||||
;;@ tlsf.ts:184:31
|
||||
(get_local $2)
|
||||
)
|
||||
(i32.const 23)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
(i32.store
|
||||
(i32.add
|
||||
(i32.add
|
||||
(get_local $3)
|
||||
(i32.const 20)
|
||||
)
|
||||
(i32.mul
|
||||
(get_local $1)
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
(get_local $1)
|
||||
(i32.const 0)
|
||||
)
|
||||
;;@ tlsf.ts:185:9
|
||||
(set_local $1
|
||||
;;@ tlsf.ts:185:30
|
||||
(set_local $2
|
||||
(i32.const 0)
|
||||
)
|
||||
(loop $continue|1
|
||||
(if
|
||||
;;@ tlsf.ts:185:33
|
||||
(i32.lt_u
|
||||
(get_local $1)
|
||||
;;@ tlsf.ts:185:43
|
||||
(get_local $2)
|
||||
(i32.const 32)
|
||||
)
|
||||
(block
|
||||
;;@ tlsf.ts:186:6
|
||||
(call $tlsf/control$set_block
|
||||
;;@ tlsf.ts:186:24
|
||||
(get_local $0)
|
||||
;;@ tlsf.ts:186:29
|
||||
(get_local $2)
|
||||
;;@ tlsf.ts:186:38
|
||||
(get_local $1)
|
||||
;;@ tlsf.ts:186:47
|
||||
(get_local $2)
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ tlsf.ts:185:59
|
||||
(set_local $1
|
||||
(set_local $2
|
||||
(i32.add
|
||||
;;@ tlsf.ts:185:61
|
||||
(get_local $1)
|
||||
(get_local $2)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
@ -198,11 +193,9 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:183:57
|
||||
(set_local $2
|
||||
(set_local $1
|
||||
(i32.add
|
||||
;;@ tlsf.ts:183:59
|
||||
(get_local $2)
|
||||
(get_local $1)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
@ -211,93 +204,122 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $start (; 4 ;) (type $v)
|
||||
;;@ tlsf.ts:10:0
|
||||
(func $start (; 9 ;) (type $v)
|
||||
(if
|
||||
;;@ tlsf.ts:10:7
|
||||
(i32.ne
|
||||
(call $tlsf/fls
|
||||
;;@ tlsf.ts:10:11
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const -1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 10)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:11:0
|
||||
(if
|
||||
;;@ tlsf.ts:11:7
|
||||
(call $tlsf/fls
|
||||
;;@ tlsf.ts:11:11
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 11)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:12:0
|
||||
(if
|
||||
;;@ tlsf.ts:12:7
|
||||
(i32.ne
|
||||
(call $tlsf/fls
|
||||
;;@ tlsf.ts:12:11
|
||||
(i32.const -2147483640)
|
||||
)
|
||||
;;@ tlsf.ts:12:26
|
||||
(i32.const 31)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 12)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:13:0
|
||||
(if
|
||||
;;@ tlsf.ts:13:7
|
||||
(i32.ne
|
||||
(call $tlsf/fls
|
||||
;;@ tlsf.ts:13:11
|
||||
(i32.const 2147483647)
|
||||
)
|
||||
;;@ tlsf.ts:13:26
|
||||
(i32.const 30)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 13)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:20:0
|
||||
(if
|
||||
;;@ tlsf.ts:20:7
|
||||
(i32.ne
|
||||
(call $tlsf/ffs
|
||||
;;@ tlsf.ts:20:11
|
||||
(i32.const 0)
|
||||
)
|
||||
(i32.const -1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 20)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:21:0
|
||||
(if
|
||||
;;@ tlsf.ts:21:7
|
||||
(call $tlsf/ffs
|
||||
;;@ tlsf.ts:21:11
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 21)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:22:0
|
||||
(if
|
||||
;;@ tlsf.ts:22:7
|
||||
(i32.ne
|
||||
(call $tlsf/ffs
|
||||
;;@ tlsf.ts:22:11
|
||||
(i32.const -2147483648)
|
||||
)
|
||||
;;@ tlsf.ts:22:26
|
||||
(i32.const 31)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 22)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:190:0
|
||||
(call $tlsf/control$construct
|
||||
;;@ tlsf.ts:190:18
|
||||
(i32.load
|
||||
;;@ tlsf.ts:190:30
|
||||
(i32.const 4)
|
||||
)
|
||||
)
|
||||
|
@ -1,11 +1,12 @@
|
||||
(module
|
||||
(type $ii (func (param i32) (result i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $i (func (result i32)))
|
||||
(type $iiv (func (param i32 i32)))
|
||||
(type $iiiv (func (param i32 i32 i32)))
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $iv (func (param i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $tlsf/ALIGN_SIZE_LOG2 i32 (i32.const 3))
|
||||
(global $tlsf/ALIGN_SIZE i32 (i32.const 8))
|
||||
(global $tlsf/SL_INDEX_COUNT_LOG2 i32 (i32.const 5))
|
||||
@ -29,12 +30,13 @@
|
||||
(global $tlsf/CONTROL$SL_BITMAP_OFFSET i32 (i32.const 20))
|
||||
(global $tlsf/CONTROL$BLOCKS_OFFSET i32 (i32.const 112))
|
||||
(global $tlsf/CONTROL$SIZE i32 (i32.const 3056))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 28))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\07\00\00\00t\00l\00s\00f\00.\00t\00s\00")
|
||||
(export "control$construct" (func $tlsf/control$construct))
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $tlsf/fls (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func $tlsf/fls (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
;;@ tlsf.ts:7:39
|
||||
(return
|
||||
;;@ tlsf.ts:7:9
|
||||
@ -61,7 +63,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $tlsf/ffs (; 1 ;) (type $ii) (param $0 i32) (result i32)
|
||||
(func $tlsf/ffs (; 2 ;) (type $ii) (param $0 i32) (result i32)
|
||||
;;@ tlsf.ts:17:35
|
||||
(return
|
||||
;;@ tlsf.ts:17:9
|
||||
@ -84,7 +86,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $tlsf/block$set_next_free (; 2 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(func $tlsf/block$set_next_free (; 3 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
;;@ tlsf.ts:89:2
|
||||
(i32.store
|
||||
;;@ tlsf.ts:89:15
|
||||
@ -97,7 +99,7 @@
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $tlsf/block$set_prev_free (; 3 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(func $tlsf/block$set_prev_free (; 4 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
;;@ tlsf.ts:97:2
|
||||
(i32.store
|
||||
;;@ tlsf.ts:97:15
|
||||
@ -110,7 +112,7 @@
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $tlsf/control$set_fl_bitmap (; 4 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
(func $tlsf/control$set_fl_bitmap (; 5 ;) (type $iiv) (param $0 i32) (param $1 i32)
|
||||
;;@ tlsf.ts:153:2
|
||||
(i32.store
|
||||
;;@ tlsf.ts:153:13
|
||||
@ -123,7 +125,7 @@
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
(func $tlsf/control$set_sl_bitmap (; 5 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
(func $tlsf/control$set_sl_bitmap (; 6 ;) (type $iiiv) (param $0 i32) (param $1 i32) (param $2 i32)
|
||||
;;@ tlsf.ts:162:2
|
||||
(if
|
||||
(i32.eqz
|
||||
@ -134,7 +136,15 @@
|
||||
(i32.const 23)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 162)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:163:2
|
||||
(i32.store
|
||||
@ -156,7 +166,7 @@
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
(func $tlsf/control$set_block (; 6 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
|
||||
(func $tlsf/control$set_block (; 7 ;) (type $iiiiv) (param $0 i32) (param $1 i32) (param $2 i32) (param $3 i32)
|
||||
;;@ tlsf.ts:173:2
|
||||
(if
|
||||
(i32.eqz
|
||||
@ -167,7 +177,15 @@
|
||||
(i32.const 23)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 173)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:174:2
|
||||
(if
|
||||
@ -179,7 +197,15 @@
|
||||
(i32.const 32)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 174)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:175:2
|
||||
(i32.store
|
||||
@ -210,7 +236,7 @@
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
(func $tlsf/control$construct (; 7 ;) (type $iv) (param $0 i32)
|
||||
(func $tlsf/control$construct (; 8 ;) (type $iv) (param $0 i32)
|
||||
(local $1 i32)
|
||||
(local $2 i32)
|
||||
;;@ tlsf.ts:180:2
|
||||
@ -315,7 +341,7 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(func $start (; 8 ;) (type $v)
|
||||
(func $start (; 9 ;) (type $v)
|
||||
;;@ tlsf.ts:10:0
|
||||
(if
|
||||
(i32.eqz
|
||||
@ -333,7 +359,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 10)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:11:0
|
||||
(if
|
||||
@ -348,7 +382,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 11)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:12:0
|
||||
(if
|
||||
@ -363,7 +405,15 @@
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 12)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:13:0
|
||||
(if
|
||||
@ -378,7 +428,15 @@
|
||||
(i32.const 30)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 13)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:20:0
|
||||
(if
|
||||
@ -397,7 +455,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 20)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:21:0
|
||||
(if
|
||||
@ -412,7 +478,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 21)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:22:0
|
||||
(if
|
||||
@ -427,7 +501,15 @@
|
||||
(i32.const 31)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 22)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:29:0
|
||||
(if
|
||||
@ -439,7 +521,15 @@
|
||||
(i32.const 8)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 29)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ tlsf.ts:190:0
|
||||
(call $tlsf/control$construct
|
||||
@ -451,102 +541,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: tlsf/fls
|
||||
FUNCTION_PROTOTYPE: tlsf/ffs
|
||||
GLOBAL: tlsf/ALIGN_SIZE_LOG2
|
||||
GLOBAL: tlsf/ALIGN_SIZE
|
||||
GLOBAL: tlsf/SL_INDEX_COUNT_LOG2
|
||||
GLOBAL: tlsf/FL_INDEX_MAX
|
||||
GLOBAL: tlsf/SL_INDEX_COUNT
|
||||
GLOBAL: tlsf/FL_INDEX_SHIFT
|
||||
GLOBAL: tlsf/FL_INDEX_COUNT
|
||||
GLOBAL: tlsf/SMALL_BLOCK_SIZE
|
||||
GLOBAL: tlsf/BLOCK$PREV_PHYS_BLOCK_OFFSET
|
||||
GLOBAL: tlsf/BLOCK$TAGGED_SIZE_OFFSET
|
||||
GLOBAL: tlsf/BLOCK$NEXT_FREE_OFFSET
|
||||
GLOBAL: tlsf/BLOCK$PREV_FREE_OFFSET
|
||||
GLOBAL: tlsf/BLOCK$SIZE
|
||||
GLOBAL: tlsf/BLOCK_HEADER_FREE_BIT
|
||||
GLOBAL: tlsf/BLOCK_HEADER_PREV_FREE_BIT
|
||||
GLOBAL: tlsf/BLOCK_OVERHEAD
|
||||
GLOBAL: tlsf/BLOCK_START_OFFSET
|
||||
GLOBAL: tlsf/BLOCK_SIZE_MIN
|
||||
GLOBAL: tlsf/BLOCK_SIZE_MAX
|
||||
FUNCTION_PROTOTYPE: tlsf/block$get_prev_phys_block
|
||||
FUNCTION_PROTOTYPE: tlsf/block$set_prev_phys_block
|
||||
FUNCTION_PROTOTYPE: tlsf/block$get_tagged_size
|
||||
FUNCTION_PROTOTYPE: tlsf/block$set_tagged_size
|
||||
FUNCTION_PROTOTYPE: tlsf/block_size
|
||||
FUNCTION_PROTOTYPE: tlsf/block_set_size
|
||||
FUNCTION_PROTOTYPE: tlsf/block$get_next_free
|
||||
FUNCTION_PROTOTYPE: tlsf/block$set_next_free
|
||||
FUNCTION_PROTOTYPE: tlsf/block$get_prev_free
|
||||
FUNCTION_PROTOTYPE: tlsf/block$set_prev_free
|
||||
FUNCTION_PROTOTYPE: tlsf/block_is_last
|
||||
FUNCTION_PROTOTYPE: tlsf/block_is_free
|
||||
FUNCTION_PROTOTYPE: tlsf/block_set_free
|
||||
FUNCTION_PROTOTYPE: tlsf/block_set_used
|
||||
FUNCTION_PROTOTYPE: tlsf/block_is_prev_free
|
||||
FUNCTION_PROTOTYPE: tlsf/block_set_prev_free
|
||||
FUNCTION_PROTOTYPE: tlsf/block_set_prev_used
|
||||
FUNCTION_PROTOTYPE: tlsf/block_from_ptr
|
||||
FUNCTION_PROTOTYPE: tlsf/block_to_ptr
|
||||
GLOBAL: tlsf/CONTROL$FL_BITMAP_OFFSET
|
||||
GLOBAL: tlsf/CONTROL$SL_BITMAP_OFFSET
|
||||
GLOBAL: tlsf/CONTROL$BLOCKS_OFFSET
|
||||
GLOBAL: tlsf/CONTROL$SIZE
|
||||
FUNCTION_PROTOTYPE: tlsf/control$get_fl_bitmap
|
||||
FUNCTION_PROTOTYPE: tlsf/control$set_fl_bitmap
|
||||
FUNCTION_PROTOTYPE: tlsf/control$get_sl_bitmap
|
||||
FUNCTION_PROTOTYPE: tlsf/control$set_sl_bitmap
|
||||
FUNCTION_PROTOTYPE: tlsf/control$get_block
|
||||
FUNCTION_PROTOTYPE: tlsf/control$set_block
|
||||
FUNCTION_PROTOTYPE: tlsf/control$construct
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: tlsf/control$construct
|
||||
;)
|
||||
|
@ -6,7 +6,6 @@
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $typealias/alias (; 0 ;) (type $ii) (param $0 i32) (result i32)
|
||||
;;@ typealias.ts:4:9
|
||||
(get_local $0)
|
||||
)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
|
@ -16,52 +16,3 @@
|
||||
(nop)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
FUNCTION_PROTOTYPE: typealias/alias
|
||||
[program.exports]
|
||||
FUNCTION_PROTOTYPE: typealias/alias
|
||||
;)
|
||||
|
@ -12,86 +12,63 @@
|
||||
(local $1 i64)
|
||||
(local $2 f32)
|
||||
(local $3 f64)
|
||||
;;@ unary.ts:15:0
|
||||
(set_global $unary/i
|
||||
(i32.add
|
||||
;;@ unary.ts:15:2
|
||||
(get_global $unary/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:16:0
|
||||
(set_global $unary/i
|
||||
(i32.sub
|
||||
;;@ unary.ts:16:2
|
||||
(get_global $unary/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:17:0
|
||||
(set_global $unary/i
|
||||
(i32.add
|
||||
(get_global $unary/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:18:0
|
||||
(set_global $unary/i
|
||||
(i32.sub
|
||||
(get_global $unary/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:20:0
|
||||
(set_global $unary/i
|
||||
;;@ unary.ts:20:4
|
||||
(i32.add
|
||||
(get_global $unary/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_global $unary/i
|
||||
(i32.sub
|
||||
(get_global $unary/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(set_global $unary/i
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ unary.ts:21:0
|
||||
(set_global $unary/i
|
||||
(i32.const -1)
|
||||
)
|
||||
;;@ unary.ts:22:0
|
||||
(set_global $unary/i
|
||||
(i32.const 0)
|
||||
)
|
||||
;;@ unary.ts:23:0
|
||||
(set_global $unary/i
|
||||
(i32.const -2)
|
||||
)
|
||||
;;@ unary.ts:25:0
|
||||
(set_global $unary/i
|
||||
;;@ unary.ts:25:4
|
||||
(i32.sub
|
||||
(i32.const 0)
|
||||
;;@ unary.ts:25:5
|
||||
(get_global $unary/i)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:26:0
|
||||
(set_global $unary/i
|
||||
;;@ unary.ts:26:4
|
||||
(i32.eqz
|
||||
;;@ unary.ts:26:5
|
||||
(get_global $unary/i)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:27:0
|
||||
(set_global $unary/i
|
||||
;;@ unary.ts:27:4
|
||||
(i32.xor
|
||||
;;@ unary.ts:27:5
|
||||
(get_global $unary/i)
|
||||
(i32.const -1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:28:0
|
||||
(set_global $unary/i
|
||||
;;@ unary.ts:28:4
|
||||
(block (result i32)
|
||||
(set_global $unary/i
|
||||
(i32.add
|
||||
;;@ unary.ts:28:6
|
||||
(get_global $unary/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -99,13 +76,10 @@
|
||||
(get_global $unary/i)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:29:0
|
||||
(set_global $unary/i
|
||||
;;@ unary.ts:29:4
|
||||
(block (result i32)
|
||||
(set_global $unary/i
|
||||
(i32.sub
|
||||
;;@ unary.ts:29:6
|
||||
(get_global $unary/i)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -113,9 +87,7 @@
|
||||
(get_global $unary/i)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:30:0
|
||||
(set_global $unary/i
|
||||
;;@ unary.ts:30:4
|
||||
(block (result i32)
|
||||
(set_global $unary/i
|
||||
(i32.add
|
||||
@ -128,9 +100,7 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:31:0
|
||||
(set_global $unary/i
|
||||
;;@ unary.ts:31:4
|
||||
(block (result i32)
|
||||
(set_global $unary/i
|
||||
(i32.sub
|
||||
@ -143,88 +113,65 @@
|
||||
(get_local $0)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:39:0
|
||||
(set_global $unary/I
|
||||
(i64.add
|
||||
;;@ unary.ts:39:2
|
||||
(get_global $unary/I)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:40:0
|
||||
(set_global $unary/I
|
||||
(i64.sub
|
||||
;;@ unary.ts:40:2
|
||||
(get_global $unary/I)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:41:0
|
||||
(set_global $unary/I
|
||||
(i64.add
|
||||
(get_global $unary/I)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:42:0
|
||||
(set_global $unary/I
|
||||
(i64.sub
|
||||
(get_global $unary/I)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:44:0
|
||||
(set_global $unary/I
|
||||
;;@ unary.ts:44:4
|
||||
(i64.add
|
||||
(get_global $unary/I)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
(set_global $unary/I
|
||||
(i64.sub
|
||||
(get_global $unary/I)
|
||||
(i64.const 1)
|
||||
)
|
||||
)
|
||||
(set_global $unary/I
|
||||
(i64.const 1)
|
||||
)
|
||||
;;@ unary.ts:45:0
|
||||
(set_global $unary/I
|
||||
(i64.const -1)
|
||||
)
|
||||
;;@ unary.ts:46:0
|
||||
(set_global $unary/I
|
||||
(i64.const 0)
|
||||
)
|
||||
;;@ unary.ts:47:0
|
||||
(set_global $unary/I
|
||||
(i64.const -2)
|
||||
)
|
||||
;;@ unary.ts:49:0
|
||||
(set_global $unary/I
|
||||
;;@ unary.ts:49:4
|
||||
(i64.sub
|
||||
(i64.const 0)
|
||||
;;@ unary.ts:49:5
|
||||
(get_global $unary/I)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:50:0
|
||||
(set_global $unary/I
|
||||
;;@ unary.ts:50:4
|
||||
(i64.extend_s/i32
|
||||
(i64.eqz
|
||||
;;@ unary.ts:50:5
|
||||
(get_global $unary/I)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:51:0
|
||||
(set_global $unary/I
|
||||
;;@ unary.ts:51:4
|
||||
(i64.xor
|
||||
;;@ unary.ts:51:5
|
||||
(get_global $unary/I)
|
||||
(i64.const -1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:52:0
|
||||
(set_global $unary/I
|
||||
;;@ unary.ts:52:4
|
||||
(block (result i64)
|
||||
(set_global $unary/I
|
||||
(i64.add
|
||||
;;@ unary.ts:52:6
|
||||
(get_global $unary/I)
|
||||
(i64.const 1)
|
||||
)
|
||||
@ -232,13 +179,10 @@
|
||||
(get_global $unary/I)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:53:0
|
||||
(set_global $unary/I
|
||||
;;@ unary.ts:53:4
|
||||
(block (result i64)
|
||||
(set_global $unary/I
|
||||
(i64.sub
|
||||
;;@ unary.ts:53:6
|
||||
(get_global $unary/I)
|
||||
(i64.const 1)
|
||||
)
|
||||
@ -246,9 +190,7 @@
|
||||
(get_global $unary/I)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:54:0
|
||||
(set_global $unary/I
|
||||
;;@ unary.ts:54:4
|
||||
(block (result i64)
|
||||
(set_global $unary/I
|
||||
(i64.add
|
||||
@ -261,9 +203,7 @@
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:55:0
|
||||
(set_global $unary/I
|
||||
;;@ unary.ts:55:4
|
||||
(block (result i64)
|
||||
(set_global $unary/I
|
||||
(i64.sub
|
||||
@ -276,73 +216,54 @@
|
||||
(get_local $1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:62:0
|
||||
(set_global $unary/f
|
||||
(f32.add
|
||||
;;@ unary.ts:62:2
|
||||
(get_global $unary/f)
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:63:0
|
||||
(set_global $unary/f
|
||||
(f32.sub
|
||||
;;@ unary.ts:63:2
|
||||
(get_global $unary/f)
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:64:0
|
||||
(set_global $unary/f
|
||||
(f32.add
|
||||
(get_global $unary/f)
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:65:0
|
||||
(set_global $unary/f
|
||||
(f32.sub
|
||||
(get_global $unary/f)
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:67:0
|
||||
(set_global $unary/f
|
||||
;;@ unary.ts:67:4
|
||||
(f32.add
|
||||
(get_global $unary/f)
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
(set_global $unary/f
|
||||
(f32.sub
|
||||
(get_global $unary/f)
|
||||
(f32.const 1)
|
||||
)
|
||||
)
|
||||
(set_global $unary/f
|
||||
(f32.const 1.25)
|
||||
)
|
||||
;;@ unary.ts:68:0
|
||||
(set_global $unary/f
|
||||
(f32.const -1.25)
|
||||
)
|
||||
;;@ unary.ts:69:0
|
||||
(set_global $unary/i
|
||||
(i32.const 0)
|
||||
)
|
||||
;;@ unary.ts:71:0
|
||||
(set_global $unary/f
|
||||
;;@ unary.ts:71:4
|
||||
(f32.neg
|
||||
;;@ unary.ts:71:5
|
||||
(get_global $unary/f)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:72:0
|
||||
(set_global $unary/i
|
||||
;;@ unary.ts:72:4
|
||||
(f32.eq
|
||||
;;@ unary.ts:72:5
|
||||
(get_global $unary/f)
|
||||
(f32.const 0)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:73:0
|
||||
(set_global $unary/f
|
||||
;;@ unary.ts:73:4
|
||||
(block (result f32)
|
||||
(set_global $unary/f
|
||||
(f32.add
|
||||
;;@ unary.ts:73:6
|
||||
(get_global $unary/f)
|
||||
(f32.const 1)
|
||||
)
|
||||
@ -350,13 +271,10 @@
|
||||
(get_global $unary/f)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:74:0
|
||||
(set_global $unary/f
|
||||
;;@ unary.ts:74:4
|
||||
(block (result f32)
|
||||
(set_global $unary/f
|
||||
(f32.sub
|
||||
;;@ unary.ts:74:6
|
||||
(get_global $unary/f)
|
||||
(f32.const 1)
|
||||
)
|
||||
@ -364,9 +282,7 @@
|
||||
(get_global $unary/f)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:75:0
|
||||
(set_global $unary/f
|
||||
;;@ unary.ts:75:4
|
||||
(block (result f32)
|
||||
(set_global $unary/f
|
||||
(f32.add
|
||||
@ -379,9 +295,7 @@
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:76:0
|
||||
(set_global $unary/f
|
||||
;;@ unary.ts:76:4
|
||||
(block (result f32)
|
||||
(set_global $unary/f
|
||||
(f32.sub
|
||||
@ -394,75 +308,56 @@
|
||||
(get_local $2)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:83:0
|
||||
(set_global $unary/F
|
||||
(f64.add
|
||||
;;@ unary.ts:83:2
|
||||
(get_global $unary/F)
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:84:0
|
||||
(set_global $unary/F
|
||||
(f64.sub
|
||||
;;@ unary.ts:84:2
|
||||
(get_global $unary/F)
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:85:0
|
||||
(set_global $unary/F
|
||||
(f64.add
|
||||
(get_global $unary/F)
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:86:0
|
||||
(set_global $unary/F
|
||||
(f64.sub
|
||||
(get_global $unary/F)
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:88:0
|
||||
(set_global $unary/F
|
||||
;;@ unary.ts:88:4
|
||||
(f64.add
|
||||
(get_global $unary/F)
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
(set_global $unary/F
|
||||
(f64.sub
|
||||
(get_global $unary/F)
|
||||
(f64.const 1)
|
||||
)
|
||||
)
|
||||
(set_global $unary/F
|
||||
(f64.const 1.25)
|
||||
)
|
||||
;;@ unary.ts:89:0
|
||||
(set_global $unary/F
|
||||
(f64.const -1.25)
|
||||
)
|
||||
;;@ unary.ts:90:0
|
||||
(set_global $unary/I
|
||||
(i64.const 0)
|
||||
)
|
||||
;;@ unary.ts:92:0
|
||||
(set_global $unary/F
|
||||
;;@ unary.ts:92:4
|
||||
(f64.neg
|
||||
;;@ unary.ts:92:5
|
||||
(get_global $unary/F)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:93:0
|
||||
(set_global $unary/I
|
||||
;;@ unary.ts:93:4
|
||||
(i64.extend_s/i32
|
||||
(f64.eq
|
||||
;;@ unary.ts:93:5
|
||||
(get_global $unary/F)
|
||||
(f64.const 0)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:94:0
|
||||
(set_global $unary/F
|
||||
;;@ unary.ts:94:4
|
||||
(block (result f64)
|
||||
(set_global $unary/F
|
||||
(f64.add
|
||||
;;@ unary.ts:94:6
|
||||
(get_global $unary/F)
|
||||
(f64.const 1)
|
||||
)
|
||||
@ -470,13 +365,10 @@
|
||||
(get_global $unary/F)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:95:0
|
||||
(set_global $unary/F
|
||||
;;@ unary.ts:95:4
|
||||
(block (result f64)
|
||||
(set_global $unary/F
|
||||
(f64.sub
|
||||
;;@ unary.ts:95:6
|
||||
(get_global $unary/F)
|
||||
(f64.const 1)
|
||||
)
|
||||
@ -484,9 +376,7 @@
|
||||
(get_global $unary/F)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:96:0
|
||||
(set_global $unary/F
|
||||
;;@ unary.ts:96:4
|
||||
(block (result f64)
|
||||
(set_global $unary/F
|
||||
(f64.add
|
||||
@ -499,9 +389,7 @@
|
||||
(get_local $3)
|
||||
)
|
||||
)
|
||||
;;@ unary.ts:97:0
|
||||
(set_global $unary/F
|
||||
;;@ unary.ts:97:4
|
||||
(block (result f64)
|
||||
(set_global $unary/F
|
||||
(f64.sub
|
||||
|
@ -739,55 +739,3 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: unary/i
|
||||
GLOBAL: unary/I
|
||||
GLOBAL: unary/f
|
||||
GLOBAL: unary/F
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
@ -1,26 +1,26 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $while/n (mut i32) (i32.const 10))
|
||||
(global $while/m (mut i32) (i32.const 0))
|
||||
(global $while/o (mut i32) (i32.const 0))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\08\00\00\00w\00h\00i\00l\00e\00.\00t\00s")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(local $0 i32)
|
||||
(loop $continue|0
|
||||
(if
|
||||
;;@ while.ts:4:7
|
||||
(get_global $while/n)
|
||||
(block
|
||||
;;@ while.ts:5:2
|
||||
(set_global $while/n
|
||||
(i32.sub
|
||||
(get_global $while/n)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:6:2
|
||||
(set_global $while/m
|
||||
(i32.add
|
||||
(get_global $while/m)
|
||||
@ -31,45 +31,49 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:8:0
|
||||
(if
|
||||
;;@ while.ts:8:7
|
||||
(get_global $while/n)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:9:0
|
||||
(if
|
||||
;;@ while.ts:9:7
|
||||
(i32.ne
|
||||
(get_global $while/m)
|
||||
;;@ while.ts:9:12
|
||||
(i32.const 10)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 9)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:11:0
|
||||
(set_global $while/n
|
||||
;;@ while.ts:11:4
|
||||
(i32.const 10)
|
||||
)
|
||||
;;@ while.ts:12:0
|
||||
(set_global $while/m
|
||||
;;@ while.ts:12:4
|
||||
(i32.const 0)
|
||||
)
|
||||
(loop $continue|1
|
||||
(if
|
||||
;;@ while.ts:14:7
|
||||
(get_global $while/n)
|
||||
(block
|
||||
;;@ while.ts:15:2
|
||||
(set_global $while/n
|
||||
(i32.sub
|
||||
(get_global $while/n)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:16:2
|
||||
(set_global $while/m
|
||||
(i32.add
|
||||
(get_global $while/m)
|
||||
@ -78,17 +82,14 @@
|
||||
)
|
||||
(loop $continue|2
|
||||
(if
|
||||
;;@ while.ts:17:9
|
||||
(get_global $while/n)
|
||||
(block
|
||||
;;@ while.ts:18:4
|
||||
(set_global $while/n
|
||||
(i32.sub
|
||||
(get_global $while/n)
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:19:4
|
||||
(set_global $while/o
|
||||
(i32.add
|
||||
(get_global $while/o)
|
||||
@ -99,65 +100,87 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:21:2
|
||||
(if
|
||||
;;@ while.ts:21:9
|
||||
(get_global $while/n)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 21)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:22:2
|
||||
(if
|
||||
;;@ while.ts:22:9
|
||||
(i32.ne
|
||||
(get_global $while/o)
|
||||
;;@ while.ts:22:14
|
||||
(i32.const 9)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 22)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
(br $continue|1)
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:24:0
|
||||
(if
|
||||
;;@ while.ts:24:7
|
||||
(get_global $while/n)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 24)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:25:0
|
||||
(if
|
||||
;;@ while.ts:25:7
|
||||
(i32.ne
|
||||
(get_global $while/m)
|
||||
;;@ while.ts:25:12
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 25)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:26:0
|
||||
(if
|
||||
;;@ while.ts:26:7
|
||||
(i32.ne
|
||||
(get_global $while/o)
|
||||
;;@ while.ts:26:12
|
||||
(i32.const 9)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 26)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:28:0
|
||||
(set_global $while/n
|
||||
;;@ while.ts:28:4
|
||||
(i32.const 1)
|
||||
)
|
||||
;;@ while.ts:29:0
|
||||
(set_global $while/m
|
||||
;;@ while.ts:29:4
|
||||
(i32.const 0)
|
||||
)
|
||||
(loop $continue|3
|
||||
(br_if $continue|3
|
||||
;;@ while.ts:30:7
|
||||
(if (result i32)
|
||||
(block (result i32)
|
||||
(set_global $while/n
|
||||
@ -170,11 +193,9 @@
|
||||
)
|
||||
(get_local $0)
|
||||
)
|
||||
;;@ while.ts:30:14
|
||||
(block (result i32)
|
||||
(set_global $while/m
|
||||
(i32.add
|
||||
;;@ while.ts:30:16
|
||||
(get_global $while/m)
|
||||
(i32.const 1)
|
||||
)
|
||||
@ -185,24 +206,35 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:31:0
|
||||
(if
|
||||
;;@ while.ts:31:7
|
||||
(i32.ne
|
||||
(get_global $while/n)
|
||||
(i32.const -1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 31)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:32:0
|
||||
(if
|
||||
;;@ while.ts:32:7
|
||||
(i32.ne
|
||||
(get_global $while/m)
|
||||
;;@ while.ts:32:12
|
||||
(i32.const 1)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 32)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
@ -1,13 +1,16 @@
|
||||
(module
|
||||
(type $iiiiv (func (param i32 i32 i32 i32)))
|
||||
(type $v (func))
|
||||
(import "env" "abort" (func $abort (param i32 i32 i32 i32)))
|
||||
(global $while/n (mut i32) (i32.const 10))
|
||||
(global $while/m (mut i32) (i32.const 0))
|
||||
(global $while/o (mut i32) (i32.const 0))
|
||||
(global $HEAP_BASE i32 (i32.const 4))
|
||||
(global $HEAP_BASE i32 (i32.const 28))
|
||||
(memory $0 1)
|
||||
(data (i32.const 8) "\08\00\00\00w\00h\00i\00l\00e\00.\00t\00s\00")
|
||||
(export "memory" (memory $0))
|
||||
(start $start)
|
||||
(func $start (; 0 ;) (type $v)
|
||||
(func $start (; 1 ;) (type $v)
|
||||
(local $0 i32)
|
||||
;;@ while.ts:4:0
|
||||
(block $break|0
|
||||
@ -47,7 +50,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 8)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:9:0
|
||||
(if
|
||||
@ -59,7 +70,15 @@
|
||||
(i32.const 10)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 9)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:11:0
|
||||
(set_global $while/n
|
||||
@ -131,7 +150,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 21)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:22:2
|
||||
(if
|
||||
@ -143,7 +170,15 @@
|
||||
(i32.const 9)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 22)
|
||||
(i32.const 2)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
(br $continue|1)
|
||||
@ -161,7 +196,15 @@
|
||||
(i32.const 0)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 24)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:25:0
|
||||
(if
|
||||
@ -173,7 +216,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 25)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:26:0
|
||||
(if
|
||||
@ -185,7 +236,15 @@
|
||||
(i32.const 9)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 26)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:28:0
|
||||
(set_global $while/n
|
||||
@ -255,7 +314,15 @@
|
||||
)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 31)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
;;@ while.ts:32:0
|
||||
(if
|
||||
@ -267,58 +334,15 @@
|
||||
(i32.const 1)
|
||||
)
|
||||
)
|
||||
(unreachable)
|
||||
(block
|
||||
(call $abort
|
||||
(i32.const 0)
|
||||
(i32.const 8)
|
||||
(i32.const 32)
|
||||
(i32.const 0)
|
||||
)
|
||||
(unreachable)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
(;
|
||||
[program.elements]
|
||||
GLOBAL: NaN
|
||||
GLOBAL: Infinity
|
||||
FUNCTION_PROTOTYPE: isNaN
|
||||
FUNCTION_PROTOTYPE: isFinite
|
||||
FUNCTION_PROTOTYPE: clz
|
||||
FUNCTION_PROTOTYPE: ctz
|
||||
FUNCTION_PROTOTYPE: popcnt
|
||||
FUNCTION_PROTOTYPE: rotl
|
||||
FUNCTION_PROTOTYPE: rotr
|
||||
FUNCTION_PROTOTYPE: abs
|
||||
FUNCTION_PROTOTYPE: max
|
||||
FUNCTION_PROTOTYPE: min
|
||||
FUNCTION_PROTOTYPE: ceil
|
||||
FUNCTION_PROTOTYPE: floor
|
||||
FUNCTION_PROTOTYPE: copysign
|
||||
FUNCTION_PROTOTYPE: nearest
|
||||
FUNCTION_PROTOTYPE: reinterpret
|
||||
FUNCTION_PROTOTYPE: sqrt
|
||||
FUNCTION_PROTOTYPE: trunc
|
||||
FUNCTION_PROTOTYPE: load
|
||||
FUNCTION_PROTOTYPE: store
|
||||
FUNCTION_PROTOTYPE: sizeof
|
||||
FUNCTION_PROTOTYPE: select
|
||||
FUNCTION_PROTOTYPE: unreachable
|
||||
FUNCTION_PROTOTYPE: current_memory
|
||||
FUNCTION_PROTOTYPE: grow_memory
|
||||
FUNCTION_PROTOTYPE: changetype
|
||||
FUNCTION_PROTOTYPE: assert
|
||||
FUNCTION_PROTOTYPE: abort
|
||||
FUNCTION_PROTOTYPE: i8
|
||||
FUNCTION_PROTOTYPE: i16
|
||||
FUNCTION_PROTOTYPE: i32
|
||||
FUNCTION_PROTOTYPE: i64
|
||||
FUNCTION_PROTOTYPE: u8
|
||||
FUNCTION_PROTOTYPE: u16
|
||||
FUNCTION_PROTOTYPE: u32
|
||||
FUNCTION_PROTOTYPE: u64
|
||||
FUNCTION_PROTOTYPE: bool
|
||||
FUNCTION_PROTOTYPE: f32
|
||||
FUNCTION_PROTOTYPE: f64
|
||||
FUNCTION_PROTOTYPE: isize
|
||||
FUNCTION_PROTOTYPE: usize
|
||||
GLOBAL: HEAP_BASE
|
||||
GLOBAL: while/n
|
||||
GLOBAL: while/m
|
||||
GLOBAL: while/o
|
||||
[program.exports]
|
||||
|
||||
;)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user