OT Bytecode Attributes/CallinParamMappings

From Eclipsepedia

Jump to: navigation, search

Contents

Attribute CallinParamMappings

Intent

The CallinParamMappings attribute is a variable-length attribute used in the attributes table of method_info structures. This attribute is used to store the declared parameter mappings. It contains an integer list encoding the parameter postitions of a callin replace (only?) binding.

Location:

A callin wrapper method.

Content:

A list of pairs: role method parameter index + base method parameter index.

Purpose:

The OTRE uses this attribute while generating the base call and while weaving a replace callin.

Format:

   CallinParamMappings {
     u2 attribute_name_index;
     u4 attribute_length;
     u2 param_mappings_count;
     CallinParamMapping param_mappings[param_mappings_count];
    }
   
    CallinParamMapping {
     u2 pos_role_param_idx;
    }

The items of the CallinParamMappings structure are as follows:

  • attribute_name_index
The constant_pool entry at that index must be a CONSTANT_Utf8_info representing the string "CallinRoleBaseBindings".
  • attribute_length
The value of the attribute_length item indicates the length of the attribute, excluding the initial six bytes.
  • param_mappings_count
The value of the param_mappings_count item indicates the number of entries in the param_mappings array.
  • param_mappings[]
Each param_mappings array entry contains the following item:
  • pos_role_param_idx
The index of the base method parameter being mapped to the role method parameter at this index.