Skip to content

Commit

Permalink
fix: asm.js allocations adjustments (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Mar 17, 2022
1 parent 3ddb700 commit c6bb168
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/lexer.asm.js
Expand Up @@ -26,9 +26,9 @@ export function parse (_source, _name = '@') {
copy(words, new Uint16Array(asmBuffer, 16, words.length));
asm = asmInit(typeof self !== 'undefined' ? self : global, {}, asmBuffer);
// 2 bytes per string code point
// + analysis space (~4000 imports @ 8 bytes per import)
// + analysis space
// remaining space is stack space
addr = asm.su(source.length * 2 + (2 << 15));
addr = asm.su(source.length * 2 + (2 << 16));
}
const len = source.length + 1;
asm.ses(addr);
Expand Down
4 changes: 2 additions & 2 deletions src/lexer.asm.js
Expand Up @@ -26,9 +26,9 @@ export function parse (_source, _name = '@') {
copy(words, new Uint16Array(asmBuffer, 16, words.length));
asm = asmInit(typeof self !== 'undefined' ? self : global, {}, asmBuffer);
// 2 bytes per string code point
// + analysis space (~4000 imports @ 8 bytes per import)
// + analysis space
// remaining space is stack space
addr = asm.su(source.length * 2 + (2 << 15));
addr = asm.su(source.length * 2 + (2 << 16));
}
const len = source.length + 1;
asm.ses(addr);
Expand Down

0 comments on commit c6bb168

Please sign in to comment.