From: Fabrice Bellard Date: Sat, 21 Nov 2026 14:10:43 +0000 (+0100) Subject: Fix the stack depth of an optional call through a with scope X-Git-Url: https://git.kaiwu.me/http/ngx_http_proxy_module.html?a=commitdiff_plain;h=1eba3837f70a35a32cf3a9a843f9bfb366bc6f6b;p=quickjs.git Fix the stack depth of an optional call through a with scope --- diff --git a/quickjs.c b/quickjs.c index cd8fe1b..9e90533 100644 --- a/quickjs.c +++ b/quickjs.c @@ -27892,6 +27892,7 @@ static __exception int js_parse_postfix_expr(JSParseState *s, int parse_flags) int scope; name = get_u32(fd->byte_code.buf + fd->last_opcode_pos + 1); scope = get_u16(fd->byte_code.buf + fd->last_opcode_pos + 5); + drop_count = 1; if (name == JS_ATOM_eval && call_type == FUNC_CALL_NORMAL && !has_optional_chain) { /* direct 'eval' */ opcode = OP_eval; @@ -27907,9 +27908,9 @@ static __exception int js_parse_postfix_expr(JSParseState *s, int parse_flags) if (has_with_scope(fd, scope)) { opcode = OP_scope_get_ref; fd->byte_code.buf[fd->last_opcode_pos] = opcode; + drop_count = 2; } } - drop_count = 1; } break; case OP_get_super_value: