1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
|
""" Trace object space configuration options - set with __pytrace__=1
in py.py """
from pypy.tool.traceop import ResultPrinter, ResultPrinterVerbose
def get_operations_all():
from pypy.interpreter.baseobjspace import ObjSpace
operations = dict([(r[0], r[0]) for r in ObjSpace.MethodTable])
for name in ObjSpace.IrregularOpTable + ["get_and_call_function"]:
operations[name] = name
# Remove list
for name in ["wrap", "unwrap"]:
if name in operations:
del operations[name]
return operations
config = {
# An optional filename to use for trace output. None is stdout
"output_filename" : None,
# Use a simple wrapped repr (fast) or try to do something more intelligent (slow)
"repr_type_simple" : True,
# Some internal interpreter code is written at applevel - by default
# it is a good idea to hide this.
"show_hidden_applevel" : False,
# Many operations call back into the object space
"recursive_operations" : False,
# Show the bytecode or just the operations
"show_bytecode" : True,
# Indentor string used for output
"indentor" : ' ',
# Show wrapped values in bytecode
"show_wrapped_consts_bytecode" : True,
# Used to show realtive position in tree
"tree_pos_indicator" : "|-",
"result_printer_clz" : ResultPrinter,
"operations" : get_operations_all()
}
|