add method
This commit is contained in:
parent
95c6b624ae
commit
f15ad78d44
1 changed files with 6 additions and 0 deletions
|
|
@ -26,6 +26,12 @@ pub struct MethodCFG<'a> {
|
|||
pub nodes: Vec<MethodCFGNode<'a>>,
|
||||
}
|
||||
|
||||
impl Method {
|
||||
pub fn get_cfg(&self) -> Result<MethodCFG> {
|
||||
MethodCFG::new(self)
|
||||
}
|
||||
}
|
||||
|
||||
impl<'a> MethodCFG<'a> {
|
||||
pub fn new(method: &'a Method) -> Result<Self> {
|
||||
let insns: &'a [Instruction] = if let Some(code) = method.code.as_ref() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue