You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by ma...@apache.org on 2013/07/31 03:11:15 UTC

[lucy-commits] [3/6] git commit: refs/heads/move-dumpable - Use Freezer instead of Dump/Load.

Use Freezer instead of Dump/Load.

Instead of invoking Dump/Load methods on Obj, Hash and VArray object,
use Freezer_dump and Freezer_load.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/e3e16616
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/e3e16616
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/e3e16616

Branch: refs/heads/move-dumpable
Commit: e3e16616121b28de1493439fbafc98849f0c66fd
Parents: 6589307
Author: Marvin Humphrey <ma...@rectangular.com>
Authored: Sun Jul 28 11:35:56 2013 -0700
Committer: Marvin Humphrey <ma...@rectangular.com>
Committed: Tue Jul 30 17:57:23 2013 -0700

----------------------------------------------------------------------
 core/Lucy/Analysis/PolyAnalyzer.c       | 14 +++++++-------
 core/Lucy/Analysis/RegexTokenizer.c     |  2 +-
 core/Lucy/Analysis/SnowballStopFilter.c |  6 ++++--
 core/Lucy/Plan/FullTextType.c           |  3 ++-
 core/Lucy/Plan/Schema.c                 | 10 +++++-----
 core/Lucy/Search/LeafQuery.c            |  8 ++++----
 core/Lucy/Search/PhraseQuery.c          |  8 ++++----
 core/Lucy/Search/PolyQuery.c            |  4 ++--
 core/Lucy/Search/RangeQuery.c           | 12 ++++++------
 core/Lucy/Search/TermQuery.c            |  8 ++++----
 core/Lucy/Test/Plan/TestBlobType.c      |  3 ++-
 core/Lucy/Test/Plan/TestFullTextType.c  |  3 ++-
 core/Lucy/Test/Plan/TestNumericType.c   |  9 +++++----
 core/Lucy/Test/Search/TestNOTQuery.c    |  3 ++-
 core/Lucy/Test/Search/TestPhraseQuery.c |  3 ++-
 core/Lucy/Test/Search/TestPolyQuery.c   |  3 ++-
 core/Lucy/Test/Search/TestReqOptQuery.c |  3 ++-
 core/Lucy/Test/TestSchema.c             |  3 ++-
 core/Lucy/Util/Freezer.c                |  2 +-
 core/LucyX/Search/ProximityQuery.c      |  8 ++++----
 20 files changed, 63 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Analysis/PolyAnalyzer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/PolyAnalyzer.c b/core/Lucy/Analysis/PolyAnalyzer.c
index 0f64d16..f29b122 100644
--- a/core/Lucy/Analysis/PolyAnalyzer.c
+++ b/core/Lucy/Analysis/PolyAnalyzer.c
@@ -23,6 +23,7 @@
 #include "Lucy/Analysis/Inversion.h"
 #include "Lucy/Analysis/SnowballStemmer.h"
 #include "Lucy/Analysis/RegexTokenizer.h"
+#include "Lucy/Util/Freezer.h"
 
 PolyAnalyzer*
 PolyAnalyzer_new(const CharBuf *language, VArray *analyzers) {
@@ -128,7 +129,8 @@ PolyAnalyzer_dump(PolyAnalyzer *self)
         = SUPER_METHOD_PTR(POLYANALYZER, Lucy_PolyAnalyzer_Dump);
     Hash *dump = (Hash*)CERTIFY(super_dump(self), HASH);
     if (ivars->analyzers) {
-        Hash_Store_Str(dump, "analyzers", 9, Obj_Dump((Obj*)ivars->analyzers));
+        Hash_Store_Str(dump, "analyzers", 9,
+                       Freezer_dump((Obj*)ivars->analyzers));
     }
     return (Obj*)dump;
 }
