@@ -74,6 +74,8 @@ def dis(x=None, *, file=None, depth=None, show_caches=False, adaptive=False):
74
74
objects, and coroutine objects, all of which store their code object
75
75
in a special attribute.
76
76
"""
77
+ # GraalPy change
78
+ raise NotImplementedError ("dis module is not supported on GraalPy" )
77
79
if x is None :
78
80
distb (file = file , show_caches = show_caches , adaptive = adaptive )
79
81
return
@@ -338,6 +340,8 @@ def get_instructions(x, *, first_line=None, show_caches=False, adaptive=False):
338
340
Otherwise, the source line information (if any) is taken directly from
339
341
the disassembled code object.
340
342
"""
343
+ # GraalPy change
344
+ raise NotImplementedError ("dis module is not supported on GraalPy" )
341
345
co = _get_code_object (x )
342
346
linestarts = dict (findlinestarts (co ))
343
347
if first_line is not None :
@@ -519,6 +523,8 @@ def _get_instructions_bytes(code, varname_from_oparg=None,
519
523
520
524
def disassemble (co , lasti = - 1 , * , file = None , show_caches = False , adaptive = False ):
521
525
"""Disassemble a code object."""
526
+ # GraalPy change
527
+ raise NotImplementedError ("dis module is not supported on GraalPy" )
522
528
linestarts = dict (findlinestarts (co ))
523
529
exception_entries = _parse_exception_table (co )
524
530
_disassemble_bytes (_get_code_array (co , adaptive ),
@@ -697,6 +703,8 @@ class Bytecode:
697
703
Iterating over this yields the bytecode operations as Instruction instances.
698
704
"""
699
705
def __init__ (self , x , * , first_line = None , current_offset = None , show_caches = False , adaptive = False ):
706
+ # GraalPy change
707
+ raise NotImplementedError ("'dis' module is not supported on GraalPy" )
700
708
self .codeobj = co = _get_code_object (x )
701
709
if first_line is None :
702
710
self .first_line = co .co_firstlineno
@@ -760,6 +768,11 @@ def dis(self):
760
768
return output .getvalue ()
761
769
762
770
771
+ # GraalPy stubs
772
+ def stack_effect (opcode , oparg = None , / , * , jump = None ):
773
+ raise NotImplementedError ("'dis' module is not supported on GraalPy" )
774
+
775
+
763
776
def main ():
764
777
import argparse
765
778
0 commit comments