- The OAT Header has a new field containing the offset to the
entries for the DEX files.
- The change was made in OAT 127.
- All offsets in the header had to be adjusted to account
for this new field.
- The offset to the entries for the DEX files also had to
be adjusted to use this field as they are no longer
right after the key value store.
- The format of the DEX entries also changed in OAT 127 and
again in OAT 131.
- The field containing the offset to the method bss
mapping was added in OAT 127.
- The field containing the offset to the dex sections
layout was added in OAT 131 right before the method
bss mapping offset.
The calculation of the number of output registers for
invoke-polymorphic and invoke-polymorphic-range should be based on the
number of registers provided.
Previously, we only propagated the conversion if it was a narrowing
conversion, to avoid problems that can occur with member access with
widening conversions.
However, it should be safe to do the conversion for a "sideways"
conversion - one that is neither widening or narrowing.
This can happen if we don't yet have full knowledge of the register types,
or, less likely, if the "true" branch is impossible to reach.
In the first case, we should get better type info as we continue to analyze
the method, and we'll revisit the conversion once we have better type info.
Or, if it really is an impossible conversion, we still want to propagate
the type from the instance-of to the true branch.
When calling isZipFile() in ZipDexContainer, the ZipFile would remain open if
the file was in fact a zip file but the ZipFile object would then go out of
scope thus creating a resource leak. This ensures that the ZipFile is closed
by adding a finally clause containing a close call at the end of the try catch
block.
Also make invoke-polymorphic conditional on this new art version.
This also fixes a bug where the version was being selected incorrectly
due to a parameter name that shadowed a local variable.