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

[FunC] Make all functions impure by default, add "pure" specifier

This commit is contained in:
Aleksandr Kirsanov 2024-05-03 13:26:57 +03:00
parent a3e9e03019
commit 85c60d1263
No known key found for this signature in database
GPG key ID: B758BBAA01FFB3D3
61 changed files with 3511 additions and 3500 deletions

View file

@ -50,7 +50,7 @@ SymDef* predefine_builtin_func(std::string name, TypeExpr* func_type) {
template <typename T>
SymDef* define_builtin_func(std::string name, TypeExpr* func_type, const T& func, bool impure = false) {
SymDef* def = predefine_builtin_func(name, func_type);
def->value = new SymValAsmFunc{func_type, func, impure};
def->value = new SymValAsmFunc{func_type, func, !impure};
#ifdef FUNC_DEBUG
dynamic_cast<SymValAsmFunc*>(def->value)->name = name;
#endif
@ -61,7 +61,7 @@ template <typename T>
SymDef* define_builtin_func(std::string name, TypeExpr* func_type, const T& func, std::initializer_list<int> arg_order,
std::initializer_list<int> ret_order = {}, bool impure = false) {
SymDef* def = predefine_builtin_func(name, func_type);
def->value = new SymValAsmFunc{func_type, func, arg_order, ret_order, impure};
def->value = new SymValAsmFunc{func_type, func, arg_order, ret_order, !impure};
#ifdef FUNC_DEBUG
dynamic_cast<SymValAsmFunc*>(def->value)->name = name;
#endif
@ -72,7 +72,7 @@ SymDef* define_builtin_func(std::string name, TypeExpr* func_type, const AsmOp&
std::initializer_list<int> arg_order, std::initializer_list<int> ret_order = {},
bool impure = false) {
SymDef* def = predefine_builtin_func(name, func_type);
def->value = new SymValAsmFunc{func_type, make_simple_compile(macro), arg_order, ret_order, impure};
def->value = new SymValAsmFunc{func_type, make_simple_compile(macro), arg_order, ret_order, !impure};
#ifdef FUNC_DEBUG
dynamic_cast<SymValAsmFunc*>(def->value)->name = name;
#endif