diff options
author | 2018-03-13 13:07:52 -0700 | |
---|---|---|
committer | 2018-03-13 13:09:37 -0700 | |
commit | 9ba46f8f3c2f62a37914e7bfb199c65a71b64b9f (patch) | |
tree | a37d6665ae4c4f156e0ff27616bfe8ea01791846 /src/main/java/com/google/devtools/build/skyframe/EvaluationResult.java | |
parent | 25f37123a0b33484acedaab2ef7c78d50365c43a (diff) |
Integrate memoization into standard serialization. This involves a number of large changes:
1. SerializationContext and DeserializationContext become the owners of the Memoizer if requested. They produce new versions of themselves on demand that are memoization-aware. Because of intricacies of Skylark that I do not fully understand, we inject a Mutability object when starting memoization, and so to be conservative, that injection starts up a new memoization frame, nested if we were already memoizing, just like before. It would be nice to decouple this injection from memoization in the future.
2. MemoizingCodec is deleted, but really ObjectCodec becomes MemoizingCodec, so it lives on. BaseCodec is deleted since it now has only one implementation.
3. The simplified model of registering MemoizingCodecs is adopted for ObjectCodecs: all codecs are registered based on their #getEncodedClass and #additionalEncodedSubclasses. This also allows us to register codecs that are defined using tricky parameter types, since we're no longer trying to reflectively examine them. This required a clean-up of such codecs, and the addition of ArrayListCodec to stop NullableListCodec from making lists unmodifiable when they shouldn't be.
4. @AutoCodec is extended to allow users to specify that memoization should start with this codec.
To ensure bit-equivalence, SkyKeySerializer disables memoization.
PiperOrigin-RevId: 188918251
Diffstat (limited to 'src/main/java/com/google/devtools/build/skyframe/EvaluationResult.java')
0 files changed, 0 insertions, 0 deletions