Merge branches/quickjs to trunk. This is the way.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3621 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2021-01-02 18:10:00 +00:00
parent d293637741
commit 79022e1e1f
703 changed files with 419987 additions and 30640 deletions

View File

@ -6,16 +6,16 @@ task.onExit = function() {
print("child exited");
};
task.activate();
task.execute({name: "child.js", source: File.readFile("child.js")}).then(async function() {
task.execute({name: "child.js", source: utf8Decode(File.readFile("child.js"))}).then(async function() {
print("child started");
var input = new ArrayBuffer(10);
var input = new Uint8Array(10);
for (var i = 0; i < 10; i++) {
input[i] = i;
}
var test = (await task.getExports()).test;
var output = await test(input);
print("input", input);
print("output", output);
var output = new Uint8Array(await test(input));
print("input", input, input.length, input.byteLength);
print("output", output, output.length, output.byteLength);
for (var i = 0; i < 10; i++) {
print(output[i]);
if (output[i] != i) {