fest: test spec

This commit is contained in:
msojocs 2023-08-01 22:24:38 +08:00
parent 9555a442b3
commit ccb51e4c2f
2 changed files with 456 additions and 17 deletions

File diff suppressed because one or more lines are too long

View File

@ -11296,6 +11296,7 @@ struct _Unwind_Exception *__usercall WXML::Compiler::ParseSource@<eax>(
char v96[4]; // [esp+318h] [ebp-160h] BYREF
char v97[348]; // [esp+31Ch] [ebp-15Ch] BYREF
// ParseSource - 0
std::string::substr(v95, a2, a2[1] - 5, 0xFFFFFFFF);
lpuexcpta = std::operator==<char>((int)v95, ".wxml");
std::string::_M_dispose((void **)v95);
@ -11309,6 +11310,7 @@ struct _Unwind_Exception *__usercall WXML::Compiler::ParseSource@<eax>(
lpuexcpt = (struct _Unwind_Exception *)WXML::DOMLib::Parser::Parse((int)v95, a1, *a3, (int)a8, (int)a2, &v66);
if ( !lpuexcpt )
{
// ParseSource - 5
WXML::DOMLib::Parser::GetParsed(&v91, (WXML::DOMLib::Parser *)v95);
v13 = std::map<std::string,zcc::shared_ptr<WXML::DOMLib::WXMLDom>>::operator[](a9, (int)a2);
*(_DWORD *)v13 = v91;
@ -11330,6 +11332,7 @@ struct _Unwind_Exception *__usercall WXML::Compiler::ParseSource@<eax>(
std::operator<<<std::char_traits<char>>(v15, a4);
std::string::_M_dispose((void **)&v91);
}
// ParseSource - 10
for ( i = 0; -1227133513 * (((char *)v67 - (char *)v66) >> 4) > i; ++i )
{
v74[1] = 0;
@ -11504,6 +11507,7 @@ struct _Unwind_Exception *__usercall WXML::Compiler::ParseSource@<eax>(
std::string::_M_dispose((void **)&v76);
std::string::_M_dispose(v74);
}
// ParseSource - 15
std::stringbuf::str((int)&v91, (int)v90);
std::string::operator=((unsigned __int8 **)&v69, (int)&v91);
@ -11522,6 +11526,7 @@ struct _Unwind_Exception *__usercall WXML::Compiler::ParseSource@<eax>(
std::vector<WXML::DOMLib::Token>::~vector((void **)&v66);
}
// end isWXML
// ParseSource - 20
else
{
std::string::substr(v95, a2, a2[1] - 4, 0xFFFFFFFF);
@ -16985,7 +16990,7 @@ _DWORD *__userpurge night::NSASTParse::ast_dispatch@<eax>(_DWORD *a1@<ecx>, nigh
{
std::string::basic_string((char *)v67, (int)(a1 + 11));
std::string::operator=(a1 + 11, (char *)&byte_551F04);
std::string::basic_string(v82, (char *)&asc_5527F4[4]);
std::string::basic_string(v82, (char *)&asc_5527F4[4]); // {
v45 = night::NSASTParse::is_punctuation(a1, (int)v82);
std::string::_M_dispose(v82);
if ( v45 )
@ -17209,19 +17214,19 @@ _DWORD *__userpurge night::NSASTParse::ast_dispatch@<eax>(_DWORD *a1@<ecx>, nigh
std::string::_M_dispose(v82);
}
std::string::_M_dispose((void **)v81);
}
} // end arguments
std::string::_M_dispose(v80);
v22 = 1;
v23 = 1;
v24 = 1;
v25 = 1;
v32 = 1;
v29 = 1;
v26 = 1;
v53 = 1;
v29 = 1;
v32 = 1;
v38 = 1;
goto LABEL_61;
}
v53 = 1;
goto LABEL_61; // LABEL_62
}// end this
is_op_self = 1;
}
v38 = 1;
@ -17229,7 +17234,7 @@ _DWORD *__userpurge night::NSASTParse::ast_dispatch@<eax>(_DWORD *a1@<ecx>, nigh
v53 = 1;
}
v26 = 1;
}
} // return end
v29 = 1;
}
v32 = 1;
@ -17369,7 +17374,7 @@ _DWORD *__userpurge night::NSASTParse::ast_dispatch@<eax>(_DWORD *a1@<ecx>, nigh
goto LABEL_113;
}
goto LABEL_112;
}
}// end is_op_self
LABEL_61:
std::string::_M_dispose(v79);
goto LABEL_62;
@ -17795,8 +17800,8 @@ unsigned int *__fastcall night::NSASTParse::ast_if(int *a1)
v7 = night::NSGod::gen_son(v6, (int)v9);
std::string::_M_dispose(v9);
v7[51] = (unsigned int)v2;
v7[53] = 0;
v7[52] = (unsigned int)v3;
v7[53] = 0;
if ( (unsigned __int8)std::operator!=<char>((int)&night::NS_TYPE_PROG_NO_SEM, (int)v3) )
{
if ( !night::NSToken::eof(a1[7]) )
@ -18113,11 +18118,15 @@ _DWORD *__thiscall night::NSASTParse::ast_obj_op(int *this, int a2)
break;
}
while ( !(unsigned __int8)std::operator!=<char>("[", v10) );
// ==
if ( night::NSASTParse::is_obj_op_self(this, 0, v8) )
return night::NSASTParse::ast_obj_op_self(this, (int)v13);
v5 = night::NSToken::peek(this[7]);
if ( v5 && std::operator==<char>(".", (int)(v5 + 15)) )
return (_DWORD *)night::NSASTParse::ast_obj_dot(v13);
return v13;
}
// 4155E3: variable 'v2' is possibly undefined
@ -18282,30 +18291,42 @@ _DWORD *__fastcall night::NSASTParse::ast_switch(int *a1)
std::string::basic_string((char *)v55, (int)&night::std_v_n);
v27 = night::NSGod::gen_girl(v43, (int)v55);
std::string::_M_dispose(v55);
v44 = (void *)a1[6];
std::string::basic_string((char *)v55, (int)&night::std_v_v_n);
v22 = night::NSGod::gen_girl(v44, (int)v55);
std::string::_M_dispose(v55);
v45 = (void *)a1[6];
std::string::basic_string((char *)v55, (int)&night::std_v_n);
v20 = night::NSGod::gen_girl(v45, (int)v55);
std::string::_M_dispose(v55);
v46 = (void *)a1[6];
std::string::basic_string((char *)v55, (int)&night::NS_TYPE_SWITCH);
v47 = night::NSGod::gen_son(v46, (int)v55);
std::string::_M_dispose(v55);
// offset_232
v47[58] = v27;
// offset_204
v47[51] = 0;
// offset_236
v47[59] = v22;
// offset_240
v47[60] = v20;
std::string::basic_string(v55, (char *)asc_5527F4);
std::string::basic_string(v55, (char *)asc_5527F4); // "(\000)\000{"
night::NSASTParse::ignore_punc(a1, (int)v55);
v16 = v1;
std::string::_M_dispose(v55);
v47[51] = night::NSASTParse::ast_expression(v16);
std::string::basic_string(v55, (char *)&asc_5527F4[2]);
night::NSASTParse::ignore_punc(a1, (int)v55);
std::string::_M_dispose(v55);
std::string::basic_string(v55, (char *)&asc_5527F4[4]);
night::NSASTParse::ignore_punc(a1, (int)v55);
std::string::_M_dispose(v55);
@ -18317,16 +18338,19 @@ _DWORD *__fastcall night::NSASTParse::ast_switch(int *a1)
std::string::_M_dispose(v55);
if ( !v28 )
break;
std::string::basic_string(v55, "case");
night::NSASTParse::ignore_buildin_kw(a1, (int)v55);
std::string::_M_dispose(v55);
v2 = a1[7];
// int v2
v3 = *(_DWORD *)(v2 + 4);
v19 = *(_DWORD *)(v3 + 52);
v21 = *(_DWORD *)(v3 + 56);
v29 = night::NSToken::peek(v2);
if ( !v29 )
goto LABEL_4;
std::string::basic_string(v54, "-");
v23 = 1;
if ( !night::NSASTParse::is_op(a1, (int)v54) )
@ -18366,12 +18390,13 @@ _DWORD *__fastcall night::NSASTParse::ast_switch(int *a1)
std::string::_M_dispose(v54);
if ( !v30 )
{
LABEL_4:
LABEL_4:
lpuexcpta = (struct _Unwind_Exception *)a1[7];
std::string::basic_string(v55, "Expected variable|numer|boolean|string");
night::NSToken::err((int)lpuexcpta, (int)v55, v19, v21, 1);
}
}
// v47->offset_232
v31 = (void **)v47[58];
v55[0] = night::NSToken::next(a1[7]);
std::vector<night::ns_node *>::emplace_back<night::ns_node *>(v31, (char **)v55);
@ -18435,6 +18460,7 @@ LABEL_4:
std::string::basic_string((char *)v55, (int)&night::std_v_n);
v52 = (void **)night::NSGod::gen_girl(v36, (int)v55);
std::string::_M_dispose(v55);
v37 = v52;
v26 = (void *)a1[6];
std::string::basic_string((char *)v55, (int)&night::NS_TYPE_SKIP);
@ -18442,7 +18468,9 @@ LABEL_4:
std::vector<night::ns_node *>::emplace_back<night::ns_node *>(v37, (char **)v54);
std::string::_M_dispose(v55);
}
// v47->offset_236.push_back()
std::vector<std::vector*<night::ns_node *,std::allocator<night::ns_node>>>::push_back(v47[59], &v52);
if ( night::NSToken::eof(a1[7]) )
{
lpuexcptb = (struct _Unwind_Exception *)a1[7];
@ -18910,6 +18938,7 @@ _DWORD *__fastcall night::NSASTParse::ast_new_array(int *a1)
std::string::_M_dispose(v20);
std::string::operator=((unsigned int *)v19[0] + 15, "]");
std::vector<night::ns_node *>::push_back(v13, (char **)v19);
v10 = (void *)a1[6];
std::string::basic_string((char *)v20, (int)&night::NS_TYPE_ARRAY);
v19[0] = night::NSGod::gen_son(v10, (int)v20);
@ -18917,6 +18946,7 @@ _DWORD *__fastcall night::NSASTParse::ast_new_array(int *a1)
v2 = (unsigned int *)v19[0];
*((_DWORD *)v19[0] + 57) = v13;
std::string::operator=(v2 + 27, (char *)&byte_551F04);
v14 = night::NSASTParse::make_call_or_just_expression(a1, (_DWORD *)v19[0]);
v3 = night::NSToken::peek(a1[7]);
if ( v3 )
@ -20181,9 +20211,11 @@ _BYTE *__thiscall night::NSCompileJs::compile_obj_property[abi:cxx11](_BYTE *thi
std::string::basic_string(v26, v3);
std::string::_M_dispose((void **)v39);
++*(_DWORD *)(a2 + 32);
this[8] = 0;
*((_DWORD *)this + 1) = 0;
*(_DWORD *)this = this + 8;
*((_DWORD *)this + 1) = 0;
this[8] = 0;
night::NSCompileJs::compile[abi:cxx11](a2, *(_DWORD *)(a3 + 192));
std::string::operator+=(v39);
std::string::_M_dispose((void **)v39);
@ -20224,6 +20256,7 @@ _BYTE *__thiscall night::NSCompileJs::compile_obj_property[abi:cxx11](_BYTE *thi
std::string::_M_dispose((void **)v39);
std::string::operator+=(&v27);
*(_DWORD *)(a2 + 48) += v28;
v11 = (_DWORD *)std::vector<night::ns_node *>::at(*(_DWORD **)(a3 + 196), lpuexcpt);
night::NSCompileJs::compile[abi:cxx11](a2, *v11);
v12 = std::string::append(v38, "),");
@ -20232,6 +20265,7 @@ _BYTE *__thiscall night::NSCompileJs::compile_obj_property[abi:cxx11](_BYTE *thi
std::string::_M_dispose((void **)v39);
std::string::_M_dispose(v38);
*(_DWORD *)(a2 + 48) += 2;
std::operator+<char>((int)v29, "null==", (int)v26);
v13 = std::string::append(v29, "?undefined:");
std::string::basic_string(v30, v13);
@ -23001,6 +23035,7 @@ int __fastcall WXML::DOMLib::WXMLDom::RewriteTree(int a1)
break;
if ( std::operator==<char>(*(_DWORD *)(v16 + 8 * (_DWORD)Strc), "block") )
{
// int a1
std::string::operator=(*(unsigned int **)(*(_DWORD *)(a1 + 72) + 8 * (_DWORD)Strc), "block");
v34 = v17;
}
@ -23924,6 +23959,8 @@ int __cdecl WXML::DOMLib::WXMLDom::DealSingleTokenToOps(
v16 = (struct _Unwind_Exception *)(a11 + 4);
lpuexcpt = v16;
}
// 寻找结束
std::string::_M_dispose(&Block);
if ( v59 != lpuexcpt )
{
@ -23946,9 +23983,11 @@ int __cdecl WXML::DOMLib::WXMLDom::DealSingleTokenToOps(
}
if ( v59 == v54 || (unsigned __int8)std::operator<<char>((int)&Block, (int)v54 + 16) )
std::__throw_out_of_range((std::out_of_range *)"map::at");
std::string::basic_string((char *)&v80, (int)v54 + 40);
std::string::_M_dispose(&Block);
v87 = 0;
// void *v86[2]
v86[0] = &v87;
v86[1] = 0;
v85 = 0;
@ -23988,7 +24027,7 @@ int __cdecl WXML::DOMLib::WXMLDom::DealSingleTokenToOps(
}
if ( *(_DWORD **)&v77[1] != v78 && *(v78 - 7) == 1 )
std::vector<WXML::StringTemplating::Token>::push_back((char **)&v77[1], &v85);
lpuexcptc = 1;
lpuexcptc = 1; // 当前下标
// int v23
v23 = 0;
while ( -1227133513 * (((int)v78 - *(_DWORD *)&v77[1]) >> 2) > lpuexcptc )
@ -24016,7 +24055,7 @@ int __cdecl WXML::DOMLib::WXMLDom::DealSingleTokenToOps(
std::string::_M_dispose(v86);
std::string::_M_dispose((void **)&v80);
}
}
} // end a8
// DealSingleTokenToOps - 15
if ( a7 )
{
@ -25584,9 +25623,11 @@ LABEL_9:
v163 = std::operator<<<char>(v301, v342);
v164 = std::operator<<<std::char_traits<char>>(v163, "\"");
v302 = std::operator<<<std::char_traits<char>>(v164, ":\"");
v165 = (int *)WXML::DOMLib::Token::ToAttrContent[abi:cxx11]((int)v258 + v324 + 24);
WXML::Rewrite::ToStringCode((int)&Str, v165);
v166 = std::operator<<<char>(v302, (int *)&Str);
std::operator<<<std::char_traits<char>>(v166, "\",");
std::string::_M_dispose((void **)&Str);
std::string::_M_dispose((void **)v342);