add instruction reprs, WIP

This commit is contained in:
Jean-Marie Mineau 2023-12-15 00:23:55 +01:00
parent 4b62c495ed
commit 95f4686f3f
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
2 changed files with 4485 additions and 1 deletions

File diff suppressed because it is too large Load diff

View file

@ -603,6 +603,21 @@ impl MethodHandle {
}
}
// Not exposed to python, but meh, let's keep it coherent
pub fn __repr__(&self) -> String {
match self {
Self::StaticPut(val) => val.__repr__(),
Self::StaticGet(val) => val.__repr__(),
Self::InstancePut(val) => val.__repr__(),
Self::InstanceGet(val) => val.__repr__(),
Self::InvokeStatic(val) => val.__repr__(),
Self::InvokeInstance(val) => val.__repr__(),
Self::InvokeConstructor(val) => val.__str__(),
Self::InvokeDirect(val) => val.__repr__(),
Self::InvokeInterface(val) => val.__repr__(),
}
}
/// Return all strings referenced in the Handle.
pub fn get_all_strings(&self) -> HashSet<DexString> {
match self {