From d13f3f4a13f975afbe2ce7ef29925be5bc5b3865 Mon Sep 17 00:00:00 2001 From: occheung Date: Mon, 10 Feb 2025 11:06:58 +0800 Subject: [PATCH] language: report special python IDs --- artiq/coredevice/core.py | 1 + artiq/language/core.py | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/artiq/coredevice/core.py b/artiq/coredevice/core.py index 0bad68ba1..d74e46a10 100644 --- a/artiq/coredevice/core.py +++ b/artiq/coredevice/core.py @@ -109,6 +109,7 @@ class Core: self.compiler.analyze( core_language._registered_functions, core_language._registered_classes, + core_language._special_ids, core_language._registered_modules ) self.analyzed = True diff --git a/artiq/language/core.py b/artiq/language/core.py index 7e970e420..b6a6491a5 100644 --- a/artiq/language/core.py +++ b/artiq/language/core.py @@ -227,6 +227,12 @@ parallel = _ParallelContextManager() legacy_parallel = _ParallelContextManager() sequential = _SequentialContextManager() +_special_ids = { + "parallel": id(parallel), + "legacy_parallel": id(legacy_parallel), + "sequential": id(sequential), +} + def delay_mu(duration): """Increases the RTIO time by the given amount (in machine units)."""