mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
[Tolk] Refactor: get rid of split_vars, construct valid LET ops
In FunC (and in Tolk before), tensor vars (actually occupying several stack slots) were represented as a single var in terms or IR vars (Ops): > var a = (1, 2); > LET (_i) = (_1, _2) Now, every tensor of N stack slots is represented as N IR vars. > LET (_i, _j) = (_1, _2) This will give an ability to control access to parts of a tensor when implementing `tensorVar.0` syntax.
This commit is contained in:
parent
989629a832
commit
565bc59735
17 changed files with 100 additions and 217 deletions
|
@ -537,31 +537,6 @@ bool TypeDataVoid::can_be_casted_with_as_operator(TypePtr cast_to) const {
|
|||
}
|
||||
|
||||
|
||||
// --------------------------------------------
|
||||
// extract_components()
|
||||
//
|
||||
// used in code generation (transforming Ops to other Ops)
|
||||
// to be removed in the future
|
||||
//
|
||||
|
||||
void TypeDataGenericT::extract_components(std::vector<TypePtr>& comp_types) const {
|
||||
assert(false);
|
||||
}
|
||||
|
||||
void TypeDataTensor::extract_components(std::vector<TypePtr>& comp_types) const {
|
||||
for (TypePtr item : items) {
|
||||
item->extract_components(comp_types);
|
||||
}
|
||||
}
|
||||
|
||||
void TypeDataUnresolved::extract_components(std::vector<TypePtr>& comp_types) const {
|
||||
assert(false);
|
||||
}
|
||||
|
||||
void TypeDataVoid::extract_components(std::vector<TypePtr>& comp_types) const {
|
||||
}
|
||||
|
||||
|
||||
// --------------------------------------------
|
||||
// parsing type from tokens
|
||||
//
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue