Proposal: #ClassFileModuleName
Remi Forax
forax at univ-mlv.fr
Wed Nov 23 20:03:25 UTC 2016
I'm pleased with this proposal,
if obviously, module name are NOT in internal form.
regards,
Rémi
----- Mail original -----
> De: "mark reinhold" <mark.reinhold at oracle.com>
> À: jpms-spec-experts at openjdk.java.net
> Envoyé: Mardi 22 Novembre 2016 17:47:35
> Objet: Proposal: #ClassFileModuleName
> Issue summary
> -------------
>
> #ClassFileModuleName --- The name of a module is not a simple UTF-8
> string but is, rather, derived from the value of the `this_class`
> field of the `ClassFile` structure, which is awkward. [1]
>
> Proposal
> --------
>
> Revise the binary form of module declarations [2] as follows:
>
> - Add a `u2 module_name_index` field to the `Module` class-file
> attribute, immediately preceding the existing `module_flags` field.
> The value of this field will be the index of a `CONSTANT_Utf8_info`
> structure in the constant pool that represents the module's name in
> internal form, i.e., with period characters replaced by slashes [3].
>
> - Rather than encode the module's name in the value of the `this_class`
> field of the `ClassFile` structure, simply set this field to zero.
>
> (Side note: The prototype implementation does not store module names in
> internal form, even though the draft specification [2] has long mandated
> that. The implementation will be fixed.)
>
>
> [1] http://openjdk.java.net/projects/jigsaw/spec/issues/#ClassFileModuleName
> [2] http://cr.openjdk.java.net/~mr/jigsaw/spec/lang-vm.html
> [3] http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.2.1
More information about the jpms-spec-experts
mailing list