[all-commits] [llvm/llvm-project] ddb2ba: [libc++] Make sure we don't cache DSL functions to...
Louis Dionne via All-commits
all-commits at lists.llvm.org
Fri Oct 9 07:23:10 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: ddb2baf9fbff3d574c6c2bd69c2c9569100509a4
https://github.com/llvm/llvm-project/commit/ddb2baf9fbff3d574c6c2bd69c2c9569100509a4
Author: Louis Dionne <ldionne at apple.com>
Date: 2020-10-09 (Fri, 09 Oct 2020)
Changed paths:
M libcxx/test/libcxx/selftest/dsl/dsl.sh.py
M libcxx/utils/libcxx/test/dsl.py
Log Message:
-----------
[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.
More information about the All-commits
mailing list