aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2013-07-24 01:56:01 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-07-24 01:56:02 +0000
commit5526d138fe76e7d19a58ab68c9ba7a0354172daa (patch)
tree155fe778a9996159ec19b664bbff2bb24cf4a92f /java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java
parent6587773fcfa26fa277901315859397005e3d1f27 (diff)
parent91cbe3566d21e1ae11c1409ae62c0c0a9614dec6 (diff)
downloadlatinime-5526d138fe76e7d19a58ab68c9ba7a0354172daa.tar.gz
latinime-5526d138fe76e7d19a58ab68c9ba7a0354172daa.tar.xz
latinime-5526d138fe76e7d19a58ab68c9ba7a0354172daa.zip
Merge "[FD2] Separate cached address before/after update for nodes."
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java')
-rw-r--r--java/src/com/android/inputmethod/latin/makedict/FusionDictionary.java8
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() {