@@ -139,12 +141,10 @@ PolyAnalyzer_load(PolyAnalyzer *self, Obj *dump) {
     PolyAnalyzer_Load_t super_load 
         = SUPER_METHOD_PTR(POLYANALYZER, Lucy_PolyAnalyzer_Load);
     PolyAnalyzer *loaded = super_load(self, dump);
-    VArray *analyzer_dumps = (VArray*)CERTIFY(
-                                 Hash_Fetch_Str(source, "analyzers", 9),
-                                 VARRAY);
-    VArray *analyzers = (VArray*)CERTIFY(
-                            VA_Load(analyzer_dumps, (Obj*)analyzer_dumps),
-                            VARRAY);
+    VArray *analyzer_dumps
+        = (VArray*)CERTIFY(Hash_Fetch_Str(source, "analyzers", 9), VARRAY);
+    VArray *analyzers
+        = (VArray*)CERTIFY(Freezer_load((Obj*)analyzer_dumps), VARRAY);
     PolyAnalyzer_init(loaded, NULL, analyzers);
     DECREF(analyzers);
     return loaded;

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Analysis/RegexTokenizer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/RegexTokenizer.c b/core/Lucy/Analysis/RegexTokenizer.c
index b44095e..a4fbe45 100644
--- a/core/Lucy/Analysis/RegexTokenizer.c
+++ b/core/Lucy/Analysis/RegexTokenizer.c
@@ -56,7 +56,7 @@ RegexTokenizer_dump(RegexTokenizer *self) {
     RegexTokenizer_Dump_t super_dump
         = SUPER_METHOD_PTR(REGEXTOKENIZER, Lucy_RegexTokenizer_Dump);
     Hash *dump = (Hash*)CERTIFY(super_dump(self), HASH);
-    Hash_Store_Str(dump, "pattern", 7, CB_Dump(ivars->pattern));
+    Hash_Store_Str(dump, "pattern", 7, CB_Clone(ivars->pattern));
     return (Obj*)dump;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Analysis/SnowballStopFilter.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Analysis/SnowballStopFilter.c b/core/Lucy/Analysis/SnowballStopFilter.c
index 576ab08..b764f70 100644
--- a/core/Lucy/Analysis/SnowballStopFilter.c
+++ b/core/Lucy/Analysis/SnowballStopFilter.c
@@ -22,6 +22,7 @@
 #include "Lucy/Analysis/SnowballStopFilter.h"
 #include "Lucy/Analysis/Token.h"
 #include "Lucy/Analysis/Inversion.h"
+#include "Lucy/Util/Freezer.h"
 
 SnowballStopFilter*
 SnowStop_new(const CharBuf *language, Hash *stoplist) {
@@ -97,7 +98,8 @@ SnowStop_dump(SnowballStopFilter *self)
         = SUPER_METHOD_PTR(SNOWBALLSTOPFILTER, Lucy_SnowStop_Dump);
     Hash *dump = (Hash*)CERTIFY(super_dump(self), HASH);
     if (ivars->stoplist) {
-        Hash_Store_Str(dump, "stoplist", 8, Obj_Dump((Obj*)ivars->stoplist));
+        Hash_Store_Str(dump, "stoplist", 8,
+                       Freezer_dump((Obj*)ivars->stoplist));
     }
     return (Obj*)dump;
 }
@@ -112,7 +114,7 @@ SnowStop_load(SnowballStopFilter *self, Obj *dump)
     Obj *stoplist = Hash_Fetch_Str(source, "stoplist", 8);
     if (stoplist) {
         SnowStop_IVARS(loaded)->stoplist
-            = (Hash*)CERTIFY(Obj_Load(stoplist, stoplist), HASH);
+            = (Hash*)CERTIFY(Freezer_load(stoplist), HASH);
     }
     return (Obj*)loaded;
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Plan/FullTextType.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Plan/FullTextType.c b/core/Lucy/Plan/FullTextType.c
index ac379eb..cb69272 100644
--- a/core/Lucy/Plan/FullTextType.c
+++ b/core/Lucy/Plan/FullTextType.c
@@ -21,6 +21,7 @@
 #include "Lucy/Analysis/Analyzer.h"
 #include "Lucy/Index/Posting/ScorePosting.h"
 #include "Lucy/Index/Similarity.h"
+#include "Lucy/Util/Freezer.h"
 
 FullTextType*
 FullTextType_new(Analyzer *analyzer) {
@@ -146,7 +147,7 @@ FullTextType_load(FullTextType *self, Obj *dump) {
             analyzer = (Analyzer*)INCREF(analyzer_dump);
         }
         else if (Obj_Is_A((Obj*)analyzer_dump, HASH)) {
-            analyzer = (Analyzer*)Obj_Load(analyzer_dump, analyzer_dump);
+            analyzer = (Analyzer*)Freezer_load(analyzer_dump);
         }
     }
     CERTIFY(analyzer, ANALYZER);

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Plan/Schema.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Plan/Schema.c b/core/Lucy/Plan/Schema.c
index 64f9281..4203543 100644
--- a/core/Lucy/Plan/Schema.c
+++ b/core/Lucy/Plan/Schema.c
@@ -257,7 +257,7 @@ Schema_dump(Schema *self) {
     // Record class name, store dumps of unique Analyzers.
     Hash_Store_Str(dump, "_class", 6,
                    (Obj*)CB_Clone(Schema_Get_Class_Name(self)));
-    Hash_Store_Str(dump, "analyzers", 9, (Obj*)VA_Dump(ivars->uniq_analyzers));
+    Hash_Store_Str(dump, "analyzers", 9, Freezer_dump(ivars->uniq_analyzers));
 
     // Dump FieldTypes.
     Hash_Store_Str(dump, "fields", 6, (Obj*)type_dumps);
@@ -304,7 +304,7 @@ Schema_load(Schema *self, Obj *dump) {
     VArray *analyzer_dumps
         = (VArray*)CERTIFY(Hash_Fetch_Str(source, "analyzers", 9), VARRAY);
     VArray *analyzers
-        = (VArray*)VA_Load(analyzer_dumps, (Obj*)analyzer_dumps);
+        = (VArray*)Freezer_load((Obj*)analyzer_dumps);
     CharBuf *field;
     Hash    *type_dump;
     UNUSED_VAR(self);
@@ -381,9 +381,9 @@ Schema_load(Schema *self, Obj *dump) {
             }
         }
         else {
-            FieldType *type = (FieldType*)CERTIFY(
-                                  Hash_Load(type_dump, (Obj*)type_dump),
-                                  FIELDTYPE);
+            FieldType *type
+                = (FieldType*)CERTIFY(Freezer_load((Obj*)type_dump),
+                                      FIELDTYPE);
             Schema_Spec_Field(loaded, field, type);
             DECREF(type);
         }

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Search/LeafQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/LeafQuery.c b/core/Lucy/Search/LeafQuery.c
index e248504..f37ab2c 100644
--- a/core/Lucy/Search/LeafQuery.c
+++ b/core/Lucy/Search/LeafQuery.c
@@ -119,9 +119,9 @@ LeafQuery_dump(LeafQuery *self)
         = SUPER_METHOD_PTR(LEAFQUERY, Lucy_LeafQuery_Dump);
     Hash *dump = (Hash*)CERTIFY(super_dump(self), HASH);
     if (ivars->field) {
-        Hash_Store_Str(dump, "field", 5, Obj_Dump((Obj*)ivars->field));
+        Hash_Store_Str(dump, "field", 5, Freezer_dump((Obj*)ivars->field));
     }
-    Hash_Store_Str(dump, "text", 4, Obj_Dump((Obj*)ivars->text));
+    Hash_Store_Str(dump, "text", 4, Freezer_dump((Obj*)ivars->text));
     return (Obj*)dump;
 }
 
@@ -136,10 +136,10 @@ LeafQuery_load(LeafQuery *self, Obj *dump)
     Obj *field = Hash_Fetch_Str(source, "field", 5);
     if (field) {
         loaded_ivars->field
-            = (CharBuf*)CERTIFY(Obj_Load(field, field), CHARBUF);
+            = (CharBuf*)CERTIFY(Freezer_load(field), CHARBUF);
     }
     Obj *text = CERTIFY(Hash_Fetch_Str(source, "text", 4), OBJ);
-    loaded_ivars->text = (CharBuf*)CERTIFY(Obj_Load(text, text), CHARBUF);
+    loaded_ivars->text = (CharBuf*)CERTIFY(Freezer_load(text), CHARBUF);
     return (Obj*)loaded;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Search/PhraseQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/PhraseQuery.c b/core/Lucy/Search/PhraseQuery.c
index 7bcca36..3933d9f 100644
--- a/core/Lucy/Search/PhraseQuery.c
+++ b/core/Lucy/Search/PhraseQuery.c
@@ -97,8 +97,8 @@ PhraseQuery_dump(PhraseQuery *self)
     PhraseQuery_Dump_t super_dump
         = SUPER_METHOD_PTR(PHRASEQUERY, Lucy_PhraseQuery_Dump);
     Hash *dump = (Hash*)CERTIFY(super_dump(self), HASH);
-    Hash_Store_Str(dump, "field", 5, Obj_Dump((Obj*)ivars->field));
-    Hash_Store_Str(dump, "terms", 5, Obj_Dump((Obj*)ivars->terms));
+    Hash_Store_Str(dump, "field", 5, Freezer_dump((Obj*)ivars->field));
+    Hash_Store_Str(dump, "terms", 5, Freezer_dump((Obj*)ivars->terms));
     return (Obj*)dump;
 }
 
@@ -112,10 +112,10 @@ PhraseQuery_load(PhraseQuery *self, Obj *dump)
     PhraseQueryIVARS *loaded_ivars = PhraseQuery_IVARS(loaded);
     Obj *field = CERTIFY(Hash_Fetch_Str(source, "field", 5), OBJ);
     loaded_ivars->field
-        = (CharBuf*)CERTIFY(Obj_Load(field, field), CHARBUF);
+        = (CharBuf*)CERTIFY(Freezer_load(field), CHARBUF);
     Obj *terms = CERTIFY(Hash_Fetch_Str(source, "terms", 5), OBJ);
     loaded_ivars->terms
-        = (VArray*)CERTIFY(Obj_Load(terms, terms), VARRAY);
+        = (VArray*)CERTIFY(Freezer_load(terms), VARRAY);
     return (Obj*)loaded;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Search/PolyQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/PolyQuery.c b/core/Lucy/Search/PolyQuery.c
index 74222a6..b1be177 100644
--- a/core/Lucy/Search/PolyQuery.c
+++ b/core/Lucy/Search/PolyQuery.c
@@ -99,7 +99,7 @@ PolyQuery_dump(PolyQuery *self)
     PolyQuery_Dump_t super_dump
         = SUPER_METHOD_PTR(POLYQUERY, Lucy_PolyQuery_Dump);
     Hash *dump = (Hash*)CERTIFY(super_dump(self), HASH);
-    Hash_Store_Str(dump, "children", 8, Obj_Dump((Obj*)ivars->children));
+    Hash_Store_Str(dump, "children", 8, Freezer_dump((Obj*)ivars->children));
     return (Obj*)dump;
 }
 
