[decompiler] small fixes for methods and more reference tests (#419)

* clean up method stuff, fix a few small bugs, and add references for easy -h files

* more small fixes and reference tests
This commit is contained in:
water111
2021-05-06 00:42:49 -04:00
committed by GitHub
parent 0a6602e320
commit 21fefa0aaa
41 changed files with 3427 additions and 220 deletions
+2 -6
View File
@@ -457,12 +457,8 @@ Form* LoadVarOp::get_load_src(FormPool& pool, const Env& env) const {
auto method_id = (ro.offset - 16) / 4;
auto method_info = env.dts->ts.lookup_method(type_name, method_id);
std::vector<DerefToken> tokens;
tokens.push_back(DerefToken::make_field_name("methods-by-name"));
tokens.push_back(DerefToken::make_field_name(method_info.name));
auto source = pool.alloc_single_element_form<SimpleExpressionElement>(
nullptr, SimpleAtom::make_var(ro.var).as_expr(), m_my_idx);
return pool.alloc_single_element_form<DerefElement>(nullptr, source, false, tokens);
return pool.alloc_single_element_form<MethodOfTypeElement>(
nullptr, ro.var, input_type.get_type_objects_typespec(), method_info);
}
// todo structure method