Skip to content

Commit

Permalink
revise function name
Browse files Browse the repository at this point in the history
  • Loading branch information
Penkace committed Jan 18, 2025
1 parent 3986570 commit bdc9588
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions ohre/abcre/dis/DisFile.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ def __init__(self, value):
lines: List[str] = list()
if (isinstance(value, str)):
file = open(value, "r", encoding="utf-8", errors="ignore")
for line in file:
lines.append(line)
lines = file.readlines()
file.close()
else:
Log.error(f"DisFile init ERROR: value type NOT supported, {type(value)} {value}")
Expand Down Expand Up @@ -265,7 +264,7 @@ def get_external_module_name(
file_class_name {file_class_name}", True)
return None

def get_lexical_environment_name(
def create_lexical_environment(
self, slots: int, file_class_method_name: str = "") -> Union[str, None]:
slots_number = slots
lex_env_layer = [None] * slots_number
Expand Down
2 changes: 1 addition & 1 deletion ohre/abcre/dis/NACtoTAC.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def toTAC(self, nac: NAC, meth: AsmMethod, dis_file: DisFile) -> Union[TAC, List
return TAC.tac_assign(AsmArg.ACC(), arg_obj, log="createobjectwithbuffer d3bug")
if (nac.op == "newlexenv"):
slots = int(nac.args[0], base=16)
cur_lexenv_level = dis_file.get_lexical_environment_name(slots, meth.file_class_method_name)
cur_lexenv_level = dis_file.create_lexical_environment(slots, meth.file_class_method_name)
return TAC.tac_assign(AsmArg.ACC(), AsmArg(AsmTypes.LEXENV, value=cur_lexenv_level))
# === inst: object creaters # END

Expand Down

0 comments on commit bdc9588

Please sign in to comment.