Assemble kernel on the client #1
6
asm.js
6
asm.js
@@ -1306,7 +1306,7 @@ export class Assembler {
|
||||
...data,
|
||||
]
|
||||
});
|
||||
return [ contents.length ].concat(...contents);
|
||||
return [ contents.length, contents ].flat(Infinity);
|
||||
}
|
||||
|
||||
wasm() {
|
||||
@@ -1326,10 +1326,10 @@ export class Assembler {
|
||||
];
|
||||
const sections = template.map(([ code, generator ]) => {
|
||||
const body = generator();
|
||||
return body == null ? [] : [ code, body.length, ...body ];
|
||||
return body == null ? [] : [ code, body.length, body ];
|
||||
});
|
||||
|
||||
return new Uint8Array(HEADER.concat(...sections));
|
||||
return new Uint8Array([ HEADER, sections ].flat(Infinity));
|
||||
}
|
||||
|
||||
mem_wasm({ flags, init, max }) {
|
||||
|
||||
Reference in New Issue
Block a user