Assemble kernel on the client #1
4
asm.js
4
asm.js
@@ -1327,7 +1327,9 @@ export class Assembler {
|
|||||||
];
|
];
|
||||||
const sections = template.map(([ code, generator ]) => {
|
const sections = template.map(([ code, generator ]) => {
|
||||||
const body = generator();
|
const body = generator();
|
||||||
return body == null ? [] : [ code, body.length, body ];
|
if (body == null)
|
||||||
|
return [];
|
||||||
|
return [ code, this.uleb128(body.length), body ];
|
||||||
});
|
});
|
||||||
|
|
||||||
return new Uint8Array([ HEADER, sections ].flat(Infinity));
|
return new Uint8Array([ HEADER, sections ].flat(Infinity));
|
||||||
|
|||||||
Reference in New Issue
Block a user