diff options
author | 2013-07-10 19:23:03 +0900 | |
---|---|---|
committer | 2013-07-23 17:52:54 +0900 | |
commit | 91cbe3566d21e1ae11c1409ae62c0c0a9614dec6 (patch) | |
tree | b63f42f5b136fb09e6fad87b669d1a252c36901f /java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java | |
parent | 62f3b4e9c9d896d2026ebf363aeefce36116baac (diff) | |
download | latinime-91cbe3566d21e1ae11c1409ae62c0c0a9614dec6.tar.gz latinime-91cbe3566d21e1ae11c1409ae62c0c0a9614dec6.tar.xz latinime-91cbe3566d21e1ae11c1409ae62c0c0a9614dec6.zip |
[FD2] Separate cached address before/after update for nodes.
Bug: 8526576
Change-Id: Ib9f8594a9e12dc75eba296faff2612c4bd7483d3
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java b/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java index 17d281518..5530b7a74 100644 --- a/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java +++ b/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java @@ -46,7 +46,13 @@ public final class FusionDictionary implements Iterable<Word> { ArrayList<CharGroup> mData; // To help with binary generation int mCachedSize = Integer.MIN_VALUE; - int mCachedAddress = Integer.MIN_VALUE; + // mCachedAddressBefore/AfterUpdate are helpers for binary dictionary generation. They + // always hold the same value except between dictionary address compression, during which + // the update process needs to know about both values at the same time. Updating will + // update the AfterUpdate value, and the code will move them to BeforeUpdate before + // the next update pass. + int mCachedAddressBeforeUpdate = Integer.MIN_VALUE; + int mCachedAddressAfterUpdate = Integer.MIN_VALUE; int mCachedParentAddress = 0; public Node() { |