From 950141bc7e672be06e88fb842f4beb1c5b894ff9 Mon Sep 17 00:00:00 2001 From: "yu.dongliang" <18588496441@163.com> Date: Wed, 5 Nov 2025 14:39:21 +0800 Subject: [PATCH] js: fix 'teq' for 'js object' which is a return value of an function call(), for source code as 'if (obj)', 'if (!obj)', or 'if (Boolean(0))', etc. --- examples/js.html | 8 +- html/Makefile | 1 + js/core/scf_dag.c | 12 +- js/core/scf_operator_dag.c | 2 + js/core/scf_optimizer.c | 2 + js/core/scf_optimizer_auto_gc.c | 6 +- js/core/scf_optimizer_auto_gc_find.c | 8 +- js/core/scf_optimizer_inline.c | 6 +- js/core/scf_optimizer_js_teq.c | 176 +++++++++++++++++++++++++++ js/core/scf_optimizer_split_call.c | 2 +- js/core/scf_variable.c | 3 + js/core/scf_variable.h | 1 + js/doc.c | 24 ++++ js/parse/scf_dfa_var.c | 4 + js/parse/scf_parse.c | 4 - ui/Makefile | 1 + 16 files changed, 238 insertions(+), 22 deletions(-) create mode 100644 js/core/scf_optimizer_js_teq.c diff --git a/examples/js.html b/examples/js.html index be3e657..322c052 100644 --- a/examples/js.html +++ b/examples/js.html @@ -8,13 +8,7 @@