hg: amber/amber: hooking records to patterns
brian.goetz at oracle.com
Fri Apr 6 18:52:46 UTC 2018
For one reason, because there might not _be_ a primary constructor.
Suppose I have a pattern that takes a matrix and returns its
eigenvalues. There isn't necessarily a "primary constructor" that takes
the eigenvalues and returns a matrix. The descriptor describes the
arity and types of the binding variables -- it's pure type information.
Maybe there's an inverse method with a related descriptor, maybe there
On 4/6/2018 2:29 PM, Remi Forax wrote:
> I'm Ok with this design for the extractor, exporting the component method handles,
> it's not clear for me why the descriptor is not a method handle corresponding to the primary constructor instead of a method type.
> For the implementation, i suppose it's temporary until it uses a ConstantDynamic instead of an Indy.
> Also Flag.RECORD should be named Flag.EXTRACTOR when applied on a method even if it shares the same value.
> ----- Mail original -----
>> De: "Vicente Romero" <vicente.romero at oracle.com>
>> À: "amber-dev" <amber-dev at openjdk.java.net>
>> Envoyé: Vendredi 6 Avril 2018 19:01:44
>> Objet: hg: amber/amber: hooking records to patterns
>> Changeset: 829d99f94b43
>> Author: vromero
>> Date: 2018-04-06 12:28 -0400
>> URL: http://hg.openjdk.java.net/amber/amber/rev/829d99f94b43
>> hooking records to patterns
>> ! make/autoconf/spec.gmk.in
>> ! src/java.base/share/classes/java/lang/compiler/Extractor.java
>> ! src/java.base/share/classes/module-info.java
>> ! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Symtab.java
>> ! src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java
>> ! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Lower.java
>> ! src/jdk.compiler/share/classes/com/sun/tools/javac/util/Names.java
More information about the amber-dev