feat: 添加一些函数

This commit is contained in:
msojocs 2023-07-02 16:08:49 +08:00
parent 8fd49dc4c9
commit 7be7c0c473
9 changed files with 543 additions and 137 deletions

View File

@ -8,6 +8,7 @@ add_executable(wcc
src/wcc.cpp
src/include/wxml.h
src/wcc/usage.cpp
src/wxa/wxa.cpp
src/wxml/rewrite.cpp
src/wxml/name_allocator.cpp
src/wxml/string_templating/token.cpp

21
src/include/wxa.h Normal file
View File

@ -0,0 +1,21 @@
#ifndef __WXA_H__
#define __WXA_H__
#include <iostream>
#include <vector>
namespace MMBizWxaAppComm
{
void SplitBySlash(std::string const&,std::vector<std::string> &);
/**
*
*
* @param base
* @param path
* @param result
*/
void PathCombine(std::string const& base,std::string const& path,std::string& result);
}
#endif

View File

@ -87,6 +87,7 @@ namespace WXML
int offset_20 = 0; // size
int offset_24 = 0; // ???
int offset_40 = 0; // AttrsCompartor用到怎么来不知道
// int offset_48 = 0;
int offset_56 = 0; // ??? -3, -1
std::string offset_60 = ""; // ???
Token();
@ -318,6 +319,8 @@ namespace WXML
std::string ToCamelStyle(std::string const&);
void AddTestAttr(std::string const&, std::stringstream &, char);
bool HasSpAttrPrefix(void);
void MarkIfHasDescendant(std::vector<std::string> const&);
void CutDomsForCustomComponent(std::vector<std::string> const&);
};
@ -370,7 +373,7 @@ namespace WXML
namespace Compiler
{
WXML::DOMLib::Parser ParseSource(
int ParseSource(
std::string const& content, // 源码a2
std::string const& filePath, // 文件名? a3
char lineEndMark, // '\n' a4
@ -438,7 +441,7 @@ namespace WXML
std::string& a3,
std::string& a4,
std::string& a5,
int & a6,
int * a6,
std::string& a7
);

79
src/wxa/wxa.cpp Normal file
View File

@ -0,0 +1,79 @@
#include "../include/wxa.h"
namespace MMBizWxaAppComm
{
void SplitBySlash(std::string const& a1, std::vector<std::string> & a2)
{
int v2 = -1;
int i;
for ( i = 0; i < a1.length(); i++)
{
if (a1[i] == '/')
{
if (i - v2 > 1)
{
auto v4 = a1.substr(v2 + 1, i - v2 - 1);
a2.emplace_back(v4);
}
v2 = i;
}
}
if (i - v2 > 1)
{
auto v4 = a1.substr(v2 + 1, i - v2 - 1);
a2.emplace_back(v4);
}
}
void PathCombine(std::string const& a1, std::string const& a2, std::string& a3)
{
std::vector<std::string> dirList;
if (a2.length() == 0 || a2[0] != '/')
{
MMBizWxaAppComm::SplitBySlash(a1, dirList);
if (a1.length() > 0)
{
if (a1.back() != '/')
{
dirList.pop_back();
}
}
}
std::vector<std::string> v15;
MMBizWxaAppComm::SplitBySlash(a2, v15);
for (int i = 0; i < v15.size(); i++)
{
if (v15[i] == "..")
{
if (dirList.begin() != dirList.end())
{
dirList.pop_back();
}
}
else if (v15[i] == ".")
{
dirList.push_back(v15[i]);
}
}
std::string v8;
if (a1.length() > 0 && a1[0] == '/' || a2.length() > 0 && a2[0] == '/')
{
v8 = "/";
}
a3 = v8;
for (int i = 0; i < dirList.size(); i++)
{
if (i)
{
a3.append("/");
}
a3.append(dirList[i]);
}
}
}

View File

@ -1,15 +1,17 @@
#include "../include/wxml.h"
#include "../include/define.h"
#include "../include/wxa.h"
#include <iostream>
#include <set>
#include <memory>
#include <algorithm>
namespace WXML{
namespace Compiler
{
WXML::DOMLib::Parser ParseSource(
int ParseSource(
std::string const& filePath, // 文件名a2
std::string const& content, // 源码a3
char lineEndMark, // '\n' a4
@ -18,12 +20,12 @@ namespace WXML{
std::map<std::string,std::string> const& fileContentMap, // fileContentMap a7
std::string& errorMessage, // 错误信息 a8
std::map<std::string, std::shared_ptr<WXML::DOMLib::WXMLDom>>& result,// map<string, ?> a9
std::map<std::string, std::string>& map1,// ??? a10
std::map<std::string,int>& map2, // ??? a11
std::map<std::string, std::string>& a10,// ??? a10
std::map<std::string,int>& a11, // ??? a11
bool b1, // mark指定运算结果是否非0 a12
bool b2) // mark指定运算结果是否非0 a13
{
WXML::DOMLib::Parser pResult;
int pResult;
bool isWxml = filePath.substr(filePath.length() - 5) == ".wxml";
if (isWxml)
{
@ -33,27 +35,33 @@ namespace WXML{
std::vector<WXML::DOMLib::Token> tokenList; // v102
parseResult = v50.Parse(content.c_str(), errorMessage, filePath, tokenList);
if (parseResult)
if (parseResult)
{
// GetParsed
std::shared_ptr<WXML::DOMLib::WXMLDom> parseDom = v50.GetParsed();
result[filePath] = parseDom;
int a;
int b;
std::stringstream ss;
if (a != b)
if (tokenList.begin() != tokenList.end())
{
ss << "f_['";
ss << WXML::Rewrite::ToStringCode(filePath);
ss << "']={};";
ss << lineEndMark;
}
for (int i = 0; i < 99; i++)
for (int i = 0; i < tokenList.size(); i++)
{
/* code */
int dealResult = 0;
std::string t;
// dealResult = WXML::Compiler::DealWxsTag(filePath, , t);
std::string v74, v76, v79;
int v65;
dealResult = WXML::Compiler::DealWxsTag(
filePath,
tokenList[i],
v74,
v76,
v79,
&v65,
errorMessage);
if (dealResult)
{
// 非0
@ -63,42 +71,39 @@ namespace WXML{
ss << "['";
ss << WXML::Rewrite::ToStringCode(filePath);
ss << "']['";
ss << WXML::Rewrite::ToStringCode(t);
ss << WXML::Rewrite::ToStringCode(v74);
ss << "'] =";
int r = 1;
if (r)
if (v76.length() > 0)
{
std::string ret;
// PathCombine(fileName, ??, ret);
MMBizWxaAppComm::PathCombine(filePath, v76, ret);
if (ret[0] == '/')
{
ret = '.' + ret;
}
if (/*??? && */ (gwxMark == "$gwx" || b2))
if (fileContentMap.find(ret) == fileContentMap.end() && /*??? && */ (gwxMark == "$gwx" || b2))
{
std::stringstream errs;
errs << filePath;
errs << ":";
// errs << v65; // 行号?
errs << v65; // 行号?
errs << ":";
// errs << v66[28 * i + 3];
errs << tokenList[i].offset_12;
errs << ":";
// errs << v76; // 文件的某种路径
errs << v76; // 文件的某种路径
errs << " not found from ";
errs << filePath;
errorMessage = errs.str();
// 清空
errs.clear();
throw 1;
throw errorMessage;
}
ss << "f_['";
// ss << WXML::Rewrite::ToStringCode(v81);
ss << WXML::Rewrite::ToStringCode(ret);
ss << "'] || ";
ss << "nv_require(\"";
// ss << WXML::Rewrite::ToStringCode("p_" + v81);
ss << WXML::Rewrite::ToStringCode("p_" + ret);
ss << "\");";
ss << lineEndMark;
@ -106,7 +111,7 @@ namespace WXML{
ss << "['";
ss << WXML::Rewrite::ToStringCode(filePath);
ss << "']['";
// ss << WXML::Rewrite::ToStringCode(v74);
ss << WXML::Rewrite::ToStringCode(v74);
ss << "']();";
ss << lineEndMark;
@ -115,9 +120,10 @@ namespace WXML{
{
std::string data = "m_" + filePath;
data = data.append(":");
data = data.append(t);
// GetFuncId
// compile_ns
data = data.append(v74);
auto v83 = WXML::Compiler::GetFuncId(a11, data);
std::string v72;
// TODO: compile_ns
int compilerResult = 1;
if (compilerResult)
{
@ -126,31 +132,32 @@ namespace WXML{
ss << "nv_require(\"";
std::string m = "m_" + filePath;
m = m.append(":");
// m = m.append(v74);
// ss << ToStringCode(m);
m = m.append(v74);
ss << WXML::Rewrite::ToStringCode(m);
ss << "\");";
ss << lineEndMark;
// ss << v72;
ss << v72;
ss << lineEndMark;
}
}
std::string code = ss.str();
if (1)
auto v69 = ss.str();
if (v69.length() > 0)
{
map1[filePath].assign(code);
a10[filePath] = v69;
}
}
// LABEL_24:
}
else if(filePath.substr(filePath.length() - 4) == ".wxs")
{
std::string v84;
std::string p = "p_" + filePath;
// GetFuncId(map2)
// compile_ns
auto v86 = WXML::Compiler::GetFuncId(a11, p);
int compilerResultCode = 0;
// TODO: compile_ns
if (compilerResultCode) {
errorMessage.assign("error...");
throw compilerResultCode;
@ -159,61 +166,62 @@ namespace WXML{
{
std::stringstream code;
code << "f_['";
// code << ToStringCode(fileName);
code << WXML::Rewrite::ToStringCode(filePath);
code << "'] = nv_require(";
code << '"';
// code << ToStringCode("p_" + fileName);
code << WXML::Rewrite::ToStringCode("p_" + filePath);
code << "\");";
code << lineEndMark;
// code << compileResultData;
code << v84;
code << lineEndMark;
std::string strCode = code.str();
map1[filePath] = strCode;
a10[filePath] = strCode;
}
}
return pResult;
}
int CompileLazy(
std::map<std::string,std::string> const& fileContentMap, // a2
std::string& errorMessage, // 错误信息 a3
std::map<std::string,std::string>& outputContentMap, // 输出 a4
std::map<std::string,std::string>& outputFuncMap, // 输出 a5
std::map<std::string, std::vector<std::string>>& dependencyListMap, // a6
std::map<std::string, std::vector<std::string>>& componentListMap, // componentListMap a7
std::vector<std::string> const& splitedData, // splitedData a8
std::map<std::string,std::string> const& mapData1, // mapData1 a9
bool isLLA, // isLLA a10
std::string const& gwxMark, // gwxMark a11
uint mark, // mark
char lineEndMark, // '\n'
std::string const& eMark1, // 'e'
std::string const& charArr, // const char off_5403C3[] = {'s','\0','e','\0'}
std::string const& ggMark, // "gg"
std::string const& eMark, // "e_"
std::string const& dMark, // "d_"
std::string const& pMark, // "p_"
std::string const& strEndMark, // '\0'
std::string const& boxMark, // "boxofchocolate"
std::string const& gdwxMark, // "$gdwx"
std::string const& fMark // "f_"
std::map<std::string,std::string> const& fileContentMap, // a1
std::string& errorMessage, // 错误信息 a2
std::map<std::string,std::string>& outputContentMap, // 输出 a3
std::map<std::string,std::string>& outputFuncMap, // 输出 a4
std::map<std::string, std::vector<std::string>>& dependencyListMap, // a5
std::map<std::string, std::vector<std::string>>& componentListMap, // componentListMap a6
std::vector<std::string> const& splitedData, // splitedData a7
std::map<std::string,std::string> const& mapData1, // mapData1 a8
bool isLLA, // isLLA a9
std::string const& gwxMark, // gwxMark a10
uint mark, // mark a11
char lineEndMark, // '\n' a12
std::string const& eMark1, // 'e' a13
std::string const& charArr, // const char off_5403C3[] = {'s','\0','e','\0'} a14
std::string const& ggMark, // "gg" a15
std::string const& eMark, // "e_" a16
std::string const& dMark, // "d_" a17
std::string const& pMark, // "p_" a18
std::string const& strEndMark, // '\0' a19
std::string const& boxMark, // "boxofchocolate" a20
std::string const& gdwxMark, // "$gdwx" a21
std::string const& fMark // "f_" a22
)
{
try
{
// try
// {
/* code */
std::map<std::string, std::shared_ptr<std::stringstream>> ssDataMap;
std::map<std::string, std::vector<std::string>> v307_localVecStrMap1;
std::map<std::string, std::shared_ptr<DOMLib::WXMLDom>> v304;
std::map<std::string, std::string> v309;
std::map<std::string, int> v311;
// mark - 1
for (auto it = fileContentMap.begin(); it != fileContentMap.end(); it++)
{
/* code */
WXML::DOMLib::Parser parseResult = WXML::Compiler::ParseSource(
auto parseResult = WXML::Compiler::ParseSource(
it->first, // 文件路径a2
it->second, // 源码 a3
lineEndMark, // '\n' a4
@ -227,11 +235,13 @@ namespace WXML{
(mark & 4) != 0, // a11 -> mark a12
(mark & 0x20) != 0); // a13
}
// mark - 5
std::shared_ptr<std::stringstream> v301_localCommonStream1; // v301
ssDataMap["__COMMON__"] = v301_localCommonStream1;
std::vector<std::string> commonVec;
v307_localVecStrMap1["__COMMON__"] = commonVec;
// mark - 10
for (int i = 0; i < splitedData.size(); i++)
{
std::shared_ptr<std::stringstream> v328_ss;
@ -245,38 +255,136 @@ namespace WXML{
j.push_back(path);
v307_localVecStrMap1[splitedData[i]] = j;
}
std::set<std::string> temp;
for (int i = 0 ; i < splitedData.size(); i++)
// mark - 15
// v238
std::set<std::string> v314;
// mark - 20
for (auto i = splitedData.begin() ; i != splitedData.end(); i++)
{
temp.insert(splitedData[i]);
v314.insert(*i);
}
for (auto it = splitedData.begin(); it != splitedData.end(); it++)
// mark - 25
// std::map<string, share_ptr<WXML::DOMLib::WXMLDom>>
for (auto it = v304.begin(); it != v304.end(); it++)
{
auto str = it->substr(2, it->size() - 7);
// 去掉 "./" 和 ".wxml"
auto str = it->first.substr(2, it->first.size() - 7);
if(v314.find(str) == v314.end())
{
v307_localVecStrMap1["__COMMON__"].push_back(it->first);
}
}
// mark - 30
std::stringstream info;
info << "WXML::Compiler::CompileLazy: file name to paths:\n";
info << " all files: [ ";
for (size_t i = 0; i < 6; i++)
for (auto i: fileContentMap)
{
/* code */
info << i.first;
info << " ";
}
// mark - 35
info << "];\n";
for (auto i: v307_localVecStrMap1)
{
info << " ";
info << i.first;
info << ": [ ";
for (auto j: i.second)
{
info << j << " ";
if (v304.find( j) == v304.end())
{
errorMessage = "WXML file not found: " + j;
return -1152;
}
}
info << "];\n";
}
auto t = info.str();
// mark - 40
for (auto i = v304.begin(); i != v304.end(); i++)
{
std::set<std::string> v328;
WXML::DOMLib::recurseDependencies(*i->second, i->first, v328);
// TODO: ...
}
// mark - 45
for (auto i = v304.begin(); i != v304.end(); i++)
{
std::string v328 = "ALL";
auto v51 = componentListMap[v328];
auto v282 = i->second;
v282->MarkIfHasDescendant(v51);
if (isLLA)
{
v282->CutDomsForCustomComponent(v51);
}
}
// mark - 50
/*
std::map<std::string,std::string> const& fileContentMap, // a1
std::string& errorMessage, // 错误信息 a2
std::map<std::string,std::string>& outputContentMap, // 输出 a3
std::map<std::string,std::string>& outputFuncMap, // 输出 a4
std::map<std::string, std::vector<std::string>>& dependencyListMap, // a5
std::map<std::string, std::vector<std::string>>& componentListMap, // componentListMap a6
std::vector<std::string> const& splitedData, // splitedData a7
std::map<std::string,std::string> const& mapData1, // mapData1 a8
bool isLLA, // isLLA a9
std::string const& gwxMark, // gwxMark a10
uint mark, // mark a11
char lineEndMark, // '\n' a12
std::string const& eMark1, // 'e' a13
std::string const& charArr, // const char off_5403C3[] = {'s','\0','e','\0'} a14
std::string const& ggMark, // "gg" a15
std::string const& eMark, // "e_" a16
std::string const& dMark, // "d_" a17
std::string const& pMark, // "p_" a18
std::string const& strEndMark, // '\0' a19
std::string const& boxMark, // "boxofchocolate" a20
std::string const& gdwxMark, // "$gdwx" a21
std::string const& fMark // "f_" a22
*/
std::string jj;
if (!isLLA)
{
jj = "global";
}
else
{
jj = "__globalThis";
}
std::string v328;
WXML::Compiler::GetVersionInfo(v328, jj);
*v301_localCommonStream1 << v328 << std::endl;
// WXML::NameAllocator::NameAllocator();
*v301_localCommonStream1 << "var $gwxc" << lineEndMark << "var $gaic={}" << lineEndMark;
if (!isLLA)
*v301_localCommonStream1 << "var outerGlobal=typeof __globalThis==='undefined'?window:__globalThis;";
// mark - 55
// for (size_t i = 0; i < count; i++)
// {
// /* code */
// }
// mark - 60
// for (size_t i = 0; i < count; i++)
// {
// /* code */
// }
// mark - 65
}
catch(const std::exception& e)
{
std::cerr << e.what() << '\n';
}
// }
// catch(const std::exception& e)
// {
// std::cerr << e.what() << '\n';
// }
return 0;
}
int DealWxsTag(
std::string const& filePath,
WXML::DOMLib::Token & a2,
@ -467,7 +575,8 @@ namespace WXML{
std::string result = "";
if(!a2.count(a3))
{
// a2.insert({})
// TODO: 待验证
a2.insert({a3, a2.size()});
}
auto v5 = a2[a3];
sprintf(&result[0], "np_%d", v5);

View File

@ -10,6 +10,7 @@ namespace WXML
Parser::Parser(/* args */)
{
this->offset_104.offset_24 = 4;
}
Parser::~Parser()
@ -24,10 +25,10 @@ namespace WXML
{
// if(!token)
// throw "unexpected attribute name"
int v20 = token.offset_24;
int v20 = token.offset_20;
for (int i = 0; i < v20; i++)
{
char v3 = token.offset_16 + token.offset_0[i];
char v3 = token.offset_0[token.offset_16 + i];
if ((v3 & 0xDF) - 'A' > 25
&& (v3 - '0') > 10
&& v3 != '_'
@ -47,7 +48,7 @@ namespace WXML
{
this->peekIndex++;
auto v6 = this->Peek();
int v22;
int v22 = v6.offset_24;
if (v22 == 2)
{
this->peekIndex++;
@ -164,7 +165,7 @@ namespace WXML
}
else
{
v40 = *this->dequeStr.end();
v40 = this->dequeStr.back();
}
if (!v47.IsMatch(&v40[0]))
@ -203,28 +204,28 @@ namespace WXML
}
return;
}
auto v16 = token.GetContent();
this->peekIndex++;
if (v16.length() > 0)
}
auto v16 = token.GetContent();
this->peekIndex++;
if (v16.length() > 0)
{
int v17 = 0;
// TODO v18 = *v16 + v43[4];
char* v18 = &v16[0] + token.offset_16;
// offset_20第一次是3
while(token.offset_20 > v17)
{
int v17 = 0;
// TODO v18 = *v16 + v43[4];
char* v18 = &v16[0] + token.offset_16;
// offset_20第一次是3
while(token.offset_20 > v17)
int v19 = *(uint8_t *)(v18 + v17) - 9;
if (v19 > 0x17u || ((0x800013u >> v19) & 1) == 0)
{
int v19 = *(uint8_t *)(v18 + v17) - 9;
if (v19 > 0x17u || ((0x800013u >> v19) & 1) == 0)
{
auto v45 = this->dequeDom.back();
std::shared_ptr<WXML::DOMLib::WXMLDom> dom(new WXML::DOMLib::WXMLDom());
dom->offset_0 = "TEXTNODE";
dom->offset_84 = token;
v45->offset_72.push_back(dom);
break;
}
++v17;
auto v45 = this->dequeDom.back();
std::shared_ptr<WXML::DOMLib::WXMLDom> dom(new WXML::DOMLib::WXMLDom());
dom->offset_0 = "TEXTNODE";
dom->offset_84 = token;
v45->offset_72.push_back(dom);
break;
}
++v17;
}
}
}

View File

@ -20,9 +20,11 @@ namespace WXML
offset_12(token.offset_12),
offset_16(token.offset_16),
offset_20(token.offset_20),
offset_24(token.offset_24),
offset_28(token.offset_28),
offset_32(token.offset_32),
offset_40(token.offset_40),
// offset_40(token.offset_40),
// offset_48(token.offset_48),
offset_56(token.offset_56),
offset_60(token.offset_60),
offset_84(token.offset_84),
@ -36,8 +38,11 @@ namespace WXML
this->offset_12 = token.offset_12;
this->offset_16 = token.offset_16;
this->offset_20 = token.offset_20;
this->offset_24 = token.offset_24;
this->offset_28 = token.offset_28;
this->offset_32 = token.offset_32;
// this->offset_40 = token.offset_40;
// this->offset_48 = token.offset_48;
this->offset_56 = token.offset_56;
this->offset_60 = token.offset_60;
this->offset_84 = token.offset_84;
@ -50,8 +55,11 @@ namespace WXML
this->offset_12 = token.offset_12;
this->offset_16 = token.offset_16;
this->offset_20 = token.offset_20;
this->offset_24 = token.offset_24;
this->offset_28 = token.offset_28;
this->offset_32 = token.offset_32;
// this->offset_40 = token.offset_40;
// this->offset_48 = token.offset_48;
this->offset_56 = token.offset_56;
this->offset_60 = token.offset_60;
this->offset_84 = token.offset_84;
@ -65,8 +73,11 @@ namespace WXML
this->offset_12 = token.offset_12;
this->offset_16 = token.offset_16;
this->offset_20 = token.offset_20;
this->offset_24 = token.offset_24;
this->offset_28 = token.offset_28;
this->offset_32 = token.offset_32;
// this->offset_40 = token.offset_40;
// this->offset_48 = token.offset_48;
this->offset_56 = token.offset_56;
this->offset_60 = token.offset_60;
this->offset_84 = token.offset_84;

View File

@ -872,6 +872,7 @@ namespace WXML {
this->offset_72.erase(this->offset_72.begin() + v11--);
return true;
}
return hasElIf;
}
bool WXMLDom::operator==(std::string tag)
{
@ -931,5 +932,62 @@ namespace WXML {
return false;
}
void WXMLDom::MarkIfHasDescendant(std::vector<std::string> const& a2)
{
if (a2.size() > 0)
{
auto v4 = this->offset_72.size();
while (--v4 >= 0)
{
this->MarkIfHasDescendant(a2);
auto v6 = this->offset_72[v4]->offset_0;
auto ret = std::find(a2.begin(), a2.end(), v6);
if (ret != a2.end())
{
this->offset_256 = 1;
}
}
}
}
void WXMLDom::CutDomsForCustomComponent(std::vector<std::string> const& a2)
{
int v3 = this->offset_72.size();
while (--v3 >= 0)
{
this->CutDomsForCustomComponent(a2);
if (
this->offset_72[v3]->offset_0 != "include"
&& this->offset_72[v3]->offset_0 != "import"
&& this->offset_72[v3]->offset_0 != "wx-template"
&& this->offset_72[v3]->offset_0 != "wx-define"
&& this->offset_72[v3]->offset_0 != "template"
&& this->offset_72[v3]->offset_0 != "slot"
&& this->offset_72[v3]->offset_0 != "wx-import"
)
{
if (
a2.end() == std::find(a2.begin(), a2.end(), this->offset_72[v3]->offset_0)
&& !this->IfHasItsElse(v3, a2)
)
{
auto v5 = this->offset_72[v3];
if (v5->offset_72.begin() == v5->offset_72.end())
{
this->offset_72.erase(this->offset_72.begin() + v3);
}
else if(v5->offset_72.size() == 8
&& !v5->HasSpAttrPrefix())
{
auto v6 = this->offset_72[v3];
auto v7 = v6->offset_72[0];
this->offset_72[v3] = v7;
}
}
}
}
}
}
}

View File

@ -10686,12 +10686,14 @@ void **__cdecl WXML::Compiler::GetFuncId(void **a1, _DWORD *a2, int a3)
Block = (void **)operator new(0x2Cu);
std::string::basic_string(Block + 4, Str);
Block[10] = (void *)Str[0]._bufsiz;
insert_unique_pos = std::_Rb_tree<std::string,std::pair<std::string const,int>,std::_Select1st<std::pair<std::string const,int>>,std::less<std::string>,std::allocator<std::pair<std::string const,int>>>::_M_get_insert_unique_pos(
insert_unique_pos = std::_Rb_tree<std::string,std::pair<std::string const,int>,std::_Select1st<std::pair<std::string const,int>>,std::less<std::string>,std::allocator<std::pair<std::string const,int>>>
::_M_get_insert_unique_pos(
a2,
(int)(Block + 4));
if ( v4 )
{
std::_Rb_tree<std::string,std::pair<std::string const,int>,std::_Select1st<std::pair<std::string const,int>>,std::less<std::string>,std::allocator<std::pair<std::string const,int>>>::_M_insert_node(
std::_Rb_tree<std::string,std::pair<std::string const,int>,std::_Select1st<std::pair<std::string const,int>>,std::less<std::string>,std::allocator<std::pair<std::string const,int>>>
::_M_insert_node(
a2,
insert_unique_pos,
v4,
@ -11336,7 +11338,7 @@ struct _Unwind_Exception *__usercall WXML::Compiler::ParseSource@<eax>(
v82 = 0;
v55 = WXML::Compiler::DealWxsTag((int)a2, &v66[28 * i], v74, (int)&v76, (int)v79, &v65, a8);
if ( v55 )
goto LABEL_20;
goto LABEL_20; // 销毁数据,返回
v16 = std::operator<<<char>((std::ostream::sentry *)v89, a6);
v56 = std::operator<<<std::char_traits<char>>(v16, "['");
WXML::Rewrite::ToStringCode((int)v87, a2);
@ -11347,10 +11349,25 @@ struct _Unwind_Exception *__usercall WXML::Compiler::ParseSource@<eax>(
std::operator<<<std::char_traits<char>>(v18, "'] =");
std::string::_M_dispose((void **)&v91);
std::string::_M_dispose((void **)v87);
/*
WXML::DOMLib::Parser *a1@<edi>,
int *a2, //文件名
char **a3, // 源码
char a4, // '\n'
int a5, // gwxMark
int *a6,
_DWORD *a7,
int *a8,
_DWORD *a9,
_DWORD *a10,
_DWORD *a11,
int a12,
char a13)*/
if ( v77 )
{
MMBizWxaAppComm::PathCombine(a2, &v76, (unsigned int *)v81);
if ( *(_BYTE *)v81[0] == 47 )
if ( *(_BYTE *)v81[0] == '/' /*47*/ )
{
std::operator+<char>((int)v86, 46, (int)v81);
std::string::operator=((unsigned __int8 **)v81, (int)v86);
@ -11362,21 +11379,30 @@ struct _Unwind_Exception *__usercall WXML::Compiler::ParseSource@<eax>(
&& (std::operator==<char>(a5, "$gwx") || a13) )
{
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream((int)&v91);
v19 = std::operator<<<char>((std::ostream::sentry *)v93, a2);
std::operator<<<std::char_traits<char>>(v19, ":");
v20 = (std::ostream::sentry *)std::ostream::operator<<(v65);
std::operator<<<std::char_traits<char>>(v20, ":");
v21 = (std::ostream::sentry *)std::ostream::operator<<(v66[28 * i + 3]);
v22 = std::operator<<<std::char_traits<char>>(v21, ":");
// 被引用文件
v23 = std::operator<<<char>(v22, &v76);
v24 = std::operator<<<std::char_traits<char>>(v23, " not found from ");
// 引用文件a2, a2引用v76
std::operator<<<char>(v24, a2);
std::stringbuf::str((int)v87, (int)v94);
// errorMessage
std::string::operator=((unsigned __int8 **)a8, (int)v87);
std::string::_M_dispose((void **)v87);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream((int)&v91);
v55 = 1;
LABEL_20:
v55 = 1; // 返回值非0
LABEL_20:
std::string::_M_dispose((void **)v81);
std::string::_M_dispose(v79);
std::string::_M_dispose((void **)&v76);
@ -11385,28 +11411,38 @@ LABEL_20:
std::string::_M_dispose((void **)v72);
std::string::_M_dispose((void **)&v69);
lpuexcpt = (struct _Unwind_Exception *)v55;
goto LABEL_24;
goto LABEL_24; // 销毁数据,返回
}
v58 = std::operator<<<std::char_traits<char>>((std::ostream::sentry *)v89, "f_['");
// v81 -> ret (合并后的路径)
WXML::Rewrite::ToStringCode((int)&v91, v81);
v25 = std::operator<<<char>(v58, &v91);
std::operator<<<std::char_traits<char>>(v25, "'] || ");
std::string::_M_dispose((void **)&v91);
v59 = std::operator<<<std::char_traits<char>>((std::ostream::sentry *)v89, "nv_require(\"");
std::operator+<char>((int)v87, "p_", (int)v81);
WXML::Rewrite::ToStringCode((int)&v91, v87);
v26 = std::operator<<<char>(v59, &v91);
v27 = std::operator<<<std::char_traits<char>>(v26, "\");");
std::operator<<<std::char_traits<char>>(v27, a4);
std::string::_M_dispose((void **)&v91);
std::string::_M_dispose((void **)v87);
v28 = std::operator<<<char>((std::ostream::sentry *)v89, a6);
v60 = std::operator<<<std::char_traits<char>>(v28, "['");
WXML::Rewrite::ToStringCode((int)v87, a2);
v29 = std::operator<<<char>(v60, v87);
v61 = std::operator<<<std::char_traits<char>>(v29, "']['");
WXML::Rewrite::ToStringCode((int)&v91, (int *)v74);
v30 = std::operator<<<char>(v61, &v91);
v31 = std::operator<<<std::char_traits<char>>(v30, "']();");
std::operator<<<std::char_traits<char>>(v31, a4);
std::string::_M_dispose((void **)&v91);
@ -11416,21 +11452,26 @@ LABEL_20:
{
std::operator+<char>((int)v86, "m_", (int)a2);
v33 = std::string::append(v86, ":");
std::string::basic_string(v87, v33);
v34 = std::string::append(v87, (int)v74);
std::string::basic_string(&v91, v34);
WXML::Compiler::GetFuncId(v83, a11, (int)&v91);
std::string::_M_dispose((void **)&v91);
std::string::_M_dispose((void **)v87);
std::string::_M_dispose((void **)v86);
v55 = night::compile_ns((int)a2, (int)v83, (int)v79, v65, (unsigned int *)v72, 0);
if ( v55 )
{
std::string::_M_assign((int)a8, (int)v72);
std::string::_M_dispose(v83);
goto LABEL_20;
goto LABEL_20; // 销毁数据,返回
}
v62 = std::operator<<<std::char_traits<char>>((std::ostream::sentry *)v89, "nv_require(\"");
std::operator+<char>((int)v84, "m_", (int)a2);
v35 = std::string::append(v84, ":");
std::string::basic_string(v86, v35);
@ -11438,6 +11479,7 @@ LABEL_20:
std::string::basic_string(v87, v36);
WXML::Rewrite::ToStringCode((int)&v91, v87);
v37 = std::operator<<<char>(v62, &v91);
v38 = std::operator<<<std::char_traits<char>>(v37, "\");");
std::operator<<<std::char_traits<char>>(v38, a4);
std::string::_M_dispose((void **)&v91);
@ -11456,6 +11498,7 @@ LABEL_20:
}
std::stringbuf::str((int)&v91, (int)v90);
std::string::operator=((unsigned __int8 **)&v69, (int)&v91);
std::string::_M_dispose((void **)&v91);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream((int)v88);
std::string::_M_dispose((void **)v72);
@ -11466,10 +11509,11 @@ LABEL_20:
}
std::string::_M_dispose((void **)&v69);
}
LABEL_24:
LABEL_24:
WXML::DOMLib::Parser::~Parser((int)v95);
std::vector<WXML::DOMLib::Token>::~vector((void **)&v66);
}
// end isWXML
else
{
std::string::substr(v95, a2, a2[1] - 4, 0xFFFFFFFF);
@ -11496,13 +11540,16 @@ LABEL_24:
WXML::Rewrite::ToStringCode((int)v87, a2);
v41 = std::operator<<<char>(v53, v87);
v42 = std::operator<<<std::char_traits<char>>(v41, "'] = nv_require(");
v54 = std::operator<<<std::char_traits<char>>(v42, 34);
v54 = std::operator<<<std::char_traits<char>>(v42, 34); // 双引号"
std::operator+<char>((int)v88, "p_", (int)a2);
WXML::Rewrite::ToStringCode((int)&v91, v88);
v43 = std::operator<<<char>(v54, &v91);
v44 = std::operator<<<std::char_traits<char>>(v43, 34);
v44 = std::operator<<<std::char_traits<char>>(v43, 34); // 双引号"
v45 = std::operator<<<std::char_traits<char>>(v44, ");");
std::operator<<<std::char_traits<char>>(v45, a4);
std::string::_M_dispose((void **)&v91);
std::string::_M_dispose((void **)v88);
std::string::_M_dispose((void **)v87);
@ -13563,8 +13610,11 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
std::_Rb_tree_header::_Rb_tree_header(v308);
std::_Rb_tree_header::_Rb_tree_header(v310);
std::_Rb_tree_header::_Rb_tree_header(v312);
// a1.offset_12
lpuexcpt = (struct _Unwind_Exception *)a1[3];
// a1.offset_4
v249 = (WXML::DOMLib::Parser *)(a1 + 1);
// mark - 1
while ( lpuexcpt != v249 )
{
// 13个参数
@ -13584,39 +13634,53 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
(a11 & 0x20) != 0);
// 源码解析失败LABEL_187 -> return v258
if ( v258 )
goto LABEL_187;
goto LABEL_187; // 销毁数据,返回
// 递增
lpuexcpt = (struct _Unwind_Exception *)std::_Rb_tree_increment((int)lpuexcpt);
}
// mark - 5
v223 = operator new(0xD0u);
// 输出流
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream((int)v223);
zcc::shared_ptr<std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>>::shared_ptr(&jj, (int)v223);
std::string::basic_string((void **)&v328, "__COMMON__");
v22 = (volatile signed __int32 **)std::map<std::string,zcc::shared_ptr<std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>>>::operator[](
&v301,
&v328);
// v22 = v301["__COMMON__"]
// v22 = v301["__COMMON__"] = jj
*v22 = (volatile signed __int32 *)jj;
// v301["__COMMON__"] = jj
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(v22 + 1, v326);
std::string::_M_dispose((void **)&v328);
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(&v326);
jj = 0;
v326 = 0;
v327 = 0;
std::string::basic_string((void **)&v328, "__COMMON__");
v23 = std::map<std::string,std::vector<std::string>>::operator[](&v307, &v328);
// v23 = v307["__COMMON__"]
std::vector<std::string>::operator=(v23, &jj);
// v307["__COMMON__"] = jj
std::string::_M_dispose((void **)&v328);
std::vector<std::string>::~vector((void ***)&jj, v24);
std::string::basic_string((void **)&v328, "__COMMON__");
v226 = *std::map<std::string,zcc::shared_ptr<std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>>>::operator[](
&v301,
&v328);
// v226 = v301["__COMMON__"]
std::string::_M_dispose((void **)&v328);
// a7.offset_4 a7.end()
v237 = (WXML::EXPRLib::Parser *)a7[1];
/*
_DWORD *a1, // fileData
int *a2, // 错误信息
@ -13642,6 +13706,7 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
int *a22) // "f_"
*/
// mark - 10
// splitedData
for ( i = *a7; (WXML::EXPRLib::Parser *)i != v237; i += 24 )
{
@ -13699,19 +13764,23 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
v324 = (int)j + 24;
std::string::basic_string((char *)j, (int)&v328);
v323 = lpuexcpto;
v27 = std::map<std::string,std::vector<std::string>>::operator[](&v307, i);
std::vector<std::string>::operator=(v27, (int *)&j);
// v307[i] = j
std::vector<std::string>::~vector((void ***)&j, v28);
std::string::_M_dispose((void **)&v328);
std::string::_M_dispose((void **)&jj);
}
// for end
// mark - 15
v238 = (WXML::EXPRLib::Parser *)a7[1]; // v238 - end?
// a7 splitedData
lpuexcptb = (struct _Unwind_Exception *)*a7;
std::_Rb_tree_header::_Rb_tree_header(v314);
// mark - 20
// 是否splitedData结尾
while ( v238 != lpuexcptb )
{
@ -13736,14 +13805,18 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
lpuexcptb = (struct _Unwind_Exception *)((char *)lpuexcptb + 24);
}
// while end
// mark - 25
// v304
for ( j = v306;
j != v305;
std::_Rb_tree_iterator<std::pair<std::string const,zcc::shared_ptr<WXML::DOMLib::WXMLDom>>>
::operator++((int *)&j) )
{
// j.offset_(16 * 4) -> j.offset_64
v260 = (char *)j + 16;
std::string::substr(&jj, (_DWORD *)j + 4, 2u, *((_DWORD *)j + 5) - 7);
//
std::string::substr(&jj, (_DWORD *)j + 4/*j.offset_16*/, 2u, *((_DWORD *)j + 5) - 7);
lpuexcptc = (struct _Unwind_Exception *)v314[1];
v276 = (struct _Unwind_Exception *)v314;
while ( lpuexcptc )
@ -13770,6 +13843,7 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
}
std::string::_M_dispose((void **)&jj);
}
// mark - 30
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::basic_stringstream((int)&v328);
std::operator<<<std::char_traits<char>>(
(std::ostream::sentry *)v330,
@ -13783,17 +13857,22 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
v36 = std::operator<<<char>((std::ostream::sentry *)v330, (int *)(k + 16));
std::operator<<<std::char_traits<char>>(v36, " ");
}
// mark - 35
std::operator<<<std::char_traits<char>>((std::ostream::sentry *)v330, "];\n");
// _DWORD v308[5];
for ( m = (int *)v308[2]; ; m = (int *)std::_Rb_tree_increment((int)v277) )
{
v277 = m;
if ( m == v308 )
break;
// key
v38 = std::operator<<<std::char_traits<char>>((std::ostream::sentry *)v330, " ");
v39 = std::operator<<<char>(v38, v277 + 4);
std::operator<<<std::char_traits<char>>(v39, ": [ ");
v239 = (WXML::EXPRLib::Parser *)v277[11];
v250 = (int *)v277[10];
// 遍历value
while ( 1 )
{
v234 = (int)v250;
@ -13803,6 +13882,7 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
std::operator<<<std::char_traits<char>>(v40, " ");
v261 = (struct _Unwind_Exception *)v305[1];
lpuexcpte = (struct _Unwind_Exception *)v305;
// v261递增
while ( v261 )
{
v41 = (unsigned __int8)std::operator<<char>((int)v261 + 16, (int)v250) == 0;
@ -13817,6 +13897,7 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
v261 = v43;
lpuexcpte = v42;
}
// splitedData中有没有
if ( lpuexcpte != (struct _Unwind_Exception *)v305 )
{
v31 = (unsigned __int8)std::operator<<char>((int)v250, (int)lpuexcpte + 16) == 0;
@ -13833,11 +13914,13 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
std::string::_M_dispose((void **)&jj);
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream((int)&v328);
v258 = (struct _Unwind_Exception *)-1152;
goto LABEL_186;
goto LABEL_186; // 销毁数据返回v258
}
}
std::operator<<<std::char_traits<char>>((std::ostream::sentry *)v330, "];\n");
}
// mark - 40
std::basic_stringstream<char,std::char_traits<char>,std::allocator<char>>::~basic_stringstream((int)&v328);
for ( j = v306;
;
@ -13847,7 +13930,7 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
if ( j == v305 )
break;
std::_Rb_tree_header::_Rb_tree_header(&v329);
v262 = (char *)lpuexcptf + 16;
v262 = (char *)lpuexcptf + 16; // std::string
WXML::DOMLib::recurseDependencies((int *)lpuexcptf + 10, (int *)lpuexcptf + 4, &v328);
lpuexcptg = (struct _Unwind_Exception *)v332;
if ( v332 > 0x5555555 )
@ -13856,7 +13939,7 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
v326 = 0;
v327 = 0;
v45 = std::_Vector_base<std::string>::_M_allocate(v332);
v278 = (int)v45;
v278 = (int)v45; // std::vector<string>
jj = (int)v45;
v46 = &v45[6 * (_DWORD)lpuexcptg];
v327 = v46;
@ -13875,11 +13958,13 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
lpuexcpth = (struct _Unwind_Exception *)n;
if ( n == &v329 )
break;
// v278.assign(n+4)
std::string::_M_assign(v278, (int)(n + 4));
v278 += 24;
v278 += 24; // v278移到下一个元素
}
lpuexcpti = std::map<std::string,std::vector<std::string>>::operator[](a5, (int)v262);
if ( lpuexcpti != (char *)&jj )
// a5[v262]
if ( lpuexcpti != (char *)&jj )// jj std::vector<string>
{
v240 = (WXML::EXPRLib::Parser *)v326;
v263 = (char *)jj;
@ -13892,6 +13977,7 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
v241 = (WXML::EXPRLib::Parser *)*((_DWORD *)lpuexcpti + 1);
if ( (unsigned int)v251 > v241 - (WXML::EXPRLib::Parser *)v279 )
{
// ii = v279.size()
for ( ii = -1431655765 * ((v241 - (WXML::EXPRLib::Parser *)v279) >> 3); ii > 0; --ii )
{
std::string::_M_assign((int)v279, (int)v263);
@ -13946,12 +14032,14 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
std::vector<std::string>::~vector((void ***)&jj, v49);
std::_Rb_tree<std::string,std::string,std::_Identity<std::string>,std::less<std::string>,std::allocator<std::string>>::~_Rb_tree((int)&v328);
}
// mark - 45
std::_Rb_tree_header::_Rb_tree_header(v317);
for ( jj = (int)v306;
;
std::_Rb_tree_iterator<std::pair<std::string const,zcc::shared_ptr<WXML::DOMLib::WXMLDom>>>::operator++(&jj) )
{
lpuexcptj = (struct _Unwind_Exception *)jj;
// end就退出循环
if ( (_DWORD *)jj == v305 )
break;
WXML::DOMLib::WXMLDom::RewriteTree(*(_DWORD *)(jj + 40));
@ -13965,10 +14053,12 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
lpuexcptp = (struct _Unwind_Exception *)*((_DWORD *)lpuexcptj + 10);
std::string::basic_string((void **)&v328, (char *)off_550B3F);
v52 = std::map<std::string,std::vector<std::string>>::operator[](a6, &v328);
// a6["ALL"]
WXML::DOMLib::WXMLDom::CutDomsForCustomComponent(lpuexcptp, v52);
std::string::_M_dispose((void **)&v328);
}
}
// mark - 50
lpuexcptk = (struct _Unwind_Exception *)(v226 + 8);
if ( a9 )
std::string::basic_string((void **)&jj, "global");
@ -13991,6 +14081,7 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
v224 = 0;
v233 = v303;
v209 = (a11 & 2) != 0;
// mark - 55
while ( v233 != v302 )
{
v243 = (WXML::EXPRLib::Parser *)v233[10];
@ -13998,18 +14089,23 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
v225 = std::operator==<char>((int)(v233 + 4), "__COMMON__");
if ( v225 )
{
// a10 gwxMark
std::string::basic_string((char *)v318, a10);
}
else
{
std::to_string((std::__cxx11 *)&jj, v224);
std::operator+<char>((char *)&j, a10, "_XC_");
// std::string j = a10 + "_XC_"
std::operator+<char>(v318, &j, (unsigned int *)&jj);
// std::string v318 = j + jj = j + v224
std::string::_M_dispose(&j);
std::string::_M_dispose((void **)&jj);
++v224;
}
// v56 = a4[v248]
v56 = std::map<std::string,std::string>::operator[](a4, v248);
// a4[v248].assign(v318)
std::string::_M_assign((int)v56, (int)v318);
lpuexcptl = (WXML::EXPRLib::Parser *)((char *)v243 + 8);
if ( (a11 & 2) != 0 )
@ -14341,10 +14437,10 @@ struct _Unwind_Exception *__cdecl WXML::Compiler::CompileLazy(
if ( v258 )
{
std::string::_M_dispose((void **)v321);
LABEL_180:
LABEL_180:
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count(v320);
std::string::_M_dispose((void **)v318);
goto LABEL_185;
goto LABEL_185; // 销毁数据,返回
}
v142 = std::operator<<<char>(lpuexcptl, a16);
std::operator<<<std::char_traits<char>>(v142, (char *)off_55101C);
@ -14585,6 +14681,7 @@ LABEL_180:
std::string::_M_dispose((void **)v318);
v233 = (_DWORD *)std::_Rb_tree_increment((int)v233);
}
// mark - 60
for ( i5 = (struct _Unwind_Exception *)v303; ; i5 = (struct _Unwind_Exception *)std::_Rb_tree_increment((int)lpuexcptn) )
{
lpuexcptn = i5;
@ -14592,9 +14689,12 @@ LABEL_180:
break;
std::stringbuf::str((int)&jj, *((_DWORD *)i5 + 10) + 12);
v203 = std::map<std::string,std::string>::operator[](a3, (int)lpuexcptn + 16);
// a3[(int)lpuexcptn + 16]
std::string::operator=((unsigned __int8 **)v203, (int)&jj);
// a3[(int)lpuexcptn + 16] = jj
std::string::_M_dispose((void **)&jj);
}
// mark - 65
v258 = 0;
LABEL_185:
WXML::NameAllocator::~NameAllocator((int)&v328);
@ -14738,7 +14838,7 @@ void __cdecl MMBizWxaAppComm::SplitBySlash(_DWORD *a1, void **a2)
v2 = -1;
while ( a1[1] > (int)lpuexcpt )
{
if ( *((_BYTE *)lpuexcpt + *a1) == 47 )
if ( *((_BYTE *)lpuexcpt + *a1) == '/' /*47*/ )
{
if ( (int)lpuexcpt - v2 > 1 )
{
@ -14786,7 +14886,7 @@ int __cdecl MMBizWxaAppComm::PathCombine(_DWORD *a1, _DWORD *a2, unsigned int *a
v15 = 0;
v16 = 0;
v17 = 0;
if ( v3 || *(_BYTE *)*a2 != 47 )
if ( v3 || *(_BYTE *)*a2 != '/' /*47*/ )
{
MMBizWxaAppComm::SplitBySlash(a1, (void **)&v12);
v4 = a1[1];
@ -14831,6 +14931,7 @@ int __cdecl MMBizWxaAppComm::PathCombine(_DWORD *a1, _DWORD *a2, unsigned int *a
else
v8 = (char *)&unk_551F01;
std::string::operator=(a3, v8);
// v12 dirList
for ( lpuexcpta = 0;
(unsigned int)lpuexcpta < -1431655765 * (((char *)v13 - (char *)v12) >> 3);
lpuexcpta = (struct _Unwind_Exception *)((char *)lpuexcpta + 1) )
@ -21781,7 +21882,7 @@ _DWORD *__fastcall WXML::DOMLib::Parser::Peek(_DWORD *a1)
int v2; // esi
unsigned int v3; // ebx
result = a1 + 26; //
result = a1 + 26; // 26 * 4 = 104
v2 = a1[22]; // offset_88
v3 = a1[25]; // offset_100
if ( v3 < -1227133513 * ((a1[23]/*offset_92*/ - v2) >> 4) )
@ -22343,7 +22444,13 @@ void __fastcall WXML::DOMLib::Parser::ATTR(WXML::DOMLib::Parser *a1)
int v20; // [esp+84h] [ebp-E4h]
char v21[24]; // [esp+E0h] [ebp-88h] BYREF
int v22; // [esp+F8h] [ebp-70h]
/*
v19
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00, 00(v20) 00 00 00, 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00(v22) 00 00 00
*/
v1 = (WXML::DOMLib::Token *)WXML::DOMLib::Parser::Peek(a1);
WXML::DOMLib::Token::Token((int)v19, v1, v11);
if ( !WXML::DOMLib::Token::IsMatch((int)v19, (WXML::DOMLib::Token *)">", v12)
@ -22384,6 +22491,13 @@ LABEL_12:
{
++*((_DWORD *)a1 + 25);
v6 = (WXML::DOMLib::Token *)WXML::DOMLib::Parser::Peek(a1);
/*
v21[24]
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00, 00(v22) 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
*/
WXML::DOMLib::Token::Token((int)v21, v6, v15);
if ( v22 == 2 )
{
@ -23157,7 +23271,7 @@ void __usercall WXML::DOMLib::Parser::DOM(_DWORD *a1@<ecx>, WXML::DOMLib::Parser
++a1[25];
std::deque<zcc::shared_ptr<WXML::DOMLib::WXMLDom>>::pop_back(Block);
std::deque<std::string>::pop_back(v35);
LABEL_27:
LABEL_27:
WXML::DOMLib::Token::~Token((int)&v45);
goto LABEL_41;
}
@ -52839,6 +52953,9 @@ char __fastcall WXML::DOMLib::WXMLDom::HasSpAttrPrefix(int a1)
//----- (00471024) --------------------------------------------------------
int __thiscall WXML::DOMLib::WXMLDom::MarkIfHasDescendant(int this, int *a2)
{
/*
a2 std::vector<std::string> const&
*/
int result; // eax
int v4; // ebx
int v5; // ecx
@ -52870,6 +52987,8 @@ int __thiscall WXML::DOMLib::WXMLDom::MarkIfHasDescendant(int this, int *a2)
//----- (0047109C) --------------------------------------------------------
void __thiscall WXML::DOMLib::WXMLDom::CutDomsForCustomComponent(_DWORD *this, int *a2)
{
// std::vector<std::string> const& a2
int v3; // ebx
int v4; // esi
int *v5; // eax
@ -52879,6 +52998,7 @@ void __thiscall WXML::DOMLib::WXMLDom::CutDomsForCustomComponent(_DWORD *this, i
volatile signed __int32 *v9; // eax
int v10; // [esp+1Ch] [ebp-1Ch]
// 19 * 4 = 76; 18 * 4 = 72
v3 = (this[19] - this[18]) >> 3;
while ( --v3 >= 0 )
{
@ -52906,11 +53026,14 @@ void __thiscall WXML::DOMLib::WXMLDom::CutDomsForCustomComponent(_DWORD *this, i
}
else if ( *(_DWORD *)(*v5 + 76) - *(_DWORD *)(*v5 + 72) == 8 && !WXML::DOMLib::WXMLDom::HasSpAttrPrefix(*v5) )
{
// 把 v7 复制到 v6
v6 = (volatile signed __int32 **)(this[18] + v4);
// 18 * 4 = 72
v7 = (volatile signed __int32 **)*((_DWORD *)*v6 + 18);
v8 = *v7;
v9 = v7[1];
*v6 = v8;
// v6 + 1 -> v6.offset_4
std::__shared_count<(__gnu_cxx::_Lock_policy)2>::operator=(v6 + 1, v9);
}
}