RFR: 8152641: Plugin to generate BMH$Species classes ahead-of-time
Claes Redestad
claes.redestad at oracle.com
Fri Apr 1 12:32:08 UTC 2016
Hi Mandy et al,
On 2016-04-01 01:10, Mandy Chung wrote:
> GenerateBMHClassesPlugin::configure
> The plugin should validate of the input argument and throw an exception if it’s invalid. The plugin API is still being revised and JDK-8152800 is related to the exception case. The existing plugins throw PluginException. GenerateBMHClassesPlugin can do the same.
>
> Perhaps the expanded signatures should be stored after validation.
>
> GenerateBMHClassesPlugin::generateConcreteClass
> It issues a warning if any exception thrown. If the user specifies the types in the command line, they should specify the valid values (I would expect). I prefer it to be an error and throw PluginException.
>
> It may be time to rename this plugin to —-generate-jli-classes plugin, as John suggests. A jlink plugin can define its sub options e.g. —-generate-jli-classes=bmh[:species=LL,LLL].
>
> Can you add a test to sanity test if the classes are generated (both the default species types as well as specified in the input argument)?
>
> Mandy
http://cr.openjdk.java.net/~redestad/8152641/webrev.06/
- Renamed GenerateBMHClassesPlugin to GenerateJLIClassesPlugin,
--generate-bmh -> --generate-jli-classes
- Implement control of BMH species with sub-parameters
--generate-jli-classes=bmh:bmh-species=LL,L3,L5 etc. This will be easy
to extend into something like
--generate-jli-classes=all:bmh-species=LL,L3,...:invokers=??,...:lambda-forms=??,...
as we add other things to this plugin
- Expand and validate input in the plugin
- Add a test which tests default, explicit, invalid and disabled cases
- Add a defaultSpecies() method for testing convenience together with a
comment alluding to how it was generated.
- Bumped the counter in JLinkTest...[1]
To try and answer John's other comments: Yes, I intend to file RFEs and
work on adding support to generate other j.l.i classes in the near
future as time allows, and also have some naïve hope that we can add
support to generate the default input arguments at build-time.
Thanks for all the feedback and reviews!
/Claes
[1] Mandy filed https://bugs.openjdk.java.net/browse/JDK-8153238 to
improve this test.
More information about the jigsaw-dev
mailing list