@@ -112,7 +112,7 @@ PolyQuery_load(PolyQuery *self, Obj *dump)
     PolyQuery *loaded = (PolyQuery*)super_load(self, dump);
     Obj *children = CERTIFY(Hash_Fetch_Str(source, "children", 8), OBJ);
     PolyQuery_IVARS(loaded)->children
-        = (VArray*)CERTIFY(Obj_Load(children, children), VARRAY);
+        = (VArray*)CERTIFY(Freezer_load(children), VARRAY);
     return (Obj*)loaded;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Search/RangeQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/RangeQuery.c b/core/Lucy/Search/RangeQuery.c
index 3047e8a..b32c3f1 100644
--- a/core/Lucy/Search/RangeQuery.c
+++ b/core/Lucy/Search/RangeQuery.c
@@ -167,14 +167,14 @@ RangeQuery_dump(RangeQuery *self)
     RangeQuery_Dump_t super_dump
         = SUPER_METHOD_PTR(RANGEQUERY, Lucy_RangeQuery_Dump);
     Hash *dump = (Hash*)CERTIFY(super_dump(self), HASH);
-    Hash_Store_Str(dump, "field", 5, Obj_Dump((Obj*)ivars->field));
+    Hash_Store_Str(dump, "field", 5, Freezer_dump((Obj*)ivars->field));
     if (ivars->lower_term) {
         Hash_Store_Str(dump, "lower_term", 10,
-                       Obj_Dump((Obj*)ivars->lower_term));
+                       Freezer_dump((Obj*)ivars->lower_term));
     }
     if (ivars->upper_term) {
         Hash_Store_Str(dump, "upper_term", 10,
-                       Obj_Dump((Obj*)ivars->upper_term));
+                       Freezer_dump((Obj*)ivars->upper_term));
     }
     Hash_Store_Str(dump, "include_lower", 13,
                    (Obj*)Bool_singleton(ivars->include_lower));
