From 73dbcfb648e0abbfe60c9ea0ab2b803d9dc4d774 Mon Sep 17 00:00:00 2001 From: Pablo Gordillo Date: Tue, 22 Oct 2024 16:22:19 +0200 Subject: [PATCH] adding mainExit as jump_type --- src/parser/cfg_block.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/parser/cfg_block.py b/src/parser/cfg_block.py index 4b42a955..c2fdbeaf 100644 --- a/src/parser/cfg_block.py +++ b/src/parser/cfg_block.py @@ -165,7 +165,7 @@ def set_comes_from(self, new_comes_from: List[str]) -> None: self._comes_from = new_comes_from def set_jump_type(self, t: str) -> None: - if t not in ["conditional", "unconditional", "terminal", "falls_to", "sub_block"]: + if t not in ["conditional", "unconditional", "terminal", "falls_to", "sub_block", "mainExit"]: raise Exception("Wrong jump type") else: self._jump_type = t @@ -223,7 +223,7 @@ def set_jump_info(self, exit_info: Dict[str, Any]) -> None: # It corresponds to falls_to blocks self._jump_type = "falls_to" elif type_block in ["MainExit"]: - self._jump_type = "terminal" + self._jump_type = "mainExit" elif type_block in ["FunctionReturn"]: self._jump_type = "FunctionReturn" self._process_instructions_from_function_return(exit_info["returnValues"])