Skip to main content
Jump to: navigation, search

Difference between revisions of "OT Bytecode Attributes/OTCompilerVersion"

(New page: =Attribute OTCompilerVersion= ===Intent=== The OTCompilerVersion attribute is used to record which compiler version has generated a given class file. ===Location:=== A team class or a ro...)
 
Line 30: Line 30:
 
:* bits 6-9: minor version number (range 0-15)
 
:* bits 6-9: minor version number (range 0-15)
 
:* bits 1-5: revision (range 0-31)
 
:* bits 1-5: revision (range 0-31)
 +
 +
'''Correlation to OTDT versions''':
  
 
For all versions published from <tt>objectteams.org</tt> the compiler version matched exactly the version of the OTDT.
 
For all versions published from <tt>objectteams.org</tt> the compiler version matched exactly the version of the OTDT.
 +
 
During incubation of the Eclipse Object Teams Project the OTDT version 0.7.x is mapped to the internal compiler version 1.5.x
 
During incubation of the Eclipse Object Teams Project the OTDT version 0.7.x is mapped to the internal compiler version 1.5.x
 
in order to keep the evolution of bytecode versions monotonic.
 
in order to keep the evolution of bytecode versions monotonic.
 +
 +
The OTDT version 2.0.0 after project graduation is identified by the internal compiler version 1.6.0 (this version was also used
 +
by all milestones called 0.8 Mx, which were actually milestones towards 2.0.0).
  
 
[[Category:Object Teams Development]]
 
[[Category:Object Teams Development]]

Revision as of 12:25, 12 May 2011

Attribute OTCompilerVersion

Intent

The OTCompilerVersion attribute is used to record which compiler version has generated a given class file.

Location:

A team class or a role type.

Content:

An integer encoding the compiler/bytecode version (see below).

Purpose:

Detect bytecode incompatibilities due to changes in the compiler.

Format:

   OTCompilerVersion {
     u2 attribute_name_index;
     u4 attribute_length;
     u2 compiler_version;
    }

The items of the OTCompilerVersion structure are as follows:

  • attribute_name_index
The constant_pool entry at that index must be a CONSTANT_Utf8_info representing the string "OTCompilerVersion".
  • attribute_length
The value of the attribute_length item indicates the length of the attribute, excluding the initial six bytes.
  • compiler_version
The value of the compiler_version item is interpreted as a packed structure of three numbers:
  • bits 10-16: major version number (range 0-127)
  • bits 6-9: minor version number (range 0-15)
  • bits 1-5: revision (range 0-31)

Correlation to OTDT versions:

For all versions published from objectteams.org the compiler version matched exactly the version of the OTDT.

During incubation of the Eclipse Object Teams Project the OTDT version 0.7.x is mapped to the internal compiler version 1.5.x in order to keep the evolution of bytecode versions monotonic.

The OTDT version 2.0.0 after project graduation is identified by the internal compiler version 1.6.0 (this version was also used by all milestones called 0.8 Mx, which were actually milestones towards 2.0.0).

Back to the top