Review request: update javac to properly output mandated parameters in MethodParameters attributes (original) (raw)
maurizio cimadamore maurizio.cimadamore at oracle.com
Thu Feb 7 12:51:55 PST 2013
- Previous message: Review request: update javac to properly output mandated parameters in MethodParameters attributes
- Next message: Review request: update javac to properly output mandated parameters in MethodParameters attributes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 07-Feb-13 8:29 PM, maurizio cimadamore wrote:
On 07-Feb-13 7:32 PM, Alex Buckley wrote:
In http://cr.openjdk.java.net/~abuckley/8misc.pdf, see JLS 13.1 for new information about explicitly and implicitly declared constructs. Also, see JVMS 4.7.22 for how a compiler emitting class files can mark formal parameters as required by JLS 13.1. Anyway thanks for pointing me out at 13.1 - I missed that on a first scan. It would seem that the spec is not defining (on top of my head - there are probably others): *) (effectively) final variables passed in to inner classes (javac only does that for reference-types as others are just constants that can be produced on the stack at will) *) I believe javac's generated enum constructor has an additional parameter accepting the ordinal Another case - private constructors:
class Outer { class Inner { private Inner() { } }
Inner i = new Inner();
}
javac will append to the Inner's constructor an extra argument called 'accessTag' - which is essentially a type token.
Again, in this case I don't think it would be fair to specify this as 'implicitly declared' as there's a lot of room to manouvre.
Maurizio
It feels like the second should probably be spec'd - the first I don't know - I see a lot of implementation room on that one. In any case, the implementation problem remains: it doesn't distinguish between impl-only parameters and 'implicitly declared' ones. It just takes all parameters that do not have a correspondent in the source code and put them in the same place. Maurizio
- Previous message: Review request: update javac to properly output mandated parameters in MethodParameters attributes
- Next message: Review request: update javac to properly output mandated parameters in MethodParameters attributes
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]