From b8d9a760ad887c45d1e0c5d1f0b63c6df6f83c86 Mon Sep 17 00:00:00 2001 From: Nicola Cabiddu Date: Mon, 8 Jul 2024 11:22:35 +0100 Subject: [PATCH] remove typed_print --- src/realm/array.cpp | 34 ----------- src/realm/array.hpp | 2 - src/realm/bplustree.cpp | 31 ---------- src/realm/bplustree.hpp | 2 - src/realm/cluster.cpp | 72 ----------------------- src/realm/cluster.hpp | 8 --- src/realm/cluster_tree.cpp | 37 ------------ src/realm/cluster_tree.hpp | 11 ---- src/realm/group.cpp | 42 ------------- src/realm/group.hpp | 6 -- src/realm/node.hpp | 5 -- src/realm/parser/generated/query_flex.cpp | 31 +++++----- src/realm/parser/generated/query_flex.hpp | 7 ++- src/realm/spec.hpp | 5 -- src/realm/table.cpp | 26 -------- src/realm/table.hpp | 1 - 16 files changed, 20 insertions(+), 300 deletions(-) diff --git a/src/realm/array.cpp b/src/realm/array.cpp index be70388bb2b..a2f61e4491c 100644 --- a/src/realm/array.cpp +++ b/src/realm/array.cpp @@ -1080,40 +1080,6 @@ bool QueryStateFindAll::match(size_t index) noexcept return (m_limit > m_match_count); } -void Array::typed_print(std::string prefix) const -{ - std::cout << "Generic Array " << header_to_string(get_header()) << " @ " << m_ref; - if (!is_attached()) { - std::cout << " Unattached"; - return; - } - if (size() == 0) { - std::cout << " Empty" << std::endl; - return; - } - std::cout << " size = " << size() << " {"; - if (has_refs()) { - std::cout << std::endl; - for (unsigned n = 0; n < size(); ++n) { - auto pref = prefix + " " + to_string(n) + ":\t"; - RefOrTagged rot = get_as_ref_or_tagged(n); - if (rot.is_ref() && rot.get_as_ref()) { - Array a(m_alloc); - a.init_from_ref(rot.get_as_ref()); - std::cout << pref; - a.typed_print(pref); - } - else if (rot.is_tagged()) { - std::cout << pref << rot.get_as_int() << std::endl; - } - } - std::cout << prefix << "}" << std::endl; - } - else { - std::cout << " Leaf of unknown type }" << std::endl; - } -} - ref_type ArrayPayload::typed_write(ref_type ref, _impl::ArrayWriterBase& out, Allocator& alloc) { Array arr(alloc); diff --git a/src/realm/array.hpp b/src/realm/array.hpp index 47984bfe959..858915fe27f 100644 --- a/src/realm/array.hpp +++ b/src/realm/array.hpp @@ -506,8 +506,6 @@ class Array : public Node, public ArrayParent { /// log2. Possible results {0, 1, 2, 4, 8, 16, 32, 64} static uint8_t bit_width(int64_t value); - void typed_print(std::string prefix) const; - protected: friend class NodeTree; void copy_on_write(); diff --git a/src/realm/bplustree.cpp b/src/realm/bplustree.cpp index b07e68d0e2b..02ea994b303 100644 --- a/src/realm/bplustree.cpp +++ b/src/realm/bplustree.cpp @@ -867,37 +867,6 @@ ref_type BPlusTreeBase::typed_write(ref_type ref, _impl::ArrayWriterBase& out, A return written_node.write(out); } -void BPlusTreeBase::typed_print(std::string prefix, Allocator& alloc, ref_type root, ColumnType col_type) -{ - char* header = alloc.translate(root); - Array a(alloc); - a.init_from_ref(root); - if (NodeHeader::get_is_inner_bptree_node_from_header(header)) { - std::cout << "{" << std::endl; - REALM_ASSERT(a.has_refs()); - for (unsigned j = 0; j < a.size(); ++j) { - auto pref = prefix + " " + std::to_string(j) + ":\t"; - RefOrTagged rot = a.get_as_ref_or_tagged(j); - if (rot.is_ref() && rot.get_as_ref()) { - if (j == 0) { - std::cout << pref << "BPTree offsets as ArrayUnsigned as "; - Array a(alloc); - a.init_from_ref(rot.get_as_ref()); - a.typed_print(prefix); - } - else { - std::cout << pref << "Subtree beeing "; - BPlusTreeBase::typed_print(pref, alloc, rot.get_as_ref(), col_type); - } - } - } - } - else { - std::cout << "BPTree Leaf[" << col_type << "] as "; - a.typed_print(prefix); - } -} - size_t BPlusTreeBase::size_from_header(const char* header) { auto node_size = Array::get_size_from_header(header); diff --git a/src/realm/bplustree.hpp b/src/realm/bplustree.hpp index 1f78d32ac26..5f763892b7a 100644 --- a/src/realm/bplustree.hpp +++ b/src/realm/bplustree.hpp @@ -219,8 +219,6 @@ class BPlusTreeBase { } static ref_type typed_write(ref_type, _impl::ArrayWriterBase&, Allocator&, TypedWriteFunc); - static void typed_print(std::string prefix, Allocator& alloc, ref_type root, ColumnType col_type); - protected: template diff --git a/src/realm/cluster.cpp b/src/realm/cluster.cpp index 2406d1e2362..1734993ebce 100644 --- a/src/realm/cluster.cpp +++ b/src/realm/cluster.cpp @@ -1713,76 +1713,4 @@ ref_type Cluster::typed_write(ref_type ref, _impl::ArrayWriterBase& out) const } return written_cluster.write(out); } - -void Cluster::typed_print(std::string prefix) const -{ - REALM_ASSERT_DEBUG(!get_is_inner_bptree_node_from_header(get_header())); - std::cout << "Cluster of size " << size() << " " << header_to_string(get_header()) << std::endl; - const auto table = get_owning_table(); - for (unsigned j = 0; j < size(); ++j) { - RefOrTagged rot = get_as_ref_or_tagged(j); - auto pref = prefix + " " + std::to_string(j) + ":\t"; - if (rot.is_ref() && rot.get_as_ref()) { - if (j == 0) { - std::cout << pref << "Keys as ArrayUnsigned as "; - Array a(m_alloc); - a.init_from_ref(rot.get_as_ref()); - a.typed_print(pref); - } - else { - auto col_key = table->m_leaf_ndx2colkey[j - 1]; - auto col_type = col_key.get_type(); - auto col_attr = col_key.get_attrs(); - std::string attr_string; - if (col_attr.test(col_attr_Dictionary)) - attr_string = "Dict:"; - if (col_attr.test(col_attr_List)) - attr_string = "List:"; - if (col_attr.test(col_attr_Set)) - attr_string = "Set:"; - if (col_attr.test(col_attr_Nullable)) - attr_string += "Null:"; - std::cout << pref << "Column[" << attr_string << col_type << "] as "; - // special cases for the types we want to compress - if (col_attr.test(col_attr_List) || col_attr.test(col_attr_Set)) { - // That is a single bplustree - // propagation of nullable missing here? - // handling of mixed missing here? - BPlusTreeBase::typed_print(pref, m_alloc, rot.get_as_ref(), col_type); - } - else if (col_attr.test(col_attr_Dictionary)) { - Array dict_top(m_alloc); - dict_top.init_from_ref(rot.get_as_ref()); - if (dict_top.size() == 0) { - std::cout << "{ empty }" << std::endl; - continue; - } - std::cout << "{" << std::endl; - auto ref0 = dict_top.get_as_ref(0); - if (ref0) { - auto p = pref + " 0:\t"; - std::cout << p; - BPlusTreeBase::typed_print(p, m_alloc, ref0, col_type); - } - if (dict_top.size() == 1) { - continue; // is this really possible? or should all dicts have both trees? - } - auto ref1 = dict_top.get_as_ref(1); - if (ref1) { - auto p = pref + " 1:\t"; - std::cout << p; - BPlusTreeBase::typed_print(p, m_alloc, dict_top.get_as_ref(1), col_type); - } - } - else { - // handle all other cases as generic arrays - Array a(m_alloc); - a.init_from_ref(rot.get_as_ref()); - a.typed_print(pref); - } - } - } - } -} - } // namespace realm diff --git a/src/realm/cluster.hpp b/src/realm/cluster.hpp index 33be9fcbe8b..564f3aa107e 100644 --- a/src/realm/cluster.hpp +++ b/src/realm/cluster.hpp @@ -214,13 +214,6 @@ class ClusterNode : public Array { } virtual ref_type typed_write(ref_type ref, _impl::ArrayWriterBase& out) const = 0; - virtual void typed_print(std::string prefix) const - { - static_cast(get_owning_table()); - std::cout << "ClusterNode as "; - Array::typed_print(prefix); - } - protected: #if REALM_MAX_BPNODE_SIZE > 256 static constexpr int node_shift_factor = 8; @@ -329,7 +322,6 @@ class Cluster : public ClusterNode { void verify() const; void dump_objects(int64_t key_offset, std::string lead) const override; virtual ref_type typed_write(ref_type ref, _impl::ArrayWriterBase& out) const override; - virtual void typed_print(std::string prefix) const override; static void remove_backlinks(const Table* origin_table, ObjKey origin_key, ColKey col, const std::vector& keys, CascadeState& state); static void remove_backlinks(const Table* origin_table, ObjKey origin_key, ColKey col, diff --git a/src/realm/cluster_tree.cpp b/src/realm/cluster_tree.cpp index 5bc2231454c..9c6d7fb1fe7 100644 --- a/src/realm/cluster_tree.cpp +++ b/src/realm/cluster_tree.cpp @@ -165,43 +165,6 @@ class ClusterNodeInner : public ClusterNode { return written_node.write(out); } - virtual void typed_print(std::string prefix) const override - { - REALM_ASSERT(get_is_inner_bptree_node_from_header(get_header())); - REALM_ASSERT(has_refs()); - std::cout << "ClusterNodeInner " << header_to_string(get_header()) << std::endl; - for (unsigned j = 0; j < size(); ++j) { - RefOrTagged rot = get_as_ref_or_tagged(j); - auto pref = prefix + " " + std::to_string(j) + ":\t"; - if (rot.is_ref() && rot.get_as_ref()) { - if (j == 0) { - std::cout << pref << "Keys as ArrayUnsigned as "; - Array a(m_alloc); - a.init_from_ref(rot.get_as_ref()); - a.typed_print(pref); - } - else { - auto header = m_alloc.translate(rot.get_as_ref()); - MemRef m(header, rot.get_as_ref(), m_alloc); - if (get_is_inner_bptree_node_from_header(header)) { - ClusterNodeInner a(m_alloc, m_tree_top); - a.init(m); - std::cout << pref; - a.typed_print(pref); - } - else { - Cluster a(j, m_alloc, m_tree_top); - a.init(m); - std::cout << pref; - a.typed_print(pref); - } - } - } - // just ignore entries, which are not refs. - } - Array::typed_print(prefix); - } - private: static constexpr size_t s_key_ref_index = 0; static constexpr size_t s_sub_tree_depth_index = 1; diff --git a/src/realm/cluster_tree.hpp b/src/realm/cluster_tree.hpp index a03ed4aabde..1b0d05c759b 100644 --- a/src/realm/cluster_tree.hpp +++ b/src/realm/cluster_tree.hpp @@ -196,17 +196,6 @@ class ClusterTree { return m_root->typed_write(ref, out); } - void typed_print(std::string prefix) const - { - if (m_root) { - std::cout << prefix << "ClusterTree as "; - m_root->typed_print(prefix); - } - else { - std::cout << "Emtpy ClusterTree" << std::endl; - } - } - protected: friend class Obj; friend class Cluster; diff --git a/src/realm/group.cpp b/src/realm/group.cpp index 90b7d690b26..b6703b3af53 100644 --- a/src/realm/group.cpp +++ b/src/realm/group.cpp @@ -960,48 +960,6 @@ ref_type Group::typed_write_tables(_impl::ArrayWriterBase& out) const } return dest.write(out); } -void Group::table_typed_print(std::string prefix, ref_type ref) const -{ - REALM_ASSERT(m_top.get_as_ref(1) == ref); - Array a(m_alloc); - a.init_from_ref(ref); - REALM_ASSERT(a.has_refs()); - for (unsigned j = 0; j < a.size(); ++j) { - auto pref = prefix + " " + to_string(j) + ":\t"; - RefOrTagged rot = a.get_as_ref_or_tagged(j); - if (rot.is_tagged() || rot.get_as_ref() == 0) - continue; - auto table_accessor = do_get_table(j); - REALM_ASSERT(table_accessor); - table_accessor->typed_print(pref, rot.get_as_ref()); - } -} -void Group::typed_print(std::string prefix) const -{ - std::cout << "Group top array" << std::endl; - for (unsigned j = 0; j < m_top.size(); ++j) { - auto pref = prefix + " " + to_string(j) + ":\t"; - RefOrTagged rot = m_top.get_as_ref_or_tagged(j); - if (rot.is_ref() && rot.get_as_ref()) { - if (j == 1) { - // Tables - std::cout << pref << "All Tables" << std::endl; - table_typed_print(pref, rot.get_as_ref()); - } - else { - Array a(m_alloc); - a.init_from_ref(rot.get_as_ref()); - std::cout << pref; - a.typed_print(pref); - } - } - else { - std::cout << pref << rot.get_as_int() << std::endl; - } - } - std::cout << "}" << std::endl; -} - ref_type Group::DefaultTableWriter::write_names(_impl::OutputStream& out) { diff --git a/src/realm/group.hpp b/src/realm/group.hpp index 08ddd9acd44..352c5bd25fb 100644 --- a/src/realm/group.hpp +++ b/src/realm/group.hpp @@ -516,8 +516,6 @@ class Group : public ArrayParent { } #endif ref_type typed_write_tables(_impl::ArrayWriterBase& out) const; - void table_typed_print(std::string prefix, ref_type ref) const; - void typed_print(std::string prefix) const; protected: static constexpr size_t s_table_name_ndx = 0; @@ -1129,10 +1127,6 @@ class Group::TableWriter { virtual ref_type write_names(_impl::OutputStream&) = 0; virtual ref_type write_tables(_impl::OutputStream&) = 0; virtual HistoryInfo write_history(_impl::OutputStream&) = 0; - void typed_print(std::string prefix) - { - m_group->typed_print(prefix); - } virtual ~TableWriter() noexcept {} diff --git a/src/realm/node.hpp b/src/realm/node.hpp index 8a4b862a701..8d606b37708 100644 --- a/src/realm/node.hpp +++ b/src/realm/node.hpp @@ -263,11 +263,6 @@ class Node : public NodeHeader { } } - void typed_print(int) const - { - std::cout << "Generic Node ERROR\n"; - } - protected: /// The total size in bytes (including the header) of a new empty /// array. Must be a multiple of 8 (i.e., 64-bit aligned). diff --git a/src/realm/parser/generated/query_flex.cpp b/src/realm/parser/generated/query_flex.cpp index efeb479959a..91b35ec7db3 100644 --- a/src/realm/parser/generated/query_flex.cpp +++ b/src/realm/parser/generated/query_flex.cpp @@ -101,6 +101,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -330,7 +331,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -428,7 +429,7 @@ static void yy_init_buffer ( YY_BUFFER_STATE b, FILE *file , yyscan_t yyscanner YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); /* %endif */ @@ -495,7 +496,7 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); #define YY_DO_BEFORE_ACTION \ yyg->yytext_ptr = yy_bp; \ /* %% [2.0] code to fiddle yytext and yyleng for yymore() goes here \ */\ - yyleng = (int) (yy_cp - yy_bp); \ + yyleng = (yy_size_t) (yy_cp - yy_bp); \ yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ /* %% [3.0] code to copy yytext_ptr to yytext[] goes here, if %array \ */\ @@ -1309,8 +1310,8 @@ struct yyguts_t size_t yy_buffer_stack_max; /**< capacity of stack. */ YY_BUFFER_STATE * yy_buffer_stack; /**< Stack as an array. */ char yy_hold_char; - int yy_n_chars; - int yyleng_r; + yy_size_t yy_n_chars; + yy_size_t yyleng_r; char *yy_c_buf_p; int yy_init; int yy_start; @@ -1402,7 +1403,7 @@ void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - int yyget_leng ( yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); @@ -1516,7 +1517,7 @@ static int input ( yyscan_t yyscanner ); if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ - int n; \ + yy_size_t n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -2266,7 +2267,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) @@ -2280,7 +2281,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -2338,7 +2339,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) if ((yyg->yy_n_chars + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - int new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); + yy_size_t new_size = yyg->yy_n_chars + number_to_move + (yyg->yy_n_chars >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc( (void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf, (yy_size_t) new_size , yyscanner ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -2466,7 +2467,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) else { /* need more input */ - int offset = (int) (yyg->yy_c_buf_p - yyg->yytext_ptr); + yy_size_t offset = yyg->yy_c_buf_p - yyg->yytext_ptr; ++yyg->yy_c_buf_p; switch ( yy_get_next_buffer( yyscanner ) ) @@ -2935,12 +2936,12 @@ YY_BUFFER_STATE yy_scan_string (const char * yystr , yyscan_t yyscanner) * @param yyscanner The scanner object. * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, int _yybytes_len , yyscan_t yyscanner) +YY_BUFFER_STATE yy_scan_bytes (const char * yybytes, yy_size_t _yybytes_len , yyscan_t yyscanner) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = (yy_size_t) (_yybytes_len + 2); @@ -2999,7 +3000,7 @@ static void yynoreturn yy_fatal_error (const char* msg , yyscan_t yyscanner) do \ { \ /* Undo effects of setting up yytext. */ \ - int yyless_macro_arg = (n); \ + yy_size_t yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ yytext[yyleng] = yyg->yy_hold_char; \ yyg->yy_c_buf_p = yytext + yyless_macro_arg; \ @@ -3087,7 +3088,7 @@ FILE *yyget_out (yyscan_t yyscanner) /** Get the length of the current token. * @param yyscanner The scanner object. */ -int yyget_leng (yyscan_t yyscanner) +yy_size_t yyget_leng (yyscan_t yyscanner) { struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; return yyleng; diff --git a/src/realm/parser/generated/query_flex.hpp b/src/realm/parser/generated/query_flex.hpp index 29b3ba5916f..ccb937ad959 100644 --- a/src/realm/parser/generated/query_flex.hpp +++ b/src/realm/parser/generated/query_flex.hpp @@ -100,6 +100,7 @@ typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; +typedef uint64_t flex_uint64_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; @@ -278,7 +279,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -339,7 +340,7 @@ void yypop_buffer_state ( yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_buffer ( char *base, yy_size_t size , yyscan_t yyscanner ); YY_BUFFER_STATE yy_scan_string ( const char *yy_str , yyscan_t yyscanner ); -YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, int len , yyscan_t yyscanner ); +YY_BUFFER_STATE yy_scan_bytes ( const char *bytes, yy_size_t len , yyscan_t yyscanner ); /* %endif */ @@ -459,7 +460,7 @@ void yyset_out ( FILE * _out_str , yyscan_t yyscanner ); - int yyget_leng ( yyscan_t yyscanner ); + yy_size_t yyget_leng ( yyscan_t yyscanner ); diff --git a/src/realm/spec.hpp b/src/realm/spec.hpp index d1a17072f67..c9f3ff0c230 100644 --- a/src/realm/spec.hpp +++ b/src/realm/spec.hpp @@ -84,11 +84,6 @@ class Spec { void set_ndx_in_parent(size_t) noexcept; void verify() const; - void typed_print(std::string prefix) const - { - std::cout << prefix << "Spec as "; - m_top.typed_print(prefix); - } private: // Underlying array structure. diff --git a/src/realm/table.cpp b/src/realm/table.cpp index ad9435f45ca..a21820997d6 100644 --- a/src/realm/table.cpp +++ b/src/realm/table.cpp @@ -3381,29 +3381,3 @@ ref_type Table::typed_write(ref_type ref, _impl::ArrayWriterBase& out) const } return dest.write(out); } - -void Table::typed_print(std::string prefix, ref_type ref) const -{ - REALM_ASSERT(ref == m_top.get_mem().get_ref()); - std::cout << prefix << "Table with key = " << m_key << " " << NodeHeader::header_to_string(m_top.get_header()) - << " {" << std::endl; - for (unsigned j = 0; j < m_top.size(); ++j) { - auto pref = prefix + " " + to_string(j) + ":\t"; - auto rot = m_top.get_as_ref_or_tagged(j); - if (rot.is_ref() && rot.get_as_ref()) { - if (j == 0) { - m_spec.typed_print(pref); - } - else if (j == 2) { - m_clusters.typed_print(pref); - } - else { - Array a(m_alloc); - a.init_from_ref(rot.get_as_ref()); - std::cout << pref; - a.typed_print(pref); - } - } - } - std::cout << prefix << "}" << std::endl; -} diff --git a/src/realm/table.hpp b/src/realm/table.hpp index 0830d7c733f..ac0faa5140a 100644 --- a/src/realm/table.hpp +++ b/src/realm/table.hpp @@ -546,7 +546,6 @@ class Table { ref_type typed_write(ref_type ref, _impl::ArrayWriterBase& out, bool deep, bool only_modified, bool compress) const; - void typed_print(std::string prefix, ref_type ref) const; private: template