Skip to content

2.4.0

Compare
Choose a tag to compare
@Col-E Col-E released this 24 Feb 17:56
· 139 commits to master since this release

What's new

  • WIP Dalvik AST model
    • Not intended for use just yet as things are not fully fleshed out, but if you're curious it is there
  • Changes Compiler result from ClassRepresentation to ClassResult which will hold analysis data even if a full ClassRepresentation could not be built
    • This allows getting partial analysis data even if there were build problems
    • Before, analysis data required the class be fully buildable in order to access
  • AST to CodeElement and CodeElement to AST lookups in AnalysisResults
    • Pairs will with the prior change above with partial builds
    • Allows easy look-ups of compilation mappings without having to do a lot of work yourself
  • Shortcuts for common invokedynamic bootstrap methods
    • LambdaMetaFactory.metafactory -> java.lang.invoke.LambdaMetafactory.metafactory(MethodHandles.Lookup, String, MethodType, MethodType, MethodHandle, MethodType)
    • LambdaMetaFactory.altMetafactory -> java.lang.invoke.LambdaMetafactory.altMetafactory(MethodHandles.Lookup, String, MethodType, Object...)
    • ConstantBootstraps.nullConstant -> java.lang.invoke.ConstantBootstraps.nullConstant(MethodHandles.Lookup, String, Class)
    • ConstantBootstraps.primitiveClass -> java.lang.invoke.ConstantBootstraps.primitiveClass(MethodHandles.Lookup, String, Class)
    • ConstantBootstraps.enumConstant -> java.lang.invoke.ConstantBootstraps.enumConstant(MethodHandles.Lookup, String, Class)
    • ConstantBootstraps.getStaticFinal -> java.lang.invoke.ConstantBootstraps.getStaticFinal(MethodHandles.Lookup, String, Class, Class)
    • ConstantBootstraps.invoke -> java.lang.invoke.ConstantBootstraps.invoke(MethodHandles.Lookup, String, Class, MethodHandle, Object...)
    • ConstantBootstraps.fieldVarHandle -> java.lang.invoke.ConstantBootstraps.fieldVarHandle(MethodHandles.Lookup, String, Class, Class, Class)
    • ConstantBootstraps.staticFieldVarHandle -> java.lang.invoke.ConstantBootstraps.staticFieldVarHandle(MethodHandles.Lookup, String, Class, Class, Class)
    • ConstantBootstraps.arrayVarHandle -> java.lang.invoke.ConstantBootstraps.arrayVarHandle(MethodHandles.Lookup, String, Class, Class)
    • ConstantBootstraps.explicitCast -> java.lang.invoke.ConstantBootstraps.explicitCast(MethodHandles.Lookup, String, Class, Object)
    • SwitchBootstraps.enumSwitch -> java.lang.runtime.SwitchBootstraps.enumSwitch(MethodHandles.Lookup, String, MethodType, Object...)
    • SwitchBootstraps.stringSwitch -> java.lang.runtime.SwitchBootstraps.typeSwitch(MethodHandles.Lookup, String, MethodType, Object...)
    • ObjectMethods.bootstrap -> java.lang.runtime.ObjectMethods.bootstrap(MethodHandles.Lookup, String, TypeDescriptor, Class, String, MethodHandle...)
  • Field and method descriptors are now verified for correct formatting
  • More supported values in the provided BasicMethodValueLookup (which got moved to a new package)
  • Value lookups for fields/methods are only attempted when value content is known

What's Fixed

  • Tokenizer associating tokens with wrong column
  • OOBE when printing a virtual method with no parameters
  • Unintended breakage of annotation path selection in CompilerOptions
  • ASTElement.range() yielding unexpected positions due to unsorted children
  • Missing special case handling for numbers (NaN and the like)
  • Incorrectly creating additional parameters when disassembling methods with wide-type parameters
  • Many analysis engine problems
    • nop, arraylength, *aload and *astore instructions not being implemented
    • anewarray not popping array size off the stack
    • checkcase not changing the value type on the stack
    • Value analysis truncating small floats and doubles
    • Analysis engine errors not being reported in the common error collector system
    • Revisiting control flow would not merge frames, but overwrite them with the last visited iteration
    • Jump target frames being put at the wrong index
    • Unmatched push and pop in a variety of stack-manipulating and math instructions
    • Incorrect handling of frame merging for terminal instructions
    • Incorrect printing of annotation enum values
    • Incorrect printing of annotation class values
    • Unexpected re-ordering of annotation values
    • Missing char/special-case-number support for annotation values

Full Changelog: 2.3.0...2.4.0