[libc++] Make sure we don't cache DSL functions too aggressively
To make sure we don't store a mutable object (which could be modified by outside code without us noticing) as the cache key, we pickle the cache key to get a byte stream. If two keys are unequal, we know for sure they will not have the same pickling. And if they are equal, there's a large chance they will have the same pickling. If they don't, we might end up not reusing a cached entry when we could have, but at least the behavior we'll have is semantically correct.
Loading
Please sign in to comment