@@ -192,16 +192,16 @@ RangeQuery_load(RangeQuery *self, Obj *dump)
     RangeQuery *loaded = (RangeQuery*)super_load(self, dump);
     RangeQueryIVARS *loaded_ivars = RangeQuery_IVARS(loaded);
     Obj *field = CERTIFY(Hash_Fetch_Str(source, "field", 5), OBJ);
-    loaded_ivars->field = (CharBuf*)CERTIFY(Obj_Load(field, field), CHARBUF);
+    loaded_ivars->field = (CharBuf*)CERTIFY(Freezer_load(field), CHARBUF);
     Obj *lower_term = Hash_Fetch_Str(source, "lower_term", 10);
     if (lower_term) {
         loaded_ivars->lower_term
-            = (Obj*)CERTIFY(Obj_Load(lower_term, lower_term), OBJ);
+            = (Obj*)CERTIFY(Freezer_load(lower_term), OBJ);
     }
     Obj *upper_term = Hash_Fetch_Str(source, "upper_term", 10);
     if (upper_term) {
         loaded_ivars->upper_term
-            = (Obj*)CERTIFY(Obj_Load(upper_term, upper_term), OBJ);
+            = (Obj*)CERTIFY(Freezer_load(upper_term), OBJ);
     }
     Obj *include_lower
         = CERTIFY(Hash_Fetch_Str(source, "include_lower", 13), OBJ);

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Search/TermQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Search/TermQuery.c b/core/Lucy/Search/TermQuery.c
index 18f36f5..5040e32 100644
--- a/core/Lucy/Search/TermQuery.c
+++ b/core/Lucy/Search/TermQuery.c
@@ -81,8 +81,8 @@ TermQuery_dump(TermQuery *self)
     TermQuery_Dump_t super_dump
         = SUPER_METHOD_PTR(TERMQUERY, Lucy_TermQuery_Dump);
     Hash *dump = (Hash*)CERTIFY(super_dump(self), HASH);
