summary refs log tree commit diff stats
path: root/compiler/vmops.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/vmops.nim')
-rw-r--r--compiler/vmops.nim6
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/vmops.nim b/compiler/vmops.nim
index f1a2e1e69..f51280ec5 100644
--- a/compiler/vmops.nim
+++ b/compiler/vmops.nim
@@ -284,6 +284,12 @@ proc registerAdditionalOps*(c: PCtx) =
       stackTrace2(c, "isExported() requires a symbol. '$#' is of kind '$#'" % [$n, $n.kind], n)
     setResult(a, sfExported in n.sym.flags)
 
+  registerCallback c, "stdlib.macrocache.hasKey", proc (a: VmArgs) =
+    let
+      table = getString(a, 0)
+      key = getString(a, 1)
+    setResult(a, table in c.graph.cacheTables and key in c.graph.cacheTables[table])
+
   registerCallback c, "stdlib.vmutils.vmTrace", proc (a: VmArgs) =
     c.config.isVmTrace = getBool(a, 0)