Lines Matching refs:ctx
19 ctx = Context()
20 module = Module.parse(r"""module @successfulParse {}""", ctx)
21 assert module.context is ctx
23 ctx = None # Ensure that module captures the context.
34 ctx = Context()
36 module = Module.parse(r"""}SYNTAX ERROR{""", ctx)
48 ctx = Context()
49 loc = Location.unknown(ctx)
52 ctx = None # Ensure that module captures the context.
65 ctx = Context()
68 """, ctx)
94 ctx = Context()
95 module = Module.parse(r"""module @successfulParse {}""", ctx)
96 assert ctx._get_live_module_count() == 1
98 assert ctx._get_live_operation_count() == 1
104 assert ctx._get_live_operation_count() == 1
109 assert ctx._get_live_operation_count() == 1
110 num_invalidated = ctx._clear_live_operations()
112 assert ctx._get_live_operation_count() == 0
126 print("LIVE OPERATIONS:", ctx._get_live_operation_count())
127 assert ctx._get_live_operation_count() == 0
128 assert ctx._get_live_module_count() == 0
134 ctx = Context()
135 module = Module.parse(r"""module @successfulParse {}""", ctx)
136 assert ctx._get_live_module_count() == 1
142 assert module_dup.context is ctx
148 assert ctx._get_live_module_count() == 0