unidecompiler-plugin-lua 0.2.0__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (19) hide show
  1. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/PKG-INFO +2 -2
  2. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/pyproject.toml +2 -2
  3. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/src/unidecompiler_plugin_lua/lifter.py +25 -1
  4. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/src/unidecompiler_plugin_lua.egg-info/PKG-INFO +2 -2
  5. unidecompiler_plugin_lua-0.2.2/src/unidecompiler_plugin_lua.egg-info/requires.txt +1 -0
  6. unidecompiler_plugin_lua-0.2.0/src/unidecompiler_plugin_lua.egg-info/requires.txt +0 -1
  7. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/README.md +0 -0
  8. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/setup.cfg +0 -0
  9. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/src/unidecompiler_plugin_lua/__init__.py +0 -0
  10. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/src/unidecompiler_plugin_lua/chunk54.py +0 -0
  11. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/src/unidecompiler_plugin_lua/luac.py +0 -0
  12. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/src/unidecompiler_plugin_lua/normalize.py +0 -0
  13. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/src/unidecompiler_plugin_lua/plugin.py +0 -0
  14. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/src/unidecompiler_plugin_lua/simulation.py +0 -0
  15. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/src/unidecompiler_plugin_lua/support.py +0 -0
  16. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/src/unidecompiler_plugin_lua.egg-info/SOURCES.txt +0 -0
  17. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/src/unidecompiler_plugin_lua.egg-info/dependency_links.txt +0 -0
  18. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/src/unidecompiler_plugin_lua.egg-info/entry_points.txt +0 -0
  19. {unidecompiler_plugin_lua-0.2.0 → unidecompiler_plugin_lua-0.2.2}/src/unidecompiler_plugin_lua.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unidecompiler-plugin-lua
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Lua bytecode frontend plugin for unidecompiler
5
5
  Author-email: Wker <1670133844@qq.com>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -9,7 +9,7 @@ Project-URL: Repository, https://github.com/Wker666/unidecompiler
9
9
  Project-URL: Issues, https://github.com/Wker666/unidecompiler/issues
10
10
  Requires-Python: >=3.11
11
11
  Description-Content-Type: text/markdown
12
- Requires-Dist: unidecompiler<0.3.0,>=0.2.0
12
+ Requires-Dist: unidecompiler<0.3.0,>=0.2.2
13
13
 
14
14
  # unidecompiler-plugin-lua
15
15
 
@@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "unidecompiler-plugin-lua"
7
- version = "0.2.0"
7
+ version = "0.2.2"
8
8
  description = "Lua bytecode frontend plugin for unidecompiler"
9
9
  readme = "README.md"
10
10
  license = "AGPL-3.0-or-later"
11
11
  authors = [{ name = "Wker", email = "1670133844@qq.com" }]
12
12
  requires-python = ">=3.11"
13
- dependencies = ["unidecompiler>=0.2.0,<0.3.0"]
13
+ dependencies = ["unidecompiler>=0.2.2,<0.3.0"]
14
14
 
15
15
  [project.urls]
16
16
  Homepage = "https://github.com/Wker666/unidecompiler"
@@ -964,6 +964,22 @@ def _lift_lua_function_tree(
964
964
  progress: list[int] | None = None,
965
965
  ) -> tuple[FunctionIR, int]:
966
966
  listing = listings[index]
967
+ item_label = listing.inferred_name
968
+ if item_label is not None and item_label.startswith("<function_"):
969
+ item_label = None
970
+ if not item_label and listing.instructions:
971
+ item_label = f"function@{listing.instructions[0].pc}"
972
+ message_label = item_label or "current function"
973
+ if reporter is not None and total is not None and progress is not None:
974
+ report_progress(
975
+ reporter,
976
+ phase="lift",
977
+ completed=progress[0],
978
+ total=total,
979
+ unit="function",
980
+ item_label=item_label,
981
+ message=f"lifting {message_label}",
982
+ )
967
983
  function_ir = recover_vm_function(
968
984
  _lua_function_spec(listing),
969
985
  lambda: lift_lua_function(listing),
@@ -974,7 +990,15 @@ def _lift_lua_function_tree(
974
990
  )
975
991
  if reporter is not None and total is not None and progress is not None:
976
992
  progress[0] += 1
977
- report_progress(reporter, phase="lift", completed=progress[0], total=total, unit="function", message=f"lifting function {progress[0]}/{total}")
993
+ report_progress(
994
+ reporter,
995
+ phase="lift",
996
+ completed=progress[0],
997
+ total=total,
998
+ unit="function",
999
+ item_label=item_label,
1000
+ message=f"lifted {message_label}",
1001
+ )
978
1002
  next_index = index + 1
979
1003
  nested_functions: list[FunctionIR] = []
980
1004
  for _ in range(listing.child_function_count):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: unidecompiler-plugin-lua
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Lua bytecode frontend plugin for unidecompiler
5
5
  Author-email: Wker <1670133844@qq.com>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -9,7 +9,7 @@ Project-URL: Repository, https://github.com/Wker666/unidecompiler
9
9
  Project-URL: Issues, https://github.com/Wker666/unidecompiler/issues
10
10
  Requires-Python: >=3.11
11
11
  Description-Content-Type: text/markdown
12
- Requires-Dist: unidecompiler<0.3.0,>=0.2.0
12
+ Requires-Dist: unidecompiler<0.3.0,>=0.2.2
13
13
 
14
14
  # unidecompiler-plugin-lua
15
15
 
@@ -0,0 +1 @@
1
+ unidecompiler<0.3.0,>=0.2.2
@@ -1 +0,0 @@
1
- unidecompiler<0.3.0,>=0.2.0