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:
parent
a3e9e03019
commit
85c60d1263
61 changed files with 3511 additions and 3500 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue