Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "OT Bytecode Attributes/CallinFlags"

(Format:)
 
(9 intermediate revisions by 2 users not shown)
Line 5: Line 5:
  
 
===Location:===
 
===Location:===
A role method or a callin wrapper.  
+
A role method or a callin wrapper or a base call surrogate (for return type).
  
 
===Content:===
 
===Content:===
Line 11: Line 11:
  
 
===Purpose:===
 
===Purpose:===
CALLIN_FLAG_OVERRIDING: if set, this method is overriding an inherited version.
+
*Used by OTRE:
The OTRE uses this information to realize the inheritance of method bindings.
+
:CALLIN_FLAG_OVERRIDING  
(OTRE internal: This flag prevents the OTRE from generating an empty base-call-surrogate which would wrongly override an inherited (non-empty) version.)
+
:CALLIN_FLAG_WRAPPER
 +
:The OTRE uses this information to realize the inheritance of method bindings.
 +
:(OTRE internal: This flag prevents the OTRE from generating an empty base-call-surrogate which would wrongly override an inherited (non-empty) version.)
 +
 
 +
*The other flags are only used by the compiler.
 +
:CALLIN_FLAG_BASE_SUPER_CALL: OTRE part is handled via [[OT_Bytecode_Attributes/OTSpecialAccess|OTSpecialAccess]] attribute (kind SUPER_METHOD_ACCESS).
  
 
===Format:===
 
===Format:===
Line 24: Line 29:
 
The items of the CallinFlags structure are as follows:  
 
The items of the CallinFlags structure are as follows:  
 
*attribute_name_index
 
*attribute_name_index
:The constant_pool entry at that index must be a CONSTANT_Utf8_info representing the string "CallinRoleBaseBindings".  
+
:The constant_pool entry at that index must be a CONSTANT_Utf8_info representing the string "CallinFlags".  
 
*attribute_length
 
*attribute_length
 
:The value of the attribute_length item indicates the length of the attribute, excluding the initial six bytes.  
 
:The value of the attribute_length item indicates the length of the attribute, excluding the initial six bytes.  
Line 32: Line 37:
  
  
{| cellpadding="5" border="1
+
{| cellpadding="5" border="1"
 
|-
 
|-
 
! Flag Name                                          !! Value                                !! Interpretation
 
! Flag Name                                          !! Value                                !! Interpretation
Line 40: Line 45:
 
| CALLIN_FLAG_WRAPPER    || <tt>2</tt>          ||  this method is the generated team-level callin wrapper
 
| CALLIN_FLAG_WRAPPER    || <tt>2</tt>          ||  this method is the generated team-level callin wrapper
 
|-
 
|-
| CALLIN_FLAG_DEFINITELY_MISSING_BASECALL    || <tt>8</tt>          ||  For base call flow analysis including super calls
+
| CALLIN_FLAG_DEFINITELY_MISSING_BASECALL    || <tt>8</tt>          ||  for base call flow analysis including super calls
 
|-
 
|-
| CALLIN_FLAG_POTENTIALLY_MISSING_BASECALL    || <tt>16</tt>          ||  For base call flow analysis including super calls
+
| CALLIN_FLAG_POTENTIALLY_MISSING_BASECALL    || <tt>16</tt>          ||  for base call flow analysis including super calls
 
|-
 
|-
| CALLIN_FLAG_BASE_SUPER_CALL    || <tt>32</tt>          ||  Is the base call targeting the base's super?  
+
| CALLIN_FLAG_BASE_SUPER_CALL    || <tt>32</tt>          ||  is the base call targeting the base's super?  
 
|-
 
|-
| CALLIN_RETURN_MASK    || <tt>9-12</tt>          ||  Encoding of original non-reference return type.
+
| CALLIN_RETURN_MASK    || bits <tt>9-12</tt>          ||  encoding of original non-reference return type, see <tt>IOTConstants.CALLIN_RETURN_VOID</tt> ff..
 
|}
 
|}
  
  
 
[[Category:Object Teams Development]]
 
[[Category:Object Teams Development]]

Latest revision as of 07:26, 4 July 2010

Attribute CallinFlags

Intent

The CallinFlags attribute is a fixed-length attribute used in the attributes table of method_info structures.

Location:

A role method or a callin wrapper or a base call surrogate (for return type).

Content:

An integer encoding the callin flags.

Purpose:

  • Used by OTRE:
CALLIN_FLAG_OVERRIDING
CALLIN_FLAG_WRAPPER
The OTRE uses this information to realize the inheritance of method bindings.
(OTRE internal: This flag prevents the OTRE from generating an empty base-call-surrogate which would wrongly override an inherited (non-empty) version.)
  • The other flags are only used by the compiler.
CALLIN_FLAG_BASE_SUPER_CALL: OTRE part is handled via OTSpecialAccess attribute (kind SUPER_METHOD_ACCESS).

Format:

   CallinFlags {
     u2 attribute_name_index;
     u4 attribute_length;
     u2 callin_flags;
    } 

The items of the CallinFlags structure are as follows:

  • attribute_name_index
The constant_pool entry at that index must be a CONSTANT_Utf8_info representing the string "CallinFlags".
  • attribute_length
The value of the attribute_length item indicates the length of the attribute, excluding the initial six bytes.
  • callin_flags
The value of the callin_flags item is a mask of flags (used to denote ...). The interpretation of each flag, when set, is as shown in the following:


Flag Name Value Interpretation
CALLIN_FLAG_OVERRIDING 1 this method is overriding an inherited version
CALLIN_FLAG_WRAPPER 2 this method is the generated team-level callin wrapper
CALLIN_FLAG_DEFINITELY_MISSING_BASECALL 8 for base call flow analysis including super calls
CALLIN_FLAG_POTENTIALLY_MISSING_BASECALL 16 for base call flow analysis including super calls
CALLIN_FLAG_BASE_SUPER_CALL 32 is the base call targeting the base's super?
CALLIN_RETURN_MASK bits 9-12 encoding of original non-reference return type, see IOTConstants.CALLIN_RETURN_VOID ff..

Back to the top