History log of /external/turbine/javatests/com/google/turbine/bytecode/sig/SigRegressionTest.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
4b69277c912bf7ab6f9915f407ec5cb207566747 25-Oct-2016 cushon <cushon@google.com> Fix type canonicalization of recursive types, and wildcards

Instantiate types recursively; previously [T/e]A<T> worked but
[T/e]A<B<T>> didn't.

Also handle instantiating arrays with parametric element types, which
can't appear as top-level types during canonicalization but can appear
as type arguments (e.g. [T/e]A<T[]> -> A<e[]>).

The array instantiation case is interesting because it allows the
creation of arrays with wildcard element types. The JVMS signature
grammar [1] doesn't actually allow that, but both javac and ecj can be
coerced into emitting it:

class A<X> { class I {} }
class Test {
class B<Y> extends A<Y[]> {}
B<?>.I i; // LA<[*>.I;
}

To support this, restructure the type and signature models to make
wildcards first-class types, instead of only allowing them as top-level
type arguments.

[1] https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.7.9.1

MOE_MIGRATED_REVID=137101539
/external/turbine/javatests/com/google/turbine/bytecode/sig/SigRegressionTest.java
38a11c000aff3774567d354577cea2d2af65aaa7 19-Sep-2016 cushon <cushon@google.com> JVMS 4.3.4 signature parsing and output

The next phase of header compilation will perform type analysis, and it needs
to be able to reason about types in bytecode. This is a step towards exposing
type information in BytecodeBoundClass. Writing signatures back to strings
won't be needed until lowering is implemented, but it makes this easier to test.

MOE_MIGRATED_REVID=133627571
/external/turbine/javatests/com/google/turbine/bytecode/sig/SigRegressionTest.java