[llvm-branch-commits] [llvm] [Dexter] Add !address node (PR #202801)

Jeremy Morse via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jun 22 06:57:34 PDT 2026


================
@@ -67,12 +104,21 @@ class DebuggerExpectMatch:
     `actual_result` is None if either `actual` or `expect.get_variable_result(actual)` is None,
     Otherwise, if `expected` is a dict, then `actual_result` is a dict[str, DebuggerExpectMatch],
     Otherwise, `actual_result` is a str.
+    Uses the provided match_context, and updates a local copy of it; if this match is selected, then its local updated
+    match_context should be committed.
     """
 
-    def __init__(self, expect: Expect, expected, actual: Optional[ValueIR]):
+    def __init__(
+        self,
+        expect: Expect,
+        expected,
+        actual: Optional[ValueIR],
+        match_context: ExpectMatchContext,
+    ):
         self.expect = expect
         self.expected = expected
         self.actual = actual
+        self.match_context = copy.deepcopy(match_context)
----------------
jmorse wrote:

I feel there's impedence mismatch between calling something "context" but then generating deep-copies whenever they're evaluated: from the name I would expect this to be shared state held across the whole trace. I feel the downside is there can be multiple active contexts at one time in the tree of scripty things; is there really a need for this, or can we consolidate it?

https://github.com/llvm/llvm-project/pull/202801


More information about the llvm-branch-commits mailing list