From c008648c4984ee34a99ac24917fd504302e33c00 Mon Sep 17 00:00:00 2001 From: Julien Gamba Date: Sun, 23 Jun 2024 09:01:23 +0000 Subject: [PATCH] Clean up unused functions in opcodes.rs --- src/opcodes.rs | 467 ------------------------------------------------- 1 file changed, 467 deletions(-) diff --git a/src/opcodes.rs b/src/opcodes.rs index 9893ac7..2327347 100644 --- a/src/opcodes.rs +++ b/src/opcodes.rs @@ -1,4 +1,3 @@ -use std::fmt; use log::warn; #[allow(non_camel_case_types)] @@ -491,470 +490,4 @@ impl OpCode { 0xff => Some(OpCode::CONST_METHOD_TYPE), // Instruction 21c, } } - - pub fn get_inst_format(&self) -> Option<&str> { - match self { - OpCode::NOP => Some("Instruction10x"), - OpCode::MOVE => Some("Instruction12x"), - OpCode::MOVE_FROM16 => Some("Instruction22x"), - OpCode::MOVE_16 => Some("Instruction32x"), - OpCode::MOVE_WIDE => Some("Instruction12x"), - OpCode::MOVE_WIDE_FROM16 => Some("Instruction22x"), - OpCode::MOVE_WIDE_16 => Some("Instruction32x"), - OpCode::MOVE_OBJECT => Some("Instruction12x"), - OpCode::MOVE_OBJECT_FROM16 => Some("Instruction22x"), - OpCode::MOVE_OBJECT_16 => Some("Instruction32x"), - OpCode::MOVE_RESULT => Some("Instruction11x"), - OpCode::MOVE_RESULT_WIDE => Some("Instruction11x"), - OpCode::MOVE_RESULT_OBJECT => Some("Instruction11x"), - OpCode::MOVE_EXCEPTION => Some("Instruction11x"), - OpCode::RETURN_VOID => Some("Instruction10x"), - OpCode::RETURN => Some("Instruction11x"), - OpCode::RETURN_WIDE => Some("Instruction11x"), - OpCode::RETURN_OBJECT => Some("Instruction11x"), - OpCode::CONST_4 => Some("Instruction11n"), - OpCode::CONST_16 => Some("Instruction21s"), - OpCode::CONST => Some("Instruction31i"), - OpCode::CONST_HIGH16 => Some("Instruction21h"), - OpCode::CONST_WIDE_16 => Some("Instruction21s"), - OpCode::CONST_WIDE_32 => Some("Instruction31i"), - OpCode::CONST_WIDE => Some("Instruction51l"), - OpCode::CONST_WIDE_HIGH16 => Some("Instruction21h"), - OpCode::CONST_STRING => Some("Instruction21c"), - OpCode::CONST_STRING_JUMBO => Some("Instruction31c"), - OpCode::CONST_CLASS => Some("Instruction21c"), - OpCode::MONITOR_ENTER => Some("Instruction11x"), - OpCode::MONITOR_EXIT => Some("Instruction11x"), - OpCode::CHECK_CAST => Some("Instruction21c"), - OpCode::INSTANCE_OF => Some("Instruction22c"), - OpCode::ARRAY_LENGTH => Some("Instruction12x"), - OpCode::NEW_INSTANCE => Some("Instruction21c"), - OpCode::NEW_ARRAY => Some("Instruction22c"), - OpCode::FILLED_NEW_ARRAY => Some("Instruction35c"), - OpCode::FILLED_NEW_ARRAY_RANGE => Some("Instruction3rc"), - OpCode::FILL_ARRAY_DATA => Some("Instruction31t"), - OpCode::THROW => Some("Instruction11x"), - OpCode::GOTO => Some("Instruction10t"), - OpCode::GOTO_16 => Some("Instruction20t"), - OpCode::GOTO_32 => Some("Instruction30t"), - OpCode::PACKED_SWITCH => Some("Instruction31t"), - OpCode::SPARSE_SWITCH => Some("Instruction31t"), - OpCode::CMPL_FLOAT => Some("Instruction23x"), - OpCode::CMPG_FLOAT => Some("Instruction23x"), - OpCode::CMPL_DOUBLE => Some("Instruction23x"), - OpCode::CMPG_DOUBLE => Some("Instruction23x"), - OpCode::CMP_LONG => Some("Instruction23x"), - OpCode::IF_EQ => Some("Instruction22t"), - OpCode::IF_NE => Some("Instruction22t"), - OpCode::IF_LT => Some("Instruction22t"), - OpCode::IF_GE => Some("Instruction22t"), - OpCode::IF_GT => Some("Instruction22t"), - OpCode::IF_LE => Some("Instruction22t"), - OpCode::IF_EQZ => Some("Instruction21t"), - OpCode::IF_NEZ => Some("Instruction21t"), - OpCode::IF_LTZ => Some("Instruction21t"), - OpCode::IF_GEZ => Some("Instruction21t"), - OpCode::IF_GTZ => Some("Instruction21t"), - OpCode::IF_LEZ => Some("Instruction21t"), - OpCode::AGET => Some("Instruction23x"), - OpCode::AGET_WIDE => Some("Instruction23x"), - OpCode::AGET_OBJECT => Some("Instruction23x"), - OpCode::AGET_BOOLEAN => Some("Instruction23x"), - OpCode::AGET_BYTE => Some("Instruction23x"), - OpCode::AGET_CHAR => Some("Instruction23x"), - OpCode::AGET_SHORT => Some("Instruction23x"), - OpCode::APUT => Some("Instruction23x"), - OpCode::APUT_WIDE => Some("Instruction23x"), - OpCode::APUT_OBJECT => Some("Instruction23x"), - OpCode::APUT_BOOLEAN => Some("Instruction23x"), - OpCode::APUT_BYTE => Some("Instruction23x"), - OpCode::APUT_CHAR => Some("Instruction23x"), - OpCode::APUT_SHORT => Some("Instruction23x"), - OpCode::IGET => Some("Instruction22c"), - OpCode::IGET_WIDE => Some("Instruction22c"), - OpCode::IGET_OBJECT => Some("Instruction22c"), - OpCode::IGET_BOOLEAN => Some("Instruction22c"), - OpCode::IGET_BYTE => Some("Instruction22c"), - OpCode::IGET_CHAR => Some("Instruction22c"), - OpCode::IGET_SHORT => Some("Instruction22c"), - OpCode::IPUT => Some("Instruction22c"), - OpCode::IPUT_WIDE => Some("Instruction22c"), - OpCode::IPUT_OBJECT => Some("Instruction22c"), - OpCode::IPUT_BOOLEAN => Some("Instruction22c"), - OpCode::IPUT_BYTE => Some("Instruction22c"), - OpCode::IPUT_CHAR => Some("Instruction22c"), - OpCode::IPUT_SHORT => Some("Instruction22c"), - OpCode::SGET => Some("Instruction21c"), - OpCode::SGET_WIDE => Some("Instruction21c"), - OpCode::SGET_OBJECT => Some("Instruction21c"), - OpCode::SGET_BOOLEAN => Some("Instruction21c"), - OpCode::SGET_BYTE => Some("Instruction21c"), - OpCode::SGET_CHAR => Some("Instruction21c"), - OpCode::SGET_SHORT => Some("Instruction21c"), - OpCode::SPUT => Some("Instruction21c"), - OpCode::SPUT_WIDE => Some("Instruction21c"), - OpCode::SPUT_OBJECT => Some("Instruction21c"), - OpCode::SPUT_BOOLEAN => Some("Instruction21c"), - OpCode::SPUT_BYTE => Some("Instruction21c"), - OpCode::SPUT_CHAR => Some("Instruction21c"), - OpCode::SPUT_SHORT => Some("Instruction21c"), - OpCode::INVOKE_VIRTUAL => Some("Instruction35c"), - OpCode::INVOKE_SUPER => Some("Instruction35c"), - OpCode::INVOKE_DIRECT => Some("Instruction35c"), - OpCode::INVOKE_STATIC => Some("Instruction35c"), - OpCode::INVOKE_INTERFACE => Some("Instruction35c"), - OpCode::INVOKE_VIRTUAL_RANGE => Some("Instruction3rc"), - OpCode::INVOKE_SUPER_RANGE => Some("Instruction3rc"), - OpCode::INVOKE_DIRECT_RANGE => Some("Instruction3rc"), - OpCode::INVOKE_STATIC_RANGE => Some("Instruction3rc"), - OpCode::INVOKE_INTERFACE_RANGE => Some("Instruction3rc"), - OpCode::NEG_INT => Some("Instruction12x"), - OpCode::NOT_INT => Some("Instruction12x"), - OpCode::NEG_LONG => Some("Instruction12x"), - OpCode::NOT_LONG => Some("Instruction12x"), - OpCode::NEG_FLOAT => Some("Instruction12x"), - OpCode::NEG_DOUBLE => Some("Instruction12x"), - OpCode::INT_TO_LONG => Some("Instruction12x"), - OpCode::INT_TO_FLOAT => Some("Instruction12x"), - OpCode::INT_TO_DOUBLE => Some("Instruction12x"), - OpCode::LONG_TO_INT => Some("Instruction12x"), - OpCode::LONG_TO_FLOAT => Some("Instruction12x"), - OpCode::LONG_TO_DOUBLE => Some("Instruction12x"), - OpCode::FLOAT_TO_INT => Some("Instruction12x"), - OpCode::FLOAT_TO_LONG => Some("Instruction12x"), - OpCode::FLOAT_TO_DOUBLE => Some("Instruction12x"), - OpCode::DOUBLE_TO_INT => Some("Instruction12x"), - OpCode::DOUBLE_TO_LONG => Some("Instruction12x"), - OpCode::DOUBLE_TO_FLOAT => Some("Instruction12x"), - OpCode::INT_TO_BYTE => Some("Instruction12x"), - OpCode::INT_TO_CHAR => Some("Instruction12x"), - OpCode::INT_TO_SHORT => Some("Instruction12x"), - OpCode::ADD_INT => Some("Instruction23x"), - OpCode::SUB_INT => Some("Instruction23x"), - OpCode::MUL_INT => Some("Instruction23x"), - OpCode::DIV_INT => Some("Instruction23x"), - OpCode::REM_INT => Some("Instruction23x"), - OpCode::AND_INT => Some("Instruction23x"), - OpCode::OR_INT => Some("Instruction23x"), - OpCode::XOR_INT => Some("Instruction23x"), - OpCode::SHL_INT => Some("Instruction23x"), - OpCode::SHR_INT => Some("Instruction23x"), - OpCode::USHR_INT => Some("Instruction23x"), - OpCode::ADD_LONG => Some("Instruction23x"), - OpCode::SUB_LONG => Some("Instruction23x"), - OpCode::MUL_LONG => Some("Instruction23x"), - OpCode::DIV_LONG => Some("Instruction23x"), - OpCode::REM_LONG => Some("Instruction23x"), - OpCode::AND_LONG => Some("Instruction23x"), - OpCode::OR_LONG => Some("Instruction23x"), - OpCode::XOR_LONG => Some("Instruction23x"), - OpCode::SHL_LONG => Some("Instruction23x"), - OpCode::SHR_LONG => Some("Instruction23x"), - OpCode::USHR_LONG => Some("Instruction23x"), - OpCode::ADD_FLOAT => Some("Instruction23x"), - OpCode::SUB_FLOAT => Some("Instruction23x"), - OpCode::MUL_FLOAT => Some("Instruction23x"), - OpCode::DIV_FLOAT => Some("Instruction23x"), - OpCode::REM_FLOAT => Some("Instruction23x"), - OpCode::ADD_DOUBLE => Some("Instruction23x"), - OpCode::SUB_DOUBLE => Some("Instruction23x"), - OpCode::MUL_DOUBLE => Some("Instruction23x"), - OpCode::DIV_DOUBLE => Some("Instruction23x"), - OpCode::REM_DOUBLE => Some("Instruction23x"), - OpCode::ADD_INT_2ADDR => Some("Instruction12x"), - OpCode::SUB_INT_2ADDR => Some("Instruction12x"), - OpCode::MUL_INT_2ADDR => Some("Instruction12x"), - OpCode::DIV_INT_2ADDR => Some("Instruction12x"), - OpCode::REM_INT_2ADDR => Some("Instruction12x"), - OpCode::AND_INT_2ADDR => Some("Instruction12x"), - OpCode::OR_INT_2ADDR => Some("Instruction12x"), - OpCode::XOR_INT_2ADDR => Some("Instruction12x"), - OpCode::SHL_INT_2ADDR => Some("Instruction12x"), - OpCode::SHR_INT_2ADDR => Some("Instruction12x"), - OpCode::USHR_INT_2ADDR => Some("Instruction12x"), - OpCode::ADD_LONG_2ADDR => Some("Instruction12x"), - OpCode::SUB_LONG_2ADDR => Some("Instruction12x"), - OpCode::MUL_LONG_2ADDR => Some("Instruction12x"), - OpCode::DIV_LONG_2ADDR => Some("Instruction12x"), - OpCode::REM_LONG_2ADDR => Some("Instruction12x"), - OpCode::AND_LONG_2ADDR => Some("Instruction12x"), - OpCode::OR_LONG_2ADDR => Some("Instruction12x"), - OpCode::XOR_LONG_2ADDR => Some("Instruction12x"), - OpCode::SHL_LONG_2ADDR => Some("Instruction12x"), - OpCode::SHR_LONG_2ADDR => Some("Instruction12x"), - OpCode::USHR_LONG_2ADDR => Some("Instruction12x"), - OpCode::ADD_FLOAT_2ADDR => Some("Instruction12x"), - OpCode::SUB_FLOAT_2ADDR => Some("Instruction12x"), - OpCode::MUL_FLOAT_2ADDR => Some("Instruction12x"), - OpCode::DIV_FLOAT_2ADDR => Some("Instruction12x"), - OpCode::REM_FLOAT_2ADDR => Some("Instruction12x"), - OpCode::ADD_DOUBLE_2ADDR => Some("Instruction12x"), - OpCode::SUB_DOUBLE_2ADDR => Some("Instruction12x"), - OpCode::MUL_DOUBLE_2ADDR => Some("Instruction12x"), - OpCode::DIV_DOUBLE_2ADDR => Some("Instruction12x"), - OpCode::REM_DOUBLE_2ADDR => Some("Instruction12x"), - OpCode::ADD_INT_LIT16 => Some("Instruction22s"), - OpCode::RSUB_INT => Some("Instruction22s"), - OpCode::MUL_INT_LIT16 => Some("Instruction22s"), - OpCode::DIV_INT_LIT16 => Some("Instruction22s"), - OpCode::REM_INT_LIT16 => Some("Instruction22s"), - OpCode::AND_INT_LIT16 => Some("Instruction22s"), - OpCode::OR_INT_LIT16 => Some("Instruction22s"), - OpCode::XOR_INT_LIT16 => Some("Instruction22s"), - OpCode::ADD_INT_LIT8 => Some("Instruction22b"), - OpCode::RSUB_INT_LIT8 => Some("Instruction22b"), - OpCode::MUL_INT_LIT8 => Some("Instruction22b"), - OpCode::DIV_INT_LIT8 => Some("Instruction22b"), - OpCode::REM_INT_LIT8 => Some("Instruction22b"), - OpCode::AND_INT_LIT8 => Some("Instruction22b"), - OpCode::OR_INT_LIT8 => Some("Instruction22b"), - OpCode::XOR_INT_LIT8 => Some("Instruction22b"), - OpCode::SHL_INT_LIT8 => Some("Instruction22b"), - OpCode::SHR_INT_LIT8 => Some("Instruction22b"), - OpCode::USHR_INT_LIT8 => Some("Instruction22b"), - OpCode::INVOKE_POLYMORPHIC => Some("Instruction45cc",), - OpCode::INVOKE_POLYMORPHIC_RANGE => Some("Instruction4rcc",), - OpCode::INVOKE_CUSTOM => Some("Instruction35c",), - OpCode::INVOKE_CUSTOM_RANGE => Some("Instruction3rc",), - OpCode::CONST_METHOD_HANDLE => Some("Instruction21c",), - OpCode::CONST_METHOD_TYPE => Some("Instruction21c",), - OpCode::PACKED_SWITCH_PAYLOAD => Some("packed-switch-payload"), - OpCode::SPARSE_SWITCH_PAYLOAD => Some("sparse-switch-payload"), - OpCode::FILL_ARRAY_DATA_PAYLOAD => Some("fill-array-data-payload"), - } - } -} - -impl fmt::Display for OpCode { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - match self { - OpCode::NOP => write!(f, "nop"), - OpCode::MOVE => write!(f, "move"), - OpCode::MOVE_FROM16 => write!(f, "move-from16"), - OpCode::MOVE_16 => write!(f, "move-16"), - OpCode::MOVE_WIDE => write!(f, "move-wide"), - OpCode::MOVE_WIDE_FROM16 => write!(f, "move-wide/from16"), - OpCode::MOVE_WIDE_16 => write!(f, "move-wide/16"), - OpCode::MOVE_OBJECT => write!(f, "move-object"), - OpCode::MOVE_OBJECT_FROM16 => write!(f, "move-object/from16"), - OpCode::MOVE_OBJECT_16 => write!(f, "move-object/16"), - OpCode::MOVE_RESULT => write!(f, "move-result"), - OpCode::MOVE_RESULT_WIDE => write!(f, "move-result-wide"), - OpCode::MOVE_RESULT_OBJECT => write!(f, "move-result-object"), - OpCode::MOVE_EXCEPTION => write!(f, "move-exception"), - OpCode::RETURN_VOID => write!(f, "return-void"), - OpCode::RETURN => write!(f, "return"), - OpCode::RETURN_WIDE => write!(f, "return-wide"), - OpCode::RETURN_OBJECT => write!(f, "return-object"), - OpCode::CONST_4 => write!(f, "const/4"), - OpCode::CONST_16 => write!(f, "const/16"), - OpCode::CONST => write!(f, "const"), - OpCode::CONST_HIGH16 => write!(f, "const-high16"), - OpCode::CONST_WIDE_16 => write!(f, "const-wide/16"), - OpCode::CONST_WIDE_32 => write!(f, "const-wide/32"), - OpCode::CONST_WIDE => write!(f, "const-wide"), - OpCode::CONST_WIDE_HIGH16 => write!(f, "const-wide/high16"), - OpCode::CONST_STRING => write!(f, "const-string"), - OpCode::CONST_STRING_JUMBO => write!(f, "const-string/jumbo"), - OpCode::CONST_CLASS => write!(f, "const-class"), - OpCode::MONITOR_ENTER => write!(f, "monitor-enter"), - OpCode::MONITOR_EXIT => write!(f, "monitor-exit"), - OpCode::CHECK_CAST => write!(f, "check-cast"), - OpCode::INSTANCE_OF => write!(f, "instance-of"), - OpCode::ARRAY_LENGTH => write!(f, "array-length"), - OpCode::NEW_INSTANCE => write!(f, "new-instance"), - OpCode::NEW_ARRAY => write!(f, "new-array"), - OpCode::FILLED_NEW_ARRAY => write!(f, "filled-new-array"), - OpCode::FILLED_NEW_ARRAY_RANGE => write!(f, "filled-new-array/range"), - OpCode::FILL_ARRAY_DATA => write!(f, "fill-array-data"), - OpCode::THROW => write!(f, "throw"), - OpCode::GOTO => write!(f, "goto"), - OpCode::GOTO_16 => write!(f, "goto-16"), - OpCode::GOTO_32 => write!(f, "goto-32"), - OpCode::PACKED_SWITCH => write!(f, "packed-switch"), - OpCode::SPARSE_SWITCH => write!(f, "sparse-switch"), - OpCode::CMPL_FLOAT => write!(f, "cmpl-float"), - OpCode::CMPG_FLOAT => write!(f, "cmpg-float"), - OpCode::CMPL_DOUBLE => write!(f, "cmpl-double"), - OpCode::CMPG_DOUBLE => write!(f, "cmpg-double"), - OpCode::CMP_LONG => write!(f, "cmp-long"), - OpCode::IF_EQ => write!(f, "if-eq"), - OpCode::IF_NE => write!(f, "if-ne"), - OpCode::IF_LT => write!(f, "if-lt"), - OpCode::IF_GE => write!(f, "if-ge"), - OpCode::IF_GT => write!(f, "if-gt"), - OpCode::IF_LE => write!(f, "if-le"), - OpCode::IF_EQZ => write!(f, "if-eqz"), - OpCode::IF_NEZ => write!(f, "if-nez"), - OpCode::IF_LTZ => write!(f, "if-ltz"), - OpCode::IF_GEZ => write!(f, "if-gez"), - OpCode::IF_GTZ => write!(f, "if-gtz"), - OpCode::IF_LEZ => write!(f, "if-lez"), - OpCode::AGET => write!(f, "aget"), - OpCode::AGET_WIDE => write!(f, "aget-wide"), - OpCode::AGET_OBJECT => write!(f, "aget-object"), - OpCode::AGET_BOOLEAN => write!(f, "aget-boolean"), - OpCode::AGET_BYTE => write!(f, "aget-byte"), - OpCode::AGET_CHAR => write!(f, "aget-char"), - OpCode::AGET_SHORT => write!(f, "aget-short"), - OpCode::APUT => write!(f, "aput"), - OpCode::APUT_WIDE => write!(f, "aput-wide"), - OpCode::APUT_OBJECT => write!(f, "aput-object"), - OpCode::APUT_BOOLEAN => write!(f, "aput-boolean"), - OpCode::APUT_BYTE => write!(f, "aput-byte"), - OpCode::APUT_CHAR => write!(f, "aput-char"), - OpCode::APUT_SHORT => write!(f, "aput-short"), - OpCode::IGET => write!(f, "iget"), - OpCode::IGET_WIDE => write!(f, "iget-wide"), - OpCode::IGET_OBJECT => write!(f, "iget-object"), - OpCode::IGET_BOOLEAN => write!(f, "iget-boolean"), - OpCode::IGET_BYTE => write!(f, "iget-byte"), - OpCode::IGET_CHAR => write!(f, "iget-char"), - OpCode::IGET_SHORT => write!(f, "iget-short"), - OpCode::IPUT => write!(f, "iput"), - OpCode::IPUT_WIDE => write!(f, "iput-wide"), - OpCode::IPUT_OBJECT => write!(f, "iput-object"), - OpCode::IPUT_BOOLEAN => write!(f, "iput-boolean"), - OpCode::IPUT_BYTE => write!(f, "iput-byte"), - OpCode::IPUT_CHAR => write!(f, "iput-char"), - OpCode::IPUT_SHORT => write!(f, "iput-short"), - OpCode::SGET => write!(f, "sget"), - OpCode::SGET_WIDE => write!(f, "sget-wide"), - OpCode::SGET_OBJECT => write!(f, "sget-object"), - OpCode::SGET_BOOLEAN => write!(f, "sget-boolean"), - OpCode::SGET_BYTE => write!(f, "sget-byte"), - OpCode::SGET_CHAR => write!(f, "sget-char"), - OpCode::SGET_SHORT => write!(f, "sget-short"), - OpCode::SPUT => write!(f, "sput"), - OpCode::SPUT_WIDE => write!(f, "sput-wide"), - OpCode::SPUT_OBJECT => write!(f, "sput-object"), - OpCode::SPUT_BOOLEAN => write!(f, "sput-boolean"), - OpCode::SPUT_BYTE => write!(f, "sput-byte"), - OpCode::SPUT_CHAR => write!(f, "sput-char"), - OpCode::SPUT_SHORT => write!(f, "sput-short"), - OpCode::INVOKE_VIRTUAL => write!(f, "invoke-virtual"), - OpCode::INVOKE_SUPER => write!(f, "invoke-super"), - OpCode::INVOKE_DIRECT => write!(f, "invoke-direct"), - OpCode::INVOKE_STATIC => write!(f, "invoke-static"), - OpCode::INVOKE_INTERFACE => write!(f, "invoke-interface"), - OpCode::INVOKE_VIRTUAL_RANGE => write!(f, "invoke-virtual/range"), - OpCode::INVOKE_SUPER_RANGE => write!(f, "invoke-super/range"), - OpCode::INVOKE_DIRECT_RANGE => write!(f, "invoke-direct/range"), - OpCode::INVOKE_STATIC_RANGE => write!(f, "invoke-static/range"), - OpCode::INVOKE_INTERFACE_RANGE => write!(f, "invoke-interface/range"), - OpCode::NEG_INT => write!(f, "neg-int"), - OpCode::NOT_INT => write!(f, "not-int"), - OpCode::NEG_LONG => write!(f, "neg-long"), - OpCode::NOT_LONG => write!(f, "not-long"), - OpCode::NEG_FLOAT => write!(f, "neg-float"), - OpCode::NEG_DOUBLE => write!(f, "neg-double"), - OpCode::INT_TO_LONG => write!(f, "int-to-long"), - OpCode::INT_TO_FLOAT => write!(f, "int-to-float"), - OpCode::INT_TO_DOUBLE => write!(f, "int-to-double"), - OpCode::LONG_TO_INT => write!(f, "long-to-int"), - OpCode::LONG_TO_FLOAT => write!(f, "long-to-float"), - OpCode::LONG_TO_DOUBLE => write!(f, "long-to-double"), - OpCode::FLOAT_TO_INT => write!(f, "float-to-int"), - OpCode::FLOAT_TO_LONG => write!(f, "float-to-long"), - OpCode::FLOAT_TO_DOUBLE => write!(f, "float-to-double"), - OpCode::DOUBLE_TO_INT => write!(f, "double-to-int"), - OpCode::DOUBLE_TO_LONG => write!(f, "double-to-long"), - OpCode::DOUBLE_TO_FLOAT => write!(f, "double-to-float"), - OpCode::INT_TO_BYTE => write!(f, "int-to-byte"), - OpCode::INT_TO_CHAR => write!(f, "int-to-char"), - OpCode::INT_TO_SHORT => write!(f, "int-to-short"), - OpCode::ADD_INT => write!(f, "add-int"), - OpCode::SUB_INT => write!(f, "sub-int"), - OpCode::MUL_INT => write!(f, "mul-int"), - OpCode::DIV_INT => write!(f, "div-int"), - OpCode::REM_INT => write!(f, "rem-int"), - OpCode::AND_INT => write!(f, "and-int"), - OpCode::OR_INT => write!(f, "or-int"), - OpCode::XOR_INT => write!(f, "xor-int"), - OpCode::SHL_INT => write!(f, "shl-int"), - OpCode::SHR_INT => write!(f, "shr-int"), - OpCode::USHR_INT => write!(f, "ushr-int"), - OpCode::ADD_LONG => write!(f, "add-long"), - OpCode::SUB_LONG => write!(f, "sub-long"), - OpCode::MUL_LONG => write!(f, "mul-long"), - OpCode::DIV_LONG => write!(f, "div-long"), - OpCode::REM_LONG => write!(f, "rem-long"), - OpCode::AND_LONG => write!(f, "and-long"), - OpCode::OR_LONG => write!(f, "or-long"), - OpCode::XOR_LONG => write!(f, "xor-long"), - OpCode::SHL_LONG => write!(f, "shl-long"), - OpCode::SHR_LONG => write!(f, "shr-long"), - OpCode::USHR_LONG => write!(f, "ushr-long"), - OpCode::ADD_FLOAT => write!(f, "add-float"), - OpCode::SUB_FLOAT => write!(f, "sub-float"), - OpCode::MUL_FLOAT => write!(f, "mul-float"), - OpCode::DIV_FLOAT => write!(f, "div-float"), - OpCode::REM_FLOAT => write!(f, "rem-float"), - OpCode::ADD_DOUBLE => write!(f, "add-double"), - OpCode::SUB_DOUBLE => write!(f, "sub-double"), - OpCode::MUL_DOUBLE => write!(f, "mul-double"), - OpCode::DIV_DOUBLE => write!(f, "div-double"), - OpCode::REM_DOUBLE => write!(f, "rem-double"), - OpCode::ADD_INT_2ADDR => write!(f, "add-int/2addr"), - OpCode::SUB_INT_2ADDR => write!(f, "sub-int/2addr"), - OpCode::MUL_INT_2ADDR => write!(f, "mul-int/2addr"), - OpCode::DIV_INT_2ADDR => write!(f, "div-int/2addr"), - OpCode::REM_INT_2ADDR => write!(f, "rem-int/2addr"), - OpCode::AND_INT_2ADDR => write!(f, "and-int/2addr"), - OpCode::OR_INT_2ADDR => write!(f, "or-int/2addr"), - OpCode::XOR_INT_2ADDR => write!(f, "xor-int/2addr"), - OpCode::SHL_INT_2ADDR => write!(f, "shl-int/2addr"), - OpCode::SHR_INT_2ADDR => write!(f, "shr-int/2addr"), - OpCode::USHR_INT_2ADDR => write!(f, "ushr-int/2addr"), - OpCode::ADD_LONG_2ADDR => write!(f, "add-long/2addr"), - OpCode::SUB_LONG_2ADDR => write!(f, "sub-long/2addr"), - OpCode::MUL_LONG_2ADDR => write!(f, "mul-long/2addr"), - OpCode::DIV_LONG_2ADDR => write!(f, "div-long/2addr"), - OpCode::REM_LONG_2ADDR => write!(f, "rem-long/2addr"), - OpCode::AND_LONG_2ADDR => write!(f, "and-long/2addr"), - OpCode::OR_LONG_2ADDR => write!(f, "or-long/2addr"), - OpCode::XOR_LONG_2ADDR => write!(f, "xor-long/2addr"), - OpCode::SHL_LONG_2ADDR => write!(f, "shl-long/2addr"), - OpCode::SHR_LONG_2ADDR => write!(f, "shr-long/2addr"), - OpCode::USHR_LONG_2ADDR => write!(f, "ushr-long/2addr"), - OpCode::ADD_FLOAT_2ADDR => write!(f, "add-float/2addr"), - OpCode::SUB_FLOAT_2ADDR => write!(f, "sub-float/2addr"), - OpCode::MUL_FLOAT_2ADDR => write!(f, "mul-float/2addr"), - OpCode::DIV_FLOAT_2ADDR => write!(f, "div-float/2addr"), - OpCode::REM_FLOAT_2ADDR => write!(f, "rem-float/2addr"), - OpCode::ADD_DOUBLE_2ADDR => write!(f, "add-double/2addr"), - OpCode::SUB_DOUBLE_2ADDR => write!(f, "sub-double/2addr"), - OpCode::MUL_DOUBLE_2ADDR => write!(f, "mul-double/2addr"), - OpCode::DIV_DOUBLE_2ADDR => write!(f, "div-double/2addr"), - OpCode::REM_DOUBLE_2ADDR => write!(f, "rem-double/2addr"), - OpCode::ADD_INT_LIT16 => write!(f, "add-int/lit16"), - OpCode::RSUB_INT => write!(f, "rsub-int"), - OpCode::MUL_INT_LIT16 => write!(f, "mul-int/lit16"), - OpCode::DIV_INT_LIT16 => write!(f, "div-int/lit16"), - OpCode::REM_INT_LIT16 => write!(f, "rem-int/lit16"), - OpCode::AND_INT_LIT16 => write!(f, "and-int/lit16"), - OpCode::OR_INT_LIT16 => write!(f, "or-int/lit16"), - OpCode::XOR_INT_LIT16 => write!(f, "xor-int/lit16"), - OpCode::ADD_INT_LIT8 => write!(f, "add-int/lit8"), - OpCode::RSUB_INT_LIT8 => write!(f, "rsub-int/lit8"), - OpCode::MUL_INT_LIT8 => write!(f, "mul-int/lit8"), - OpCode::DIV_INT_LIT8 => write!(f, "div-int/lit8"), - OpCode::REM_INT_LIT8 => write!(f, "rem-int/lit8"), - OpCode::AND_INT_LIT8 => write!(f, "and-int/lit8"), - OpCode::OR_INT_LIT8 => write!(f, "or-int/lit8"), - OpCode::XOR_INT_LIT8 => write!(f, "xor-int/lit8"), - OpCode::SHL_INT_LIT8 => write!(f, "shl-int/lit8"), - OpCode::SHR_INT_LIT8 => write!(f, "shr-int/lit8"), - OpCode::USHR_INT_LIT8 => write!(f, "ushr-int/lit8"), - OpCode::INVOKE_POLYMORPHIC => write!(f, "invoke-polymorphic"), - OpCode::INVOKE_POLYMORPHIC_RANGE => write!(f, "invoke-polymorphic/range"), - OpCode::INVOKE_CUSTOM => write!(f, "invoke-custom"), - OpCode::INVOKE_CUSTOM_RANGE => write!(f, "invoke-custom/range"), - OpCode::CONST_METHOD_HANDLE => write!(f, "const-method-handle"), - OpCode::CONST_METHOD_TYPE => write!(f, "const-method-type"), - OpCode::PACKED_SWITCH_PAYLOAD => write!(f, "packed-switch-payload"), - OpCode::SPARSE_SWITCH_PAYLOAD => write!(f, "sparse-switch-payload"), - OpCode::FILL_ARRAY_DATA_PAYLOAD => write!(f, "fill-array-data-payload"), - } - } }