Re: ModuleNameAndVersionQuery vs CONSTANT_ModuleQuery_Info
On 1/25/2012 1:10 PM, Mandy Chung wrote:
> In a 'requires' clause, version is optional. It seems that
> the version_index in the CONSTANT_ModuleQuery_info structure
> should be zero in that case as in the CONSTANT_ModuleId_info
Yes. The representation of a 'requires' clause
(ModuleRequires.module_table) used to refer to CONSTANT_ModuleId, so it
got version-less queries for free. Then we broke out version queries
I am wondering if we need both kinds of constant pool entry, given that
the JVM can't distinguish between a string which holds a single version
and a string which holds a version query. That is, the strong typing
provided by different kinds of constant pool entries can be subverted.
But I'll leave them both in for now. Project page will update soon.