1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

[FunC] CMake option -DFUNC_DEBUG for development purposes

Seeing function name in debugger
makes it much easier to delve into FunC sources
This commit is contained in:
Aleksandr Kirsanov 2024-04-20 23:13:10 +03:00
parent a5d2a1003f
commit cbd78964c5
No known key found for this signature in database
GPG key ID: B758BBAA01FFB3D3
4 changed files with 28 additions and 0 deletions

View file

@ -773,6 +773,9 @@ struct SymVal : sym::SymValBase {
struct SymValFunc : SymVal {
std::vector<int> arg_order, ret_order;
#ifdef FUNC_DEBUG
std::string name; // seeing function name in debugger makes it much easier to delve into FunC sources
#endif
~SymValFunc() override = default;
SymValFunc(int val, TypeExpr* _ft, bool _impure = false) : SymVal(_Func, val, _ft, _impure) {
}
@ -809,6 +812,9 @@ struct SymValType : sym::SymValBase {
struct SymValGlobVar : sym::SymValBase {
TypeExpr* sym_type;
int out_idx{0};
#ifdef FUNC_DEBUG
std::string name; // seeing variable name in debugger makes it much easier to delve into FunC sources
#endif
SymValGlobVar(int val, TypeExpr* gvtype, int oidx = 0)
: sym::SymValBase(_GlobVar, val), sym_type(gvtype), out_idx(oidx) {
}