Propagate sideways conversions after an instance-of + if-eq/if-eqz

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.
2 files changed
tree: 46fbbc1f8fd6e6058bf29d8e67484f27720204b0
  1. baksmali/
  2. deodexerant/
  3. dexlib2/
  4. examples/
  5. gradle/
  6. scripts/
  7. smali/
  8. smali-integration-tests/
  9. smalidea/
  10. util/
  11. .gitignore
  12. build.gradle
  13. gradle.properties
  14. gradlew
  15. gradlew.bat
  16. NOTICE
  17. README.md
  18. settings.gradle
README.md

About

smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android‘s Java VM implementation. The syntax is loosely based on Jasmin’s/dedexer's syntax, and supports the full functionality of the dex format (annotations, debug info, line info, etc.)

Downloads are at https://bitbucket.org/JesusFreke/smali/downloads. If you are interested in submitting a patch, feel free to send me a pull request here.

See the wiki for more info/news/release notes/etc.

Support

  • github Issue tracker - For any bugs/issues/feature requests
  • #smali on freenode - Free free to drop by and ask a question. Don't expect an instant response, but if you hang around someone will respond.

Some useful links for getting started with smali