From a317fc740cbff071110022859dfa1cf8a1eb0263 Mon Sep 17 00:00:00 2001 From: msojocs Date: Sat, 29 Jul 2023 16:33:59 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E7=A7=BB=E9=99=A4=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/night/ns_ast_parse.cpp | 16 ++++++++-------- src/night/ns_compile_js.cpp | 7 +++---- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/night/ns_ast_parse.cpp b/src/night/ns_ast_parse.cpp index f9add64..786ad8d 100644 --- a/src/night/ns_ast_parse.cpp +++ b/src/night/ns_ast_parse.cpp @@ -295,10 +295,10 @@ namespace night } return v6; } - int ast_dispatch_i = 0; + // int ast_dispatch_i = 0; night::ns_node *NSASTParse::ast_dispatch(bool a3) { - int inner_ast_dispatch_i = ++ast_dispatch_i; + // int inner_ast_dispatch_i = ++ast_dispatch_i; // ast_dispatch - 0 auto v42 = this->is_punctuation("("); if (!v42) @@ -697,10 +697,10 @@ namespace night } - int make_binary_or_just_value_i = 0; + // int make_binary_or_just_value_i = 0; night::ns_node *NSASTParse::make_binary_or_just_value(night::ns_node * a2, bool a3) { - int inner_make_binary_or_just_value_i = ++make_binary_or_just_value_i; + // int inner_make_binary_or_just_value_i = ++make_binary_or_just_value_i; bool v21; bool v18; if (a3) @@ -795,10 +795,10 @@ namespace night } return a2; } - int ast_expression_i = 0; + // int ast_expression_i = 0; night::ns_node *NSASTParse::ast_expression() { - ast_expression_i++; + // int inner_ast_expression_i = ast_expression_i++; auto v1 = this->ast_dispatch(false); auto binary_or_just_value = this->make_binary_or_just_value(v1, false); auto result = this->make_call_or_just_expression(binary_or_just_value); @@ -815,10 +815,10 @@ namespace night throw "not implement"; } - int ast_obj_dot_i = 0; + // int ast_obj_dot_i = 0; night::ns_node *NSASTParse::ast_obj_dot(night::ns_node* a2) { - ast_obj_dot_i++; + // int inner_ast_obj_dot_i = ast_obj_dot_i++; auto v11 = this->offset_24; auto v9 = v11->gen_girl(night::std_v_n); auto v10 = v11->gen_son(night::NS_TYPE_OBJ_DOT); diff --git a/src/night/ns_compile_js.cpp b/src/night/ns_compile_js.cpp index 08becb9..498a44f 100644 --- a/src/night/ns_compile_js.cpp +++ b/src/night/ns_compile_js.cpp @@ -46,7 +46,7 @@ namespace night || (v4->at(0)->offset_0 != night::NS_TYPE_SKIP) ) { - str += "("; // 待确认 + str += "("; this->offset_48++; for (int v19 = 0; v19 < v4->size(); v19++) @@ -59,7 +59,7 @@ namespace night this->offset_48++; } } - str += ")"; // TODO...待确认 + str += ")"; this->offset_48++; } @@ -187,7 +187,6 @@ namespace night } // compile_function - 10 result += ")"; - // "(function (nv_evt,nv_instanc" this->offset_48++; if (v29) { @@ -316,7 +315,7 @@ namespace night std::string NSCompileJs::compile_obj_property(night::ns_node *) { // TODO... - return ""; + throw "not implement"; } std::string NSCompileJs::compile_obj_self_op(night::ns_node *a3) {