Skip to content
Commit 56f3cc14 authored by Milian Wolff's avatar Milian Wolff
Browse files

Refactor the PersistentSymbolTable API to prevent unsafe access

Instead of handing out raw iterators to data that is stored within
the symbol table, force users to pass a visitor instead.

This has the nice side effect that we can hide way more of the
persistent symbol table internals. We can now also get rid of the
extra mutex for the caches, as we only touch them while we have
the repository mutex locked.

The downside is that the callee loops are all a bit more tedious
to write, as we can't just `break` or `continue` directly anymore
and instead have to return a special `Break` or `Continue` value
from the visitor instead.

Fixes: #10
parent 5a246795
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment