Skip to content

Commit 85d7b32

Browse files
committed
wasm: Remove code related to pushing multiple stack frames
1 parent 31a5722 commit 85d7b32

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

packages/wasm/src/index.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -455,21 +455,17 @@ class Assembler {
455455
this.localSet('ret');
456456
}
457457

458-
pushStackFrame(n = 1) {
459-
if (n === 0) return;
460-
458+
pushStackFrame() {
461459
this.globalGet('sp');
462-
this.i32Const(Assembler.STACK_FRAME_SIZE_BYTES * n);
460+
this.i32Const(Assembler.STACK_FRAME_SIZE_BYTES);
463461
this.i32Sub();
464462
this.globalSet('sp');
465463
this.savePos();
466464
this.saveNumBindings();
467465
}
468466

469-
popStackFrame(n = 1) {
470-
if (n === 0) return;
471-
472-
this.i32Const(Assembler.STACK_FRAME_SIZE_BYTES * n);
467+
popStackFrame() {
468+
this.i32Const(Assembler.STACK_FRAME_SIZE_BYTES);
473469
this.globalGet('sp');
474470
this.i32Add();
475471
this.globalSet('sp');

0 commit comments

Comments
 (0)