protected final StackMapType generate_StackMapType_from_Type ( Type t ) { switch ( t . getType ( ) ) { case Const . T_BOOLEAN : case Const . T_CHAR : case Const . T_BYTE : case Const . T_SHORT : case Const . T_INT : return new StackMapType ( Const . ITEM_Integer , - 1 , pool . getConstantPool ( ) ) ; case Const . T_FLOAT : return new StackMapType ( Const . ITEM_Float , - 1 , pool . getConstantPool ( ) ) ; case Const . T_DOUBLE : return new StackMapType ( Const . ITEM_Double , - 1 , pool . getConstantPool ( ) ) ; case Const . T_LONG : return new StackMapType ( Const . ITEM_Long , - 1 , pool . getConstantPool ( ) ) ; case Const . T_ARRAY : case Const . T_OBJECT : return new StackMapType ( Const . ITEM_Object , pool . addClass ( typeToClassGetName ( t ) ) , pool . getConstantPool ( ) ) ; // UNKNOWN seems to be used for Uninitialized objects. // The second argument to the constructor should be the code offset // of the corresponding 'new' instruction. Just using 0 for now. case Const . T_UNKNOWN : return new StackMapType ( Const . ITEM_NewObject , 0 , pool . getConstantPool ( ) ) ; default : throw new RuntimeException ( "Invalid type: " + t + t . getType ( ) ) ; } }
Convert a Type to a StackMapType .