File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414from xdis .codetype .base import iscode
1515from xdis .load import check_object_path , load_module
1616from xdis .op_imports import get_opcode_module
17+ from xdis .version_info import PythonImplementation
1718
1819# Information about a single line in a particular piece of code
1920# Note that a code can have several lines with the same value but
@@ -51,7 +52,14 @@ def _populate_lines(self) -> None:
5152 code = self .code
5253 code_map = {code .co_name : code }
5354 last_line_info = None
54- for instr in get_instructions_bytes (
55+ if self .opc .python_implementation == PythonImplementation .Graal :
56+ from xdis .bytecode_graal import get_instructions_bytes_graal
57+
58+ get_instructions_fn = get_instructions_bytes_graal
59+ else :
60+ get_instructions_fn = get_instructions_bytes
61+
62+ for instr in get_instructions_fn (
5563 code_object = code ,
5664 opc = self .opc ,
5765 ):
You can’t perform that action at this time.
0 commit comments