set up structure for reg alloc

This commit is contained in:
2024-10-19 16:25:52 +00:00
parent 24b18756e8
commit 18105a9bf5
10 changed files with 210 additions and 32 deletions

View File

@ -91,13 +91,13 @@ inline bool operator==(const ExprTypeInfo &l, const ExprTypeInfo &r) {
return true;
}
if (std::holds_alternative<IdentifierType>(l)) {
bool x = std::holds_alternative<IdentifierType>(r);
// bool x = std::holds_alternative<IdentifierType>(r);
std::string a = std::get<IdentifierType>(l);
std::string b = std::get<IdentifierType>(r);
return std::holds_alternative<IdentifierType>(r) && std::get<IdentifierType>(l) == std::get<IdentifierType>(r);
}
if (std::holds_alternative<ArrayType>(l)) {
bool x = std::holds_alternative<ArrayType>(r);
// bool x = std::holds_alternative<ArrayType>(r);
return std::holds_alternative<ArrayType>(r) && std::get<ArrayType>(l) == std::get<ArrayType>(r);
}
throw std::runtime_error("something strange happened");