mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
FunC: Prohibit unifying tensors and "forall" vars (#684)
* FunC: Prohibit unifying tensors and "forall" vars * Bump funC version to 0.4.4 --------- Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
parent
aab1fe0751
commit
5606418234
2 changed files with 24 additions and 12 deletions
|
@ -41,7 +41,7 @@ extern std::string generated_from;
|
|||
|
||||
constexpr int optimize_depth = 20;
|
||||
|
||||
const std::string func_version{"0.4.3"};
|
||||
const std::string func_version{"0.4.4"};
|
||||
|
||||
enum Keyword {
|
||||
_Eof = -1,
|
||||
|
@ -159,6 +159,7 @@ struct TypeExpr {
|
|||
int minw, maxw;
|
||||
static constexpr int w_inf = 1023;
|
||||
std::vector<TypeExpr*> args;
|
||||
bool was_forall_var = false;
|
||||
TypeExpr(te_type _constr, int _val = 0) : constr(_constr), value(_val), minw(0), maxw(w_inf) {
|
||||
}
|
||||
TypeExpr(te_type _constr, int _val, int width) : constr(_constr), value(_val), minw(width), maxw(width) {
|
||||
|
@ -265,7 +266,7 @@ struct TypeExpr {
|
|||
return new TypeExpr{te_ForAll, body, std::move(list)};
|
||||
}
|
||||
static bool remove_indirect(TypeExpr*& te, TypeExpr* forbidden = nullptr);
|
||||
static bool remove_forall(TypeExpr*& te);
|
||||
static std::vector<TypeExpr*> remove_forall(TypeExpr*& te);
|
||||
static bool remove_forall_in(TypeExpr*& te, TypeExpr* te2, const std::vector<TypeExpr*>& new_vars);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue