Lines Matching refs:Operation

14     operations: Vec<Operation>,
30 operations: vec![Operation::Raw(bytecode)], in raw()
38 self.operations.push(Operation::Simple(opcode)); in op()
43 self.operations.push(Operation::Address(address)); in op_addr()
50 self.operations.push(Operation::UnsignedConstant(value)); in op_constu()
57 self.operations.push(Operation::SignedConstant(value)); in op_consts()
62 self.operations.push(Operation::ConstantType(base, value)); in op_const_type()
67 self.operations.push(Operation::FrameOffset(offset)); in op_fbreg()
75 .push(Operation::RegisterOffset(register, offset)); in op_breg()
83 .push(Operation::RegisterType(register, base)); in op_regval_type()
90 self.operations.push(Operation::Pick(index)); in op_pick()
95 self.operations.push(Operation::Deref { space: false }); in op_deref()
100 self.operations.push(Operation::Deref { space: true }); in op_xderef()
106 .push(Operation::DerefSize { size, space: false }); in op_deref_size()
112 .push(Operation::DerefSize { size, space: true }); in op_xderef_size()
117 self.operations.push(Operation::DerefType { in op_deref_type()
126 self.operations.push(Operation::DerefType { in op_xderef_type()
135 self.operations.push(Operation::PlusConstant(value)); in op_plus_uconst()
144 self.operations.push(Operation::Skip(!0)); in op_skip()
154 self.operations.push(Operation::Branch(!0)); in op_bra()
171 Operation::Skip(ref mut target) | Operation::Branch(ref mut target) => { in set_target()
180 self.operations.push(Operation::Call(entry)); in op_call()
185 self.operations.push(Operation::CallRef(entry)); in op_call_ref()
192 self.operations.push(Operation::Convert(base)); in op_convert()
199 self.operations.push(Operation::Reinterpret(base)); in op_reinterpret()
204 self.operations.push(Operation::EntryValue(expression)); in op_entry_value()
211 self.operations.push(Operation::Register(register)); in op_reg()
216 self.operations.push(Operation::ImplicitValue(data)); in op_implicit_value()
222 .push(Operation::ImplicitPointer { entry, byte_offset }); in op_implicit_pointer()
227 self.operations.push(Operation::Piece { size_in_bytes }); in op_piece()
232 self.operations.push(Operation::BitPiece { in op_bit_piece()
240 self.operations.push(Operation::ParameterRef(entry)); in op_gnu_parameter_ref()
285 enum Operation { enum
477 impl Operation { implementation
487 Operation::Raw(ref bytecode) => return bytecode.len(), in size()
488 Operation::Simple(_) => 0, in size()
489 Operation::Address(_) => encoding.address_size as usize, in size()
490 Operation::UnsignedConstant(value) => { in size()
497 Operation::SignedConstant(value) => sleb128_size(value), in size()
498 Operation::ConstantType(base, ref value) => base_size(base) + 1 + value.len(), in size()
499 Operation::FrameOffset(offset) => sleb128_size(offset), in size()
500 Operation::RegisterOffset(register, offset) => { in size()
507 Operation::RegisterType(register, base) => { in size()
510 Operation::Pick(index) => { in size()
517 Operation::Deref { .. } => 0, in size()
518 Operation::DerefSize { .. } => 1, in size()
519 Operation::DerefType { base, .. } => 1 + base_size(base), in size()
520 Operation::PlusConstant(value) => uleb128_size(value), in size()
521 Operation::Skip(_) => 2, in size()
522 Operation::Branch(_) => 2, in size()
523 Operation::Call(_) => 4, in size()
524 Operation::CallRef(_) => encoding.format.word_size() as usize, in size()
525 Operation::Convert(base) => match base { in size()
529 Operation::Reinterpret(base) => match base { in size()
533 Operation::EntryValue(ref expression) => { in size()
537 Operation::Register(register) => { in size()
544 Operation::ImplicitValue(ref data) => uleb128_size(data.len() as u64) + data.len(), in size()
545 Operation::ImplicitPointer { byte_offset, .. } => { in size()
548 Operation::Piece { size_in_bytes } => uleb128_size(size_in_bytes), in size()
549 Operation::BitPiece { in size()
553 Operation::ParameterRef(_) => 4, in size()
577 Operation::Raw(ref bytecode) => w.write(bytecode)?, in write()
578 Operation::Simple(opcode) => w.write_u8(opcode.0)?, in write()
579 Operation::Address(address) => { in write()
583 Operation::UnsignedConstant(value) => { in write()
591 Operation::SignedConstant(value) => { in write()
595 Operation::ConstantType(base, ref value) => { in write()
605 Operation::FrameOffset(offset) => { in write()
609 Operation::RegisterOffset(register, offset) => { in write()
618 Operation::RegisterType(register, base) => { in write()
627 Operation::Pick(index) => match index { in write()
635 Operation::Deref { space } => { in write()
642 Operation::DerefSize { space, size } => { in write()
650 Operation::DerefType { space, size, base } => { in write()
663 Operation::PlusConstant(value) => { in write()
667 Operation::Skip(target) => { in write()
672 Operation::Branch(target) => { in write()
677 Operation::Call(entry) => { in write()
683 Operation::CallRef(entry) => { in write()
700 Operation::Convert(base) => { in write()
711 Operation::Reinterpret(base) => { in write()
722 Operation::EntryValue(ref expression) => { in write()
732 Operation::Register(register) => { in write()
740 Operation::ImplicitValue(ref data) => { in write()
745 Operation::ImplicitPointer { entry, byte_offset } => { in write()
769 Operation::Piece { size_in_bytes } => { in write()
773 Operation::BitPiece { in write()
781 Operation::ParameterRef(entry) => { in write()
839 read::Operation::Deref { in from()
846 Operation::DerefType { space, size, base } in from()
848 Operation::DerefSize { space, size } in from()
850 Operation::Deref { space } in from()
853 read::Operation::Drop => Operation::Simple(constants::DW_OP_drop), in from()
854 read::Operation::Pick { index } => Operation::Pick(index), in from()
855 read::Operation::Swap => Operation::Simple(constants::DW_OP_swap), in from()
856 read::Operation::Rot => Operation::Simple(constants::DW_OP_rot), in from()
857 read::Operation::Abs => Operation::Simple(constants::DW_OP_abs), in from()
858 read::Operation::And => Operation::Simple(constants::DW_OP_and), in from()
859 read::Operation::Div => Operation::Simple(constants::DW_OP_div), in from()
860 read::Operation::Minus => Operation::Simple(constants::DW_OP_minus), in from()
861 read::Operation::Mod => Operation::Simple(constants::DW_OP_mod), in from()
862 read::Operation::Mul => Operation::Simple(constants::DW_OP_mul), in from()
863 read::Operation::Neg => Operation::Simple(constants::DW_OP_neg), in from()
864 read::Operation::Not => Operation::Simple(constants::DW_OP_not), in from()
865 read::Operation::Or => Operation::Simple(constants::DW_OP_or), in from()
866 read::Operation::Plus => Operation::Simple(constants::DW_OP_plus), in from()
867 read::Operation::PlusConstant { value } => Operation::PlusConstant(value), in from()
868 read::Operation::Shl => Operation::Simple(constants::DW_OP_shl), in from()
869 read::Operation::Shr => Operation::Simple(constants::DW_OP_shr), in from()
870 read::Operation::Shra => Operation::Simple(constants::DW_OP_shra), in from()
871 read::Operation::Xor => Operation::Simple(constants::DW_OP_xor), in from()
872 read::Operation::Eq => Operation::Simple(constants::DW_OP_eq), in from()
873 read::Operation::Ge => Operation::Simple(constants::DW_OP_ge), in from()
874 read::Operation::Gt => Operation::Simple(constants::DW_OP_gt), in from()
875 read::Operation::Le => Operation::Simple(constants::DW_OP_le), in from()
876 read::Operation::Lt => Operation::Simple(constants::DW_OP_lt), in from()
877 read::Operation::Ne => Operation::Simple(constants::DW_OP_ne), in from()
878 read::Operation::Bra { target } => { in from()
885 Operation::Branch(index) in from()
887 read::Operation::Skip { target } => { in from()
894 Operation::Skip(index) in from()
896 read::Operation::UnsignedConstant { value } => { in from()
897 Operation::UnsignedConstant(value) in from()
899 read::Operation::SignedConstant { value } => Operation::SignedConstant(value), in from()
900 read::Operation::Register { register } => Operation::Register(register), in from()
901 read::Operation::RegisterOffset { in from()
907 Operation::RegisterType(register, convert_unit_offset(base_type)?) in from()
909 Operation::RegisterOffset(register, offset) in from()
912 read::Operation::FrameOffset { offset } => Operation::FrameOffset(offset), in from()
913 read::Operation::Nop => Operation::Simple(constants::DW_OP_nop), in from()
914 read::Operation::PushObjectAddress => { in from()
915 Operation::Simple(constants::DW_OP_push_object_address) in from()
917 read::Operation::Call { offset } => match offset { in from()
919 Operation::Call(convert_unit_offset(offset)?) in from()
922 Operation::CallRef(convert_debug_info_offset(offset)?) in from()
925 read::Operation::TLS => Operation::Simple(constants::DW_OP_form_tls_address), in from()
926 read::Operation::CallFrameCFA => { in from()
927 Operation::Simple(constants::DW_OP_call_frame_cfa) in from()
929 read::Operation::Piece { in from()
932 } => Operation::Piece { in from()
935 read::Operation::Piece { in from()
938 } => Operation::BitPiece { in from()
942 read::Operation::ImplicitValue { data } => { in from()
943 Operation::ImplicitValue(data.to_slice()?.into_owned().into()) in from()
945 read::Operation::StackValue => Operation::Simple(constants::DW_OP_stack_value), in from()
946 read::Operation::ImplicitPointer { value, byte_offset } => { in from()
948 Operation::ImplicitPointer { entry, byte_offset } in from()
950 read::Operation::EntryValue { expression } => { in from()
959 Operation::EntryValue(expression) in from()
961 read::Operation::ParameterRef { offset } => { in from()
963 Operation::ParameterRef(entry) in from()
965 read::Operation::Address { address } => { in from()
968 Operation::Address(address) in from()
970 read::Operation::AddressIndex { index } => { in from()
975 Operation::Address(address) in from()
977 read::Operation::ConstantIndex { index } => { in from()
981 Operation::UnsignedConstant(val) in from()
983 read::Operation::TypedLiteral { base_type, value } => { in from()
985 Operation::ConstantType(entry, value.to_slice()?.into_owned().into()) in from()
987 read::Operation::Convert { base_type } => { in from()
989 Operation::Convert(None) in from()
992 Operation::Convert(Some(entry)) in from()
995 read::Operation::Reinterpret { base_type } => { in from()
997 Operation::Reinterpret(None) in from()
1000 Operation::Reinterpret(Some(entry)) in from()
1057 let operations: &[(&dyn Fn(&mut Expression), Operation, read::Operation<_>)] = in test_operation()
1061 Operation::Deref { space: false }, in test_operation()
1062 read::Operation::Deref { in test_operation()
1070 Operation::Deref { space: true }, in test_operation()
1071 read::Operation::Deref { in test_operation()
1079 Operation::DerefSize { in test_operation()
1083 read::Operation::Deref { in test_operation()
1091 Operation::DerefSize { in test_operation()
1095 read::Operation::Deref { in test_operation()
1103 Operation::DerefType { in test_operation()
1108 read::Operation::Deref { in test_operation()
1116 Operation::DerefType { in test_operation()
1121 read::Operation::Deref { in test_operation()
1129 Operation::Simple(constants::DW_OP_drop), in test_operation()
1130 read::Operation::Drop, in test_operation()
1134 Operation::Pick(0), in test_operation()
1135 read::Operation::Pick { index: 0 }, in test_operation()
1139 Operation::Pick(1), in test_operation()
1140 read::Operation::Pick { index: 1 }, in test_operation()
1144 Operation::Pick(2), in test_operation()
1145 read::Operation::Pick { index: 2 }, in test_operation()
1149 Operation::Simple(constants::DW_OP_swap), in test_operation()
1150 read::Operation::Swap, in test_operation()
1154 Operation::Simple(constants::DW_OP_rot), in test_operation()
1155 read::Operation::Rot, in test_operation()
1159 Operation::Simple(constants::DW_OP_abs), in test_operation()
1160 read::Operation::Abs, in test_operation()
1164 Operation::Simple(constants::DW_OP_and), in test_operation()
1165 read::Operation::And, in test_operation()
1169 Operation::Simple(constants::DW_OP_div), in test_operation()
1170 read::Operation::Div, in test_operation()
1174 Operation::Simple(constants::DW_OP_minus), in test_operation()
1175 read::Operation::Minus, in test_operation()
1179 Operation::Simple(constants::DW_OP_mod), in test_operation()
1180 read::Operation::Mod, in test_operation()
1184 Operation::Simple(constants::DW_OP_mul), in test_operation()
1185 read::Operation::Mul, in test_operation()
1189 Operation::Simple(constants::DW_OP_neg), in test_operation()
1190 read::Operation::Neg, in test_operation()
1194 Operation::Simple(constants::DW_OP_not), in test_operation()
1195 read::Operation::Not, in test_operation()
1199 Operation::Simple(constants::DW_OP_or), in test_operation()
1200 read::Operation::Or, in test_operation()
1204 Operation::Simple(constants::DW_OP_plus), in test_operation()
1205 read::Operation::Plus, in test_operation()
1209 Operation::PlusConstant(23), in test_operation()
1210 read::Operation::PlusConstant { value: 23 }, in test_operation()
1214 Operation::Simple(constants::DW_OP_shl), in test_operation()
1215 read::Operation::Shl, in test_operation()
1219 Operation::Simple(constants::DW_OP_shr), in test_operation()
1220 read::Operation::Shr, in test_operation()
1224 Operation::Simple(constants::DW_OP_shra), in test_operation()
1225 read::Operation::Shra, in test_operation()
1229 Operation::Simple(constants::DW_OP_xor), in test_operation()
1230 read::Operation::Xor, in test_operation()
1234 Operation::Simple(constants::DW_OP_eq), in test_operation()
1235 read::Operation::Eq, in test_operation()
1239 Operation::Simple(constants::DW_OP_ge), in test_operation()
1240 read::Operation::Ge, in test_operation()
1244 Operation::Simple(constants::DW_OP_gt), in test_operation()
1245 read::Operation::Gt, in test_operation()
1249 Operation::Simple(constants::DW_OP_le), in test_operation()
1250 read::Operation::Le, in test_operation()
1254 Operation::Simple(constants::DW_OP_lt), in test_operation()
1255 read::Operation::Lt, in test_operation()
1259 Operation::Simple(constants::DW_OP_ne), in test_operation()
1260 read::Operation::Ne, in test_operation()
1264 Operation::UnsignedConstant(23), in test_operation()
1265 read::Operation::UnsignedConstant { value: 23 }, in test_operation()
1269 Operation::SignedConstant(-23), in test_operation()
1270 read::Operation::SignedConstant { value: -23 }, in test_operation()
1274 Operation::Register(Register(23)), in test_operation()
1275 read::Operation::Register { in test_operation()
1281 Operation::Register(Register(123)), in test_operation()
1282 read::Operation::Register { in test_operation()
1288 Operation::RegisterOffset(Register(23), 34), in test_operation()
1289 read::Operation::RegisterOffset { in test_operation()
1297 Operation::RegisterOffset(Register(123), 34), in test_operation()
1298 read::Operation::RegisterOffset { in test_operation()
1306 Operation::RegisterType(Register(23), entry_id), in test_operation()
1307 read::Operation::RegisterOffset { in test_operation()
1315 Operation::FrameOffset(34), in test_operation()
1316 read::Operation::FrameOffset { offset: 34 }, in test_operation()
1320 Operation::Simple(constants::DW_OP_nop), in test_operation()
1321 read::Operation::Nop, in test_operation()
1325 Operation::Simple(constants::DW_OP_push_object_address), in test_operation()
1326 read::Operation::PushObjectAddress, in test_operation()
1330 Operation::Call(entry_id), in test_operation()
1331 read::Operation::Call { in test_operation()
1337 Operation::CallRef(reference), in test_operation()
1338 read::Operation::Call { in test_operation()
1344 Operation::Simple(constants::DW_OP_form_tls_address), in test_operation()
1345 read::Operation::TLS, in test_operation()
1349 Operation::Simple(constants::DW_OP_call_frame_cfa), in test_operation()
1350 read::Operation::CallFrameCFA, in test_operation()
1354 Operation::Piece { size_in_bytes: 23 }, in test_operation()
1355 read::Operation::Piece { in test_operation()
1362 Operation::BitPiece { in test_operation()
1366 read::Operation::Piece { in test_operation()
1373 Operation::ImplicitValue(vec![23].into()), in test_operation()
1374 read::Operation::ImplicitValue { in test_operation()
1380 Operation::Simple(constants::DW_OP_stack_value), in test_operation()
1381 read::Operation::StackValue, in test_operation()
1385 Operation::ImplicitPointer { in test_operation()
1389 read::Operation::ImplicitPointer { in test_operation()
1396 Operation::EntryValue(reg_expression.clone()), in test_operation()
1397 read::Operation::EntryValue { in test_operation()
1406 Operation::ParameterRef(entry_id), in test_operation()
1407 read::Operation::ParameterRef { in test_operation()
1413 Operation::Address(Address::Constant(23)), in test_operation()
1414 read::Operation::Address { address: 23 }, in test_operation()
1418 Operation::ConstantType(entry_id, vec![23].into()), in test_operation()
1419 read::Operation::TypedLiteral { in test_operation()
1426 Operation::Convert(None), in test_operation()
1427 read::Operation::Convert { in test_operation()
1433 Operation::Convert(Some(entry_id)), in test_operation()
1434 read::Operation::Convert { in test_operation()
1440 Operation::Reinterpret(None), in test_operation()
1441 read::Operation::Reinterpret { in test_operation()
1447 Operation::Reinterpret(Some(entry_id)), in test_operation()
1448 read::Operation::Reinterpret { in test_operation()
1495 Ok(Some(read::Operation::Bra { in test_operation()
1502 Ok(Some(read::Operation::Skip { target: 1 })) in test_operation()
1504 assert_eq!(read_operations.next(), Ok(Some(read::Operation::Nop))); in test_operation()
1545 Some(&Operation::Branch(start_index)) in test_operation()
1547 assert_eq!(convert_operations.next(), Some(&Operation::Skip(end_index))); in test_operation()
1550 Some(&Operation::Simple(constants::DW_OP_nop)) in test_operation()