(input: &[u8])
| 44 | } |
| 45 | |
| 46 | pub fn code_attribute_parser(input: &[u8]) -> Result<(&[u8], CodeAttribute), Err<&[u8]>> { |
| 47 | let (input, max_stack) = be_u16(input)?; |
| 48 | let (input, max_locals) = be_u16(input)?; |
| 49 | let (input, code_length) = be_u32(input)?; |
| 50 | let (input, code) = take(code_length)(input)?; |
| 51 | let (input, exception_table_length) = be_u16(input)?; |
| 52 | let (input, exception_table) = |
| 53 | count(exception_entry_parser, exception_table_length as usize)(input)?; |
| 54 | let (input, attributes_count) = be_u16(input)?; |
| 55 | let (input, attributes) = count(attribute_parser, attributes_count as usize)(input)?; |
| 56 | Ok(( |
| 57 | input, |
| 58 | CodeAttribute { |
| 59 | max_stack, |
| 60 | max_locals, |
| 61 | code_length, |
| 62 | code: code.to_owned(), |
| 63 | exception_table_length, |
| 64 | exception_table, |
| 65 | attributes_count, |
| 66 | attributes, |
| 67 | }, |
| 68 | )) |
| 69 | } |
| 70 | |
| 71 | pub fn method_parameters_attribute_parser( |
| 72 | input: &[u8], |
no outgoing calls