> AI: John - send out javadoc to EG
> derived class := Class.derivedClassFactory(Class mainClass, T userData, String name)
> derived class := Class.derivedClassFactory(Class mainClass, T userData, String name)
In the spirit of the usual "5 min before the meeting" ritual action item panic, I'm trying to review the javadoc for this and can't seem to find it. Can it be sent again?
Thanks,
--Dan
----- Original message -----
From: Karen Kinnear <[email protected]>
Sent by: "valhalla-spec-experts" <[email protected]>
To: [email protected]
Cc:
Subject: minutes Valhalla EG June 07, 2017
Date: Wed, Jun 7, 2017 4:28 PM
Valhalla EG Minutes June 07, 2017attendees: Bjorn, Dan H, Dan S, John, Vlad, Frederic, Lois, Brian, Maurizio, KarenAI ALL:Dan Smith sent an initial draft of a JVMS with experimental support for MVT for review.Feedback in email requested - sooner rather than later please.AI ALL:Review embedded proposal for issue 1 - John javadoc to avoid exposing internal derived value type nameReview embedded proposal for EA for handling CONSTANT_ClassTiming note:Value type exploration is following three timeframes:Minimal Value Types Early Access (EA) - goal: ASAP so we can get feedback from initial usersMinimal Value Types (MVT) - goal: w/JDK10 for much broader feedbackValhalla Value Types - "real" vs. shady values - much richer feature setSome of the issues we are exploring - such as type vs. class will need to evolve, so we needto reach decisions on our initial EA stake in the ground ASAP.For that - review of and conclusions to JVMS and other open issues is needed.Issue 1: Exposure of mirror and mirror name for the value classBjorn: (please correct any inaccuracies)IBM implementation does NOT expose the value type mirror nameValueType.valueClass is the only way to get the value type mirrorgetClassName returns the same answer2 java objects, same underlying datano internal derived value type name is exposedJohn: proposal for breaking the link to the secondary mirrorModel is that there is one primary mirror and multiple secondary mirrorsBrian: one nominal class and multiple derived classes analogous to a DirectMethodHandle and derivedMethodHandlesLater reflection couild add APIs at the java level to get the secondary mirrors- has an initial proposal in which you pass inhead class, user data (e.g. value type descriptor), user-chosen namename is not resolvable, doesn't work for findClass, but visible when reflectingDan H: do we need to ensure user name/user data consistent? That has been an issue in related APIs?John: noKaren: assume we can not use this name to look up a class (forName)? just for reflection to print?John: not for lookupMaurizio: this could be useful today (i.e. for EA) for a value classIssue: Reflection behavior for EAKaren: we already agreed reflection will not work - will throw an exceptionMaurizio: it could be actually easier to use John's factory than to throw an exceptionTiming:AI: John - send out javadoc to EGderived class := Class.derivedClassFactory(Class mainClass, T userData, String name)All: evaluate proposal both for doabilityalso evaluate for timing: EA vs. MVT?Issue 2: Constant Pool representation for derived value type (JVMS term: value class)Goals:1. cache point for usage - need separate storage for DVT and VCC2. prefer not to do string parsing over and over to get the mode3. verifier ensure type safety without additional eager class loading4. ensure single resolution of underlying value-capable-class(longer-term want single resolution of underlying source classfile)5. allow implementations to support older classfiles6. tool support - make sure this works for a mix of constant pool changese.g. tools that do not know about new versions still instrument new classfiles- need to make sure these still work as much as possible- so for these folks we need to not change the meaning of CONSTANT_Class7. future - make sure the model works for future derivation from more than one type- e.g. Foo<Bar>7a. request that for a Parameterized Type: this_class (name and CONSTANT_Class today)allows lazy resolution of the list(ed. note: need to discuss details of "lazy" here - loading the class file perhaps,but instantiating a type from it will need the parameterizations, so far we haveconceptually recorded the loaded class file under the "head" type, with default/erasedparameterizations)8. upside opportunity: Constable and pattern matching - helpful if all class objectswere represented the same way when generating bytecodee.g. int.class vs. Integer.class require different handling today9. migration: a class should be able to migrate to being a value typeapproach: will require boxing to access, but if you pass for example a boxed value typethe current client should continue to work10. migration: value type to reference? Open question11. ed. note: we did not mention that for MVT we actually have multiple source classfiles andat least one potential prototype for parameterized types also generates separate classfiles.While we strongly do not want to build in the concept of multiple separate classfiles, itwould be valuable if the constant pool representation was able to support that.This might help extend to nested classes as well.John:two views of CONSTANT_Class:1. is it a type? then need nested CONSTANT_ClassFile: Class[ClassFile]2. is it a loaded class file? then need surrounding decoration Type[Class]bad third choice: 3. use separately resolved peers Class["name.1"], Class["name.2"] where name is mangled butrefers to same loaded class fileToday: CONSTANT_Class represents both the type and the loaded class file.Dan S:Prefers option 1: type with a reference to a raw classfile(ed. note - Dan S - I didn't get any details on why you prefer this for longer-term, it would helpto understand)(ed. note - Dan S - can you add some notes on how to represent goal #11?)Bjorn:Are there any cases in which a classfile does not represent a reference type?Valhalla - goal is that the classfile represents both value type and the boxed value typeProposal from John/Karen:CONSTANT_Class_info: used for both the "head" LType and the classfile - conflate for backward compatibilityCONSTANT_Value_info: mode information and references the underlying CONSTANT_Class_infoParameterized type: has auxiliary info and references at least on underlying (head) CONSTANT_Class_infoe.g. List<Foo> would reference List class, and Foo would linked to in auxiliary infoAI: AllExplore this potential model:Would this make sense from a JVMS perspective?Would this work for JVM implementations?Would this work for bytecode generation etc?- please check if this is feasible short-term, i.e. for EA- also explore if we could "flop" to #1 laterFeedback:John: short term: Try the proposal above with CONSTANT_Value_info refering to an underlying CONSTANT_Class_infoSpec direction is likely to be CONSTANT_Class references a ClassfileLois: ok with verifierFrederic: ok with bytecodesBjorn: prefer #3 ;Q - for MVT - it has minimal impactok with #2, but the change wouldn't slow us down muchFrederic: todwy - handle by using separate opcodes and all have CONSTANT_Class(ed. note - and we haven't implemented the verifier which would like to sanity checkthat the CONSTANT_Class matches the expected type in the opcode)---3. Ways to phase out current classfile capabilities such as CONSTANT_Class? Or LDC CONSTANT_Class?Brian: jigsaw added the (not so popular) concept of runtime warningsMaurizio - jsr/ret deprecated (John: ACC_SUPER) - not used much - javac was primary client at the timeStackMapTable added - lots of complaintsWhat if long-term we were to derive arrays using multi-level constant pool entriesWhat if we were to support Q[ as well as L arrays?- immutable, non-nullable, identitylessJohn: What if we were to evolve CONSTNAT_MethodType - currently a flat string to use tree structured approach?Dan H: limited numbers of places we parse descriptorsKaren: don't slow down our resolution method and field lookupDan H: limited to resolution timeDan S: might be faster to look up using tree comparison vs. extra long symbolsed. note: worth exploring - just be really sure there is no potential for ambiguity,i.e. at any resolution step: do you have a match for X or Y---4. Box and value implementation relationshipsgoal: reduce costs when boxing/unboxing-e.g. same layout alignment for fields- what if we could just change 1 bit in the carrier---5. Opcode proposal:drop vgetfield, overload getfield insteadBjorn: concern - not want performance impact on existing opcodesJohn: propose discard the extra defined opcode and leave room for quickeningoverload: anewarray, multianewarrayChat room notes on details:John:uses of C_Class as a class-file: this_class, PType head-type (template) uses of C_Class as a type: ldc,?Field/Methodref?Dan S:Arbitrary types allowed: anewarray, multianewarray, structural descriptor, ldc, bootstrap argument,verification_type_info, maybe field/method refsReference types allowed: checkcast, instanceofReferenceclass/species allowed: super_class, interfaces, new, annotation, catch_type, ExceptionsPlain class required: this_class, InnerClasses, EnclosingMethod, maybe field/method refsMaurizio:was thinking the recently that InnerClasses is probably another 'classfile' useJohn:Agreeldc is not arbitrary type, b/c ldc int.class not possible; ldc is L-type only
