From 60ccc012533cd5b4476dde91f19200751d778106 Mon Sep 17 00:00:00 2001 From: cong Date: Thu, 11 Jul 2024 01:49:37 +0800 Subject: [PATCH] don't calc already calced frame --- tapset/luajit_gc64.sxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tapset/luajit_gc64.sxx b/tapset/luajit_gc64.sxx index 81d9591..6193c68 100644 --- a/tapset/luajit_gc64.sxx +++ b/tapset/luajit_gc64.sxx @@ -559,13 +559,14 @@ function luajit_debug_dumpstack(L, T, depth, base, simple) depth = dir = -1 } bt = "" + frame = base - @sizeof_TValue + bot = $*L->stack->ptr64 + @sizeof_TValue //@LJ_FR2 while (level != depth) { /* lj_debug_frame(L, level, &size) {{{ */ - bot = $*L->stack->ptr64 + @sizeof_TValue //@LJ_FR2 found_frame = 0 tmp_level = level /* Traverse frames backwards. */ - for (nextframe = frame = base - @sizeof_TValue; frame > bot; ) { + for (; frame > bot; ) { if (@frame_gc(frame) == L) { tmp_level++ }