[decompiler] Update vector ops, reduce casts (#3849)

Update the decompiler to use the new vf macros.

Also, fix a bunch of silly casting issues where accessing inline fields
with an offset of 0 would be better than a cast:

![image](https://github.com/user-attachments/assets/885bbb07-634f-47b8-99f5-5a947941cdde)

---------

Co-authored-by: water111 <awaterford1111445@gmail.com>
This commit is contained in:
water111
2025-01-20 16:32:58 -05:00
committed by GitHub
parent 98d6618a8b
commit 7348e6a4ff
958 changed files with 8680 additions and 10112 deletions
+9
View File
@@ -2148,6 +2148,15 @@ DerefToken to_token(const FieldReverseLookupOutput::Token& in) {
}
}
std::vector<DerefToken> to_tokens(const std::vector<FieldReverseLookupOutput::Token>& in) {
std::vector<DerefToken> ret;
ret.reserve(in.size());
for (auto& x : in) {
ret.push_back(to_token(x));
}
return ret;
}
DerefElement::DerefElement(Form* base, bool is_addr_of, DerefToken token)
: m_base(base), m_is_addr_of(is_addr_of), m_tokens({std::move(token)}) {
m_base->parent_element = this;