(class_file: &mut Classfile, str: &str)
| 251 | |
| 252 | #[allow(dead_code)] |
| 253 | fn str_const(class_file: &mut Classfile, str: &str) -> usize { |
| 254 | let utf8_idx = utf8_const(class_file, str); |
| 255 | for i in 0..class_file.constant_pool.constants.len() { |
| 256 | match class_file.constant_pool.constants[i] { |
| 257 | Constant::String(ref idx) => { |
| 258 | if idx.idx == utf8_idx { |
| 259 | return i; |
| 260 | } |
| 261 | }, |
| 262 | _ => () |
| 263 | } |
| 264 | } |
| 265 | let ret = class_file.constant_pool.constants.len(); |
| 266 | class_file.constant_pool.constants.push(Constant::String(ConstantPoolIndex { idx: utf8_idx })); |
| 267 | return ret; |
| 268 | } |
| 269 | |
| 270 | fn class_const(class_file: &mut Classfile, class_name: &str) -> usize { |
| 271 | let utf8_idx = utf8_const(class_file, class_name); |
nothing calls this directly
no test coverage detected