perf: 移除调试变量

This commit is contained in:
msojocs 2023-08-26 15:43:49 +08:00
parent a753d8c3bf
commit 7735c69840
12 changed files with 3768 additions and 89 deletions

3767
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -518,10 +518,8 @@ namespace night
return v6;
}
int ast_dispatch_i = 0;
night::ns_node *NSASTParse::ast_dispatch(bool a3)
{
int inner_ast_dispatch_i = ++ast_dispatch_i; // 178
// ast_dispatch - 0
auto v42 = this->is_punctuation("(");
if (!v42)
@ -922,10 +920,8 @@ namespace night
}
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;
bool v21;
bool v18;
if (a3)
@ -1020,10 +1016,8 @@ namespace night
}
return a2;
}
int ast_expression_i = 0;
night::ns_node *NSASTParse::ast_expression()
{
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);
@ -1047,10 +1041,8 @@ namespace night
return lb;
}
int ast_obj_dot_i = 0;
night::ns_node *NSASTParse::ast_obj_dot(night::ns_node* a2)
{
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);
@ -1448,10 +1440,8 @@ namespace night
return lt;
}
int is_punctuation_i = 0;
night::ns_node * NSASTParse::is_punctuation(std::string const &a2)
{
int inner_is_punctuation_i = ++ is_punctuation_i;
auto v2 = this->offset_28->peek();
if (v2)
{

View File

@ -15,10 +15,8 @@ namespace night
{
return this->compile_binary(a3);
}
int compile_binary_i = 0;
std::string NSCompileJs::compile_binary(night::ns_node *a3)
{
int inner_compile_binary_i = ++compile_binary_i;
std::string ret = this->compile(a3->offset_180);
std::string v10 = " " + a3->offset_156;
std::string v3 = v10.append(" ");
@ -314,10 +312,8 @@ namespace night
return result;
}
int compile_obj_property_i = 0;
std::string NSCompileJs::compile_obj_property(night::ns_node *a3)
{
int inner_compile_obj_property_i = ++compile_obj_property_i;
std::string v26 = night::nst_ + std::to_string(this->offset_32);
this->offset_32++;
@ -492,10 +488,8 @@ namespace night
result += this->compile(a3->offset_216);
return result;
}
int compile_prog_i = 0;
std::string NSCompileJs::compile_prog(night::ns_node *a3)
{
int inner_compile_prog_i = ++compile_prog_i;
std::string result = "";
std::string v9 = a3->offset_108;
if (v9.size() == 0)
@ -539,10 +533,8 @@ namespace night
return result;
}
int compile_i = 0;
std::string NSCompileJs::compile(night::ns_node * a3)
{
int inner_compile_i = ++compile_i;
if (this->offset_0.size() == 0)
{
std::string v9 = a3->offset_0;

View File

@ -11,10 +11,9 @@ namespace night
{
}
int peek_i= 0;
// int peek_i= 0;
night::ns_node* NSToken::peek(void)
{
int inner_peek_i = ++peek_i;
auto result = this->offset_8;
if (!result)
{
@ -97,10 +96,8 @@ namespace night
return ret;
}
int next_i = 0;
night::ns_node* NSToken::next(void)
{
int inner_next_i = ++next_i; // 396
auto result = this->offset_8;
this->offset_8 = nullptr;
if (!result)

View File

@ -948,7 +948,6 @@ namespace WXML{
a1 = result.str();
}
int RenderDefine_i = 0;
int RenderDefine(
WXML::DOMLib::WXMLDom & a1,
std::string const& a2,
@ -974,7 +973,6 @@ namespace WXML{
{
try
{
int inner_RenderDefine_i = ++RenderDefine_i;
if (a1 == "template")
{
auto it = a1.offset_48.find("name");

View File

@ -852,7 +852,6 @@ namespace WXML {
}
int RenderNonDefine_i = 0;
void WXMLDom::RenderNonDefine(
std::string const& a2,
std::string const& a3,
@ -870,7 +869,6 @@ namespace WXML {
std::map<std::string,std::string> * a15
)
{
int inner_RenderNonDefine_i = ++RenderNonDefine_i;
// RenderNonDefine - 0
if (a13 && this->offset_24.size())
{

View File

@ -231,11 +231,8 @@ namespace WXML {
return ToStringCode3(src.data(), src.size());
}
int GetToken_i = 0;
void GetToken(std::string const& a1,std::vector<std::pair<int,std::string>> & a2)
{
GetToken_i++;
int inner_GetToken_i = GetToken_i;
for (int i = 0; i < a1.length(); )
{
int v9 = a1.length() - i;

View File

@ -15,11 +15,8 @@ namespace WXSS
{
}
int RenderCode_i = 0;
void CSSSyntaxTree::RenderCode(std::string & a2, bool a3)
{
RenderCode_i++;
int inner_RenderCode_i = RenderCode_i; // 10296
if (this->offset_116)
{
if (!this->offset_172)

View File

@ -9,12 +9,9 @@ namespace WXSS
{
namespace CSSTreeLib
{
int off_519A58_i = 0;
// WXSS::CSSTreeLib::MarkHostRule::MarkGood
int off_519A58(std::shared_ptr<WXSS::CSSTreeLib::Rule>& a1, std::shared_ptr<WXSS::CSSTreeLib::CSSSyntaxTree> &a2)
{
off_519A58_i++;
int inner_off_519A58_i = off_519A58_i;
for (auto lt = a2->offset_120.begin(); lt != a2->offset_120.end(); lt++)
{
if ((*lt)->offset_0 == "SELECTORS")
@ -241,12 +238,9 @@ namespace WXSS
return 0;
}
int MarkSelectorRule_i = 0;
// WXSS::CSSTreeLib::MarkSelectorRule::MarkGood
int off_519AD0(std::shared_ptr<WXSS::CSSTreeLib::Rule>& a1, std::shared_ptr<WXSS::CSSTreeLib::CSSSyntaxTree> &a2)
{
MarkSelectorRule_i++;
int inner_MarkSelectorRule_i = MarkSelectorRule_i; // 771有问题
// MarkSelectorRule - 0
for (int i = 0; i < a2->offset_120.size(); i++)
{
@ -490,12 +484,9 @@ namespace WXSS
return 0;
}
int off_519B00_i = 0;
// WXSS::CSSTreeLib::RewriteSelectorRule::MarkGood
int off_519B00(std::shared_ptr<WXSS::CSSTreeLib::Rule>& a1, std::shared_ptr<WXSS::CSSTreeLib::CSSSyntaxTree> &a2)
{
off_519B00_i++;
int inner_off_519B00_i = off_519B00_i;
std::string v14;
std::string lit = a2->offset_24.GetLiteral();
if (lit.length())
@ -560,15 +551,8 @@ namespace WXSS
}
// WXSS::CSSTreeLib::AndRules::MarkGood
int off_519B40_i = 0;
int off_519B40(std::shared_ptr<WXSS::CSSTreeLib::Rule>& a1, std::shared_ptr<WXSS::CSSTreeLib::CSSSyntaxTree> &a2)
{
off_519B40_i++;
int inner_off_519B40_i = off_519B40_i;
if (inner_off_519B40_i >= 3611)
{
int a = 0;
}
for (int i=0; i < a1->offset_4_vecPtr.size(); i++)
{
auto cur = a1->offset_4_vecPtr[i];
@ -590,18 +574,11 @@ namespace WXSS
return 1;
}
int off_519B84_i = 0;
/**
* WXSS::CSSTreeLib::ChildRule::MarkGood
*/
int off_519B84(std::shared_ptr<WXSS::CSSTreeLib::Rule>& a1, std::shared_ptr<WXSS::CSSTreeLib::CSSSyntaxTree> &a2)
{
off_519B84_i++;
int inner_off_519B84_i = off_519B84_i;
if (inner_off_519B84_i >= 9100)
{
int a = 0;
}
int v8 = 1;
for (int j = 0; j < a2->offset_120.size(); j++)
{
@ -627,15 +604,8 @@ namespace WXSS
* 00519BB4 - WXSS::CSSTreeLib::RuleChain::MarkGood
*
*/
int off_519BB4_i = 0;
int off_519BB4(std::shared_ptr<WXSS::CSSTreeLib::Rule>& a1, std::shared_ptr<WXSS::CSSTreeLib::CSSSyntaxTree> &a2)
{
off_519BB4_i++;
int inner_off_519BB4_i = off_519BB4_i;
if (inner_off_519BB4_i >= 4218)
{
int a = 0;
}
int ret = 0;
for (int i = 0; i < a1->offset_4_vecPtr.size(); i++)
{

View File

@ -13,11 +13,8 @@ namespace WXSS
{
}
int parse_i = 0;
int temp_count = 0;
int Parser::Parse(std::string const& a2, std::string const& a3, std::string& a4, std::string const& a5)
{
int inner_parse_i = ++parse_i;
// Parse - 0
WXSS::Tokenizer v125(a2.data(), a3);
std::vector<WXSS::Token> v118;
@ -54,14 +51,12 @@ namespace WXSS
v102->offset_0 = off_519B58;
v102->offset_4_str = "$";
v102->offset_28 = 1;
temp_count++;
this->offset_8.push_back(v102);
// off_519A44
std::shared_ptr<WXSS::CSSTreeLib::Base> v104(new WXSS::CSSTreeLib::Base());
v104->offset_0 = off_519A44;
v104->offset_4_int = instance->GetTopType();
temp_count++;
this->offset_8.push_back(v104);
// Parse - 15
@ -262,10 +257,6 @@ namespace WXSS
else if (v116->offset_0() == 2)
{
// off_519A44
if (inner_parse_i == 2)
{
int a = temp_count;
}
int v52 = v116->offset_4_int;
@ -301,13 +292,8 @@ namespace WXSS
auto cur = strc->second[0][i];
if (cur->offset_0() == 4)
break;
temp_count++;
this->offset_8.push_back(cur);
if (inner_parse_i == 2 && temp_count > 2983)
{
int a = temp_count;
}
}
}

View File

@ -297,11 +297,8 @@ namespace WXSS
}
}
int GetTokens_i = 0;
int Tokenizer::GetTokens(std::vector<WXSS::Token> &a2, std::string &a3, int a4)
{
GetTokens_i++;
int inner_GetTokens_i = GetTokens_i;
// GetTokens - 0
this->InitTransitTable();
this->InitSubStrCheckingCaluseTable();
@ -322,10 +319,6 @@ namespace WXSS
WXSS::TokenType AnotherTypeByAnySubStr = 0;
for (int sa = 0;; sa = v31)
{
if (inner_GetTokens_i == 2 && a2.size() == 75)
{
int a = 1;
}
if (v47 > this->offset_0.length())
{
return 0;

View File

@ -350,14 +350,11 @@ namespace WXSS
return ret;
}
int GenExpr_i = 0;
/**
* a4
*/
void XCompiler::GenExpr(std::shared_ptr<WXSS::CSSTreeLib::CSSSyntaxTree> a2, std::stringstream & a3, std::string & a4)
{
GenExpr_i++;
int inner_GenExpr_i = GenExpr_i;
auto target = a2->offset_120;
for (int i = 0; i < target.size(); i++)
{
@ -391,11 +388,8 @@ namespace WXSS
std::string str = a3.str();
return ;
}
int GetPageCss_i = 0;
int XCompiler::GetPageCss(std::string const& a2, std::string& a3, uint a4)
{
GetPageCss_i++;
int inner_GetPageCss_i = GetPageCss_i;
// GetPageCss - 0
if (this->offset_0)
{