-    Hash_Store_Str(dump, "field", 5, Obj_Dump((Obj*)ivars->field));
-    Hash_Store_Str(dump, "term", 4, Obj_Dump(ivars->term));
+    Hash_Store_Str(dump, "field", 5, Freezer_dump((Obj*)ivars->field));
+    Hash_Store_Str(dump, "term", 4, Freezer_dump(ivars->term));
     return (Obj*)dump;
 }
 
@@ -95,9 +95,9 @@ TermQuery_load(TermQuery *self, Obj *dump)
     TermQuery *loaded = (TermQuery*)super_load(self, dump);
     TermQueryIVARS *loaded_ivars = TermQuery_IVARS(loaded);
     Obj *field = CERTIFY(Hash_Fetch_Str(source, "field", 5), OBJ);
-    loaded_ivars->field = (CharBuf*)CERTIFY(Obj_Load(field, field), CHARBUF);
+    loaded_ivars->field = (CharBuf*)CERTIFY(Freezer_load(field), CHARBUF);
     Obj *term = CERTIFY(Hash_Fetch_Str(source, "term", 4), OBJ);
-    loaded_ivars->term = (Obj*)CERTIFY(Obj_Load(term, term), OBJ);
+    loaded_ivars->term = (Obj*)CERTIFY(Freezer_load(term), OBJ);
     return (Obj*)loaded;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Test/Plan/TestBlobType.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Plan/TestBlobType.c b/core/Lucy/Test/Plan/TestBlobType.c
index 744f4e1..7781e33 100644
--- a/core/Lucy/Test/Plan/TestBlobType.c
+++ b/core/Lucy/Test/Plan/TestBlobType.c
@@ -23,6 +23,7 @@
 #include "Lucy/Test/Plan/TestBlobType.h"
 #include "Lucy/Test/TestUtils.h"
 #include "Lucy/Plan/BlobType.h"
