MCPcopy Index your code
hub / github.com/encounter/objdiff / instruction_context

Method instruction_context

objdiff-core/src/arch/ppc/mod.rs:439–460  ·  view source on GitHub ↗
(
        &self,
        _obj: &Object,
        resolved: ResolvedInstructionRef,
    )

Source from the content-addressed store, hash-verified

437 }
438
439 fn instruction_context(
440 &self,
441 _obj: &Object,
442 resolved: ResolvedInstructionRef,
443 ) -> Vec<ContextItem> {
444 let Ok(ins) = self.parse_ins_ref(resolved) else {
445 return Vec::new();
446 };
447 let orig = ins.basic().to_string();
448 let simplified = ins.simplified().to_string();
449 let show_orig = orig != simplified;
450 let mut out = Vec::with_capacity(2);
451 out.push(ContextItem::Copy { value: simplified, label: None, copy_string: None });
452 if show_orig {
453 out.push(ContextItem::Copy {
454 value: orig,
455 label: Some("original".to_string()),
456 copy_string: None,
457 });
458 }
459 out
460 }
461
462 fn infer_function_size(
463 &self,

Callers 1

instruction_contextFunction · 0.45

Calls 3

basicMethod · 0.80
pushMethod · 0.80
parse_ins_refMethod · 0.45

Tested by

no test coverage detected