diff --git a/src/generator/writers/writeStdlib.ts b/src/generator/writers/writeStdlib.ts index 5a6b839e8..0e048687d 100644 --- a/src/generator/writers/writeStdlib.ts +++ b/src/generator/writers/writeStdlib.ts @@ -216,7 +216,7 @@ export function writeStdlib(ctx: WriterContext) { `(cell, (slice, int)) __tact_dict_delete_get(cell dict, int key_len, slice index)`, ); ctx.context("stdlib"); - ctx.asm("(index dict key_len)", "DICTDELGET NULLSWAPIFNOT2"); + ctx.asm("(index dict key_len)", "DICTDELGET NULLSWAPIFNOT"); }); ctx.fun("__tact_dict_delete_get_ref", () => { @@ -224,7 +224,7 @@ export function writeStdlib(ctx: WriterContext) { `(cell, (cell, int)) __tact_dict_delete_get_ref(cell dict, int key_len, slice index)`, ); ctx.context("stdlib"); - ctx.asm("(index dict key_len)", "DICTDELGETREF NULLSWAPIFNOT2"); + ctx.asm("(index dict key_len)", "DICTDELGETREF NULLSWAPIFNOT"); }); ctx.fun("__tact_dict_get_ref", () => { @@ -1389,6 +1389,8 @@ export function writeStdlib(ctx: WriterContext) { ctx.body(() => { ctx.write(` var (old, ok) = null?(v) ? d~${ctx.used(`__tact_dict_delete_get`)}(kl, k) : d~dict_replaceget?(kl, k, begin_cell().store_int(v, vl).end_cell().begin_parse()); + ~dump([old, ok]); + dump_stack(); return (d, ok ? old~load_int(vl) : null()); `); });