+#include "Lucy/Util/Freezer.h"
 
 TestBlobType*
 TestBlobType_new() {
@@ -33,7 +34,7 @@ static void
 test_Dump_Load_and_Equals(TestBatchRunner *runner) {
     BlobType *type            = BlobType_new(true);
     Obj      *dump            = (Obj*)BlobType_Dump(type);
-    Obj      *clone           = Obj_Load(dump, dump);
+    Obj      *clone           = Freezer_load(dump);
     Obj      *another_dump    = (Obj*)BlobType_Dump_For_Schema(type);
     BlobType *another_clone   = BlobType_Load(type, another_dump);
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Test/Plan/TestFullTextType.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Plan/TestFullTextType.c b/core/Lucy/Test/Plan/TestFullTextType.c
index e47468e..1a271b6 100644
--- a/core/Lucy/Test/Plan/TestFullTextType.c
+++ b/core/Lucy/Test/Plan/TestFullTextType.c
@@ -25,6 +25,7 @@
 #include "Lucy/Plan/FullTextType.h"
 #include "Lucy/Analysis/Normalizer.h"
 #include "Lucy/Analysis/StandardTokenizer.h"
+#include "Lucy/Util/Freezer.h"
 
 TestFullTextType*
 TestFullTextType_new() {
@@ -42,7 +43,7 @@ test_Dump_Load_and_Equals(TestBatchRunner *runner) {
     FullTextType      *not_stored    = FullTextType_new((Analyzer*)tokenizer);
     FullTextType      *highlightable = FullTextType_new((Analyzer*)tokenizer);
     Obj               *dump          = (Obj*)FullTextType_Dump(type);
-    Obj               *clone         = Obj_Load(dump, dump);
+    Obj               *clone         = Freezer_load(dump);
     Obj               *another_dump  = (Obj*)FullTextType_Dump_For_Schema(type);
 
     FullTextType_Set_Boost(boost_differs, 1.5);

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Test/Plan/TestNumericType.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Plan/TestNumericType.c b/core/Lucy/Test/Plan/TestNumericType.c
index 354f796..0c099e0 100644
--- a/core/Lucy/Test/Plan/TestNumericType.c
+++ b/core/Lucy/Test/Plan/TestNumericType.c
@@ -24,6 +24,7 @@
 #include "Lucy/Test/TestUtils.h"
 #include "Lucy/Plan/BlobType.h"
 #include "Lucy/Plan/NumericType.h"
+#include "Lucy/Util/Freezer.h"
 
 TestNumericType*
 TestNumericType_new() {
@@ -59,7 +60,7 @@ test_Dump_Load_and_Equals(TestBatchRunner *runner) {
 
     {
         Obj *dump = (Obj*)Int32Type_Dump(i32);
-        Obj *other = Obj_Load(dump, dump);
+        Obj *other = Freezer_load(dump);
         TEST_TRUE(runner, Int32Type_Equals(i32, other),
                   "Dump => Load round trip for Int32Type");
         DECREF(dump);
@@ -68,7 +69,7 @@ test_Dump_Load_and_Equals(TestBatchRunner *runner) {
 
     {
         Obj *dump = (Obj*)Int64Type_Dump(i64);
-        Obj *other = Obj_Load(dump, dump);
+        Obj *other = Freezer_load(dump);
         TEST_TRUE(runner, Int64Type_Equals(i64, other),
                   "Dump => Load round trip for Int64Type");
         DECREF(dump);
@@ -77,7 +78,7 @@ test_Dump_Load_and_Equals(TestBatchRunner *runner) {
 
     {
         Obj *dump = (Obj*)Float32Type_Dump(f32);
-        Obj *other = Obj_Load(dump, dump);
+        Obj *other = Freezer_load(dump);
         TEST_TRUE(runner, Float32Type_Equals(f32, other),
                   "Dump => Load round trip for Float32Type");
         DECREF(dump);
@@ -86,7 +87,7 @@ test_Dump_Load_and_Equals(TestBatchRunner *runner) {
 
     {
         Obj *dump = (Obj*)Float64Type_Dump(f64);
-        Obj *other = Obj_Load(dump, dump);
+        Obj *other = Freezer_load(dump);
         TEST_TRUE(runner, Float64Type_Equals(f64, other),
                   "Dump => Load round trip for Float64Type");
         DECREF(dump);

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Test/Search/TestNOTQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Search/TestNOTQuery.c b/core/Lucy/Test/Search/TestNOTQuery.c
index ddac353..3da657f 100644
--- a/core/Lucy/Test/Search/TestNOTQuery.c
+++ b/core/Lucy/Test/Search/TestNOTQuery.c
@@ -25,6 +25,7 @@
 #include "Lucy/Test/Search/TestNOTQuery.h"
 #include "Lucy/Search/NOTQuery.h"
 #include "Lucy/Search/LeafQuery.h"
+#include "Lucy/Util/Freezer.h"
 
 TestNOTQuery*
 TestNOTQuery_new() {
@@ -39,7 +40,7 @@ test_Dump_Load_and_Equals(TestBatchRunner *runner) {
     NOTQuery *kids_differ   = NOTQuery_new(b_leaf);
     NOTQuery *boost_differs = NOTQuery_new(a_leaf);
     Obj      *dump          = (Obj*)NOTQuery_Dump(query);
-    NOTQuery *clone         = (NOTQuery*)Obj_Load(dump, dump);
+    NOTQuery *clone         = (NOTQuery*)Freezer_load(dump);
 
     TEST_FALSE(runner, NOTQuery_Equals(query, (Obj*)kids_differ),
                "Different kids spoil Equals");

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Test/Search/TestPhraseQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Search/TestPhraseQuery.c b/core/Lucy/Test/Search/TestPhraseQuery.c
index 3fe0182..a54a04b 100644
--- a/core/Lucy/Test/Search/TestPhraseQuery.c
+++ b/core/Lucy/Test/Search/TestPhraseQuery.c
@@ -24,6 +24,7 @@
 #include "Lucy/Test/TestUtils.h"
 #include "Lucy/Test/Search/TestPhraseQuery.h"
 #include "Lucy/Search/PhraseQuery.h"
+#include "Lucy/Util/Freezer.h"
 
 TestPhraseQuery*
 TestPhraseQuery_new() {
@@ -35,7 +36,7 @@ test_Dump_And_Load(TestBatchRunner *runner) {
     PhraseQuery *query
         = TestUtils_make_phrase_query("content", "a", "b", "c", NULL);
     Obj         *dump  = (Obj*)PhraseQuery_Dump(query);
-    PhraseQuery *twin = (PhraseQuery*)Obj_Load(dump, dump);
+    PhraseQuery *twin = (PhraseQuery*)Freezer_load(dump);
     TEST_TRUE(runner, PhraseQuery_Equals(query, (Obj*)twin),
               "Dump => Load round trip");
     DECREF(query);

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Test/Search/TestPolyQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Search/TestPolyQuery.c b/core/Lucy/Test/Search/TestPolyQuery.c
index 88166f7..d7936c7 100644
--- a/core/Lucy/Test/Search/TestPolyQuery.c
+++ b/core/Lucy/Test/Search/TestPolyQuery.c
@@ -27,6 +27,7 @@
 #include "Lucy/Search/ORQuery.h"
 #include "Lucy/Search/PolyQuery.h"
 #include "Lucy/Search/LeafQuery.h"
+#include "Lucy/Util/Freezer.h"
 
 TestANDQuery*
 TestANDQuery_new() {
@@ -55,7 +56,7 @@ test_Dump_Load_and_Equals(TestBatchRunner *runner, uint32_t boolop) {
         = (PolyQuery*)TestUtils_make_poly_query(boolop, INCREF(a_leaf),
                                                 INCREF(b_leaf), NULL);
     Obj *dump = (Obj*)PolyQuery_Dump(query);
-    PolyQuery *clone = (PolyQuery*)Obj_Load(dump, dump);
+    PolyQuery *clone = (PolyQuery*)Freezer_load(dump);
 
     TEST_FALSE(runner, PolyQuery_Equals(query, (Obj*)kids_differ),
                "Different kids spoil Equals");

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Test/Search/TestReqOptQuery.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Search/TestReqOptQuery.c b/core/Lucy/Test/Search/TestReqOptQuery.c
index 79a2f15..73174bb 100644
--- a/core/Lucy/Test/Search/TestReqOptQuery.c
+++ b/core/Lucy/Test/Search/TestReqOptQuery.c
@@ -25,6 +25,7 @@
 #include "Lucy/Test/Search/TestReqOptQuery.h"
 #include "Lucy/Search/RequiredOptionalQuery.h"
 #include "Lucy/Search/LeafQuery.h"
+#include "Lucy/Util/Freezer.h"
 
 TestReqOptQuery*
 TestReqOptQuery_new() {
@@ -41,7 +42,7 @@ test_Dump_Load_and_Equals(TestBatchRunner *runner) {
     RequiredOptionalQuery *boost_differs = ReqOptQuery_new(a_leaf, b_leaf);
     Obj *dump = (Obj*)ReqOptQuery_Dump(query);
     RequiredOptionalQuery *clone
-        = (RequiredOptionalQuery*)Obj_Load(dump, dump);
+        = (RequiredOptionalQuery*)Freezer_load(dump);
 
     TEST_FALSE(runner, ReqOptQuery_Equals(query, (Obj*)kids_differ),
                "Different kids spoil Equals");

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Test/TestSchema.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/TestSchema.c b/core/Lucy/Test/TestSchema.c
index 6c28296..d5ccff7 100644
--- a/core/Lucy/Test/TestSchema.c
+++ b/core/Lucy/Test/TestSchema.c
@@ -25,6 +25,7 @@
 #include "Lucy/Analysis/StandardTokenizer.h"
 #include "Lucy/Plan/FullTextType.h"
 #include "Lucy/Plan/Architecture.h"
+#include "Lucy/Util/Freezer.h"
 
 TestSchema*
 TestSchema_new(bool use_alt_arch) {
@@ -91,7 +92,7 @@ static void
 test_Dump_and_Load(TestBatchRunner *runner) {
     TestSchema *schema = TestSchema_new(false);
     Obj        *dump   = (Obj*)TestSchema_Dump(schema);
-    TestSchema *loaded = (TestSchema*)Obj_Load(dump, dump);
+    TestSchema *loaded = (TestSchema*)Freezer_load(dump);
 
     TEST_FALSE(runner, TestSchema_Equals(schema, (Obj*)loaded),
                "Dump => Load round trip");

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/Lucy/Util/Freezer.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Util/Freezer.c b/core/Lucy/Util/Freezer.c
index 2f9bf63..56928c9 100644
--- a/core/Lucy/Util/Freezer.c
+++ b/core/Lucy/Util/Freezer.c
@@ -384,7 +384,7 @@ S_dump_hash(Hash *hash) {
         // Since JSON only supports text hash keys, dump() can only support
         // text hash keys.
         CERTIFY(key, CHARBUF);
-        Hash_Store(dump, key, Obj_Dump(value));
+        Hash_Store(dump, key, Freezer_dump(value));
     }
 
     return (Obj*)dump;

http://git-wip-us.apache.org/repos/asf/lucy/blob/e3e16616/core/LucyX/Search/ProximityQuery.c
----------------------------------------------------------------------
diff --git a/core/LucyX/Search/ProximityQuery.c b/core/LucyX/Search/ProximityQuery.c
index 37f7f70..6f9f645 100644
--- a/core/LucyX/Search/ProximityQuery.c
+++ b/core/LucyX/Search/ProximityQuery.c
@@ -103,8 +103,8 @@ ProximityQuery_dump(ProximityQuery *self)
     ProximityQuery_Dump_t super_dump
         = SUPER_METHOD_PTR(PROXIMITYQUERY, Lucy_ProximityQuery_Dump);
     Hash *dump = (Hash*)CERTIFY(super_dump(self), HASH);
-    Hash_Store_Str(dump, "field", 5, Obj_Dump((Obj*)ivars->field));
-    Hash_Store_Str(dump, "terms", 5, Obj_Dump((Obj*)ivars->terms));
+    Hash_Store_Str(dump, "field", 5, Freezer_dump((Obj*)ivars->field));
+    Hash_Store_Str(dump, "terms", 5, Freezer_dump((Obj*)ivars->terms));
     Hash_Store_Str(dump, "within", 6,
                    (Obj*)CB_newf("%i64", (int64_t)ivars->within));
     return (Obj*)dump;
@@ -119,9 +119,9 @@ ProximityQuery_load(ProximityQuery *self, Obj *dump)
     ProximityQuery *loaded = (ProximityQuery*)super_load(self, dump);
     ProximityQueryIVARS *loaded_ivars = ProximityQuery_IVARS(loaded);
     Obj *field = CERTIFY(Hash_Fetch_Str(source, "field", 5), OBJ);
-    loaded_ivars->field = (CharBuf*)CERTIFY(Obj_Load(field, field), CHARBUF);
+    loaded_ivars->field = (CharBuf*)CERTIFY(Freezer_load(field), CHARBUF);
     Obj *terms = CERTIFY(Hash_Fetch_Str(source, "terms", 5), OBJ);
-    loaded_ivars->terms = (VArray*)CERTIFY(Obj_Load(terms, terms), VARRAY);
+    loaded_ivars->terms = (VArray*)CERTIFY(Freezer_load(terms), VARRAY);
     Obj *within = CERTIFY(Hash_Fetch_Str(source, "within", 6), OBJ);
     loaded_ivars->within = (uint32_t)Obj_To_I64(within);
     return (Obj*)loaded;