From 327ea2d0149d0bec45bc4dce4d9127b3e92080ad Mon Sep 17 00:00:00 2001 From: jkeiser Date: Mon, 17 Jul 2023 22:16:34 +0000 Subject: [PATCH] deploy: 1e97af7dfb4f78f2c96436c0fbca10792b6b49fc --- ..._source.html => amalgamated_8h_source.html | 28 +- annotated.html | 4 +- annotated_dup.js | 2 +- arm64_2base_8h_source.html | 135 + arm64_2begin_8h_source.html | 7 + arm64_2bitmanipulation_8h_source.html | 177 +- arm64_2bitmask_8h_source.html | 70 +- arm64_2implementation_8h_source.html | 49 +- arm64_2intrinsics_8h_source.html | 8 +- arm64_2numberparsing__defs_8h_source.html | 161 ++ arm64_2ondemand_8h_source.html | 112 + arm64_2simd_8h_source.html | 1033 +++---- ... arm64_2stringparsing__defs_8h_source.html | 20 +- arm64_8h_source.html | 33 +- array__iterator-inl_8h_source.html | 158 +- array__iterator_8h_source.html | 127 +- atomic__ptr_8h_source.html | 136 + atomparsing_8h_source.html | 138 +- base_8h_source.html | 69 +- builtin_2base_8h_source.html | 132 + builtin_2implementation_8h_source.html | 133 + ...e.html => builtin_2ondemand_8h_source.html | 74 +- builtin_8h_source.html | 67 +- classes.html | 14 +- ..._i_o_n_1_1dom__parser__implementation.html | 2 +- ..._e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html | 28 +- ..._i_o_n_1_1ondemand_1_1array__iterator.html | 10 +- ...n_t_a_t_i_o_n_1_1ondemand_1_1document.html | 94 +- ..._n_1_1ondemand_1_1document__reference.html | 6 +- ...i_o_n_1_1ondemand_1_1document__stream.html | 8 +- ...emand_1_1document__stream_1_1iterator.html | 4 +- ..._e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html | 8 +- ...e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html | 18 +- ...i_o_n_1_1ondemand_1_1object__iterator.html | 2 +- ...e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html | 18 +- ..._o_n_1_1ondemand_1_1raw__json__string.html | 14 +- ..._e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html | 86 +- classsimdjson_1_1dom_1_1array.html | 16 +- ...ssimdjson_1_1dom_1_1array_1_1iterator.html | 10 +- classsimdjson_1_1dom_1_1document.html | 4 +- classsimdjson_1_1dom_1_1document__stream.html | 12 +- ..._1dom_1_1document__stream_1_1iterator.html | 6 +- classsimdjson_1_1dom_1_1element.html | 80 +- classsimdjson_1_1dom_1_1key__value__pair.html | 4 +- classsimdjson_1_1dom_1_1object.html | 20 +- ...simdjson_1_1dom_1_1object_1_1iterator.html | 16 +- classsimdjson_1_1dom_1_1parser.html | 30 +- classsimdjson_1_1implementation.html | 6 +- classsimdjson_1_1padded__string__view.html | 6 +- common__defs_8h_source.html | 571 ++-- ...source.html => dependencies_8h_source.html | 42 +- dir_0d145e48adcb2584d6aad0aa1d711d9e.js | 6 +- dir_0fee190c3bc9a7d22e6d44901a62fa54.js | 2 + dir_438095d7beafc60159803dc5832a82bd.js | 1 + dir_49a0b2767ded4a45005c5d6720a18cd1.html | 3 - dir_49a0b2767ded4a45005c5d6720a18cd1.js | 5 +- dir_53368a02099cf3699f2996a5d88d70b6.js | 7 +- dir_76d8247d4498211a7d04a3794a38eb71.js | 6 +- dir_7796bb4b727f918c96faee1bdd50e49a.js | 4 +- dir_9b01d0736ef91c92ca1a5074971144b1.js | 6 +- dir_b35ffb90479583e132afc246e9b6e77a.js | 6 +- dir_ba336e6e255a3bf0b1427b51513cdc60.js | 6 +- dir_bdd5d78d80e110a51a7313218161f5b4.js | 6 +- ... dir_cae07bd9608c9724f8cbc862866fc74a.html | 19 +- dir_cae07bd9608c9724f8cbc862866fc74a.js | 6 + dom_2array-inl_8h_source.html | 347 +-- dom_2array_8h_source.html | 215 +- ...8h_source.html => dom_2base_8h_source.html | 79 +- dom_2document-inl_8h_source.html | 302 +- dom_2document_8h_source.html | 76 +- dom_2document__stream-inl_8h_source.html | 694 ++--- dom_2document__stream_8h_source.html | 297 +- dom_2object-inl_8h_source.html | 493 ++-- dom_2object_8h_source.html | 278 +- dom_2parser-inl_8h_source.html | 500 ++-- dom_2parser_8h_source.html | 310 +-- dom_2serialization-inl_8h_source.html | 931 ++++--- dom_2serialization_8h_source.html | 364 ++- dom_8h_source.html | 58 +- element-inl_8h_source.html | 959 +++---- element_8h_source.html | 443 ++- error-inl_8h_source.html | 369 ++- error_8h_source.html | 8 +- fallback_2base_8h_source.html | 128 + fallback_2begin_8h_source.html | 4 + fallback_2bitmanipulation_8h_source.html | 89 +- fallback_2implementation_8h_source.html | 53 +- fallback_2numberparsing__defs_8h_source.html | 181 ++ fallback_2ondemand_8h_source.html | 112 + ...llback_2stringparsing__defs_8h_source.html | 18 +- fallback_8h_source.html | 29 +- field-inl_8h_source.html | 182 +- field_8h_source.html | 116 +- files.html | 326 ++- generic_2base_8h_source.html | 148 + ...dom__parser__implementation_8h_source.html | 179 +- generic_2ondemand_2array-inl_8h_source.html | 450 +-- generic_2ondemand_2array_8h_source.html | 174 +- generic_2ondemand_2base_8h_source.html | 158 ++ ...ric_2ondemand_2document-inl_8h_source.html | 1398 +++++----- generic_2ondemand_2document_8h_source.html | 772 +++--- ...emand_2document__stream-inl_8h_source.html | 772 +++--- ...2ondemand_2document__stream_8h_source.html | 333 +-- generic_2ondemand_2object-inl_8h_source.html | 497 ++-- generic_2ondemand_2object_8h_source.html | 185 +- generic_2ondemand_2parser-inl_8h_source.html | 321 ++- generic_2ondemand_2parser_8h_source.html | 64 +- ...ondemand_2serialization-inl_8h_source.html | 455 +-- ...ic_2ondemand_2serialization_8h_source.html | 92 +- group__array.html | 12 +- group__object.html | 16 +- group__scalar.html | 8 +- ...ource.html => haswell_2base_8h_source.html | 69 +- haswell_2begin_8h_source.html | 13 +- haswell_2bitmanipulation_8h_source.html | 120 +- haswell_2bitmask_8h_source.html | 49 +- haswell_2end_8h_source.html | 9 +- haswell_2implementation_8h_source.html | 61 +- haswell_2intrinsics_8h_source.html | 4 +- haswell_2numberparsing__defs_8h_source.html | 162 ++ haswell_2ondemand_8h_source.html | 112 + haswell_2simd_8h_source.html | 719 ++--- ...aswell_2stringparsing__defs_8h_source.html | 101 +- haswell_8h_source.html | 46 +- ...ource.html => icelake_2base_8h_source.html | 54 +- icelake_2begin_8h_source.html | 13 +- icelake_2bitmanipulation_8h_source.html | 125 +- icelake_2bitmask_8h_source.html | 44 +- icelake_2end_8h_source.html | 9 +- icelake_2implementation_8h_source.html | 61 +- icelake_2intrinsics_8h_source.html | 4 +- icelake_2numberparsing__defs_8h_source.html | 162 ++ icelake_2ondemand_8h_source.html | 112 + icelake_2simd_8h_source.html | 719 ++--- ...celake_2stringparsing__defs_8h_source.html | 101 +- icelake_8h_source.html | 46 +- implementation_8h_source.html | 198 +- ...> implementation__detection_8h_source.html | 215 +- ..._simdjson__result__base-inl_8h_source.html | 172 +- ...ion__simdjson__result__base_8h_source.html | 105 +- instruction__set_8h_source.html | 180 ++ ...dom__parser__implementation_8h_source.html | 4 +- isadetection_8h_source.html | 384 ++- json__iterator-inl_8h_source.html | 785 +++--- json__iterator_8h_source.html | 265 +- json__type-inl_8h_source.html | 239 +- json__type_8h_source.html | 204 +- jsoncharutils_8h_source.html | 220 +- jsoncharutils__tables_8h_source.html | 4 +- jsonformatutils_8h_source.html | 127 +- jsonioutil_8h_source.html | 6 +- jsonparser_8h_source.html | 8 +- logger-inl_8h_source.html | 428 +-- logger_8h_source.html | 112 +- md_doc_dom.html | 2 +- md_doc_ondemand_design.html | 2 +- menudata.js | 11 +- minify_8h_source.html | 16 +- namespacemembers.html | 10 +- namespacemembers_enum.html | 3 + namespacemembers_func.html | 39 +- namespacemembers_type.html | 2 +- namespacemembers_vars.html | 2 +- namespaces.html | 118 +- namespacesimdjson.html | 71 +- namespacesimdjson.js | 57 +- ...m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html | 28 +- ...i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.js | 2 +- namespacesimdjson_1_1arm64.html | 111 + namespacesimdjson_1_1dom.html | 388 +++ namespacesimdjson_1_1dom.js | 28 + namespacesimdjson_1_1fallback.html | 111 + namespacesimdjson_1_1haswell.html | 111 + namespacesimdjson_1_1icelake.html | 111 + namespacesimdjson_1_1ppc64.html | 111 + namespacesimdjson_1_1westmere.html | 111 + navtreedata.js | 10 +- navtreeindex0.js | 56 +- navtreeindex1.js | 26 +- navtreeindex2.js | 226 +- navtreeindex3.js | 252 +- navtreeindex4.js | 142 +- navtreeindex5.js | 80 +- ...ource.html => numberparsing_8h_source.html | 2452 +++++++++-------- numberparsing__tables_8h_source.html | 2 +- object__iterator-inl_8h_source.html | 262 +- object__iterator_8h_source.html | 143 +- ondemand_2amalgamated_8h_source.html | 146 + ...l => ondemand_2dependencies_8h_source.html | 41 +- ondemand_8h_source.html | 44 +- padded__string-inl_8h_source.html | 337 ++- padded__string_8h_source.html | 14 +- padded__string__view-inl_8h_source.html | 72 +- padded__string__view_8h_source.html | 10 +- parsedjson_8h_source.html | 6 +- parsedjson__iterator-inl_8h_source.html | 1008 +++---- parsedjson__iterator_8h_source.html | 483 ++-- portability_8h_source.html | 236 +- ..._source.html => ppc64_2base_8h_source.html | 68 +- ppc64_2begin_8h_source.html | 7 + ppc64_2bitmanipulation_8h_source.html | 146 +- ppc64_2bitmask_8h_source.html | 80 +- ppc64_2implementation_8h_source.html | 35 +- ppc64_2intrinsics_8h_source.html | 4 +- ppc64_2numberparsing__defs_8h_source.html | 169 ++ ppc64_2ondemand_8h_source.html | 112 + ppc64_2simd_8h_source.html | 943 +++---- ... ppc64_2stringparsing__defs_8h_source.html | 135 +- ppc64_8h_source.html | 33 +- raw__json__string-inl_8h_source.html | 406 +-- raw__json__string_8h_source.html | 167 +- search/all_0.js | 20 +- search/all_1.js | 9 +- search/all_10.js | 16 +- search/all_11.js | 116 +- search/all_12.js | 26 +- search/all_13.js | 21 +- search/all_14.js | 6 +- search/all_15.js | 2 +- search/all_16.js | 2 +- search/all_2.js | 24 +- search/all_3.js | 25 +- search/all_4.js | 15 +- search/all_5.js | 18 +- search/all_6.js | 40 +- search/all_7.js | 4 +- search/all_8.js | 94 +- search/all_9.js | 2 +- search/all_a.js | 12 +- search/all_b.js | 8 +- search/all_c.js | 8 +- search/all_d.js | 19 +- search/all_e.js | 53 +- search/all_f.js | 24 +- search/classes_0.js | 4 +- search/classes_1.js | 8 +- search/classes_2.js | 2 +- search/classes_3.js | 2 +- search/classes_4.js | 36 +- search/classes_5.js | 2 +- search/classes_6.js | 2 +- search/classes_7.js | 6 +- search/classes_8.js | 6 +- search/classes_9.js | 2 +- search/classes_a.js | 42 +- search/classes_b.js | 2 +- search/enums_0.js | 3 +- search/enums_1.js | 2 +- search/enums_2.js | 2 +- search/enumvalues_0.js | 3 +- search/enumvalues_1.js | 3 +- search/enumvalues_2.js | 2 +- search/enumvalues_3.js | 3 +- search/enumvalues_4.js | 2 +- search/enumvalues_5.js | 2 +- search/enumvalues_6.js | 15 +- search/enumvalues_7.js | 2 +- search/enumvalues_8.js | 13 +- search/enumvalues_9.js | 7 +- search/enumvalues_a.js | 2 +- search/enumvalues_b.js | 15 +- search/enumvalues_c.js | 6 +- search/enumvalues_d.js | 13 +- search/files_0.js | 2 +- search/files_1.html | 37 - search/files_1.js | 4 - search/functions_0.js | 24 +- search/functions_1.js | 4 +- search/functions_10.js | 38 +- search/functions_11.js | 14 +- search/functions_12.js | 8 +- search/functions_13.js | 6 +- search/functions_14.js | 2 +- search/functions_15.js | 2 +- search/functions_2.js | 18 +- search/functions_3.js | 8 +- search/functions_4.js | 8 +- search/functions_5.js | 14 +- search/functions_6.js | 40 +- search/functions_7.js | 4 +- search/functions_8.js | 44 +- search/functions_9.js | 10 +- search/functions_a.js | 6 +- search/functions_b.js | 6 +- search/functions_c.js | 4 +- search/functions_d.js | 42 +- search/functions_e.js | 16 +- search/functions_f.js | 16 +- search/groups_0.js | 2 +- search/groups_1.js | 2 +- search/groups_2.js | 2 +- search/namespaces_0.js | 11 +- search/pages_0.js | 2 +- search/pages_1.js | 2 +- search/pages_2.js | 2 +- search/pages_3.js | 2 +- search/pages_4.js | 4 +- search/pages_5.js | 6 +- search/searchdata.js | 2 +- search/typedefs_0.js | 2 +- search/typedefs_1.js | 2 +- search/typedefs_2.js | 2 +- search/typedefs_3.js | 2 +- search/variables_0.js | 2 +- search/variables_1.js | 6 +- search/variables_2.js | 2 +- search/variables_3.js | 4 +- search/variables_4.js | 2 +- search/variables_5.js | 2 +- search/variables_6.js | 2 +- search/variables_7.js | 2 +- search/variables_8.js | 6 +- search/variables_9.js | 2 +- simdjson__version_8h_source.html | 2 +- simdprune__tables_8h_source.html | 30 +- string__view_8hpp_source.html | 4 +- ...mplementation__simdjson__result__base.html | 10 +- ...e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html | 12 +- ..._m_e_n_t_a_t_i_o_n_1_1open__container.html | 2 +- structsimdjson_1_1padded__string.html | 18 +- structsimdjson_1_1simdjson__result.html | 8 +- ...t_a_t_i_o_n_1_1ondemand_1_1array_01_4.html | 2 +- ...n_1_1ondemand_1_1array__iterator_01_4.html | 2 +- ..._t_i_o_n_1_1ondemand_1_1document_01_4.html | 10 +- ..._a_t_i_o_n_1_1ondemand_1_1document_01_4.js | 2 +- ...1ondemand_1_1document__reference_01_4.html | 10 +- ...1_1ondemand_1_1document__reference_01_4.js | 2 +- ..._1_1ondemand_1_1document__stream_01_4.html | 2 +- ...t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html | 2 +- ..._n_1_1ondemand_1_1json__iterator_01_4.html | 2 +- ..._i_o_n_1_1ondemand_1_1json__type_01_4.html | 2 +- ..._a_t_i_o_n_1_1ondemand_1_1object_01_4.html | 2 +- ..._1_1ondemand_1_1object__iterator_01_4.html | 2 +- ...1_1ondemand_1_1raw__json__string_01_4.html | 2 +- ...n_1_1ondemand_1_1token__iterator_01_4.html | 2 +- ...t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html | 20 +- ...n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.js | 2 +- ...n_1_1ondemand_1_1value__iterator_01_4.html | 2 +- ...imdjson__result_3_01dom_1_1array_01_4.html | 2 +- ...sult_3_01dom_1_1document__stream_01_4.html | 2 +- ...djson__result_3_01dom_1_1element_01_4.html | 4 +- ...mdjson__result_3_01dom_1_1object_01_4.html | 2 +- tape__ref-inl_8h_source.html | 214 +- tape__ref_8h_source.html | 82 +- tape__type_8h_source.html | 17 +- token__iterator-inl_8h_source.html | 155 +- token__iterator_8h_source.html | 147 +- value-inl_8h_source.html | 890 +++--- value_8h_source.html | 479 ++-- value__iterator-inl_8h_source.html | 2019 +++++++------- value__iterator_8h_source.html | 383 +-- ...urce.html => westmere_2base_8h_source.html | 69 +- westmere_2begin_8h_source.html | 13 +- westmere_2bitmanipulation_8h_source.html | 146 +- westmere_2bitmask_8h_source.html | 44 +- westmere_2end_8h_source.html | 9 +- westmere_2implementation_8h_source.html | 57 +- westmere_2intrinsics_8h_source.html | 34 +- westmere_2numberparsing__defs_8h_source.html | 162 ++ westmere_2ondemand_8h_source.html | 112 + westmere_2simd_8h_source.html | 673 ++--- ...stmere_2stringparsing__defs_8h_source.html | 101 +- westmere_8h_source.html | 46 +- 363 files changed, 23002 insertions(+), 18694 deletions(-) rename token__position_8h_source.html => amalgamated_8h_source.html (75%) create mode 100644 arm64_2base_8h_source.html create mode 100644 arm64_2numberparsing__defs_8h_source.html create mode 100644 arm64_2ondemand_8h_source.html rename arm64_2stringparsing_8h_source.html => arm64_2stringparsing__defs_8h_source.html (94%) create mode 100644 atomic__ptr_8h_source.html create mode 100644 builtin_2base_8h_source.html create mode 100644 builtin_2implementation_8h_source.html rename ppc64_2numberparsing_8h_source.html => builtin_2ondemand_8h_source.html (65%) rename ondemand-inl_8h_source.html => dependencies_8h_source.html (77%) rename implementation-base_8h.html => dir_cae07bd9608c9724f8cbc862866fc74a.html (82%) create mode 100644 dir_cae07bd9608c9724f8cbc862866fc74a.js rename fallback_2numberparsing_8h_source.html => dom_2base_8h_source.html (54%) create mode 100644 fallback_2base_8h_source.html create mode 100644 fallback_2numberparsing__defs_8h_source.html create mode 100644 fallback_2ondemand_8h_source.html rename fallback_2stringparsing_8h_source.html => fallback_2stringparsing__defs_8h_source.html (93%) create mode 100644 generic_2base_8h_source.html create mode 100644 generic_2ondemand_2base_8h_source.html rename haswell_2numberparsing_8h_source.html => haswell_2base_8h_source.html (65%) create mode 100644 haswell_2numberparsing__defs_8h_source.html create mode 100644 haswell_2ondemand_8h_source.html rename haswell_2stringparsing_8h_source.html => haswell_2stringparsing__defs_8h_source.html (79%) rename arm64_2numberparsing_8h_source.html => icelake_2base_8h_source.html (71%) create mode 100644 icelake_2numberparsing__defs_8h_source.html create mode 100644 icelake_2ondemand_8h_source.html rename icelake_2stringparsing_8h_source.html => icelake_2stringparsing__defs_8h_source.html (79%) rename implementations_8h_source.html => implementation__detection_8h_source.html (73%) create mode 100644 instruction__set_8h_source.html create mode 100644 namespacesimdjson_1_1arm64.html create mode 100644 namespacesimdjson_1_1dom.html create mode 100644 namespacesimdjson_1_1dom.js create mode 100644 namespacesimdjson_1_1fallback.html create mode 100644 namespacesimdjson_1_1haswell.html create mode 100644 namespacesimdjson_1_1icelake.html create mode 100644 namespacesimdjson_1_1ppc64.html create mode 100644 namespacesimdjson_1_1westmere.html rename generic_2numberparsing_8h_source.html => numberparsing_8h_source.html (79%) create mode 100644 ondemand_2amalgamated_8h_source.html rename implementation-base_8h_source.html => ondemand_2dependencies_8h_source.html (67%) rename icelake_2numberparsing_8h_source.html => ppc64_2base_8h_source.html (63%) create mode 100644 ppc64_2numberparsing__defs_8h_source.html create mode 100644 ppc64_2ondemand_8h_source.html rename ppc64_2stringparsing_8h_source.html => ppc64_2stringparsing__defs_8h_source.html (74%) delete mode 100644 search/files_1.html delete mode 100644 search/files_1.js rename westmere_2numberparsing_8h_source.html => westmere_2base_8h_source.html (65%) create mode 100644 westmere_2numberparsing__defs_8h_source.html create mode 100644 westmere_2ondemand_8h_source.html rename westmere_2stringparsing_8h_source.html => westmere_2stringparsing__defs_8h_source.html (74%) diff --git a/token__position_8h_source.html b/amalgamated_8h_source.html similarity index 75% rename from token__position_8h_source.html rename to amalgamated_8h_source.html index 88a626f85..74f5fc28f 100644 --- a/token__position_8h_source.html +++ b/amalgamated_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/generic/ondemand/token_position.h Source File +simdjson: include/simdjson/generic/amalgamated.h Source File @@ -68,7 +68,7 @@ $(function() {
@@ -88,25 +88,27 @@ $(document).ready(function(){initNavTree('token__position_8h_source.html',''); i
-
token_position.h
+
amalgamated.h
-
1 namespace simdjson {
-
2 namespace SIMDJSON_IMPLEMENTATION {
-
3 namespace ondemand {
+
1 #if defined(SIMDJSON_AMALGAMATED) && !defined(SIMDJSON_GENERIC_DEPENDENCIES_H)
+
2 #error simdjson/generic/dependencies.h must be included before simdjson/generic/amalgamated.h!
+
3 #endif
4 
-
6 using token_position = const uint32_t *;
-
7 
-
8 } // namespace ondemand
-
9 } // namespace SIMDJSON_IMPLEMENTATION
-
10 } // namespace simdjson
-
We want to support argument-dependent lookup (ADL).
+
5 #include "simdjson/generic/base.h"
+
6 #include "simdjson/generic/jsoncharutils.h"
+
7 #include "simdjson/generic/atomparsing.h"
+
8 #include "simdjson/generic/dom_parser_implementation.h"
+
9 #include "simdjson/generic/implementation_simdjson_result_base.h"
+
10 #include "simdjson/generic/numberparsing.h"
+
11 
+
12 #include "simdjson/generic/implementation_simdjson_result_base-inl.h"
diff --git a/annotated.html b/annotated.html index 668a65f5c..28ed04972 100644 --- a/annotated.html +++ b/annotated.html @@ -93,8 +93,8 @@ $(document).ready(function(){initNavTree('annotated.html',''); initResizable();
Here are the classes, structs, unions and interfaces with brief descriptions:
[detail level 12345]
- - + + diff --git a/annotated_dup.js b/annotated_dup.js index eef6140db..3c5caaaa8 100644 --- a/annotated_dup.js +++ b/annotated_dup.js @@ -1,7 +1,7 @@ var annotated_dup = [ [ "simdjson", "namespacesimdjson.html", [ - [ "dom", null, [ + [ "dom", "namespacesimdjson_1_1dom.html", [ [ "array", "classsimdjson_1_1dom_1_1array.html", "classsimdjson_1_1dom_1_1array" ], [ "document", "classsimdjson_1_1dom_1_1document.html", "classsimdjson_1_1dom_1_1document" ], [ "document_stream", "classsimdjson_1_1dom_1_1document__stream.html", "classsimdjson_1_1dom_1_1document__stream" ], diff --git a/arm64_2base_8h_source.html b/arm64_2base_8h_source.html new file mode 100644 index 000000000..097c8dd71 --- /dev/null +++ b/arm64_2base_8h_source.html @@ -0,0 +1,135 @@ + + + + + + + +simdjson: include/simdjson/arm64/base.h Source File + + + + + + + + + + + + + + + + +
+
+
 NsimdjsonWe want to support argument-dependent lookup (ADL)
 Ndom
 NsimdjsonThe top level simdjson namespace, containing everything the library provides
 NdomA DOM API on top of the simdjson parser
 CarrayJSON array
 Citerator
 CdocumentA parsed JSON document
+ + + + + + +
+
simdjson +  3.2.1 +
+
Ridiculously Fast JSON
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
base.h
+
+
+
1 #ifndef SIMDJSON_ARM64_BASE_H
+
2 #define SIMDJSON_ARM64_BASE_H
+
3 
+
4 #ifndef SIMDJSON_AMALGAMATED
+
5 #include "simdjson/base.h"
+
6 #endif // SIMDJSON_AMALGAMATED
+
7 
+
8 namespace simdjson {
+
12 namespace arm64 {
+
13 
+
14 class implementation;
+
15 
+
16 namespace {
+
17 namespace simd {
+
18 template <typename T> struct simd8;
+
19 template <typename T> struct simd8x64;
+
20 } // namespace simd
+
21 } // unnamed namespace
+
22 
+
23 } // namespace arm64
+
24 } // namespace simdjson
+
25 
+
26 #ifndef SIMDJSON_AMALGAMATED
+
27 // If we're editing one of the files in this directory, begin the implementation!
+
28 #ifndef SIMDJSON_IMPLEMENTATION
+
29 #include "simdjson/arm64/begin.h"
+
30 #endif
+
31 #endif // SIMDJSON_AMALGAMATED
+
32 
+
33 #endif // SIMDJSON_ARM64_BASE_H
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
+
+
+ + + + diff --git a/arm64_2begin_8h_source.html b/arm64_2begin_8h_source.html index 7699e4e60..997a5ef68 100644 --- a/arm64_2begin_8h_source.html +++ b/arm64_2begin_8h_source.html @@ -92,6 +92,13 @@ $(document).ready(function(){initNavTree('arm64_2begin_8h_source.html',''); init
1 #define SIMDJSON_IMPLEMENTATION arm64
+
2 #include "simdjson/arm64/base.h"
+
3 #include "simdjson/arm64/intrinsics.h"
+
4 #include "simdjson/arm64/bitmanipulation.h"
+
5 #include "simdjson/arm64/bitmask.h"
+
6 #include "simdjson/arm64/numberparsing_defs.h"
+
7 #include "simdjson/arm64/simd.h"
+
8 #include "simdjson/arm64/stringparsing_defs.h"
diff --git a/arm64_2bitmanipulation_8h_source.html b/arm64_2bitmanipulation_8h_source.html index 376eeff79..172115483 100644 --- a/arm64_2bitmanipulation_8h_source.html +++ b/arm64_2bitmanipulation_8h_source.html @@ -94,93 +94,96 @@ $(document).ready(function(){initNavTree('arm64_2bitmanipulation_8h_source.html'
1 #ifndef SIMDJSON_ARM64_BITMANIPULATION_H
2 #define SIMDJSON_ARM64_BITMANIPULATION_H
3 
-
4 namespace simdjson {
-
5 namespace SIMDJSON_IMPLEMENTATION {
-
6 namespace {
-
7 
-
8 // We sometimes call trailing_zero on inputs that are zero,
-
9 // but the algorithms do not end up using the returned value.
-
10 // Sadly, sanitizers are not smart enough to figure it out.
-
11 SIMDJSON_NO_SANITIZE_UNDEFINED
-
12 // This function can be used safely even if not all bytes have been
-
13 // initialized.
-
14 // See issue https://github.com/simdjson/simdjson/issues/1965
-
15 SIMDJSON_NO_SANITIZE_MEMORY
-
16 simdjson_inline int trailing_zeroes(uint64_t input_num) {
-
17 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
-
18  unsigned long ret;
-
19  // Search the mask data from least significant bit (LSB)
-
20  // to the most significant bit (MSB) for a set bit (1).
-
21  _BitScanForward64(&ret, input_num);
-
22  return (int)ret;
-
23 #else // SIMDJSON_REGULAR_VISUAL_STUDIO
-
24  return __builtin_ctzll(input_num);
-
25 #endif // SIMDJSON_REGULAR_VISUAL_STUDIO
-
26 }
-
27 
-
28 /* result might be undefined when input_num is zero */
-
29 simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) {
-
30  return input_num & (input_num-1);
-
31 }
-
32 
-
33 /* result might be undefined when input_num is zero */
-
34 simdjson_inline int leading_zeroes(uint64_t input_num) {
-
35 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
-
36  unsigned long leading_zero = 0;
-
37  // Search the mask data from most significant bit (MSB)
-
38  // to least significant bit (LSB) for a set bit (1).
-
39  if (_BitScanReverse64(&leading_zero, input_num))
-
40  return (int)(63 - leading_zero);
-
41  else
-
42  return 64;
-
43 #else
-
44  return __builtin_clzll(input_num);
-
45 #endif// SIMDJSON_REGULAR_VISUAL_STUDIO
-
46 }
-
47 
-
48 /* result might be undefined when input_num is zero */
-
49 simdjson_inline int count_ones(uint64_t input_num) {
-
50  return vaddv_u8(vcnt_u8(vcreate_u8(input_num)));
-
51 }
-
52 
-
53 
-
54 #if defined(__GNUC__) // catches clang and gcc
-
61 /*
-
62  * We use SIMDJSON_PREFER_REVERSE_BITS as a hint that algorithms that
-
63  * work well with bit reversal may use it.
-
64  */
-
65 #define SIMDJSON_PREFER_REVERSE_BITS 1
-
66 
-
67 /* reverse the bits */
-
68 simdjson_inline uint64_t reverse_bits(uint64_t input_num) {
-
69  uint64_t rev_bits;
-
70  __asm("rbit %0, %1" : "=r"(rev_bits) : "r"(input_num));
-
71  return rev_bits;
-
72 }
-
73 
-
80 SIMDJSON_NO_SANITIZE_UNDEFINED
-
81 simdjson_inline uint64_t zero_leading_bit(uint64_t rev_bits, int leading_zeroes) {
-
82  return rev_bits ^ (uint64_t(0x8000000000000000) >> leading_zeroes);
-
83 }
-
84 
-
85 #endif
-
86 
-
87 simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, uint64_t *result) {
-
88 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
-
89  *result = value1 + value2;
-
90  return *result < value1;
-
91 #else
-
92  return __builtin_uaddll_overflow(value1, value2,
-
93  reinterpret_cast<unsigned long long *>(result));
-
94 #endif
-
95 }
-
96 
-
97 } // unnamed namespace
-
98 } // namespace SIMDJSON_IMPLEMENTATION
-
99 } // namespace simdjson
-
100 
-
101 #endif // SIMDJSON_ARM64_BITMANIPULATION_H
-
We want to support argument-dependent lookup (ADL).
+
4 #include "simdjson/arm64/base.h"
+
5 #include "simdjson/arm64/intrinsics.h"
+
6 
+
7 namespace simdjson {
+
8 namespace SIMDJSON_IMPLEMENTATION {
+
9 namespace {
+
10 
+
11 // We sometimes call trailing_zero on inputs that are zero,
+
12 // but the algorithms do not end up using the returned value.
+
13 // Sadly, sanitizers are not smart enough to figure it out.
+
14 SIMDJSON_NO_SANITIZE_UNDEFINED
+
15 // This function can be used safely even if not all bytes have been
+
16 // initialized.
+
17 // See issue https://github.com/simdjson/simdjson/issues/1965
+
18 SIMDJSON_NO_SANITIZE_MEMORY
+
19 simdjson_inline int trailing_zeroes(uint64_t input_num) {
+
20 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
+
21  unsigned long ret;
+
22  // Search the mask data from least significant bit (LSB)
+
23  // to the most significant bit (MSB) for a set bit (1).
+
24  _BitScanForward64(&ret, input_num);
+
25  return (int)ret;
+
26 #else // SIMDJSON_REGULAR_VISUAL_STUDIO
+
27  return __builtin_ctzll(input_num);
+
28 #endif // SIMDJSON_REGULAR_VISUAL_STUDIO
+
29 }
+
30 
+
31 /* result might be undefined when input_num is zero */
+
32 simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) {
+
33  return input_num & (input_num-1);
+
34 }
+
35 
+
36 /* result might be undefined when input_num is zero */
+
37 simdjson_inline int leading_zeroes(uint64_t input_num) {
+
38 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
+
39  unsigned long leading_zero = 0;
+
40  // Search the mask data from most significant bit (MSB)
+
41  // to least significant bit (LSB) for a set bit (1).
+
42  if (_BitScanReverse64(&leading_zero, input_num))
+
43  return (int)(63 - leading_zero);
+
44  else
+
45  return 64;
+
46 #else
+
47  return __builtin_clzll(input_num);
+
48 #endif// SIMDJSON_REGULAR_VISUAL_STUDIO
+
49 }
+
50 
+
51 /* result might be undefined when input_num is zero */
+
52 simdjson_inline int count_ones(uint64_t input_num) {
+
53  return vaddv_u8(vcnt_u8(vcreate_u8(input_num)));
+
54 }
+
55 
+
56 
+
57 #if defined(__GNUC__) // catches clang and gcc
+
64 /*
+
65  * We use SIMDJSON_PREFER_REVERSE_BITS as a hint that algorithms that
+
66  * work well with bit reversal may use it.
+
67  */
+
68 #define SIMDJSON_PREFER_REVERSE_BITS 1
+
69 
+
70 /* reverse the bits */
+
71 simdjson_inline uint64_t reverse_bits(uint64_t input_num) {
+
72  uint64_t rev_bits;
+
73  __asm("rbit %0, %1" : "=r"(rev_bits) : "r"(input_num));
+
74  return rev_bits;
+
75 }
+
76 
+
83 SIMDJSON_NO_SANITIZE_UNDEFINED
+
84 simdjson_inline uint64_t zero_leading_bit(uint64_t rev_bits, int leading_zeroes) {
+
85  return rev_bits ^ (uint64_t(0x8000000000000000) >> leading_zeroes);
+
86 }
+
87 
+
88 #endif
+
89 
+
90 simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, uint64_t *result) {
+
91 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
+
92  *result = value1 + value2;
+
93  return *result < value1;
+
94 #else
+
95  return __builtin_uaddll_overflow(value1, value2,
+
96  reinterpret_cast<unsigned long long *>(result));
+
97 #endif
+
98 }
+
99 
+
100 } // unnamed namespace
+
101 } // namespace SIMDJSON_IMPLEMENTATION
+
102 } // namespace simdjson
+
103 
+
104 #endif // SIMDJSON_ARM64_BITMANIPULATION_H
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
diff --git a/arm64_2bitmask_8h_source.html b/arm64_2bitmask_8h_source.html index 76b3c0034..a4e1ce24b 100644 --- a/arm64_2bitmask_8h_source.html +++ b/arm64_2bitmask_8h_source.html @@ -94,42 +94,44 @@ $(document).ready(function(){initNavTree('arm64_2bitmask_8h_source.html',''); in
1 #ifndef SIMDJSON_ARM64_BITMASK_H
2 #define SIMDJSON_ARM64_BITMASK_H
3 
-
4 namespace simdjson {
-
5 namespace SIMDJSON_IMPLEMENTATION {
-
6 namespace {
-
7 
-
8 //
-
9 // Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered.
+
4 #include "simdjson/arm64/base.h"
+
5 
+
6 namespace simdjson {
+
7 namespace SIMDJSON_IMPLEMENTATION {
+
8 namespace {
+
9 
10 //
-
11 // For example, prefix_xor(00100100) == 00011100
+
11 // Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered.
12 //
-
13 simdjson_inline uint64_t prefix_xor(uint64_t bitmask) {
-
15  // We could do this with PMULL, but it is apparently slow.
-
16  //
-
17  //#ifdef __ARM_FEATURE_CRYPTO // some ARM processors lack this extension
-
18  //return vmull_p64(-1ULL, bitmask);
-
19  //#else
-
20  // Analysis by @sebpop:
-
21  // When diffing the assembly for src/stage1_find_marks.cpp I see that the eors are all spread out
-
22  // in between other vector code, so effectively the extra cycles of the sequence do not matter
-
23  // because the GPR units are idle otherwise and the critical path is on the FP side.
-
24  // Also the PMULL requires two extra fmovs: GPR->FP (3 cycles in N1, 5 cycles in A72 )
-
25  // and FP->GPR (2 cycles on N1 and 5 cycles on A72.)
-
27  bitmask ^= bitmask << 1;
-
28  bitmask ^= bitmask << 2;
-
29  bitmask ^= bitmask << 4;
-
30  bitmask ^= bitmask << 8;
-
31  bitmask ^= bitmask << 16;
-
32  bitmask ^= bitmask << 32;
-
33  return bitmask;
-
34 }
-
35 
-
36 } // unnamed namespace
-
37 } // namespace arm64
-
38 } // namespace simdjson
-
39 
-
40 #endif
-
We want to support argument-dependent lookup (ADL).
+
13 // For example, prefix_xor(00100100) == 00011100
+
14 //
+
15 simdjson_inline uint64_t prefix_xor(uint64_t bitmask) {
+
17  // We could do this with PMULL, but it is apparently slow.
+
18  //
+
19  //#ifdef __ARM_FEATURE_CRYPTO // some ARM processors lack this extension
+
20  //return vmull_p64(-1ULL, bitmask);
+
21  //#else
+
22  // Analysis by @sebpop:
+
23  // When diffing the assembly for src/stage1_find_marks.cpp I see that the eors are all spread out
+
24  // in between other vector code, so effectively the extra cycles of the sequence do not matter
+
25  // because the GPR units are idle otherwise and the critical path is on the FP side.
+
26  // Also the PMULL requires two extra fmovs: GPR->FP (3 cycles in N1, 5 cycles in A72 )
+
27  // and FP->GPR (2 cycles on N1 and 5 cycles on A72.)
+
29  bitmask ^= bitmask << 1;
+
30  bitmask ^= bitmask << 2;
+
31  bitmask ^= bitmask << 4;
+
32  bitmask ^= bitmask << 8;
+
33  bitmask ^= bitmask << 16;
+
34  bitmask ^= bitmask << 32;
+
35  return bitmask;
+
36 }
+
37 
+
38 } // unnamed namespace
+
39 } // namespace arm64
+
40 } // namespace simdjson
+
41 
+
42 #endif
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
diff --git a/arm64_2implementation_8h_source.html b/arm64_2implementation_8h_source.html index 7fe6462ba..445c5d9e8 100644 --- a/arm64_2implementation_8h_source.html +++ b/arm64_2implementation_8h_source.html @@ -94,38 +94,33 @@ $(document).ready(function(){initNavTree('arm64_2implementation_8h_source.html',
1 #ifndef SIMDJSON_ARM64_IMPLEMENTATION_H
2 #define SIMDJSON_ARM64_IMPLEMENTATION_H
3 
-
4 #include "simdjson/base.h"
-
5 #include "simdjson/internal/isadetection.h"
+
4 #include "simdjson/implementation.h"
+
5 #include "simdjson/internal/instruction_set.h"
6 
7 namespace simdjson {
8 namespace arm64 {
9 
-
10 namespace {
-
11 using namespace simdjson;
-
12 using namespace simdjson::dom;
-
13 }
-
14 
-
18 class implementation final : public simdjson::implementation {
-
19 public:
-
20  simdjson_inline implementation() : simdjson::implementation("arm64", "ARM NEON", internal::instruction_set::NEON) {}
-
21  simdjson_warn_unused error_code create_dom_parser_implementation(
-
22  size_t capacity,
-
23  size_t max_length,
-
24  std::unique_ptr<internal::dom_parser_implementation>& dst
-
25  ) const noexcept final;
-
26  simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final;
-
27  simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final;
-
28 };
-
29 
-
30 } // namespace arm64
-
31 } // namespace simdjson
-
32 
-
33 #endif // SIMDJSON_ARM64_IMPLEMENTATION_H
-
An implementation of simdjson for a particular CPU architecture.
-
virtual simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept=0
Validate the UTF-8 string.
-
We want to support argument-dependent lookup (ADL).
+
13 class implementation final : public simdjson::implementation {
+
14 public:
+
15  simdjson_inline implementation() : simdjson::implementation("arm64", "ARM NEON", internal::instruction_set::NEON) {}
+
16  simdjson_warn_unused error_code create_dom_parser_implementation(
+
17  size_t capacity,
+
18  size_t max_length,
+
19  std::unique_ptr<internal::dom_parser_implementation>& dst
+
20  ) const noexcept final;
+
21  simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final;
+
22  simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final;
+
23 };
+
24 
+
25 } // namespace arm64
+
26 } // namespace simdjson
+
27 
+
28 #endif // SIMDJSON_ARM64_IMPLEMENTATION_H
+
An implementation of simdjson for a particular CPU architecture.
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
+
simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) noexcept
Validate the UTF-8 string.
error_code
All possible errors returned by simdjson.
Definition: error.h:17
-
std::string minify(T x)
Minifies a JSON element or document, printing the smallest possible valid JSON.
+
std::string minify(T x)
Minifies a JSON element or document, printing the smallest possible valid JSON.
diff --git a/arm64_2intrinsics_8h_source.html b/arm64_2intrinsics_8h_source.html index 83457fa8b..381a9b543 100644 --- a/arm64_2intrinsics_8h_source.html +++ b/arm64_2intrinsics_8h_source.html @@ -98,10 +98,12 @@ $(document).ready(function(){initNavTree('arm64_2intrinsics_8h_source.html','');
5 // you use visual studio or other compilers.
6 #include <arm_neon.h>
7 
-
8 static_assert(sizeof(uint8x16_t) <= simdjson::SIMDJSON_PADDING, "insufficient padding for arm64");
+
8 #include "simdjson/arm64/base.h"
9 
-
10 #endif // SIMDJSON_ARM64_INTRINSICS_H
-
constexpr size_t SIMDJSON_PADDING
The amount of padding needed in a buffer to parse JSON.
Definition: common_defs.h:45
+
10 static_assert(sizeof(uint8x16_t) <= simdjson::SIMDJSON_PADDING, "insufficient padding for arm64");
+
11 
+
12 #endif // SIMDJSON_ARM64_INTRINSICS_H
+
constexpr size_t SIMDJSON_PADDING
The amount of padding needed in a buffer to parse JSON.
Definition: base.h:30
diff --git a/arm64_2numberparsing__defs_8h_source.html b/arm64_2numberparsing__defs_8h_source.html new file mode 100644 index 000000000..27b3ff6b8 --- /dev/null +++ b/arm64_2numberparsing__defs_8h_source.html @@ -0,0 +1,161 @@ + + + + + + + +simdjson: include/simdjson/arm64/numberparsing_defs.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
simdjson +  3.2.1 +
+
Ridiculously Fast JSON
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
numberparsing_defs.h
+
+
+
1 #ifndef SIMDJSON_ARM64_NUMBERPARSING_DEFS_H
+
2 #define SIMDJSON_ARM64_NUMBERPARSING_DEFS_H
+
3 
+
4 #include "simdjson/arm64/base.h"
+
5 #include "simdjson/arm64/intrinsics.h"
+
6 
+
7 #if _M_ARM64
+
8 // __umulh requires intrin.h
+
9 #include <intrin.h>
+
10 #endif // _M_ARM64
+
11 
+
12 #include <cstring>
+
13 
+
14 #ifndef SIMDJSON_AMALGAMATED
+
15 #include "simdjson/internal/numberparsing_tables.h"
+
16 #endif // SIMDJSON_AMALGAMATED
+
17 
+
18 namespace simdjson {
+
19 namespace SIMDJSON_IMPLEMENTATION {
+
20 namespace numberparsing {
+
21 
+
22 // we don't have SSE, so let us use a scalar function
+
23 // credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/
+
25 static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) {
+
26  uint64_t val;
+
27  std::memcpy(&val, chars, sizeof(uint64_t));
+
28  val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8;
+
29  val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16;
+
30  return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32);
+
31 }
+
32 
+
33 simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) {
+
34  internal::value128 answer;
+
35 #if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
+
36 #ifdef _M_ARM64
+
37  // ARM64 has native support for 64-bit multiplications, no need to emultate
+
38  answer.high = __umulh(value1, value2);
+
39  answer.low = value1 * value2;
+
40 #else
+
41  answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64
+
42 #endif // _M_ARM64
+
43 #else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
+
44  __uint128_t r = (static_cast<__uint128_t>(value1)) * value2;
+
45  answer.low = uint64_t(r);
+
46  answer.high = uint64_t(r >> 64);
+
47 #endif
+
48  return answer;
+
49 }
+
50 
+
51 } // namespace numberparsing
+
52 } // namespace SIMDJSON_IMPLEMENTATION
+
53 } // namespace simdjson
+
54 
+
55 #define SIMDJSON_SWAR_NUMBER_PARSING 1
+
56 
+
57 #endif // SIMDJSON_ARM64_NUMBERPARSING_DEFS_H
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
+
+
+ + + + diff --git a/arm64_2ondemand_8h_source.html b/arm64_2ondemand_8h_source.html new file mode 100644 index 000000000..259bcb06f --- /dev/null +++ b/arm64_2ondemand_8h_source.html @@ -0,0 +1,112 @@ + + + + + + + +simdjson: include/simdjson/arm64/ondemand.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
simdjson +  3.2.1 +
+
Ridiculously Fast JSON
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
ondemand.h
+
+
+
1 #ifndef SIMDJSON_ARM64_ONDEMAND_H
+
2 #define SIMDJSON_ARM64_ONDEMAND_H
+
3 
+
4 #include "simdjson/arm64/begin.h"
+
5 #include "simdjson/generic/ondemand/amalgamated.h"
+
6 #include "simdjson/arm64/end.h"
+
7 
+
8 #endif // SIMDJSON_ARM64_ONDEMAND_H
+
+
+ + + + diff --git a/arm64_2simd_8h_source.html b/arm64_2simd_8h_source.html index 06229b71f..0b99cbc75 100644 --- a/arm64_2simd_8h_source.html +++ b/arm64_2simd_8h_source.html @@ -94,527 +94,528 @@ $(document).ready(function(){initNavTree('arm64_2simd_8h_source.html',''); initR
1 #ifndef SIMDJSON_ARM64_SIMD_H
2 #define SIMDJSON_ARM64_SIMD_H
3 
-
4 #include "simdjson/base.h"
-
5 #include "simdjson/internal/simdprune_tables.h"
-
6 #include "simdjson/arm64/bitmanipulation.h"
-
7 #include <type_traits>
-
8 
-
9 
-
10 namespace simdjson {
-
11 namespace SIMDJSON_IMPLEMENTATION {
-
12 namespace {
-
13 namespace simd {
-
14 
-
15 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
-
16 namespace {
-
17 // Start of private section with Visual Studio workaround
-
18 
+
4 #include "simdjson/arm64/base.h"
+
5 #include "simdjson/arm64/bitmanipulation.h"
+
6 
+
7 #ifndef SIMDJSON_AMALGAMATED
+
8 #include "simdjson/internal/simdprune_tables.h"
+
9 #endif // SIMDJSON_AMALGAMATED
+
10 
+
11 namespace simdjson {
+
12 namespace SIMDJSON_IMPLEMENTATION {
+
13 namespace {
+
14 namespace simd {
+
15 
+
16 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
+
17 namespace {
+
18 // Start of private section with Visual Studio workaround
19 
-
31 simdjson_inline uint8x16_t make_uint8x16_t(uint8_t x1, uint8_t x2, uint8_t x3, uint8_t x4,
-
32  uint8_t x5, uint8_t x6, uint8_t x7, uint8_t x8,
-
33  uint8_t x9, uint8_t x10, uint8_t x11, uint8_t x12,
-
34  uint8_t x13, uint8_t x14, uint8_t x15, uint8_t x16) {
-
35  // Doing a load like so end ups generating worse code.
-
36  // uint8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8,
-
37  // x9, x10,x11,x12,x13,x14,x15,x16};
-
38  // return vld1q_u8(array);
-
39  uint8x16_t x{};
-
40  // incredibly, Visual Studio does not allow x[0] = x1
-
41  x = vsetq_lane_u8(x1, x, 0);
-
42  x = vsetq_lane_u8(x2, x, 1);
-
43  x = vsetq_lane_u8(x3, x, 2);
-
44  x = vsetq_lane_u8(x4, x, 3);
-
45  x = vsetq_lane_u8(x5, x, 4);
-
46  x = vsetq_lane_u8(x6, x, 5);
-
47  x = vsetq_lane_u8(x7, x, 6);
-
48  x = vsetq_lane_u8(x8, x, 7);
-
49  x = vsetq_lane_u8(x9, x, 8);
-
50  x = vsetq_lane_u8(x10, x, 9);
-
51  x = vsetq_lane_u8(x11, x, 10);
-
52  x = vsetq_lane_u8(x12, x, 11);
-
53  x = vsetq_lane_u8(x13, x, 12);
-
54  x = vsetq_lane_u8(x14, x, 13);
-
55  x = vsetq_lane_u8(x15, x, 14);
-
56  x = vsetq_lane_u8(x16, x, 15);
-
57  return x;
-
58 }
-
59 
-
60 simdjson_inline uint8x8_t make_uint8x8_t(uint8_t x1, uint8_t x2, uint8_t x3, uint8_t x4,
-
61  uint8_t x5, uint8_t x6, uint8_t x7, uint8_t x8) {
-
62  uint8x8_t x{};
-
63  x = vset_lane_u8(x1, x, 0);
-
64  x = vset_lane_u8(x2, x, 1);
-
65  x = vset_lane_u8(x3, x, 2);
-
66  x = vset_lane_u8(x4, x, 3);
-
67  x = vset_lane_u8(x5, x, 4);
-
68  x = vset_lane_u8(x6, x, 5);
-
69  x = vset_lane_u8(x7, x, 6);
-
70  x = vset_lane_u8(x8, x, 7);
-
71  return x;
-
72 }
-
73 
-
74 // We have to do the same work for make_int8x16_t
-
75 simdjson_inline int8x16_t make_int8x16_t(int8_t x1, int8_t x2, int8_t x3, int8_t x4,
-
76  int8_t x5, int8_t x6, int8_t x7, int8_t x8,
-
77  int8_t x9, int8_t x10, int8_t x11, int8_t x12,
-
78  int8_t x13, int8_t x14, int8_t x15, int8_t x16) {
-
79  // Doing a load like so end ups generating worse code.
-
80  // int8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8,
-
81  // x9, x10,x11,x12,x13,x14,x15,x16};
-
82  // return vld1q_s8(array);
-
83  int8x16_t x{};
-
84  // incredibly, Visual Studio does not allow x[0] = x1
-
85  x = vsetq_lane_s8(x1, x, 0);
-
86  x = vsetq_lane_s8(x2, x, 1);
-
87  x = vsetq_lane_s8(x3, x, 2);
-
88  x = vsetq_lane_s8(x4, x, 3);
-
89  x = vsetq_lane_s8(x5, x, 4);
-
90  x = vsetq_lane_s8(x6, x, 5);
-
91  x = vsetq_lane_s8(x7, x, 6);
-
92  x = vsetq_lane_s8(x8, x, 7);
-
93  x = vsetq_lane_s8(x9, x, 8);
-
94  x = vsetq_lane_s8(x10, x, 9);
-
95  x = vsetq_lane_s8(x11, x, 10);
-
96  x = vsetq_lane_s8(x12, x, 11);
-
97  x = vsetq_lane_s8(x13, x, 12);
-
98  x = vsetq_lane_s8(x14, x, 13);
-
99  x = vsetq_lane_s8(x15, x, 14);
-
100  x = vsetq_lane_s8(x16, x, 15);
-
101  return x;
-
102 }
-
103 
-
104 // End of private section with Visual Studio workaround
-
105 } // namespace
-
106 #endif // SIMDJSON_REGULAR_VISUAL_STUDIO
-
107 
+
20 
+
32 simdjson_inline uint8x16_t make_uint8x16_t(uint8_t x1, uint8_t x2, uint8_t x3, uint8_t x4,
+
33  uint8_t x5, uint8_t x6, uint8_t x7, uint8_t x8,
+
34  uint8_t x9, uint8_t x10, uint8_t x11, uint8_t x12,
+
35  uint8_t x13, uint8_t x14, uint8_t x15, uint8_t x16) {
+
36  // Doing a load like so end ups generating worse code.
+
37  // uint8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8,
+
38  // x9, x10,x11,x12,x13,x14,x15,x16};
+
39  // return vld1q_u8(array);
+
40  uint8x16_t x{};
+
41  // incredibly, Visual Studio does not allow x[0] = x1
+
42  x = vsetq_lane_u8(x1, x, 0);
+
43  x = vsetq_lane_u8(x2, x, 1);
+
44  x = vsetq_lane_u8(x3, x, 2);
+
45  x = vsetq_lane_u8(x4, x, 3);
+
46  x = vsetq_lane_u8(x5, x, 4);
+
47  x = vsetq_lane_u8(x6, x, 5);
+
48  x = vsetq_lane_u8(x7, x, 6);
+
49  x = vsetq_lane_u8(x8, x, 7);
+
50  x = vsetq_lane_u8(x9, x, 8);
+
51  x = vsetq_lane_u8(x10, x, 9);
+
52  x = vsetq_lane_u8(x11, x, 10);
+
53  x = vsetq_lane_u8(x12, x, 11);
+
54  x = vsetq_lane_u8(x13, x, 12);
+
55  x = vsetq_lane_u8(x14, x, 13);
+
56  x = vsetq_lane_u8(x15, x, 14);
+
57  x = vsetq_lane_u8(x16, x, 15);
+
58  return x;
+
59 }
+
60 
+
61 simdjson_inline uint8x8_t make_uint8x8_t(uint8_t x1, uint8_t x2, uint8_t x3, uint8_t x4,
+
62  uint8_t x5, uint8_t x6, uint8_t x7, uint8_t x8) {
+
63  uint8x8_t x{};
+
64  x = vset_lane_u8(x1, x, 0);
+
65  x = vset_lane_u8(x2, x, 1);
+
66  x = vset_lane_u8(x3, x, 2);
+
67  x = vset_lane_u8(x4, x, 3);
+
68  x = vset_lane_u8(x5, x, 4);
+
69  x = vset_lane_u8(x6, x, 5);
+
70  x = vset_lane_u8(x7, x, 6);
+
71  x = vset_lane_u8(x8, x, 7);
+
72  return x;
+
73 }
+
74 
+
75 // We have to do the same work for make_int8x16_t
+
76 simdjson_inline int8x16_t make_int8x16_t(int8_t x1, int8_t x2, int8_t x3, int8_t x4,
+
77  int8_t x5, int8_t x6, int8_t x7, int8_t x8,
+
78  int8_t x9, int8_t x10, int8_t x11, int8_t x12,
+
79  int8_t x13, int8_t x14, int8_t x15, int8_t x16) {
+
80  // Doing a load like so end ups generating worse code.
+
81  // int8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8,
+
82  // x9, x10,x11,x12,x13,x14,x15,x16};
+
83  // return vld1q_s8(array);
+
84  int8x16_t x{};
+
85  // incredibly, Visual Studio does not allow x[0] = x1
+
86  x = vsetq_lane_s8(x1, x, 0);
+
87  x = vsetq_lane_s8(x2, x, 1);
+
88  x = vsetq_lane_s8(x3, x, 2);
+
89  x = vsetq_lane_s8(x4, x, 3);
+
90  x = vsetq_lane_s8(x5, x, 4);
+
91  x = vsetq_lane_s8(x6, x, 5);
+
92  x = vsetq_lane_s8(x7, x, 6);
+
93  x = vsetq_lane_s8(x8, x, 7);
+
94  x = vsetq_lane_s8(x9, x, 8);
+
95  x = vsetq_lane_s8(x10, x, 9);
+
96  x = vsetq_lane_s8(x11, x, 10);
+
97  x = vsetq_lane_s8(x12, x, 11);
+
98  x = vsetq_lane_s8(x13, x, 12);
+
99  x = vsetq_lane_s8(x14, x, 13);
+
100  x = vsetq_lane_s8(x15, x, 14);
+
101  x = vsetq_lane_s8(x16, x, 15);
+
102  return x;
+
103 }
+
104 
+
105 // End of private section with Visual Studio workaround
+
106 } // namespace
+
107 #endif // SIMDJSON_REGULAR_VISUAL_STUDIO
108 
-
109  template<typename T>
-
110  struct simd8;
-
111 
-
112  //
-
113  // Base class of simd8<uint8_t> and simd8<bool>, both of which use uint8x16_t internally.
-
114  //
-
115  template<typename T, typename Mask=simd8<bool>>
-
116  struct base_u8 {
-
117  uint8x16_t value;
-
118  static const int SIZE = sizeof(value);
-
119 
-
120  // Conversion from/to SIMD register
-
121  simdjson_inline base_u8(const uint8x16_t _value) : value(_value) {}
-
122  simdjson_inline operator const uint8x16_t&() const { return this->value; }
-
123  simdjson_inline operator uint8x16_t&() { return this->value; }
-
124 
-
125  // Bit operations
-
126  simdjson_inline simd8<T> operator|(const simd8<T> other) const { return vorrq_u8(*this, other); }
-
127  simdjson_inline simd8<T> operator&(const simd8<T> other) const { return vandq_u8(*this, other); }
-
128  simdjson_inline simd8<T> operator^(const simd8<T> other) const { return veorq_u8(*this, other); }
-
129  simdjson_inline simd8<T> bit_andnot(const simd8<T> other) const { return vbicq_u8(*this, other); }
-
130  simdjson_inline simd8<T> operator~() const { return *this ^ 0xFFu; }
-
131  simdjson_inline simd8<T>& operator|=(const simd8<T> other) { auto this_cast = static_cast<simd8<T>*>(this); *this_cast = *this_cast | other; return *this_cast; }
-
132  simdjson_inline simd8<T>& operator&=(const simd8<T> other) { auto this_cast = static_cast<simd8<T>*>(this); *this_cast = *this_cast & other; return *this_cast; }
-
133  simdjson_inline simd8<T>& operator^=(const simd8<T> other) { auto this_cast = static_cast<simd8<T>*>(this); *this_cast = *this_cast ^ other; return *this_cast; }
-
134 
-
135  friend simdjson_inline Mask operator==(const simd8<T> lhs, const simd8<T> rhs) { return vceqq_u8(lhs, rhs); }
-
136 
-
137  template<int N=1>
-
138  simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
-
139  return vextq_u8(prev_chunk, *this, 16 - N);
-
140  }
-
141  };
-
142 
-
143  // SIMD byte mask type (returned by things like eq and gt)
-
144  template<>
-
145  struct simd8<bool>: base_u8<bool> {
-
146  typedef uint16_t bitmask_t;
-
147  typedef uint32_t bitmask2_t;
-
148 
-
149  static simdjson_inline simd8<bool> splat(bool _value) { return vmovq_n_u8(uint8_t(-(!!_value))); }
-
150 
-
151  simdjson_inline simd8(const uint8x16_t _value) : base_u8<bool>(_value) {}
-
152  // False constructor
-
153  simdjson_inline simd8() : simd8(vdupq_n_u8(0)) {}
-
154  // Splat constructor
-
155  simdjson_inline simd8(bool _value) : simd8(splat(_value)) {}
-
156 
-
157  // We return uint32_t instead of uint16_t because that seems to be more efficient for most
-
158  // purposes (cutting it down to uint16_t costs performance in some compilers).
-
159  simdjson_inline uint32_t to_bitmask() const {
-
160 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
-
161  const uint8x16_t bit_mask = make_uint8x16_t(0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,
-
162  0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80);
-
163 #else
-
164  const uint8x16_t bit_mask = {0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,
-
165  0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80};
-
166 #endif
-
167  auto minput = *this & bit_mask;
-
168  uint8x16_t tmp = vpaddq_u8(minput, minput);
-
169  tmp = vpaddq_u8(tmp, tmp);
+
109 
+
110  template<typename T>
+
111  struct simd8;
+
112 
+
113  //
+
114  // Base class of simd8<uint8_t> and simd8<bool>, both of which use uint8x16_t internally.
+
115  //
+
116  template<typename T, typename Mask=simd8<bool>>
+
117  struct base_u8 {
+
118  uint8x16_t value;
+
119  static const int SIZE = sizeof(value);
+
120 
+
121  // Conversion from/to SIMD register
+
122  simdjson_inline base_u8(const uint8x16_t _value) : value(_value) {}
+
123  simdjson_inline operator const uint8x16_t&() const { return this->value; }
+
124  simdjson_inline operator uint8x16_t&() { return this->value; }
+
125 
+
126  // Bit operations
+
127  simdjson_inline simd8<T> operator|(const simd8<T> other) const { return vorrq_u8(*this, other); }
+
128  simdjson_inline simd8<T> operator&(const simd8<T> other) const { return vandq_u8(*this, other); }
+
129  simdjson_inline simd8<T> operator^(const simd8<T> other) const { return veorq_u8(*this, other); }
+
130  simdjson_inline simd8<T> bit_andnot(const simd8<T> other) const { return vbicq_u8(*this, other); }
+
131  simdjson_inline simd8<T> operator~() const { return *this ^ 0xFFu; }
+
132  simdjson_inline simd8<T>& operator|=(const simd8<T> other) { auto this_cast = static_cast<simd8<T>*>(this); *this_cast = *this_cast | other; return *this_cast; }
+
133  simdjson_inline simd8<T>& operator&=(const simd8<T> other) { auto this_cast = static_cast<simd8<T>*>(this); *this_cast = *this_cast & other; return *this_cast; }
+
134  simdjson_inline simd8<T>& operator^=(const simd8<T> other) { auto this_cast = static_cast<simd8<T>*>(this); *this_cast = *this_cast ^ other; return *this_cast; }
+
135 
+
136  friend simdjson_inline Mask operator==(const simd8<T> lhs, const simd8<T> rhs) { return vceqq_u8(lhs, rhs); }
+
137 
+
138  template<int N=1>
+
139  simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
+
140  return vextq_u8(prev_chunk, *this, 16 - N);
+
141  }
+
142  };
+
143 
+
144  // SIMD byte mask type (returned by things like eq and gt)
+
145  template<>
+
146  struct simd8<bool>: base_u8<bool> {
+
147  typedef uint16_t bitmask_t;
+
148  typedef uint32_t bitmask2_t;
+
149 
+
150  static simdjson_inline simd8<bool> splat(bool _value) { return vmovq_n_u8(uint8_t(-(!!_value))); }
+
151 
+
152  simdjson_inline simd8(const uint8x16_t _value) : base_u8<bool>(_value) {}
+
153  // False constructor
+
154  simdjson_inline simd8() : simd8(vdupq_n_u8(0)) {}
+
155  // Splat constructor
+
156  simdjson_inline simd8(bool _value) : simd8(splat(_value)) {}
+
157 
+
158  // We return uint32_t instead of uint16_t because that seems to be more efficient for most
+
159  // purposes (cutting it down to uint16_t costs performance in some compilers).
+
160  simdjson_inline uint32_t to_bitmask() const {
+
161 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
+
162  const uint8x16_t bit_mask = make_uint8x16_t(0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,
+
163  0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80);
+
164 #else
+
165  const uint8x16_t bit_mask = {0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,
+
166  0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80};
+
167 #endif
+
168  auto minput = *this & bit_mask;
+
169  uint8x16_t tmp = vpaddq_u8(minput, minput);
170  tmp = vpaddq_u8(tmp, tmp);
-
171  return vgetq_lane_u16(vreinterpretq_u16_u8(tmp), 0);
-
172  }
-
173  simdjson_inline bool any() const { return vmaxvq_u8(*this) != 0; }
-
174  };
-
175 
-
176  // Unsigned bytes
-
177  template<>
-
178  struct simd8<uint8_t>: base_u8<uint8_t> {
-
179  static simdjson_inline uint8x16_t splat(uint8_t _value) { return vmovq_n_u8(_value); }
-
180  static simdjson_inline uint8x16_t zero() { return vdupq_n_u8(0); }
-
181  static simdjson_inline uint8x16_t load(const uint8_t* values) { return vld1q_u8(values); }
-
182 
-
183  simdjson_inline simd8(const uint8x16_t _value) : base_u8<uint8_t>(_value) {}
-
184  // Zero constructor
-
185  simdjson_inline simd8() : simd8(zero()) {}
-
186  // Array constructor
-
187  simdjson_inline simd8(const uint8_t values[16]) : simd8(load(values)) {}
-
188  // Splat constructor
-
189  simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
-
190  // Member-by-member initialization
-
191 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
-
192  simdjson_inline simd8(
-
193  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
-
194  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15
-
195  ) : simd8(make_uint8x16_t(
-
196  v0, v1, v2, v3, v4, v5, v6, v7,
-
197  v8, v9, v10,v11,v12,v13,v14,v15
-
198  )) {}
-
199 #else
-
200  simdjson_inline simd8(
-
201  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
-
202  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15
-
203  ) : simd8(uint8x16_t{
-
204  v0, v1, v2, v3, v4, v5, v6, v7,
-
205  v8, v9, v10,v11,v12,v13,v14,v15
-
206  }) {}
-
207 #endif
-
208 
-
209  // Repeat 16 values as many times as necessary (usually for lookup tables)
-
210  simdjson_inline static simd8<uint8_t> repeat_16(
-
211  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
-
212  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15
-
213  ) {
-
214  return simd8<uint8_t>(
-
215  v0, v1, v2, v3, v4, v5, v6, v7,
-
216  v8, v9, v10,v11,v12,v13,v14,v15
-
217  );
-
218  }
-
219 
-
220  // Store to array
-
221  simdjson_inline void store(uint8_t dst[16]) const { return vst1q_u8(dst, *this); }
-
222 
-
223  // Saturated math
-
224  simdjson_inline simd8<uint8_t> saturating_add(const simd8<uint8_t> other) const { return vqaddq_u8(*this, other); }
-
225  simdjson_inline simd8<uint8_t> saturating_sub(const simd8<uint8_t> other) const { return vqsubq_u8(*this, other); }
-
226 
-
227  // Addition/subtraction are the same for signed and unsigned
-
228  simdjson_inline simd8<uint8_t> operator+(const simd8<uint8_t> other) const { return vaddq_u8(*this, other); }
-
229  simdjson_inline simd8<uint8_t> operator-(const simd8<uint8_t> other) const { return vsubq_u8(*this, other); }
-
230  simdjson_inline simd8<uint8_t>& operator+=(const simd8<uint8_t> other) { *this = *this + other; return *this; }
-
231  simdjson_inline simd8<uint8_t>& operator-=(const simd8<uint8_t> other) { *this = *this - other; return *this; }
-
232 
-
233  // Order-specific operations
-
234  simdjson_inline uint8_t max_val() const { return vmaxvq_u8(*this); }
-
235  simdjson_inline uint8_t min_val() const { return vminvq_u8(*this); }
-
236  simdjson_inline simd8<uint8_t> max_val(const simd8<uint8_t> other) const { return vmaxq_u8(*this, other); }
-
237  simdjson_inline simd8<uint8_t> min_val(const simd8<uint8_t> other) const { return vminq_u8(*this, other); }
-
238  simdjson_inline simd8<bool> operator<=(const simd8<uint8_t> other) const { return vcleq_u8(*this, other); }
-
239  simdjson_inline simd8<bool> operator>=(const simd8<uint8_t> other) const { return vcgeq_u8(*this, other); }
-
240  simdjson_inline simd8<bool> operator<(const simd8<uint8_t> other) const { return vcltq_u8(*this, other); }
-
241  simdjson_inline simd8<bool> operator>(const simd8<uint8_t> other) const { return vcgtq_u8(*this, other); }
-
242  // Same as >, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's.
-
243  simdjson_inline simd8<uint8_t> gt_bits(const simd8<uint8_t> other) const { return simd8<uint8_t>(*this > other); }
-
244  // Same as <, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's.
-
245  simdjson_inline simd8<uint8_t> lt_bits(const simd8<uint8_t> other) const { return simd8<uint8_t>(*this < other); }
-
246 
-
247  // Bit-specific operations
-
248  simdjson_inline simd8<bool> any_bits_set(simd8<uint8_t> bits) const { return vtstq_u8(*this, bits); }
-
249  simdjson_inline bool any_bits_set_anywhere() const { return this->max_val() != 0; }
-
250  simdjson_inline bool any_bits_set_anywhere(simd8<uint8_t> bits) const { return (*this & bits).any_bits_set_anywhere(); }
-
251  template<int N>
-
252  simdjson_inline simd8<uint8_t> shr() const { return vshrq_n_u8(*this, N); }
-
253  template<int N>
-
254  simdjson_inline simd8<uint8_t> shl() const { return vshlq_n_u8(*this, N); }
-
255 
-
256  // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values)
-
257  template<typename L>
-
258  simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
-
259  return lookup_table.apply_lookup_16_to(*this);
-
260  }
-
261 
+
171  tmp = vpaddq_u8(tmp, tmp);
+
172  return vgetq_lane_u16(vreinterpretq_u16_u8(tmp), 0);
+
173  }
+
174  simdjson_inline bool any() const { return vmaxvq_u8(*this) != 0; }
+
175  };
+
176 
+
177  // Unsigned bytes
+
178  template<>
+
179  struct simd8<uint8_t>: base_u8<uint8_t> {
+
180  static simdjson_inline uint8x16_t splat(uint8_t _value) { return vmovq_n_u8(_value); }
+
181  static simdjson_inline uint8x16_t zero() { return vdupq_n_u8(0); }
+
182  static simdjson_inline uint8x16_t load(const uint8_t* values) { return vld1q_u8(values); }
+
183 
+
184  simdjson_inline simd8(const uint8x16_t _value) : base_u8<uint8_t>(_value) {}
+
185  // Zero constructor
+
186  simdjson_inline simd8() : simd8(zero()) {}
+
187  // Array constructor
+
188  simdjson_inline simd8(const uint8_t values[16]) : simd8(load(values)) {}
+
189  // Splat constructor
+
190  simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
+
191  // Member-by-member initialization
+
192 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
+
193  simdjson_inline simd8(
+
194  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
+
195  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15
+
196  ) : simd8(make_uint8x16_t(
+
197  v0, v1, v2, v3, v4, v5, v6, v7,
+
198  v8, v9, v10,v11,v12,v13,v14,v15
+
199  )) {}
+
200 #else
+
201  simdjson_inline simd8(
+
202  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
+
203  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15
+
204  ) : simd8(uint8x16_t{
+
205  v0, v1, v2, v3, v4, v5, v6, v7,
+
206  v8, v9, v10,v11,v12,v13,v14,v15
+
207  }) {}
+
208 #endif
+
209 
+
210  // Repeat 16 values as many times as necessary (usually for lookup tables)
+
211  simdjson_inline static simd8<uint8_t> repeat_16(
+
212  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
+
213  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15
+
214  ) {
+
215  return simd8<uint8_t>(
+
216  v0, v1, v2, v3, v4, v5, v6, v7,
+
217  v8, v9, v10,v11,v12,v13,v14,v15
+
218  );
+
219  }
+
220 
+
221  // Store to array
+
222  simdjson_inline void store(uint8_t dst[16]) const { return vst1q_u8(dst, *this); }
+
223 
+
224  // Saturated math
+
225  simdjson_inline simd8<uint8_t> saturating_add(const simd8<uint8_t> other) const { return vqaddq_u8(*this, other); }
+
226  simdjson_inline simd8<uint8_t> saturating_sub(const simd8<uint8_t> other) const { return vqsubq_u8(*this, other); }
+
227 
+
228  // Addition/subtraction are the same for signed and unsigned
+
229  simdjson_inline simd8<uint8_t> operator+(const simd8<uint8_t> other) const { return vaddq_u8(*this, other); }
+
230  simdjson_inline simd8<uint8_t> operator-(const simd8<uint8_t> other) const { return vsubq_u8(*this, other); }
+
231  simdjson_inline simd8<uint8_t>& operator+=(const simd8<uint8_t> other) { *this = *this + other; return *this; }
+
232  simdjson_inline simd8<uint8_t>& operator-=(const simd8<uint8_t> other) { *this = *this - other; return *this; }
+
233 
+
234  // Order-specific operations
+
235  simdjson_inline uint8_t max_val() const { return vmaxvq_u8(*this); }
+
236  simdjson_inline uint8_t min_val() const { return vminvq_u8(*this); }
+
237  simdjson_inline simd8<uint8_t> max_val(const simd8<uint8_t> other) const { return vmaxq_u8(*this, other); }
+
238  simdjson_inline simd8<uint8_t> min_val(const simd8<uint8_t> other) const { return vminq_u8(*this, other); }
+
239  simdjson_inline simd8<bool> operator<=(const simd8<uint8_t> other) const { return vcleq_u8(*this, other); }
+
240  simdjson_inline simd8<bool> operator>=(const simd8<uint8_t> other) const { return vcgeq_u8(*this, other); }
+
241  simdjson_inline simd8<bool> operator<(const simd8<uint8_t> other) const { return vcltq_u8(*this, other); }
+
242  simdjson_inline simd8<bool> operator>(const simd8<uint8_t> other) const { return vcgtq_u8(*this, other); }
+
243  // Same as >, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's.
+
244  simdjson_inline simd8<uint8_t> gt_bits(const simd8<uint8_t> other) const { return simd8<uint8_t>(*this > other); }
+
245  // Same as <, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's.
+
246  simdjson_inline simd8<uint8_t> lt_bits(const simd8<uint8_t> other) const { return simd8<uint8_t>(*this < other); }
+
247 
+
248  // Bit-specific operations
+
249  simdjson_inline simd8<bool> any_bits_set(simd8<uint8_t> bits) const { return vtstq_u8(*this, bits); }
+
250  simdjson_inline bool any_bits_set_anywhere() const { return this->max_val() != 0; }
+
251  simdjson_inline bool any_bits_set_anywhere(simd8<uint8_t> bits) const { return (*this & bits).any_bits_set_anywhere(); }
+
252  template<int N>
+
253  simdjson_inline simd8<uint8_t> shr() const { return vshrq_n_u8(*this, N); }
+
254  template<int N>
+
255  simdjson_inline simd8<uint8_t> shl() const { return vshlq_n_u8(*this, N); }
+
256 
+
257  // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values)
+
258  template<typename L>
+
259  simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
+
260  return lookup_table.apply_lookup_16_to(*this);
+
261  }
262 
-
263  // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset).
-
264  // Passing a 0 value for mask would be equivalent to writing out every byte to output.
-
265  // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes
-
266  // get written.
-
267  // Design consideration: it seems like a function with the
-
268  // signature simd8<L> compress(uint16_t mask) would be
-
269  // sensible, but the AVX ISA makes this kind of approach difficult.
-
270  template<typename L>
-
271  simdjson_inline void compress(uint16_t mask, L * output) const {
-
272  using internal::thintable_epi8;
-
273  using internal::BitsSetTable256mul2;
-
274  using internal::pshufb_combine_table;
-
275  // this particular implementation was inspired by work done by @animetosho
-
276  // we do it in two steps, first 8 bytes and then second 8 bytes
-
277  uint8_t mask1 = uint8_t(mask); // least significant 8 bits
-
278  uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits
-
279  // next line just loads the 64-bit values thintable_epi8[mask1] and
-
280  // thintable_epi8[mask2] into a 128-bit register, using only
-
281  // two instructions on most compilers.
-
282  uint64x2_t shufmask64 = {thintable_epi8[mask1], thintable_epi8[mask2]};
-
283  uint8x16_t shufmask = vreinterpretq_u8_u64(shufmask64);
-
284  // we increment by 0x08 the second half of the mask
-
285 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
-
286  uint8x16_t inc = make_uint8x16_t(0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08);
-
287 #else
-
288  uint8x16_t inc = {0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08};
-
289 #endif
-
290  shufmask = vaddq_u8(shufmask, inc);
-
291  // this is the version "nearly pruned"
-
292  uint8x16_t pruned = vqtbl1q_u8(*this, shufmask);
-
293  // we still need to put the two halves together.
-
294  // we compute the popcount of the first half:
-
295  int pop1 = BitsSetTable256mul2[mask1];
-
296  // then load the corresponding mask, what it does is to write
-
297  // only the first pop1 bytes from the first 8 bytes, and then
-
298  // it fills in with the bytes from the second 8 bytes + some filling
-
299  // at the end.
-
300  uint8x16_t compactmask = vld1q_u8(reinterpret_cast<const uint8_t *>(pshufb_combine_table + pop1 * 8));
-
301  uint8x16_t answer = vqtbl1q_u8(pruned, compactmask);
-
302  vst1q_u8(reinterpret_cast<uint8_t*>(output), answer);
-
303  }
-
304 
-
305  // Copies all bytes corresponding to a 0 in the low half of the mask (interpreted as a
-
306  // bitset) to output1, then those corresponding to a 0 in the high half to output2.
-
307  template<typename L>
-
308  simdjson_inline void compress_halves(uint16_t mask, L *output1, L *output2) const {
-
309  using internal::thintable_epi8;
-
310  uint8_t mask1 = uint8_t(mask); // least significant 8 bits
-
311  uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits
-
312  uint8x8_t compactmask1 = vcreate_u8(thintable_epi8[mask1]);
-
313  uint8x8_t compactmask2 = vcreate_u8(thintable_epi8[mask2]);
-
314  // we increment by 0x08 the second half of the mask
-
315 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
-
316  uint8x8_t inc = make_uint8x8_t(0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08);
-
317 #else
-
318  uint8x8_t inc = {0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08};
-
319 #endif
-
320  compactmask2 = vadd_u8(compactmask2, inc);
-
321  // store each result (with the second store possibly overlapping the first)
-
322  vst1_u8((uint8_t*)output1, vqtbl1_u8(*this, compactmask1));
-
323  vst1_u8((uint8_t*)output2, vqtbl1_u8(*this, compactmask2));
-
324  }
-
325 
-
326  template<typename L>
-
327  simdjson_inline simd8<L> lookup_16(
-
328  L replace0, L replace1, L replace2, L replace3,
-
329  L replace4, L replace5, L replace6, L replace7,
-
330  L replace8, L replace9, L replace10, L replace11,
-
331  L replace12, L replace13, L replace14, L replace15) const {
-
332  return lookup_16(simd8<L>::repeat_16(
-
333  replace0, replace1, replace2, replace3,
-
334  replace4, replace5, replace6, replace7,
-
335  replace8, replace9, replace10, replace11,
-
336  replace12, replace13, replace14, replace15
-
337  ));
-
338  }
-
339 
-
340  template<typename T>
-
341  simdjson_inline simd8<uint8_t> apply_lookup_16_to(const simd8<T> original) {
-
342  return vqtbl1q_u8(*this, simd8<uint8_t>(original));
-
343  }
-
344  };
-
345 
-
346  // Signed bytes
-
347  template<>
-
348  struct simd8<int8_t> {
-
349  int8x16_t value;
-
350 
-
351  static simdjson_inline simd8<int8_t> splat(int8_t _value) { return vmovq_n_s8(_value); }
-
352  static simdjson_inline simd8<int8_t> zero() { return vdupq_n_s8(0); }
-
353  static simdjson_inline simd8<int8_t> load(const int8_t values[16]) { return vld1q_s8(values); }
-
354 
-
355  // Conversion from/to SIMD register
-
356  simdjson_inline simd8(const int8x16_t _value) : value{_value} {}
-
357  simdjson_inline operator const int8x16_t&() const { return this->value; }
-
358  simdjson_inline operator int8x16_t&() { return this->value; }
-
359 
-
360  // Zero constructor
-
361  simdjson_inline simd8() : simd8(zero()) {}
-
362  // Splat constructor
-
363  simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {}
-
364  // Array constructor
-
365  simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {}
-
366  // Member-by-member initialization
-
367 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
-
368  simdjson_inline simd8(
-
369  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
-
370  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15
-
371  ) : simd8(make_int8x16_t(
-
372  v0, v1, v2, v3, v4, v5, v6, v7,
-
373  v8, v9, v10,v11,v12,v13,v14,v15
-
374  )) {}
-
375 #else
-
376  simdjson_inline simd8(
-
377  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
-
378  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15
-
379  ) : simd8(int8x16_t{
-
380  v0, v1, v2, v3, v4, v5, v6, v7,
-
381  v8, v9, v10,v11,v12,v13,v14,v15
-
382  }) {}
-
383 #endif
-
384  // Repeat 16 values as many times as necessary (usually for lookup tables)
-
385  simdjson_inline static simd8<int8_t> repeat_16(
-
386  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
-
387  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15
-
388  ) {
-
389  return simd8<int8_t>(
-
390  v0, v1, v2, v3, v4, v5, v6, v7,
-
391  v8, v9, v10,v11,v12,v13,v14,v15
-
392  );
-
393  }
-
394 
-
395  // Store to array
-
396  simdjson_inline void store(int8_t dst[16]) const { return vst1q_s8(dst, *this); }
-
397 
-
398  // Explicit conversion to/from unsigned
-
399  //
-
400  // Under Visual Studio/ARM64 uint8x16_t and int8x16_t are apparently the same type.
-
401  // In theory, we could check this occurrence with std::same_as and std::enabled_if but it is C++14
-
402  // and relatively ugly and hard to read.
-
403 #ifndef SIMDJSON_REGULAR_VISUAL_STUDIO
-
404  simdjson_inline explicit simd8(const uint8x16_t other): simd8(vreinterpretq_s8_u8(other)) {}
-
405 #endif
-
406  simdjson_inline explicit operator simd8<uint8_t>() const { return vreinterpretq_u8_s8(this->value); }
-
407 
-
408  // Math
-
409  simdjson_inline simd8<int8_t> operator+(const simd8<int8_t> other) const { return vaddq_s8(*this, other); }
-
410  simdjson_inline simd8<int8_t> operator-(const simd8<int8_t> other) const { return vsubq_s8(*this, other); }
-
411  simdjson_inline simd8<int8_t>& operator+=(const simd8<int8_t> other) { *this = *this + other; return *this; }
-
412  simdjson_inline simd8<int8_t>& operator-=(const simd8<int8_t> other) { *this = *this - other; return *this; }
-
413 
-
414  // Order-sensitive comparisons
-
415  simdjson_inline simd8<int8_t> max_val(const simd8<int8_t> other) const { return vmaxq_s8(*this, other); }
-
416  simdjson_inline simd8<int8_t> min_val(const simd8<int8_t> other) const { return vminq_s8(*this, other); }
-
417  simdjson_inline simd8<bool> operator>(const simd8<int8_t> other) const { return vcgtq_s8(*this, other); }
-
418  simdjson_inline simd8<bool> operator<(const simd8<int8_t> other) const { return vcltq_s8(*this, other); }
-
419  simdjson_inline simd8<bool> operator==(const simd8<int8_t> other) const { return vceqq_s8(*this, other); }
-
420 
-
421  template<int N=1>
-
422  simdjson_inline simd8<int8_t> prev(const simd8<int8_t> prev_chunk) const {
-
423  return vextq_s8(prev_chunk, *this, 16 - N);
-
424  }
-
425 
-
426  // Perform a lookup assuming no value is larger than 16
-
427  template<typename L>
-
428  simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
-
429  return lookup_table.apply_lookup_16_to(*this);
-
430  }
-
431  template<typename L>
-
432  simdjson_inline simd8<L> lookup_16(
-
433  L replace0, L replace1, L replace2, L replace3,
-
434  L replace4, L replace5, L replace6, L replace7,
-
435  L replace8, L replace9, L replace10, L replace11,
-
436  L replace12, L replace13, L replace14, L replace15) const {
-
437  return lookup_16(simd8<L>::repeat_16(
-
438  replace0, replace1, replace2, replace3,
-
439  replace4, replace5, replace6, replace7,
-
440  replace8, replace9, replace10, replace11,
-
441  replace12, replace13, replace14, replace15
-
442  ));
-
443  }
-
444 
-
445  template<typename T>
-
446  simdjson_inline simd8<int8_t> apply_lookup_16_to(const simd8<T> original) {
-
447  return vqtbl1q_s8(*this, simd8<uint8_t>(original));
-
448  }
-
449  };
-
450 
-
451  template<typename T>
-
452  struct simd8x64 {
-
453  static constexpr int NUM_CHUNKS = 64 / sizeof(simd8<T>);
-
454  static_assert(NUM_CHUNKS == 4, "ARM kernel should use four registers per 64-byte block.");
-
455  const simd8<T> chunks[NUM_CHUNKS];
-
456 
-
457  simd8x64(const simd8x64<T>& o) = delete; // no copy allowed
-
458  simd8x64<T>& operator=(const simd8<T>& other) = delete; // no assignment allowed
-
459  simd8x64() = delete; // no default constructor allowed
-
460 
-
461  simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1, const simd8<T> chunk2, const simd8<T> chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {}
-
462  simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8<T>::load(ptr), simd8<T>::load(ptr+16), simd8<T>::load(ptr+32), simd8<T>::load(ptr+48)} {}
-
463 
-
464  simdjson_inline void store(T ptr[64]) const {
-
465  this->chunks[0].store(ptr+sizeof(simd8<T>)*0);
-
466  this->chunks[1].store(ptr+sizeof(simd8<T>)*1);
-
467  this->chunks[2].store(ptr+sizeof(simd8<T>)*2);
-
468  this->chunks[3].store(ptr+sizeof(simd8<T>)*3);
-
469  }
-
470 
-
471  simdjson_inline simd8<T> reduce_or() const {
-
472  return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]);
-
473  }
-
474 
+
263 
+
264  // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset).
+
265  // Passing a 0 value for mask would be equivalent to writing out every byte to output.
+
266  // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes
+
267  // get written.
+
268  // Design consideration: it seems like a function with the
+
269  // signature simd8<L> compress(uint16_t mask) would be
+
270  // sensible, but the AVX ISA makes this kind of approach difficult.
+
271  template<typename L>
+
272  simdjson_inline void compress(uint16_t mask, L * output) const {
+
273  using internal::thintable_epi8;
+
274  using internal::BitsSetTable256mul2;
+
275  using internal::pshufb_combine_table;
+
276  // this particular implementation was inspired by work done by @animetosho
+
277  // we do it in two steps, first 8 bytes and then second 8 bytes
+
278  uint8_t mask1 = uint8_t(mask); // least significant 8 bits
+
279  uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits
+
280  // next line just loads the 64-bit values thintable_epi8[mask1] and
+
281  // thintable_epi8[mask2] into a 128-bit register, using only
+
282  // two instructions on most compilers.
+
283  uint64x2_t shufmask64 = {thintable_epi8[mask1], thintable_epi8[mask2]};
+
284  uint8x16_t shufmask = vreinterpretq_u8_u64(shufmask64);
+
285  // we increment by 0x08 the second half of the mask
+
286 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
+
287  uint8x16_t inc = make_uint8x16_t(0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08);
+
288 #else
+
289  uint8x16_t inc = {0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08};
+
290 #endif
+
291  shufmask = vaddq_u8(shufmask, inc);
+
292  // this is the version "nearly pruned"
+
293  uint8x16_t pruned = vqtbl1q_u8(*this, shufmask);
+
294  // we still need to put the two halves together.
+
295  // we compute the popcount of the first half:
+
296  int pop1 = BitsSetTable256mul2[mask1];
+
297  // then load the corresponding mask, what it does is to write
+
298  // only the first pop1 bytes from the first 8 bytes, and then
+
299  // it fills in with the bytes from the second 8 bytes + some filling
+
300  // at the end.
+
301  uint8x16_t compactmask = vld1q_u8(reinterpret_cast<const uint8_t *>(pshufb_combine_table + pop1 * 8));
+
302  uint8x16_t answer = vqtbl1q_u8(pruned, compactmask);
+
303  vst1q_u8(reinterpret_cast<uint8_t*>(output), answer);
+
304  }
+
305 
+
306  // Copies all bytes corresponding to a 0 in the low half of the mask (interpreted as a
+
307  // bitset) to output1, then those corresponding to a 0 in the high half to output2.
+
308  template<typename L>
+
309  simdjson_inline void compress_halves(uint16_t mask, L *output1, L *output2) const {
+
310  using internal::thintable_epi8;
+
311  uint8_t mask1 = uint8_t(mask); // least significant 8 bits
+
312  uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits
+
313  uint8x8_t compactmask1 = vcreate_u8(thintable_epi8[mask1]);
+
314  uint8x8_t compactmask2 = vcreate_u8(thintable_epi8[mask2]);
+
315  // we increment by 0x08 the second half of the mask
+
316 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
+
317  uint8x8_t inc = make_uint8x8_t(0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08);
+
318 #else
+
319  uint8x8_t inc = {0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08};
+
320 #endif
+
321  compactmask2 = vadd_u8(compactmask2, inc);
+
322  // store each result (with the second store possibly overlapping the first)
+
323  vst1_u8((uint8_t*)output1, vqtbl1_u8(*this, compactmask1));
+
324  vst1_u8((uint8_t*)output2, vqtbl1_u8(*this, compactmask2));
+
325  }
+
326 
+
327  template<typename L>
+
328  simdjson_inline simd8<L> lookup_16(
+
329  L replace0, L replace1, L replace2, L replace3,
+
330  L replace4, L replace5, L replace6, L replace7,
+
331  L replace8, L replace9, L replace10, L replace11,
+
332  L replace12, L replace13, L replace14, L replace15) const {
+
333  return lookup_16(simd8<L>::repeat_16(
+
334  replace0, replace1, replace2, replace3,
+
335  replace4, replace5, replace6, replace7,
+
336  replace8, replace9, replace10, replace11,
+
337  replace12, replace13, replace14, replace15
+
338  ));
+
339  }
+
340 
+
341  template<typename T>
+
342  simdjson_inline simd8<uint8_t> apply_lookup_16_to(const simd8<T> original) {
+
343  return vqtbl1q_u8(*this, simd8<uint8_t>(original));
+
344  }
+
345  };
+
346 
+
347  // Signed bytes
+
348  template<>
+
349  struct simd8<int8_t> {
+
350  int8x16_t value;
+
351 
+
352  static simdjson_inline simd8<int8_t> splat(int8_t _value) { return vmovq_n_s8(_value); }
+
353  static simdjson_inline simd8<int8_t> zero() { return vdupq_n_s8(0); }
+
354  static simdjson_inline simd8<int8_t> load(const int8_t values[16]) { return vld1q_s8(values); }
+
355 
+
356  // Conversion from/to SIMD register
+
357  simdjson_inline simd8(const int8x16_t _value) : value{_value} {}
+
358  simdjson_inline operator const int8x16_t&() const { return this->value; }
+
359  simdjson_inline operator int8x16_t&() { return this->value; }
+
360 
+
361  // Zero constructor
+
362  simdjson_inline simd8() : simd8(zero()) {}
+
363  // Splat constructor
+
364  simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {}
+
365  // Array constructor
+
366  simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {}
+
367  // Member-by-member initialization
+
368 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
+
369  simdjson_inline simd8(
+
370  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
+
371  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15
+
372  ) : simd8(make_int8x16_t(
+
373  v0, v1, v2, v3, v4, v5, v6, v7,
+
374  v8, v9, v10,v11,v12,v13,v14,v15
+
375  )) {}
+
376 #else
+
377  simdjson_inline simd8(
+
378  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
+
379  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15
+
380  ) : simd8(int8x16_t{
+
381  v0, v1, v2, v3, v4, v5, v6, v7,
+
382  v8, v9, v10,v11,v12,v13,v14,v15
+
383  }) {}
+
384 #endif
+
385  // Repeat 16 values as many times as necessary (usually for lookup tables)
+
386  simdjson_inline static simd8<int8_t> repeat_16(
+
387  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
+
388  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15
+
389  ) {
+
390  return simd8<int8_t>(
+
391  v0, v1, v2, v3, v4, v5, v6, v7,
+
392  v8, v9, v10,v11,v12,v13,v14,v15
+
393  );
+
394  }
+
395 
+
396  // Store to array
+
397  simdjson_inline void store(int8_t dst[16]) const { return vst1q_s8(dst, *this); }
+
398 
+
399  // Explicit conversion to/from unsigned
+
400  //
+
401  // Under Visual Studio/ARM64 uint8x16_t and int8x16_t are apparently the same type.
+
402  // In theory, we could check this occurrence with std::same_as and std::enabled_if but it is C++14
+
403  // and relatively ugly and hard to read.
+
404 #ifndef SIMDJSON_REGULAR_VISUAL_STUDIO
+
405  simdjson_inline explicit simd8(const uint8x16_t other): simd8(vreinterpretq_s8_u8(other)) {}
+
406 #endif
+
407  simdjson_inline explicit operator simd8<uint8_t>() const { return vreinterpretq_u8_s8(this->value); }
+
408 
+
409  // Math
+
410  simdjson_inline simd8<int8_t> operator+(const simd8<int8_t> other) const { return vaddq_s8(*this, other); }
+
411  simdjson_inline simd8<int8_t> operator-(const simd8<int8_t> other) const { return vsubq_s8(*this, other); }
+
412  simdjson_inline simd8<int8_t>& operator+=(const simd8<int8_t> other) { *this = *this + other; return *this; }
+
413  simdjson_inline simd8<int8_t>& operator-=(const simd8<int8_t> other) { *this = *this - other; return *this; }
+
414 
+
415  // Order-sensitive comparisons
+
416  simdjson_inline simd8<int8_t> max_val(const simd8<int8_t> other) const { return vmaxq_s8(*this, other); }
+
417  simdjson_inline simd8<int8_t> min_val(const simd8<int8_t> other) const { return vminq_s8(*this, other); }
+
418  simdjson_inline simd8<bool> operator>(const simd8<int8_t> other) const { return vcgtq_s8(*this, other); }
+
419  simdjson_inline simd8<bool> operator<(const simd8<int8_t> other) const { return vcltq_s8(*this, other); }
+
420  simdjson_inline simd8<bool> operator==(const simd8<int8_t> other) const { return vceqq_s8(*this, other); }
+
421 
+
422  template<int N=1>
+
423  simdjson_inline simd8<int8_t> prev(const simd8<int8_t> prev_chunk) const {
+
424  return vextq_s8(prev_chunk, *this, 16 - N);
+
425  }
+
426 
+
427  // Perform a lookup assuming no value is larger than 16
+
428  template<typename L>
+
429  simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
+
430  return lookup_table.apply_lookup_16_to(*this);
+
431  }
+
432  template<typename L>
+
433  simdjson_inline simd8<L> lookup_16(
+
434  L replace0, L replace1, L replace2, L replace3,
+
435  L replace4, L replace5, L replace6, L replace7,
+
436  L replace8, L replace9, L replace10, L replace11,
+
437  L replace12, L replace13, L replace14, L replace15) const {
+
438  return lookup_16(simd8<L>::repeat_16(
+
439  replace0, replace1, replace2, replace3,
+
440  replace4, replace5, replace6, replace7,
+
441  replace8, replace9, replace10, replace11,
+
442  replace12, replace13, replace14, replace15
+
443  ));
+
444  }
+
445 
+
446  template<typename T>
+
447  simdjson_inline simd8<int8_t> apply_lookup_16_to(const simd8<T> original) {
+
448  return vqtbl1q_s8(*this, simd8<uint8_t>(original));
+
449  }
+
450  };
+
451 
+
452  template<typename T>
+
453  struct simd8x64 {
+
454  static constexpr int NUM_CHUNKS = 64 / sizeof(simd8<T>);
+
455  static_assert(NUM_CHUNKS == 4, "ARM kernel should use four registers per 64-byte block.");
+
456  const simd8<T> chunks[NUM_CHUNKS];
+
457 
+
458  simd8x64(const simd8x64<T>& o) = delete; // no copy allowed
+
459  simd8x64<T>& operator=(const simd8<T>& other) = delete; // no assignment allowed
+
460  simd8x64() = delete; // no default constructor allowed
+
461 
+
462  simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1, const simd8<T> chunk2, const simd8<T> chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {}
+
463  simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8<T>::load(ptr), simd8<T>::load(ptr+16), simd8<T>::load(ptr+32), simd8<T>::load(ptr+48)} {}
+
464 
+
465  simdjson_inline void store(T ptr[64]) const {
+
466  this->chunks[0].store(ptr+sizeof(simd8<T>)*0);
+
467  this->chunks[1].store(ptr+sizeof(simd8<T>)*1);
+
468  this->chunks[2].store(ptr+sizeof(simd8<T>)*2);
+
469  this->chunks[3].store(ptr+sizeof(simd8<T>)*3);
+
470  }
+
471 
+
472  simdjson_inline simd8<T> reduce_or() const {
+
473  return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]);
+
474  }
475 
-
476  simdjson_inline uint64_t compress(uint64_t mask, T * output) const {
-
477  uint64_t popcounts = vget_lane_u64(vreinterpret_u64_u8(vcnt_u8(vcreate_u8(~mask))), 0);
-
478  // compute the prefix sum of the popcounts of each byte
-
479  uint64_t offsets = popcounts * 0x0101010101010101;
-
480  this->chunks[0].compress_halves(uint16_t(mask), output, &output[popcounts & 0xFF]);
-
481  this->chunks[1].compress_halves(uint16_t(mask >> 16), &output[(offsets >> 8) & 0xFF], &output[(offsets >> 16) & 0xFF]);
-
482  this->chunks[2].compress_halves(uint16_t(mask >> 32), &output[(offsets >> 24) & 0xFF], &output[(offsets >> 32) & 0xFF]);
-
483  this->chunks[3].compress_halves(uint16_t(mask >> 48), &output[(offsets >> 40) & 0xFF], &output[(offsets >> 48) & 0xFF]);
-
484  return offsets >> 56;
-
485  }
-
486 
-
487  simdjson_inline uint64_t to_bitmask() const {
-
488 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
-
489  const uint8x16_t bit_mask = make_uint8x16_t(
-
490  0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,
-
491  0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80
-
492  );
-
493 #else
-
494  const uint8x16_t bit_mask = {
-
495  0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,
-
496  0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80
-
497  };
-
498 #endif
-
499  // Add each of the elements next to each other, successively, to stuff each 8 byte mask into one.
-
500  uint8x16_t sum0 = vpaddq_u8(this->chunks[0] & bit_mask, this->chunks[1] & bit_mask);
-
501  uint8x16_t sum1 = vpaddq_u8(this->chunks[2] & bit_mask, this->chunks[3] & bit_mask);
-
502  sum0 = vpaddq_u8(sum0, sum1);
-
503  sum0 = vpaddq_u8(sum0, sum0);
-
504  return vgetq_lane_u64(vreinterpretq_u64_u8(sum0), 0);
-
505  }
-
506 
-
507  simdjson_inline uint64_t eq(const T m) const {
-
508  const simd8<T> mask = simd8<T>::splat(m);
-
509  return simd8x64<bool>(
-
510  this->chunks[0] == mask,
-
511  this->chunks[1] == mask,
-
512  this->chunks[2] == mask,
-
513  this->chunks[3] == mask
-
514  ).to_bitmask();
-
515  }
-
516 
-
517  simdjson_inline uint64_t lteq(const T m) const {
-
518  const simd8<T> mask = simd8<T>::splat(m);
-
519  return simd8x64<bool>(
-
520  this->chunks[0] <= mask,
-
521  this->chunks[1] <= mask,
-
522  this->chunks[2] <= mask,
-
523  this->chunks[3] <= mask
-
524  ).to_bitmask();
-
525  }
-
526  }; // struct simd8x64<T>
-
527 
-
528 } // namespace simd
-
529 } // unnamed namespace
-
530 } // namespace SIMDJSON_IMPLEMENTATION
-
531 } // namespace simdjson
-
532 
-
533 #endif // SIMDJSON_ARM64_SIMD_H
-
simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
-
We want to support argument-dependent lookup (ADL).
+
476 
+
477  simdjson_inline uint64_t compress(uint64_t mask, T * output) const {
+
478  uint64_t popcounts = vget_lane_u64(vreinterpret_u64_u8(vcnt_u8(vcreate_u8(~mask))), 0);
+
479  // compute the prefix sum of the popcounts of each byte
+
480  uint64_t offsets = popcounts * 0x0101010101010101;
+
481  this->chunks[0].compress_halves(uint16_t(mask), output, &output[popcounts & 0xFF]);
+
482  this->chunks[1].compress_halves(uint16_t(mask >> 16), &output[(offsets >> 8) & 0xFF], &output[(offsets >> 16) & 0xFF]);
+
483  this->chunks[2].compress_halves(uint16_t(mask >> 32), &output[(offsets >> 24) & 0xFF], &output[(offsets >> 32) & 0xFF]);
+
484  this->chunks[3].compress_halves(uint16_t(mask >> 48), &output[(offsets >> 40) & 0xFF], &output[(offsets >> 48) & 0xFF]);
+
485  return offsets >> 56;
+
486  }
+
487 
+
488  simdjson_inline uint64_t to_bitmask() const {
+
489 #ifdef SIMDJSON_REGULAR_VISUAL_STUDIO
+
490  const uint8x16_t bit_mask = make_uint8x16_t(
+
491  0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,
+
492  0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80
+
493  );
+
494 #else
+
495  const uint8x16_t bit_mask = {
+
496  0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,
+
497  0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80
+
498  };
+
499 #endif
+
500  // Add each of the elements next to each other, successively, to stuff each 8 byte mask into one.
+
501  uint8x16_t sum0 = vpaddq_u8(this->chunks[0] & bit_mask, this->chunks[1] & bit_mask);
+
502  uint8x16_t sum1 = vpaddq_u8(this->chunks[2] & bit_mask, this->chunks[3] & bit_mask);
+
503  sum0 = vpaddq_u8(sum0, sum1);
+
504  sum0 = vpaddq_u8(sum0, sum0);
+
505  return vgetq_lane_u64(vreinterpretq_u64_u8(sum0), 0);
+
506  }
+
507 
+
508  simdjson_inline uint64_t eq(const T m) const {
+
509  const simd8<T> mask = simd8<T>::splat(m);
+
510  return simd8x64<bool>(
+
511  this->chunks[0] == mask,
+
512  this->chunks[1] == mask,
+
513  this->chunks[2] == mask,
+
514  this->chunks[3] == mask
+
515  ).to_bitmask();
+
516  }
+
517 
+
518  simdjson_inline uint64_t lteq(const T m) const {
+
519  const simd8<T> mask = simd8<T>::splat(m);
+
520  return simd8x64<bool>(
+
521  this->chunks[0] <= mask,
+
522  this->chunks[1] <= mask,
+
523  this->chunks[2] <= mask,
+
524  this->chunks[3] <= mask
+
525  ).to_bitmask();
+
526  }
+
527  }; // struct simd8x64<T>
+
528 
+
529 } // namespace simd
+
530 } // unnamed namespace
+
531 } // namespace SIMDJSON_IMPLEMENTATION
+
532 } // namespace simdjson
+
533 
+
534 #endif // SIMDJSON_ARM64_SIMD_H
+
simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
diff --git a/arm64_2stringparsing_8h_source.html b/arm64_2stringparsing__defs_8h_source.html similarity index 94% rename from arm64_2stringparsing_8h_source.html rename to arm64_2stringparsing__defs_8h_source.html index 39a471d58..0bc4f3b19 100644 --- a/arm64_2stringparsing_8h_source.html +++ b/arm64_2stringparsing__defs_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/arm64/stringparsing.h Source File +simdjson: include/simdjson/arm64/stringparsing_defs.h Source File @@ -68,7 +68,7 @@ $(function() {
@@ -88,13 +88,13 @@ $(document).ready(function(){initNavTree('arm64_2stringparsing_8h_source.html','
-
stringparsing.h
+
stringparsing_defs.h
-
1 #ifndef SIMDJSON_ARM64_STRINGPARSING_H
-
2 #define SIMDJSON_ARM64_STRINGPARSING_H
+
1 #ifndef SIMDJSON_ARM64_STRINGPARSING_DEFS_H
+
2 #define SIMDJSON_ARM64_STRINGPARSING_DEFS_H
3 
-
4 #include "simdjson/base.h"
+
4 #include "simdjson/arm64/base.h"
5 #include "simdjson/arm64/simd.h"
6 #include "simdjson/arm64/bitmanipulation.h"
7 
@@ -141,15 +141,15 @@ $(document).ready(function(){initNavTree('arm64_2stringparsing_8h_source.html','
48 } // namespace SIMDJSON_IMPLEMENTATION
49 } // namespace simdjson
50 
-
51 #endif // SIMDJSON_ARM64_STRINGPARSING_H
-
We want to support argument-dependent lookup (ADL).
-
constexpr size_t SIMDJSON_PADDING
The amount of padding needed in a buffer to parse JSON.
Definition: common_defs.h:45
+
51 #endif // SIMDJSON_ARM64_STRINGPARSING_DEFS_H
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
+
constexpr size_t SIMDJSON_PADDING
The amount of padding needed in a buffer to parse JSON.
Definition: base.h:30
diff --git a/arm64_8h_source.html b/arm64_8h_source.html index dcab9f5fb..6aabbf70e 100644 --- a/arm64_8h_source.html +++ b/arm64_8h_source.html @@ -94,36 +94,11 @@ $(document).ready(function(){initNavTree('arm64_8h_source.html',''); initResizab
1 #ifndef SIMDJSON_ARM64_H
2 #define SIMDJSON_ARM64_H
3 
- -
5 
-
6 #if SIMDJSON_IMPLEMENTATION_ARM64
+
4 #include "simdjson/arm64/begin.h"
+
5 #include "simdjson/generic/amalgamated.h"
+
6 #include "simdjson/arm64/end.h"
7 
-
8 namespace simdjson {
-
12 namespace arm64 {
-
13 } // namespace arm64
-
14 } // namespace simdjson
-
15 
-
16 #include "simdjson/arm64/implementation.h"
-
17 
-
18 #include "simdjson/arm64/begin.h"
-
19 
-
20 // Declarations
-
21 #include "simdjson/generic/dom_parser_implementation.h"
-
22 #include "simdjson/arm64/intrinsics.h"
-
23 #include "simdjson/arm64/bitmanipulation.h"
-
24 #include "simdjson/arm64/bitmask.h"
-
25 #include "simdjson/arm64/simd.h"
-
26 #include "simdjson/generic/jsoncharutils.h"
-
27 #include "simdjson/generic/atomparsing.h"
-
28 #include "simdjson/arm64/stringparsing.h"
-
29 #include "simdjson/arm64/numberparsing.h"
-
30 #include "simdjson/arm64/end.h"
-
31 
-
32 #endif // SIMDJSON_IMPLEMENTATION_ARM64
-
33 
-
34 #endif // SIMDJSON_ARM64_H
-
Includes common stuff needed for implementations.
-
We want to support argument-dependent lookup (ADL).
+
8 #endif // SIMDJSON_ARM64_H
diff --git a/array__iterator-inl_8h_source.html b/array__iterator-inl_8h_source.html index 6c599cc3f..4f19793e4 100644 --- a/array__iterator-inl_8h_source.html +++ b/array__iterator-inl_8h_source.html @@ -91,84 +91,96 @@ $(document).ready(function(){initNavTree('array__iterator-inl_8h_source.html',''
array_iterator-inl.h
-
1 namespace simdjson {
-
2 namespace SIMDJSON_IMPLEMENTATION {
-
3 namespace ondemand {
-
4 
-
5 simdjson_inline array_iterator::array_iterator(const value_iterator &_iter) noexcept
-
6  : iter{_iter}
-
7 {}
-
8 
- -
10  if (iter.error()) { iter.abandon(); return iter.error(); }
-
11  return value(iter.child());
-
12 }
-
13 simdjson_inline bool array_iterator::operator==(const array_iterator &other) const noexcept {
-
14  return !(*this != other);
-
15 }
-
16 simdjson_inline bool array_iterator::operator!=(const array_iterator &) const noexcept {
-
17  return iter.is_open();
-
18 }
-
19 simdjson_inline array_iterator &array_iterator::operator++() noexcept {
-
20  error_code error;
-
21  // PERF NOTE this is a safety rail ... users should exit loops as soon as they receive an error, so we'll never get here.
-
22  // However, it does not seem to make a perf difference, so we add it out of an abundance of caution.
-
23  if (( error = iter.error() )) { return *this; }
-
24  if (( error = iter.skip_child() )) { return *this; }
-
25  if (( error = iter.has_next_element().error() )) { return *this; }
-
26  return *this;
-
27 }
-
28 
-
29 } // namespace ondemand
-
30 } // namespace SIMDJSON_IMPLEMENTATION
-
31 } // namespace simdjson
-
32 
-
33 namespace simdjson {
-
34 
-
35 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::simdjson_result(
-
36  SIMDJSON_IMPLEMENTATION::ondemand::array_iterator &&value
-
37 ) noexcept
-
38  : SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>(value))
-
39 {
-
40  first.iter.assert_is_valid();
-
41 }
-
42 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::simdjson_result(error_code error) noexcept
-
43  : SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>({}, error)
-
44 {
-
45 }
-
46 
-
47 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::operator*() noexcept {
-
48  if (error()) { return error(); }
-
49  return *first;
-
50 }
-
51 simdjson_inline bool simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::operator==(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &other) const noexcept {
-
52  if (!first.iter.is_valid()) { return !error(); }
-
53  return first == other.first;
-
54 }
-
55 simdjson_inline bool simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::operator!=(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &other) const noexcept {
-
56  if (!first.iter.is_valid()) { return error(); }
-
57  return first != other.first;
-
58 }
-
59 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::operator++() noexcept {
-
60  // Clear the error if there is one, so we don't yield it twice
-
61  if (error()) { second = SUCCESS; return *this; }
-
62  ++(first);
-
63  return *this;
+
1 #ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H
+
2 
+
3 #ifndef SIMDJSON_AMALGAMATED
+
4 #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H
+
5 #include "simdjson/generic/ondemand/base.h"
+
6 #include "simdjson/generic/ondemand/array_iterator.h"
+
7 #include "simdjson/generic/ondemand/value-inl.h"
+
8 #include "simdjson/generic/ondemand/value_iterator-inl.h"
+
9 #endif // SIMDJSON_AMALGAMATED
+
10 
+
11 namespace simdjson {
+
12 namespace SIMDJSON_IMPLEMENTATION {
+
13 namespace ondemand {
+
14 
+
15 simdjson_inline array_iterator::array_iterator(const value_iterator &_iter) noexcept
+
16  : iter{_iter}
+
17 {}
+
18 
+ +
20  if (iter.error()) { iter.abandon(); return iter.error(); }
+
21  return value(iter.child());
+
22 }
+
23 simdjson_inline bool array_iterator::operator==(const array_iterator &other) const noexcept {
+
24  return !(*this != other);
+
25 }
+
26 simdjson_inline bool array_iterator::operator!=(const array_iterator &) const noexcept {
+
27  return iter.is_open();
+
28 }
+
29 simdjson_inline array_iterator &array_iterator::operator++() noexcept {
+
30  error_code error;
+
31  // PERF NOTE this is a safety rail ... users should exit loops as soon as they receive an error, so we'll never get here.
+
32  // However, it does not seem to make a perf difference, so we add it out of an abundance of caution.
+
33  if (( error = iter.error() )) { return *this; }
+
34  if (( error = iter.skip_child() )) { return *this; }
+
35  if (( error = iter.has_next_element().error() )) { return *this; }
+
36  return *this;
+
37 }
+
38 
+
39 } // namespace ondemand
+
40 } // namespace SIMDJSON_IMPLEMENTATION
+
41 } // namespace simdjson
+
42 
+
43 namespace simdjson {
+
44 
+
45 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::simdjson_result(
+
46  SIMDJSON_IMPLEMENTATION::ondemand::array_iterator &&value
+
47 ) noexcept
+
48  : SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>(value))
+
49 {
+
50  first.iter.assert_is_valid();
+
51 }
+
52 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::simdjson_result(error_code error) noexcept
+
53  : SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>({}, error)
+
54 {
+
55 }
+
56 
+
57 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::operator*() noexcept {
+
58  if (error()) { return error(); }
+
59  return *first;
+
60 }
+
61 simdjson_inline bool simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::operator==(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &other) const noexcept {
+
62  if (!first.iter.is_valid()) { return !error(); }
+
63  return first == other.first;
64 }
-
65 
-
66 } // namespace simdjson
- -
simdjson_inline simdjson_result< value > operator*() noexcept
Get the current element.
-
simdjson_inline bool operator==(const array_iterator &) const noexcept
Check if we are at the end of the JSON.
-
simdjson_inline array_iterator & operator++() noexcept
Move to the next element.
+
65 simdjson_inline bool simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::operator!=(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &other) const noexcept {
+
66  if (!first.iter.is_valid()) { return error(); }
+
67  return first != other.first;
+
68 }
+
69 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator>::operator++() noexcept {
+
70  // Clear the error if there is one, so we don't yield it twice
+
71  if (error()) { second = SUCCESS; return *this; }
+
72  ++(first);
+
73  return *this;
+
74 }
+
75 
+
76 } // namespace simdjson
+
77 
+
78 #endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H
+ +
simdjson_inline simdjson_result< value > operator*() noexcept
Get the current element.
+
simdjson_inline bool operator==(const array_iterator &) const noexcept
Check if we are at the end of the JSON.
+
simdjson_inline array_iterator & operator++() noexcept
Move to the next element.
simdjson_inline array_iterator() noexcept=default
Create a new, invalid array iterator.
-
simdjson_inline bool operator!=(const array_iterator &) const noexcept
Check if there are more elements in the JSON array.
-
An ephemeral JSON value returned during iteration.
Definition: value.h:17
-
We want to support argument-dependent lookup (ADL).
+
simdjson_inline bool operator!=(const array_iterator &) const noexcept
Check if there are more elements in the JSON array.
+
An ephemeral JSON value returned during iteration.
Definition: value.h:18
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
error_code
All possible errors returned by simdjson.
Definition: error.h:17
@ SUCCESS
No error.
Definition: error.h:18
The result of a simdjson operation that could fail.
Definition: error.h:205
-
simdjson_inline error_code error() const noexcept
The error.
Definition: error-inl.h:132
+
simdjson_inline error_code error() const noexcept
The error.
Definition: error-inl.h:131
diff --git a/array__iterator_8h_source.html b/array__iterator_8h_source.html index cb5a0acb9..e75f40e00 100644 --- a/array__iterator_8h_source.html +++ b/array__iterator_8h_source.html @@ -91,75 +91,80 @@ $(document).ready(function(){initNavTree('array__iterator_8h_source.html',''); i
array_iterator.h
-
1 #include "simdjson/error.h"
+
1 #ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H
2 
-
3 namespace simdjson {
-
4 namespace SIMDJSON_IMPLEMENTATION {
-
5 namespace ondemand {
-
6 
-
7 class array;
-
8 class value;
-
9 class document;
+
3 #ifndef SIMDJSON_AMALGAMATED
+
4 #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H
+
5 #include "simdjson/generic/implementation_simdjson_result_base.h"
+
6 #include "simdjson/generic/ondemand/base.h"
+
7 #include "simdjson/generic/ondemand/value_iterator.h"
+
8 #endif // SIMDJSON_AMALGAMATED
+
9 
10 
- -
20 public:
-
22  simdjson_inline array_iterator() noexcept = default;
-
23 
-
24  //
-
25  // Iterator interface
-
26  //
+
11 namespace simdjson {
+
12 namespace SIMDJSON_IMPLEMENTATION {
+
13 namespace ondemand {
+
14 
+ +
24 public:
+
26  simdjson_inline array_iterator() noexcept = default;
27 
-
33  simdjson_inline simdjson_result<value> operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION.
-
41  simdjson_inline bool operator==(const array_iterator &) const noexcept;
-
49  simdjson_inline bool operator!=(const array_iterator &) const noexcept;
-
55  simdjson_inline array_iterator &operator++() noexcept;
-
56 
-
57 private:
-
58  value_iterator iter{};
-
59 
-
60  simdjson_inline array_iterator(const value_iterator &iter) noexcept;
-
61 
-
62  friend class array;
-
63  friend class value;
-
64  friend struct simdjson_result<array_iterator>;
-
65 };
-
66 
-
67 } // namespace ondemand
-
68 } // namespace SIMDJSON_IMPLEMENTATION
-
69 } // namespace simdjson
+
28  //
+
29  // Iterator interface
+
30  //
+
31 
+
37  simdjson_inline simdjson_result<value> operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION.
+
45  simdjson_inline bool operator==(const array_iterator &) const noexcept;
+
53  simdjson_inline bool operator!=(const array_iterator &) const noexcept;
+
59  simdjson_inline array_iterator &operator++() noexcept;
+
60 
+
61 private:
+
62  value_iterator iter{};
+
63 
+
64  simdjson_inline array_iterator(const value_iterator &iter) noexcept;
+
65 
+
66  friend class array;
+
67  friend class value;
+
68  friend struct simdjson_result<array_iterator>;
+
69 };
70 
-
71 namespace simdjson {
-
72 
-
73 template<>
-
74 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> {
-
75 public:
- -
77  simdjson_inline simdjson_result(error_code error) noexcept;
-
78  simdjson_inline simdjson_result() noexcept = default;
-
79 
-
80  //
-
81  // Iterator interface
-
82  //
+
71 } // namespace ondemand
+
72 } // namespace SIMDJSON_IMPLEMENTATION
+
73 } // namespace simdjson
+
74 
+
75 namespace simdjson {
+
76 
+
77 template<>
+
78 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> {
+
79 public:
+ +
81  simdjson_inline simdjson_result(error_code error) noexcept;
+
82  simdjson_inline simdjson_result() noexcept = default;
83 
-
84  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION.
-
85  simdjson_inline bool operator==(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &) const noexcept;
-
86  simdjson_inline bool operator!=(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &) const noexcept;
-
87  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &operator++() noexcept;
-
88 };
-
89 
-
90 } // namespace simdjson
- +
84  //
+
85  // Iterator interface
+
86  //
+
87 
+
88  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION.
+
89  simdjson_inline bool operator==(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &) const noexcept;
+
90  simdjson_inline bool operator!=(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &) const noexcept;
+
91  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> &operator++() noexcept;
+
92 };
+
93 
+
94 } // namespace simdjson
+
95 
+
96 #endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H
+
simdjson_inline array_iterator() noexcept=default
Create a new, invalid array iterator.
- -
An ephemeral JSON value returned during iteration.
Definition: value.h:17
- -
We want to support argument-dependent lookup (ADL).
+ +
An ephemeral JSON value returned during iteration.
Definition: value.h:18
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
error_code
All possible errors returned by simdjson.
Definition: error.h:17
- - - + + +
The result of a simdjson operation that could fail.
Definition: error.h:205
-
simdjson_inline error_code error() const noexcept
The error.
Definition: error-inl.h:132
+
simdjson_inline error_code error() const noexcept
The error.
Definition: error-inl.h:131
simdjson_inline T & value() &noexcept(false)
Get the result value.
diff --git a/atomic__ptr_8h_source.html b/atomic__ptr_8h_source.html new file mode 100644 index 000000000..7cdb2418b --- /dev/null +++ b/atomic__ptr_8h_source.html @@ -0,0 +1,136 @@ + + + + + + + +simdjson: include/simdjson/internal/atomic_ptr.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
simdjson +  3.2.1 +
+
Ridiculously Fast JSON
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
atomic_ptr.h
+
+
+
1 #ifndef SIMDJSON_INTERNAL_ATOMIC_PTR_H
+
2 #define SIMDJSON_INTERNAL_ATOMIC_PTR_H
+
3 
+
4 #include "simdjson/base.h"
+
5 #include <atomic>
+
6 
+
7 namespace simdjson {
+
8 namespace internal {
+
9 
+
10 template<typename T>
+
11 class atomic_ptr {
+
12 public:
+
13  atomic_ptr(T *_ptr) : ptr{_ptr} {}
+
14 
+
15  operator const T*() const { return ptr.load(); }
+
16  const T& operator*() const { return *ptr; }
+
17  const T* operator->() const { return ptr.load(); }
+
18 
+
19  operator T*() { return ptr.load(); }
+
20  T& operator*() { return *ptr; }
+
21  T* operator->() { return ptr.load(); }
+
22  atomic_ptr& operator=(T *_ptr) { ptr = _ptr; return *this; }
+
23 
+
24 private:
+
25  std::atomic<T*> ptr;
+
26 };
+
27 
+
28 } // namespace internal
+
29 } // namespace simdjson
+
30 
+
31 #endif // SIMDJSON_INTERNAL_ATOMIC_PTR_H
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
+
+
+ + + + diff --git a/atomparsing_8h_source.html b/atomparsing_8h_source.html index b40030cad..d93bd86ec 100644 --- a/atomparsing_8h_source.html +++ b/atomparsing_8h_source.html @@ -91,72 +91,82 @@ $(document).ready(function(){initNavTree('atomparsing_8h_source.html',''); initR
atomparsing.h
-
1 namespace simdjson {
-
2 namespace SIMDJSON_IMPLEMENTATION {
-
3 namespace {
-
5 namespace atomparsing {
-
6 
-
7 // The string_to_uint32 is exclusively used to map literal strings to 32-bit values.
-
8 // We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot
-
9 // be certain that the character pointer will be properly aligned.
-
10 // You might think that using memcpy makes this function expensive, but you'd be wrong.
-
11 // All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32("false");
-
12 // to the compile-time constant 1936482662.
-
13 simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; }
+
1 #ifndef SIMDJSON_GENERIC_ATOMPARSING_H
+
2 
+
3 #ifndef SIMDJSON_AMALGAMATED
+
4 #define SIMDJSON_GENERIC_ATOMPARSING_H
+
5 #include "simdjson/generic/base.h"
+
6 #include "simdjson/generic/jsoncharutils.h"
+
7 #endif // SIMDJSON_AMALGAMATED
+
8 
+
9 namespace simdjson {
+
10 namespace SIMDJSON_IMPLEMENTATION {
+
11 namespace {
+
13 namespace atomparsing {
14 
-
15 
-
16 // Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive.
-
17 // Yet all decent optimizing compilers will compile memcpy to a single instruction, just about.
-
18 simdjson_warn_unused
-
19 simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) {
-
20  uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++)
-
21  static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes");
-
22  std::memcpy(&srcval, src, sizeof(uint32_t));
-
23  return srcval ^ string_to_uint32(atom);
-
24 }
-
25 
+
15 // The string_to_uint32 is exclusively used to map literal strings to 32-bit values.
+
16 // We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot
+
17 // be certain that the character pointer will be properly aligned.
+
18 // You might think that using memcpy makes this function expensive, but you'd be wrong.
+
19 // All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32("false");
+
20 // to the compile-time constant 1936482662.
+
21 simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; }
+
22 
+
23 
+
24 // Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive.
+
25 // Yet all decent optimizing compilers will compile memcpy to a single instruction, just about.
26 simdjson_warn_unused
-
27 simdjson_inline bool is_valid_true_atom(const uint8_t *src) {
-
28  return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0;
-
29 }
-
30 
-
31 simdjson_warn_unused
-
32 simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) {
-
33  if (len > 4) { return is_valid_true_atom(src); }
-
34  else if (len == 4) { return !str4ncmp(src, "true"); }
-
35  else { return false; }
-
36 }
-
37 
-
38 simdjson_warn_unused
-
39 simdjson_inline bool is_valid_false_atom(const uint8_t *src) {
-
40  return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0;
-
41 }
-
42 
-
43 simdjson_warn_unused
-
44 simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) {
-
45  if (len > 5) { return is_valid_false_atom(src); }
-
46  else if (len == 5) { return !str4ncmp(src+1, "alse"); }
-
47  else { return false; }
-
48 }
-
49 
-
50 simdjson_warn_unused
-
51 simdjson_inline bool is_valid_null_atom(const uint8_t *src) {
-
52  return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0;
-
53 }
-
54 
-
55 simdjson_warn_unused
-
56 simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) {
-
57  if (len > 4) { return is_valid_null_atom(src); }
-
58  else if (len == 4) { return !str4ncmp(src, "null"); }
-
59  else { return false; }
-
60 }
-
61 
-
62 } // namespace atomparsing
-
63 } // unnamed namespace
-
64 } // namespace SIMDJSON_IMPLEMENTATION
-
65 } // namespace simdjson
-
We want to support argument-dependent lookup (ADL).
-
constexpr size_t SIMDJSON_PADDING
The amount of padding needed in a buffer to parse JSON.
Definition: common_defs.h:45
+
27 simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) {
+
28  uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++)
+
29  static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes");
+
30  std::memcpy(&srcval, src, sizeof(uint32_t));
+
31  return srcval ^ string_to_uint32(atom);
+
32 }
+
33 
+
34 simdjson_warn_unused
+
35 simdjson_inline bool is_valid_true_atom(const uint8_t *src) {
+
36  return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0;
+
37 }
+
38 
+
39 simdjson_warn_unused
+
40 simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) {
+
41  if (len > 4) { return is_valid_true_atom(src); }
+
42  else if (len == 4) { return !str4ncmp(src, "true"); }
+
43  else { return false; }
+
44 }
+
45 
+
46 simdjson_warn_unused
+
47 simdjson_inline bool is_valid_false_atom(const uint8_t *src) {
+
48  return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0;
+
49 }
+
50 
+
51 simdjson_warn_unused
+
52 simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) {
+
53  if (len > 5) { return is_valid_false_atom(src); }
+
54  else if (len == 5) { return !str4ncmp(src+1, "alse"); }
+
55  else { return false; }
+
56 }
+
57 
+
58 simdjson_warn_unused
+
59 simdjson_inline bool is_valid_null_atom(const uint8_t *src) {
+
60  return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0;
+
61 }
+
62 
+
63 simdjson_warn_unused
+
64 simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) {
+
65  if (len > 4) { return is_valid_null_atom(src); }
+
66  else if (len == 4) { return !str4ncmp(src, "null"); }
+
67  else { return false; }
+
68 }
+
69 
+
70 } // namespace atomparsing
+
71 } // unnamed namespace
+
72 } // namespace SIMDJSON_IMPLEMENTATION
+
73 } // namespace simdjson
+
74 
+
75 #endif // SIMDJSON_GENERIC_ATOMPARSING_H
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
+
constexpr size_t SIMDJSON_PADDING
The amount of padding needed in a buffer to parse JSON.
Definition: base.h:30
diff --git a/base_8h_source.html b/base_8h_source.html index c286ec433..a6351af31 100644 --- a/base_8h_source.html +++ b/base_8h_source.html @@ -91,32 +91,53 @@ $(document).ready(function(){initNavTree('base_8h_source.html',''); initResizabl
base.h
-
1 #ifndef SIMDJSON_BASE_H
-
2 #define SIMDJSON_BASE_H
-
3 
-
4 #include "simdjson/compiler_check.h"
-
5 #include "simdjson/common_defs.h"
-
6 #include "simdjson/portability.h"
+
1 
+
5 #ifndef SIMDJSON_BASE_H
+
6 #define SIMDJSON_BASE_H
7 
-
8 SIMDJSON_PUSH_DISABLE_WARNINGS
-
9 SIMDJSON_DISABLE_UNDESIRED_WARNINGS
-
10 
-
11 // Public API
-
12 #include "simdjson/simdjson_version.h"
-
13 #include "simdjson/error.h"
-
14 #include "simdjson/minify.h"
-
15 #include "simdjson/padded_string.h"
-
16 #include "simdjson/padded_string_view.h"
-
17 #include "simdjson/implementation.h"
+
8 #include "simdjson/common_defs.h"
+
9 #include "simdjson/compiler_check.h"
+
10 #include "simdjson/error.h"
+
11 
+
15 namespace simdjson {
+
16 
+
17 SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS
18 
-
19 // Inline functions
-
20 #include "simdjson/error-inl.h"
-
21 #include "simdjson/padded_string-inl.h"
-
22 #include "simdjson/padded_string_view-inl.h"
-
23 
-
24 SIMDJSON_POP_DISABLE_WARNINGS
-
25 
-
26 #endif // SIMDJSON_BASE_H
+
20 constexpr size_t SIMDJSON_MAXSIZE_BYTES = 0xFFFFFFFF;
+
21 
+
30 constexpr size_t SIMDJSON_PADDING = 64;
+
31 
+
37 constexpr size_t DEFAULT_MAX_DEPTH = 1024;
+
38 
+
39 SIMDJSON_POP_DISABLE_UNUSED_WARNINGS
+
40 
+
41 class implementation;
+
42 struct padded_string;
+
43 class padded_string_view;
+
44 enum class stage1_mode;
+
45 
+
46 namespace internal {
+
47 
+
48 template<typename T>
+
49 class atomic_ptr;
+
50 class dom_parser_implementation;
+
51 class escape_json_string;
+
52 class tape_ref;
+
53 struct value128;
+
54 enum class tape_type;
+
55 
+
56 } // namespace internal
+
57 } // namespace simdjson
+
58 
+
59 #endif // SIMDJSON_BASE_H
+
An implementation of simdjson for a particular CPU architecture.
+
User-provided string that promises it has extra padded bytes at the end for use with parser::parse().
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
+
constexpr SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS size_t SIMDJSON_MAXSIZE_BYTES
The maximum document size supported by simdjson.
Definition: base.h:20
+
constexpr size_t DEFAULT_MAX_DEPTH
By default, simdjson supports this many nested objects and arrays.
Definition: base.h:37
+
stage1_mode
This enum is used with the dom_parser_implementation::stage1 function.
+
constexpr size_t SIMDJSON_PADDING
The amount of padding needed in a buffer to parse JSON.
Definition: base.h:30
+
String with extra allocation for ease of use with parser::parse()
Definition: padded_string.h:21
diff --git a/builtin_2base_8h_source.html b/builtin_2base_8h_source.html new file mode 100644 index 000000000..238a1b5cd --- /dev/null +++ b/builtin_2base_8h_source.html @@ -0,0 +1,132 @@ + + + + + + + +simdjson: include/simdjson/builtin/base.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
simdjson +  3.2.1 +
+
Ridiculously Fast JSON
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
base.h
+
+
+
1 #ifndef SIMDJSON_BUILTIN_BASE_H
+
2 #define SIMDJSON_BUILTIN_BASE_H
+
3 
+
4 #include "simdjson/base.h"
+
5 #include "simdjson/implementation_detection.h"
+
6 
+
7 namespace simdjson {
+
8 #if SIMDJSON_BUILTIN_IMPLEMENTATION_IS(arm64)
+
9  namespace arm64 {}
+
10 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(fallback)
+
11  namespace fallback {}
+
12 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(haswell)
+
13  namespace haswell {}
+
14 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(icelake)
+
15  namespace icelake {}
+
16 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(ppc64)
+
17  namespace ppc64 {}
+
18 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(westmere)
+
19  namespace westmere {}
+
20 #else
+
21 #error Unknown SIMDJSON_BUILTIN_IMPLEMENTATION
+
22 #endif
+
23 
+
34  namespace builtin = SIMDJSON_BUILTIN_IMPLEMENTATION;
+
35 } // namespace simdjson
+
36 
+
37 #endif // SIMDJSON_BUILTIN_BASE_H
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
+
+
+ + + + diff --git a/builtin_2implementation_8h_source.html b/builtin_2implementation_8h_source.html new file mode 100644 index 000000000..f4e0137b3 --- /dev/null +++ b/builtin_2implementation_8h_source.html @@ -0,0 +1,133 @@ + + + + + + + +simdjson: include/simdjson/builtin/implementation.h Source File + + + + + + + + + + + + + + + + +
+
+ + + + + + + +
+
simdjson +  3.2.1 +
+
Ridiculously Fast JSON
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
implementation.h
+
+
+
1 #ifndef SIMDJSON_BUILTIN_IMPLEMENTATION_H
+
2 #define SIMDJSON_BUILTIN_IMPLEMENTATION_H
+
3 
+
4 #include "simdjson/builtin/base.h"
+
5 
+
6 #if SIMDJSON_BUILTIN_IMPLEMENTATION_IS(arm64)
+
7 #include "simdjson/arm64/implementation.h"
+
8 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(fallback)
+
9 #include "simdjson/fallback/implementation.h"
+
10 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(haswell)
+
11 #include "simdjson/haswell/implementation.h"
+
12 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(icelake)
+
13 #include "simdjson/icelake/implementation.h"
+
14 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(ppc64)
+
15 #include "simdjson/ppc64/implementation.h"
+
16 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(westmere)
+
17 #include "simdjson/westmere/implementation.h"
+
18 #else
+
19 #error Unknown SIMDJSON_BUILTIN_IMPLEMENTATION
+
20 #endif
+
21 
+
22 namespace simdjson {
+ +
30 } // namespace simdjson
+
31 
+
32 #endif // SIMDJSON_BUILTIN_IMPLEMENTATION_H
+
An implementation of simdjson for a particular CPU architecture.
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
+
const implementation * builtin_implementation()
Function which returns a pointer to an implementation matching the "builtin" implementation.
+
+
+ + + + diff --git a/ppc64_2numberparsing_8h_source.html b/builtin_2ondemand_8h_source.html similarity index 65% rename from ppc64_2numberparsing_8h_source.html rename to builtin_2ondemand_8h_source.html index 99a5de230..34f459166 100644 --- a/ppc64_2numberparsing_8h_source.html +++ b/builtin_2ondemand_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/ppc64/numberparsing.h Source File +simdjson: include/simdjson/builtin/ondemand.h Source File @@ -68,7 +68,7 @@ $(function() {
@@ -88,55 +88,49 @@ $(document).ready(function(){initNavTree('ppc64_2numberparsing_8h_source.html','
-
numberparsing.h
+
ondemand.h
-
1 #ifndef SIMDJSON_PPC64_NUMBERPARSING_H
-
2 #define SIMDJSON_PPC64_NUMBERPARSING_H
+
1 #ifndef SIMDJSON_BUILTIN_ONDEMAND_H
+
2 #define SIMDJSON_BUILTIN_ONDEMAND_H
3 
-
4 #if defined(__linux__)
-
5 #include <byteswap.h>
-
6 #elif defined(__FreeBSD__)
-
7 #include <sys/endian.h>
-
8 #endif
-
9 
-
10 namespace simdjson {
-
11 namespace SIMDJSON_IMPLEMENTATION {
-
12 namespace numberparsing {
-
13 
-
14 // we don't have appropriate instructions, so let us use a scalar function
-
15 // credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/
-
17 static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) {
-
18  uint64_t val;
-
19  std::memcpy(&val, chars, sizeof(uint64_t));
-
20 #ifdef __BIG_ENDIAN__
-
21 #if defined(__linux__)
-
22  val = bswap_64(val);
-
23 #elif defined(__FreeBSD__)
-
24  val = bswap64(val);
+
4 #include "simdjson/builtin.h"
+
5 #include "simdjson/builtin/base.h"
+
6 
+
7 #include "simdjson/generic/ondemand/dependencies.h"
+
8 
+
9 #define SIMDJSON_AMALGAMATED
+
10 
+
11 #if SIMDJSON_BUILTIN_IMPLEMENTATION_IS(arm64)
+
12 #include "simdjson/arm64/ondemand.h"
+
13 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(fallback)
+
14 #include "simdjson/fallback/ondemand.h"
+
15 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(haswell)
+
16 #include "simdjson/haswell/ondemand.h"
+
17 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(icelake)
+
18 #include "simdjson/icelake/ondemand.h"
+
19 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(ppc64)
+
20 #include "simdjson/ppc64/ondemand.h"
+
21 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(westmere)
+
22 #include "simdjson/westmere/ondemand.h"
+
23 #else
+
24 #error Unknown SIMDJSON_BUILTIN_IMPLEMENTATION
25 #endif
-
26 #endif
-
27  val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8;
-
28  val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16;
-
29  return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32);
-
30 }
-
31 
-
32 } // namespace numberparsing
-
33 } // namespace SIMDJSON_IMPLEMENTATION
+
26 
+
27 #undef SIMDJSON_AMALGAMATED
+
28 
+
29 namespace simdjson {
+
33  namespace ondemand = SIMDJSON_BUILTIN_IMPLEMENTATION::ondemand;
34 } // namespace simdjson
35 
-
36 #define SIMDJSON_SWAR_NUMBER_PARSING 1
-
37 
-
38 #include "simdjson/generic/numberparsing.h"
-
39 
-
40 #endif // SIMDJSON_PPC64_NUMBERPARSING_H
-
We want to support argument-dependent lookup (ADL).
+
36 #endif // SIMDJSON_BUILTIN_ONDEMAND_H
+
The top level simdjson namespace, containing everything the library provides.
Definition: base.h:8
diff --git a/builtin_8h_source.html b/builtin_8h_source.html index 674915a28..901106057 100644 --- a/builtin_8h_source.html +++ b/builtin_8h_source.html @@ -94,51 +94,32 @@ $(document).ready(function(){initNavTree('builtin_8h_source.html',''); initResiz
1 #ifndef SIMDJSON_BUILTIN_H
2 #define SIMDJSON_BUILTIN_H
3 
-
4 #include "simdjson/implementations.h"
-
5 
-
6 // Determine the best builtin implementation
-
7 #ifndef SIMDJSON_BUILTIN_IMPLEMENTATION
-
8 #if SIMDJSON_CAN_ALWAYS_RUN_ICELAKE
-
9 #define SIMDJSON_BUILTIN_IMPLEMENTATION icelake
-
10 #elif SIMDJSON_CAN_ALWAYS_RUN_HASWELL
-
11 #define SIMDJSON_BUILTIN_IMPLEMENTATION haswell
-
12 #elif SIMDJSON_CAN_ALWAYS_RUN_WESTMERE
-
13 #define SIMDJSON_BUILTIN_IMPLEMENTATION westmere
-
14 #elif SIMDJSON_CAN_ALWAYS_RUN_ARM64
-
15 #define SIMDJSON_BUILTIN_IMPLEMENTATION arm64
-
16 #elif SIMDJSON_CAN_ALWAYS_RUN_PPC64
-
17 #define SIMDJSON_BUILTIN_IMPLEMENTATION ppc64
-
18 #elif SIMDJSON_CAN_ALWAYS_RUN_FALLBACK
-
19 #define SIMDJSON_BUILTIN_IMPLEMENTATION fallback
-
20 #else
-
21 #error "All possible implementations (including fallback) have been disabled! simdjson will not run."
-
22 #endif
-
23 #endif // SIMDJSON_BUILTIN_IMPLEMENTATION
-
24 
-
25 #define SIMDJSON_IMPLEMENTATION SIMDJSON_BUILTIN_IMPLEMENTATION
+
4 #include "simdjson/builtin/base.h"
+
5 #include "simdjson/builtin/implementation.h"
+
6 
+
7 #include "simdjson/generic/dependencies.h"
+
8 
+
9 #define SIMDJSON_AMALGAMATED
+
10 
+
11 #if SIMDJSON_BUILTIN_IMPLEMENTATION_IS(arm64)
+
12 #include "simdjson/arm64.h"
+
13 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(fallback)
+
14 #include "simdjson/fallback.h"
+
15 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(haswell)
+
16 #include "simdjson/haswell.h"
+
17 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(icelake)
+
18 #include "simdjson/icelake.h"
+
19 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(ppc64)
+
20 #include "simdjson/ppc64.h"
+
21 #elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(westmere)
+
22 #include "simdjson/westmere.h"
+
23 #else
+
24 #error Unknown SIMDJSON_BUILTIN_IMPLEMENTATION
+
25 #endif
26 
-
27 // ondemand is only compiled as part of the builtin implementation at present
+
27 #undef SIMDJSON_AMALGAMATED
28 
-
29 // Interface declarations
-
30 #include "simdjson/generic/implementation_simdjson_result_base.h"
-
31 #include "simdjson/generic/ondemand.h"
-
32 
-
33 // Inline definitions
-
34 #include "simdjson/generic/implementation_simdjson_result_base-inl.h"
-
35 #include "simdjson/generic/ondemand-inl.h"
-
36 
-
37 #undef SIMDJSON_IMPLEMENTATION
-
38 
-
39 namespace simdjson {
-
50  namespace builtin = SIMDJSON_BUILTIN_IMPLEMENTATION;
-
54  namespace ondemand = SIMDJSON_BUILTIN_IMPLEMENTATION::ondemand;
- -
62 } // namespace simdjson
-
63 
-
64 #endif // SIMDJSON_BUILTIN_H
-
An implementation of simdjson for a particular CPU architecture.
-
We want to support argument-dependent lookup (ADL).
-
const implementation * builtin_implementation()
Represents the best statically linked simdjson implementation that can be used by the compiling progr...
+
29 #endif // SIMDJSON_BUILTIN_H
diff --git a/classes.html b/classes.html index ac49b885f..d414ac9b3 100644 --- a/classes.html +++ b/classes.html @@ -95,31 +95,31 @@ $(document).ready(function(){initNavTree('classes.html',''); initResizable(); })
A
-
array (simdjson::dom)
array (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
array_iterator (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
+
array (simdjson::dom)
array (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
array_iterator (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
D
-
document (simdjson::dom)
document (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
document_reference (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
document_stream (simdjson::dom)
document_stream (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
dom_parser_implementation (simdjson::SIMDJSON_IMPLEMENTATION)
+
document (simdjson::dom)
document (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
document_reference (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
document_stream (simdjson::dom)
document_stream (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
dom_parser_implementation (simdjson::SIMDJSON_IMPLEMENTATION)
E
-
element (simdjson::dom)
+
element (simdjson::dom)
F
field (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
I
-
implementation (simdjson)
implementation_simdjson_result_base (simdjson::SIMDJSON_IMPLEMENTATION)
array::iterator (simdjson::dom)
document_stream::iterator (simdjson::dom)
object::iterator (simdjson::dom)
document_stream::iterator (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
+
implementation (simdjson)
implementation_simdjson_result_base (simdjson::SIMDJSON_IMPLEMENTATION)
array::iterator (simdjson::dom)
document_stream::iterator (simdjson::dom)
object::iterator (simdjson::dom)
document_stream::iterator (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
K
-
key_value_pair (simdjson::dom)
+
key_value_pair (simdjson::dom)
N
number (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
O
-
object (simdjson::dom)
object (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
object_iterator (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
open_container (simdjson::SIMDJSON_IMPLEMENTATION)
+
object (simdjson::dom)
object (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
object_iterator (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
open_container (simdjson::SIMDJSON_IMPLEMENTATION)
P
-
padded_string (simdjson)
padded_string_view (simdjson)
parser (simdjson::dom)
parser (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
+
padded_string (simdjson)
padded_string_view (simdjson)
parser (simdjson::dom)
parser (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
R
raw_json_string (simdjson::SIMDJSON_IMPLEMENTATION::ondemand)
diff --git a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html index b96018bd1..5cf2e316f 100644 --- a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html +++ b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html @@ -166,7 +166,7 @@ size_t 

Detailed Description

-

Definition at line 15 of file dom_parser_implementation.h.

+

Definition at line 20 of file dom_parser_implementation.h.


The documentation for this class was generated from the following file: diff --git a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html index 29756ddf8..caff0ad2c 100644 --- a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html +++ b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html @@ -162,7 +162,7 @@ Protected Attributes

Detailed Description

A forward-only JSON array.

-

Definition at line 13 of file array.h.

+

Definition at line 17 of file array.h.

Constructor & Destructor Documentation

◆ array() [1/2]

@@ -225,7 +225,7 @@ Protected Attributes -

Definition at line 43 of file array-inl.h.

+

Definition at line 55 of file array-inl.h.

@@ -261,7 +261,7 @@ Protected Attributes -

Definition at line 154 of file array-inl.h.

+

Definition at line 166 of file array-inl.h.

@@ -303,7 +303,7 @@ Protected Attributes -

Definition at line 118 of file array-inl.h.

+

Definition at line 130 of file array-inl.h.

@@ -333,7 +333,7 @@ Protected Attributes

Begin array iteration.

Part of the std::iterable interface.

-

Definition at line 66 of file array-inl.h.

+

Definition at line 78 of file array-inl.h.

@@ -364,7 +364,7 @@ Protected Attributes

The count_elements method should always be called before you have begun iterating through the array: it is expected that you are pointing at the beginning of the array. The runtime complexity is linear in the size of the array. After calling this function, if successful, the array is 'rewinded' at its beginning as if it had never been accessed. If the JSON is malformed (e.g., there is a missing comma), then an error is returned and it is no longer safe to continue.

To check that an array is empty, it is more performant to use the is_empty() method.

-

Definition at line 94 of file array-inl.h.

+

Definition at line 106 of file array-inl.h.

@@ -394,7 +394,7 @@ Protected Attributes

Sentinel representing the end of the array.

Part of the std::iterable interface.

-

Definition at line 72 of file array-inl.h.

+

Definition at line 84 of file array-inl.h.

@@ -424,7 +424,7 @@ Protected Attributes

This method scans the beginning of the array and checks whether the array is empty.

The runtime complexity is constant time. After calling this function, if successful, the array is 'rewinded' at its beginning as if it had never been accessed. If the JSON is malformed (e.g., there is a missing comma), then an error is returned and it is no longer safe to continue.

-

Definition at line 107 of file array-inl.h.

+

Definition at line 119 of file array-inl.h.

@@ -454,7 +454,7 @@ Protected Attributes

Consumes the array and returns a string_view instance corresponding to the array as represented in JSON.

It points inside the original document.

-

Definition at line 81 of file array-inl.h.

+

Definition at line 93 of file array-inl.h.

@@ -485,7 +485,7 @@ Protected Attributes

You should still consume values only once even if you can iterate through the array more than once. If you unescape a string within the array more than once, you have unsafe code. Note that rewinding an array means that you may need to reparse it anew: it is not a free operation.

Returns
true if the array contains some elements (not empty)
-

Definition at line 114 of file array-inl.h.

+

Definition at line 126 of file array-inl.h.

@@ -521,7 +521,7 @@ Protected Attributes -

Definition at line 48 of file array-inl.h.

+

Definition at line 60 of file array-inl.h.

@@ -557,7 +557,7 @@ Protected Attributes -

Definition at line 55 of file array-inl.h.

+

Definition at line 67 of file array-inl.h.

@@ -594,7 +594,7 @@ Protected Attributes -

Definition at line 60 of file array-inl.h.

+

Definition at line 72 of file array-inl.h.

@@ -622,7 +622,7 @@ Protected Attributes

Iterator marking current position.

iter.is_alive() == false indicates iteration is complete.

-

Definition at line 160 of file array.h.

+

Definition at line 164 of file array.h.

diff --git a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html index 499d0e9e5..885bcb20d 100644 --- a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html +++ b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html @@ -125,7 +125,7 @@ simdjson_inline ++ must be called exactly once in between each * (*, ++, *, ++, * ...) -

Definition at line 19 of file array_iterator.h.

+

Definition at line 23 of file array_iterator.h.

Member Function Documentation

◆ operator!=()

@@ -155,7 +155,7 @@ simdjson_inline Part of the std::iterator interface.

Returns
true if there are more elements in the JSON array.
-

Definition at line 16 of file array_iterator-inl.h.

+

Definition at line 26 of file array_iterator-inl.h.

@@ -185,7 +185,7 @@ simdjson_inline Get the current element.

Part of the std::iterator interface.

-

Definition at line 9 of file array_iterator-inl.h.

+

Definition at line 19 of file array_iterator-inl.h.

@@ -215,7 +215,7 @@ simdjson_inline Move to the next element.

Part of the std::iterator interface.

-

Definition at line 19 of file array_iterator-inl.h.

+

Definition at line 29 of file array_iterator-inl.h.

@@ -247,7 +247,7 @@ simdjson_inline Part of the std::iterator interface.

Returns
true if there are no more elements in the JSON array.
-

Definition at line 13 of file array_iterator-inl.h.

+

Definition at line 23 of file array_iterator-inl.h.

diff --git a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html index cbb717df6..ce46494b8 100644 --- a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html +++ b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html @@ -249,7 +249,7 @@ simdjson_inline sim simdjson_inline simdjson_result< bool > is_integer () noexcept  Checks whether the document is an integer number. More...
  -simdjson_inline simdjson_result< number_typeget_number_type () noexcept +simdjson_inline simdjson_result< number_typeget_number_type () noexcept  Determine the number type (integer or floating-point number) as quickly as possible. More...
  simdjson_warn_unused simdjson_inline simdjson_result< numberget_number () noexcept @@ -349,7 +349,7 @@ static constexpr Definition at line 22 of file document.h.

+

Definition at line 20 of file document.h.

Constructor & Destructor Documentation

◆ document()

@@ -411,7 +411,7 @@ static constexpr Definition at line 179 of file document-inl.h.

+

Definition at line 195 of file document-inl.h.

@@ -441,7 +441,7 @@ static constexpr at_end() returns false, then there may be trailing content.

-

Definition at line 31 of file document-inl.h.

+

Definition at line 47 of file document-inl.h.

@@ -485,7 +485,7 @@ static constexpr Definition at line 260 of file document-inl.h.

+

Definition at line 276 of file document-inl.h.

@@ -515,7 +515,7 @@ static constexpr Definition at line 183 of file document-inl.h.

+

Definition at line 199 of file document-inl.h.

@@ -545,7 +545,7 @@ static constexpr Definition at line 165 of file document-inl.h.

+

Definition at line 181 of file document-inl.h.

@@ -576,7 +576,7 @@ static constexpr Definition at line 172 of file document-inl.h.

+

Definition at line 188 of file document-inl.h.

@@ -606,7 +606,7 @@ static constexpr Definition at line 27 of file document-inl.h.

+

Definition at line 43 of file document-inl.h.

@@ -636,7 +636,7 @@ static constexpr Definition at line 186 of file document-inl.h.

+

Definition at line 202 of file document-inl.h.

@@ -683,7 +683,7 @@ static constexpr
Returns
The value of the field, or NO_SUCH_FIELD if the field is not in the object.
-

Definition at line 190 of file document-inl.h.

+

Definition at line 206 of file document-inl.h.

@@ -725,7 +725,7 @@ static constexpr
Returns
The value of the field, or NO_SUCH_FIELD if the field is not in the object.
-

Definition at line 196 of file document-inl.h.

+

Definition at line 212 of file document-inl.h.

@@ -761,7 +761,7 @@ template<typename T >
INCORRECT_TYPE If the JSON value is not the given type.
-

Definition at line 162 of file document.h.

+

Definition at line 160 of file document.h.

@@ -834,7 +834,7 @@ SUCCESS If the parse succeeded and the out parameter was set to the value.
INCORRECT_TYPE If the JSON value is not an array.
-

Definition at line 77 of file document-inl.h.

+

Definition at line 93 of file document-inl.h.

@@ -866,7 +866,7 @@ INCORRECT_TYPE If the JSON value is not an array.
INCORRECT_TYPE if the JSON value is not true or false.
-

Definition at line 121 of file document-inl.h.

+

Definition at line 137 of file document-inl.h.

@@ -898,7 +898,7 @@ INCORRECT_TYPE if the JSON value is not true or false.
INCORRECT_TYPE If the JSON value is not a valid floating-point number.
-

Definition at line 106 of file document-inl.h.

+

Definition at line 122 of file document-inl.h.

@@ -930,7 +930,7 @@ INCORRECT_TYPE If the JSON value is not a valid floating-point number. INCORRECT_TYPE If the JSON value is not a valid floating-point number. -

Definition at line 109 of file document-inl.h.

+

Definition at line 125 of file document-inl.h.

@@ -962,7 +962,7 @@ INCORRECT_TYPE If the JSON value is not a valid floating-point number. INCORRECT_TYPE If the JSON value is not a 64-bit integer. -

Definition at line 100 of file document-inl.h.

+

Definition at line 116 of file document-inl.h.

@@ -994,7 +994,7 @@ INCORRECT_TYPE If the JSON value is not a 64-bit integer.
INCORRECT_TYPE If the JSON value is not a 64-bit integer.
-

Definition at line 103 of file document-inl.h.

+

Definition at line 119 of file document-inl.h.

@@ -1028,7 +1028,7 @@ INCORRECT_TYPE If the JSON value is not a 64-bit integer.

Otherwise, number.get_number_type() has value number_type::floating_point_number and we have a binary64 number. You can recover the value by calling number.get_double() and you have that number.is_double() is true.

You must check the type before accessing the value: it is an error to call "get_int64()" when number.get_number_type() is not number_type::signed_integer and when number.is_int64() is false.

-

Definition at line 250 of file document-inl.h.

+

Definition at line 266 of file document-inl.h.

@@ -1042,7 +1042,7 @@ INCORRECT_TYPE If the JSON value is not a 64-bit integer. - + @@ -1062,7 +1062,7 @@ INCORRECT_TYPE If the JSON value is not a 64-bit integer.

This function requires processing the number string, but it is expected to be faster than get_number().get_number_type() because it is does not parse the number value.

Returns
the type of the number
-

Definition at line 246 of file document-inl.h.

+

Definition at line 262 of file document-inl.h.

@@ -1094,7 +1094,7 @@ INCORRECT_TYPE If the JSON value is not a 64-bit integer.
INCORRECT_TYPE If the JSON value is not an object.
-

Definition at line 81 of file document-inl.h.

+

Definition at line 97 of file document-inl.h.

@@ -1128,7 +1128,7 @@ INCORRECT_TYPE If the JSON value is not an object.
INCORRECT_TYPE if the JSON value is not a string.
-

Definition at line 118 of file document-inl.h.

+

Definition at line 134 of file document-inl.h.

@@ -1169,7 +1169,7 @@ INCORRECT_TYPE if the JSON value is not a string.
INCORRECT_TYPE if the JSON value is not a string.
-

Definition at line 112 of file document-inl.h.

+

Definition at line 128 of file document-inl.h.

@@ -1203,7 +1203,7 @@ INCORRECT_TYPE if the JSON value is not a string. INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer.

We want to disallow trailing content. Thus, in several implementations below, we pass a 'true' parameter value to a get_root_value_iterator() method: this indicates that we disallow trailing content.

-

Definition at line 94 of file document-inl.h.

+

Definition at line 110 of file document-inl.h.

@@ -1235,7 +1235,7 @@ INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer.
INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer.
-

Definition at line 97 of file document-inl.h.

+

Definition at line 113 of file document-inl.h.

@@ -1267,7 +1267,7 @@ INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer.
SCALAR_DOCUMENT_AS_VALUE error is the document is a scalar (see is_scalar() function).
-

Definition at line 52 of file document-inl.h.

+

Definition at line 68 of file document-inl.h.

@@ -1301,7 +1301,7 @@ SCALAR_DOCUMENT_AS_VALUE error is the document is a scalar (see INCORRECT_TYPE if the JSON value is not a string. -

Definition at line 115 of file document-inl.h.

+

Definition at line 131 of file document-inl.h.

@@ -1331,7 +1331,7 @@ INCORRECT_TYPE if the JSON value is not a string.

Some unrecoverable error conditions may render the document instance unusable.

The is_alive() method returns true when the document is still suitable.

-

Definition at line 36 of file document-inl.h.

+

Definition at line 52 of file document-inl.h.

@@ -1362,7 +1362,7 @@ INCORRECT_TYPE if the JSON value is not a string.

Note that this requires to partially parse the number string. If the value is determined to be an integer, it may still not parse properly as an integer in subsequent steps (e.g., it might overflow).

Returns
true if the number if negative.
-

Definition at line 242 of file document-inl.h.

+

Definition at line 258 of file document-inl.h.

@@ -1392,7 +1392,7 @@ INCORRECT_TYPE if the JSON value is not a string.

Checks whether the document is a negative number.

Returns
true if the number if negative.
-

Definition at line 238 of file document-inl.h.

+

Definition at line 254 of file document-inl.h.

@@ -1425,7 +1425,7 @@ INCORRECT_TYPE if the JSON value is not a string.
INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'.
-

Definition at line 124 of file document-inl.h.

+

Definition at line 140 of file document-inl.h.

@@ -1456,7 +1456,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'.

Returns false when there it is an array or object.

Returns
true if the type is string, number, null, Boolean @error TAPE_ERROR when the JSON value is a bad token like "}" "," or "alse".
-

Definition at line 231 of file document-inl.h.

+

Definition at line 247 of file document-inl.h.

@@ -1492,7 +1492,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

Definition at line 154 of file document-inl.h.

+

Definition at line 170 of file document-inl.h.

@@ -1528,7 +1528,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

Definition at line 161 of file document-inl.h.

+

Definition at line 177 of file document-inl.h.

@@ -1564,7 +1564,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

Definition at line 158 of file document-inl.h.

+

Definition at line 174 of file document-inl.h.

@@ -1600,7 +1600,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

Definition at line 157 of file document-inl.h.

+

Definition at line 173 of file document-inl.h.

@@ -1636,7 +1636,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

Definition at line 155 of file document-inl.h.

+

Definition at line 171 of file document-inl.h.

@@ -1674,7 +1674,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

Definition at line 160 of file document-inl.h.

+

Definition at line 176 of file document-inl.h.

@@ -1711,7 +1711,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

Definition at line 159 of file document-inl.h.

+

Definition at line 175 of file document-inl.h.

@@ -1747,7 +1747,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

Definition at line 156 of file document-inl.h.

+

Definition at line 172 of file document-inl.h.

@@ -1783,7 +1783,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

Definition at line 162 of file document-inl.h.

+

Definition at line 178 of file document-inl.h.

@@ -1813,7 +1813,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'.

Consumes the document and returns a string_view instance corresponding to the document as represented in JSON.

It points inside the original byte array containing the JSON document.

-

Definition at line 215 of file document-inl.h.

+

Definition at line 231 of file document-inl.h.

@@ -1854,7 +1854,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'.
  • null
  • -

    Definition at line 255 of file document-inl.h.

    +

    Definition at line 271 of file document-inl.h.

    @@ -1884,7 +1884,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'.

    Reset the iterator inside the document instance so we are pointing back at the beginning of the document, as if it had just been created.

    It invalidates all values, objects and arrays that you have created so far (including unescaped strings).

    -

    Definition at line 15 of file document-inl.h.

    +

    Definition at line 31 of file document-inl.h.

    @@ -1916,7 +1916,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'.

    NOTE: If you're only expecting a value to be one type (a typical case), it's generally better to just call .get_double, .get_string, etc. and check for INCORRECT_TYPE (or just let it throw an exception).

    @error TAPE_ERROR when the JSON value is a bad token like "}" "," or "alse".

    -

    Definition at line 227 of file document-inl.h.

    +

    Definition at line 243 of file document-inl.h.

    diff --git a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html index e40b459cc..a85b36a9f 100644 --- a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html +++ b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html @@ -239,7 +239,7 @@ simdjson_inline bool  +simdjson_inline simdjson_result< number_type >  @@ -254,7 +254,7 @@ simdjson_inline sim

    Detailed Description

    A document_reference is a thin wrapper around a document reference instance.

    -

    Definition at line 607 of file document.h.

    +

    Definition at line 605 of file document.h.

    Member Function Documentation

    ◆ get_uint64()

    @@ -284,7 +284,7 @@ simdjson_inline sim

    However, for streams of JSON documents, we want to be able to start from "321" "321" "321" and parse it successfully as a stream of JSON documents, calling get_uint64_in_string() successfully each time.

    To achieve this result, we pass a 'false' to a get_root_value_iterator() method: this indicates that we allow trailing content.

    -

    Definition at line 563 of file document-inl.h.

    +

    Definition at line 579 of file document-inl.h.

    diff --git a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html index 1625dba8a..27acc0ea9 100644 --- a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html +++ b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html @@ -137,7 +137,7 @@ simdjson_inline

    A forward-only stream of documents.

    Produced by parser::iterate_many.

    -

    Definition at line 74 of file document_stream.h.

    +

    Definition at line 79 of file document_stream.h.

    Constructor & Destructor Documentation

    ◆ document_stream()

    @@ -166,9 +166,9 @@ simdjson_inline
    {c++}
    document_stream docs;
    auto error = parser.iterate_many(json).get(docs);
    -
    simdjson_inline document_stream() noexcept
    Construct an uninitialized document_stream.
    +
    simdjson_inline document_stream() noexcept
    Construct an uninitialized document_stream.
    -

    Definition at line 107 of file document_stream-inl.h.

    +

    Definition at line 117 of file document_stream-inl.h.

    @@ -201,7 +201,7 @@ simdjson_inline truncated_bytes() after streaming through all documents, like so:

    document_stream stream = parser.iterate_many(json,window); for(auto & doc : stream) { // do something with doc } size_t truncated = stream.truncated_bytes();

    -

    Definition at line 131 of file document_stream-inl.h.

    +

    Definition at line 141 of file document_stream-inl.h.

    diff --git a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html index 1a423981d..8e85d6c44 100644 --- a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html +++ b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html @@ -135,7 +135,7 @@ simdjson_inline sim
    simdjson_inline simdjson_result< number_type > simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_number_type simdjson_inline simdjson_result< number_type > simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_number_type ( ) is_ne simdjson_inline simdjson_result< bool > is_integer () noexcept
     
    -simdjson_inline simdjson_result< number_typeget_number_type () noexcept
    get_number_type () noexcept
     
    simdjson_inline simdjson_result< numberget_number () noexcept

    Detailed Description

    -

    Definition at line 117 of file document_stream.h.

    +

    Definition at line 122 of file document_stream.h.

    Member Function Documentation

    ◆ operator!=()

    @@ -169,7 +169,7 @@ simdjson_inline sim -

    Definition at line 176 of file document_stream-inl.h.

    +

    Definition at line 186 of file document_stream-inl.h.

    diff --git a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html index 1ec26dbc3..60fa8c68d 100644 --- a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html +++ b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html @@ -145,7 +145,7 @@ static simdjson_inline Definition at line 14 of file field.h.

    +

    Definition at line 22 of file field.h.

    Constructor & Destructor Documentation

    ◆ field()

    @@ -173,7 +173,7 @@ static simdjson_inline Definition at line 6 of file field-inl.h.

    +

    Definition at line 16 of file field-inl.h.

    @@ -204,7 +204,7 @@ static simdjson_inline raw_json_string.

    Can be used for direct comparison with an unescaped C string: e.g., key() == "test".

    -

    Definition at line 31 of file field-inl.h.

    +

    Definition at line 41 of file field-inl.h.

    @@ -236,7 +236,7 @@ static simdjson_inline unescaped_key(), you cannot call it again nor can you call key().

    -

    Definition at line 24 of file field-inl.h.

    +

    Definition at line 34 of file field-inl.h.

    diff --git a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html index 201c99d09..0f11f646d 100644 --- a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html +++ b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html @@ -182,7 +182,7 @@ value_iterator iter {}

    Detailed Description

    A forward-only JSON object field iterator.

    -

    Definition at line 10 of file object.h.

    +

    Definition at line 17 of file object.h.

    Constructor & Destructor Documentation

    ◆ object()

    @@ -253,7 +253,7 @@ value_iterator iter {} -

    Definition at line 114 of file object-inl.h.

    +

    Definition at line 127 of file object-inl.h.

    @@ -284,7 +284,7 @@ value_iterator iter {}

    whenever you are pointing at a key, calling skip_child() is unsafe because you will hit a string and you will assume that it is string value, and this mistake will lead you to make bad depth computation.

    We want to 'consume' the key. We could really just do _json_iter->return_current_and_advance(); at this point, but, for clarity, we will use the high-level API to eat the key. We assume that the compiler optimizes away most of the work.

    -

    Definition at line 56 of file object-inl.h.

    +

    Definition at line 69 of file object-inl.h.

    @@ -316,7 +316,7 @@ value_iterator iter {}

    To check that an object is empty, it is more performant to use the is_empty() method.

    Performance hint: You should only call count_fields() as a last resort as it may require scanning the document twice or more.

    -

    Definition at line 154 of file object-inl.h.

    +

    Definition at line 167 of file object-inl.h.

    @@ -364,7 +364,7 @@ value_iterator iter {}
    Returns
    The value of the field, or NO_SUCH_FIELD if the field is not in the object.
    -

    Definition at line 29 of file object-inl.h.

    +

    Definition at line 42 of file object-inl.h.

    @@ -407,7 +407,7 @@ value_iterator iter {}
    Returns
    The value of the field, or NO_SUCH_FIELD if the field is not in the object.
    -

    Definition at line 5 of file object-inl.h.

    +

    Definition at line 18 of file object-inl.h.

    @@ -437,7 +437,7 @@ value_iterator iter {}

    This method scans the beginning of the object and checks whether the object is empty.

    The runtime complexity is constant time. After calling this function, if successful, the object is 'rewinded' at its beginning as if it had never been accessed. If the JSON is malformed (e.g., there is a missing comma), then an error is returned and it is no longer safe to continue.

    -

    Definition at line 166 of file object-inl.h.

    +

    Definition at line 179 of file object-inl.h.

    @@ -467,7 +467,7 @@ value_iterator iter {}

    Consumes the object and returns a string_view instance corresponding to the object as represented in JSON.

    It points inside the original byte array containing the JSON document.

    -

    Definition at line 82 of file object-inl.h.

    +

    Definition at line 95 of file object-inl.h.

    @@ -498,7 +498,7 @@ value_iterator iter {}

    You should still consume values only once even if you can iterate through the object more than once. If you unescape a string within the object more than once, you have unsafe code. Note that rewinding an object means that you may need to reparse it anew: it is not a free operation.

    Returns
    true if the object contains some elements (not empty)
    -

    Definition at line 173 of file object-inl.h.

    +

    Definition at line 186 of file object-inl.h.

    diff --git a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html index ff7ae2548..0fa68bc2f 100644 --- a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html +++ b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html @@ -115,7 +115,7 @@ simdjson_inline

    Detailed Description

    -

    Definition at line 9 of file object_iterator.h.

    +

    Definition at line 14 of file object_iterator.h.

    Constructor & Destructor Documentation

    ◆ object_iterator()

    diff --git a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html index 0098c6822..1fe5bdda3 100644 --- a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html +++ b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html @@ -100,7 +100,7 @@ $(document).ready(function(){initNavTree('classsimdjson_1_1_s_i_m_d_j_s_o_n___i_ - + - +

    Public Member Functions

     parser (size_t max_capacity=SIMDJSON_MAXSIZE_BYTES) noexcept
     parser (size_t max_capacity=SIMDJSON_MAXSIZE_BYTES) noexcept
     Create a JSON parser. More...
     
    @@ -206,7 +206,7 @@ simdjson_inline void set_m simdjson_inline simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::parser ( size_t max_capacity = SIMDJSON_MAXSIZE_BYTES)max_capacity = SIMDJSON_MAXSIZE_BYTES)
    @@ -220,7 +220,7 @@ simdjson_inline void set_m

    Create a JSON parser.

    The new parser will have zero capacity.

    -

    Definition at line 5 of file parser-inl.h.

    +

    Definition at line 18 of file parser-inl.h.

    @@ -270,7 +270,7 @@ simdjson_inline void set_m
    Returns
    The error, if there is one.
    -

    Definition at line 9 of file parser-inl.h.

    +

    Definition at line 22 of file parser-inl.h.

    @@ -331,7 +331,7 @@ REQUIRED: Buffer Padding -

    Definition at line 31 of file parser-inl.h.

    +

    Definition at line 44 of file parser-inl.h.

    @@ -417,7 +417,7 @@ Parser Capacity -

    Definition at line 87 of file parser-inl.h.

    +

    Definition at line 100 of file parser-inl.h.

    @@ -447,7 +447,7 @@ Parser Capacity

    The maximum depth of this parser (the most deeply nested objects and arrays it can process).

    This parameter is only relevant when the macro SIMDJSON_DEVELOPMENT_CHECKS is set to true. The document's instance current_depth() method should be used to monitor the parsing depth and limit it if desired.

    -

    Definition at line 108 of file parser-inl.h.

    +

    Definition at line 121 of file parser-inl.h.

    @@ -508,7 +508,7 @@ IMPORTANT: string_view lifetime
    Returns
    A string_view pointing at the unescaped string in dst @error STRING_ERROR if escapes are incorrect.
    -

    Definition at line 120 of file parser-inl.h.

    +

    Definition at line 133 of file parser-inl.h.

    @@ -562,7 +562,7 @@ IMPORTANT: string_view lifetime
    Returns
    A string_view pointing at the unescaped string in dst @error STRING_ERROR if escapes are incorrect.
    -

    Definition at line 128 of file parser-inl.h.

    +

    Definition at line 141 of file parser-inl.h.

    diff --git a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html index 0a99cc851..55db2daad 100644 --- a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html +++ b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html @@ -145,7 +145,7 @@ static simdjson_inline bool <

    The raw_json_string is unescaped. If you wish to write an unescaped version of it to your own buffer, you may do so using the parser.unescape(string, buff) method, using an ondemand::parser instance. Doing so requires you to have a sufficiently large buffer.

    The raw_json_string instances originate typically from field instance which in turn represent key-value pairs from object instances. From a field instance, you get the raw_json_string instance by calling key(). You can, if you want a more usable string_view instance, call the unescaped_key() method on the field instance. You may also create a raw_json_string from any other string value, with the value.get_raw_json_string() method. Again, you can get a more usable string_view instance by calling get_string().

    -

    Definition at line 34 of file raw_json_string.h.

    +

    Definition at line 36 of file raw_json_string.h.

    Constructor & Destructor Documentation

    ◆ raw_json_string() [1/2]

    @@ -203,7 +203,7 @@ static simdjson_inline bool <

    The given location must be just after the beginning quote (") in the JSON file.

    It must be terminated by a ", and be a valid JSON string.

    -

    Definition at line 6 of file raw_json_string-inl.h.

    +

    Definition at line 16 of file raw_json_string-inl.h.

    @@ -235,7 +235,7 @@ static simdjson_inline bool <

    Returns true if target is free from unescaped quote.

    If target is known at compile-time, we might expect the computation to happen at compile time with many compilers (not all!).

    -

    Definition at line 11 of file raw_json_string-inl.h.

    +

    Definition at line 21 of file raw_json_string-inl.h.

    @@ -265,7 +265,7 @@ static simdjson_inline bool <

    Get the raw pointer to the beginning of the string in the JSON (just after the ").

    It is possible for this function to return a null pointer if the instance has outlived its existence.

    -

    Definition at line 8 of file raw_json_string-inl.h.

    +

    Definition at line 18 of file raw_json_string-inl.h.

    @@ -298,7 +298,7 @@ static simdjson_inline bool <

    If target is a compile-time constant, and your compiler likes you, you should be able to do the following without performance penalty...

    static_assert(raw_json_string::is_free_from_unescaped_quote(target), ""); s.unsafe_is_equal(target);

    -

    Definition at line 92 of file raw_json_string-inl.h.

    +

    Definition at line 102 of file raw_json_string-inl.h.

    @@ -341,7 +341,7 @@ static simdjson_inline bool <

    The std::string_view instance may contain any characters. However, the caller is responsible for setting length so that length bytes may be read in the raw_json_string.

    Performance: the comparison may be done using memcmp which may be efficient for long strings.

    -

    Definition at line 48 of file raw_json_string-inl.h.

    +

    Definition at line 58 of file raw_json_string-inl.h.

    @@ -375,7 +375,7 @@ static simdjson_inline bool <

    If target is a compile-time constant, and your compiler likes you, you should be able to do the following without performance penalty...

    static_assert(raw_json_string::is_free_from_unescaped_quote(target), ""); s.unsafe_is_equal(target);

    -

    Definition at line 53 of file raw_json_string-inl.h.

    +

    Definition at line 63 of file raw_json_string-inl.h.

    diff --git a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html index 4b49ce2d2..67c09511b 100644 --- a/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html +++ b/classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html @@ -222,7 +222,7 @@ simdjson_inline sim simdjson_inline simdjson_result< bool > is_integer () noexcept  Checks whether the value is an integer number. More...
      -simdjson_inline simdjson_result< number_typeget_number_type () noexcept +simdjson_inline simdjson_result< number_typeget_number_type () noexcept  Determine the number type (integer or floating-point number) as quickly as possible. More...
      simdjson_warn_unused simdjson_inline simdjson_result< numberget_number () noexcept @@ -281,7 +281,7 @@ value_iterator iter {}

    An ephemeral JSON value returned during iteration.

    It is only valid for as long as you do not access more data in the JSON document.

    -

    Definition at line 17 of file value.h.

    +

    Definition at line 18 of file value.h.

    Constructor & Destructor Documentation

    ◆ value()

    @@ -343,7 +343,7 @@ value_iterator iter {} -

    Definition at line 127 of file value-inl.h.

    +

    Definition at line 141 of file value-inl.h.

    @@ -389,7 +389,7 @@ value_iterator iter {} -

    Definition at line 190 of file value-inl.h.

    +

    Definition at line 204 of file value-inl.h.

    @@ -420,7 +420,7 @@ value_iterator iter {}

    Part of the std::iterable interface.

    Returns
    INCORRECT_TYPE If the JSON value is not an array.
    -

    Definition at line 104 of file value-inl.h.

    +

    Definition at line 118 of file value-inl.h.

    @@ -451,7 +451,7 @@ value_iterator iter {}

    The count_elements method should always be called before you have begun iterating through the array: it is expected that you are pointing at the beginning of the array. The runtime complexity is linear in the size of the array. After calling this function, if successful, the array is 'rewinded' at its beginning as if it had never been accessed. If the JSON is malformed (e.g., there is a missing comma), then an error is returned and it is no longer safe to continue.

    Performance hint: You should only call count_elements() as a last resort as it may require scanning the document twice or more.

    -

    Definition at line 110 of file value-inl.h.

    +

    Definition at line 124 of file value-inl.h.

    @@ -483,7 +483,7 @@ value_iterator iter {}

    To check that an object is empty, it is more performant to use the is_empty() method on the object instance.

    Performance hint: You should only call count_fields() as a last resort as it may require scanning the document twice or more.

    -

    Definition at line 120 of file value-inl.h.

    +

    Definition at line 134 of file value-inl.h.

    @@ -513,7 +513,7 @@ value_iterator iter {}

    Returns the current depth in the document if in bounds.

    E.g., 0 = finished with document 1 = document root value (could be [ or {, not yet known) 2 = , or } inside root array/object 3 = key or value inside root array/object.

    -

    Definition at line 186 of file value-inl.h.

    +

    Definition at line 200 of file value-inl.h.

    @@ -543,7 +543,7 @@ value_iterator iter {}

    Sentinel representing the end of the array.

    Part of the std::iterable interface.

    -

    Definition at line 107 of file value-inl.h.

    +

    Definition at line 121 of file value-inl.h.

    @@ -590,7 +590,7 @@ value_iterator iter {}
    Returns
    The value of the field, or NO_SUCH_FIELD if the field is not in the object.

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    -

    Definition at line 132 of file value-inl.h.

    +

    Definition at line 146 of file value-inl.h.

    @@ -632,7 +632,7 @@ value_iterator iter {}
    Returns
    The value of the field, or NO_SUCH_FIELD if the field is not in the object.

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    -

    Definition at line 139 of file value-inl.h.

    +

    Definition at line 153 of file value-inl.h.

    @@ -668,7 +668,7 @@ template<typename T >
    INCORRECT_TYPE If the JSON value is not the given type.
    -

    Definition at line 37 of file value.h.

    +

    Definition at line 38 of file value.h.

    @@ -710,7 +710,7 @@ template<typename T >
    SUCCESS If the parse succeeded and the out parameter was set to the value.
    -

    Definition at line 73 of file value-inl.h.

    +

    Definition at line 87 of file value-inl.h.

    @@ -742,7 +742,7 @@ SUCCESS If the parse succeeded and the out parameter was set to the value.
    INCORRECT_TYPE If the JSON value is not an array.
    -

    Definition at line 16 of file value-inl.h.

    +

    Definition at line 30 of file value-inl.h.

    @@ -774,7 +774,7 @@ INCORRECT_TYPE If the JSON value is not an array.
    INCORRECT_TYPE if the JSON value is not true or false.
    -

    Definition at line 57 of file value-inl.h.

    +

    Definition at line 71 of file value-inl.h.

    @@ -806,7 +806,7 @@ INCORRECT_TYPE if the JSON value is not true or false.
    INCORRECT_TYPE If the JSON value is not a valid floating-point number.
    -

    Definition at line 39 of file value-inl.h.

    +

    Definition at line 53 of file value-inl.h.

    @@ -838,7 +838,7 @@ INCORRECT_TYPE If the JSON value is not a valid floating-point number. INCORRECT_TYPE If the JSON value is not a valid floating-point number. -

    Definition at line 42 of file value-inl.h.

    +

    Definition at line 56 of file value-inl.h.

    @@ -870,7 +870,7 @@ INCORRECT_TYPE If the JSON value is not a valid floating-point number. INCORRECT_TYPE If the JSON value is not a 64-bit integer. -

    Definition at line 51 of file value-inl.h.

    +

    Definition at line 65 of file value-inl.h.

    @@ -902,7 +902,7 @@ INCORRECT_TYPE If the JSON value is not a 64-bit integer.
    INCORRECT_TYPE If the JSON value is not a 64-bit integer.
    -

    Definition at line 54 of file value-inl.h.

    +

    Definition at line 68 of file value-inl.h.

    @@ -937,7 +937,7 @@ INCORRECT_TYPE If the JSON value is not a 64-bit integer.

    You must check the type before accessing the value: it is an error to call "get_int64()" when number.get_number_type() is not number_type::signed_integer and when number.is_int64() is false.

    Performance note: this is designed with performance in mind. When calling 'get_number()', you scan the number string only once, determining efficiently the type and storing it in an efficient manner.

    -

    Definition at line 174 of file value-inl.h.

    +

    Definition at line 188 of file value-inl.h.

    @@ -951,7 +951,7 @@ INCORRECT_TYPE If the JSON value is not a 64-bit integer. - + @@ -971,7 +971,7 @@ INCORRECT_TYPE If the JSON value is not a 64-bit integer.

    This function requires processing the number string, but it is expected to be faster than get_number().get_number_type() because it is does not parse the number value.

    Returns
    the type of the number
    -

    Definition at line 171 of file value-inl.h.

    +

    Definition at line 185 of file value-inl.h.

    @@ -1003,7 +1003,7 @@ INCORRECT_TYPE If the JSON value is not a 64-bit integer.
    INCORRECT_TYPE If the JSON value is not an object.
    -

    Definition at line 19 of file value-inl.h.

    +

    Definition at line 33 of file value-inl.h.

    @@ -1037,7 +1037,7 @@ INCORRECT_TYPE If the JSON value is not an object.
    INCORRECT_TYPE if the JSON value is not a string.
    -

    Definition at line 30 of file value-inl.h.

    +

    Definition at line 44 of file value-inl.h.

    @@ -1073,7 +1073,7 @@ INCORRECT_TYPE if the JSON value is not a string.
    INCORRECT_TYPE if the JSON value is not a string.
    -

    Definition at line 33 of file value-inl.h.

    +

    Definition at line 47 of file value-inl.h.

    @@ -1105,7 +1105,7 @@ INCORRECT_TYPE if the JSON value is not a string.
    INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer.
    -

    Definition at line 45 of file value-inl.h.

    +

    Definition at line 59 of file value-inl.h.

    @@ -1137,7 +1137,7 @@ INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer.
    INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer.
    -

    Definition at line 48 of file value-inl.h.

    +

    Definition at line 62 of file value-inl.h.

    @@ -1171,7 +1171,7 @@ INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer.
    INCORRECT_TYPE if the JSON value is not a string.
    -

    Definition at line 36 of file value-inl.h.

    +

    Definition at line 50 of file value-inl.h.

    @@ -1203,7 +1203,7 @@ INCORRECT_TYPE if the JSON value is not a string.

    Performance note: if you call this function systematically before parsing a number, you may have fallen for a performance anti-pattern.

    Returns
    true if the number if negative.
    -

    Definition at line 168 of file value-inl.h.

    +

    Definition at line 182 of file value-inl.h.

    @@ -1233,7 +1233,7 @@ INCORRECT_TYPE if the JSON value is not a string.

    Checks whether the value is a negative number.

    Returns
    true if the number if negative.
    -

    Definition at line 164 of file value-inl.h.

    +

    Definition at line 178 of file value-inl.h.

    @@ -1266,7 +1266,7 @@ INCORRECT_TYPE if the JSON value is not a string.
    INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'.
    -

    Definition at line 60 of file value-inl.h.

    +

    Definition at line 74 of file value-inl.h.

    @@ -1297,7 +1297,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'.

    Returns false when there it is an array or object.

    Returns
    true if the type is string, number, null, Boolean @error TAPE_ERROR when the JSON value is a bad token like "}" "," or "alse".
    -

    Definition at line 157 of file value-inl.h.

    +

    Definition at line 171 of file value-inl.h.

    @@ -1333,7 +1333,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

    Definition at line 78 of file value-inl.h.

    +

    Definition at line 92 of file value-inl.h.

    @@ -1369,7 +1369,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

    Definition at line 99 of file value-inl.h.

    +

    Definition at line 113 of file value-inl.h.

    @@ -1405,7 +1405,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

    Definition at line 90 of file value-inl.h.

    +

    Definition at line 104 of file value-inl.h.

    @@ -1441,7 +1441,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

    Definition at line 87 of file value-inl.h.

    +

    Definition at line 101 of file value-inl.h.

    @@ -1477,7 +1477,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

    Definition at line 81 of file value-inl.h.

    +

    Definition at line 95 of file value-inl.h.

    @@ -1515,7 +1515,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

    Definition at line 96 of file value-inl.h.

    +

    Definition at line 110 of file value-inl.h.

    @@ -1553,7 +1553,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

    Definition at line 93 of file value-inl.h.

    +

    Definition at line 107 of file value-inl.h.

    @@ -1589,7 +1589,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. -

    Definition at line 84 of file value-inl.h.

    +

    Definition at line 98 of file value-inl.h.

    @@ -1630,7 +1630,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'.
  • null
  • -

    Definition at line 178 of file value-inl.h.

    +

    Definition at line 192 of file value-inl.h.

    @@ -1661,7 +1661,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'.

    Start a value at the current position.

    (It should already be started; this is just a self-documentation method.)

    -

    Definition at line 9 of file value-inl.h.

    +

    Definition at line 23 of file value-inl.h.

    @@ -1693,7 +1693,7 @@ INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'.

    NOTE: If you're only expecting a value to be one type (a typical case), it's generally better to just call .get_double, .get_string, etc. and check for INCORRECT_TYPE (or just let it throw an exception).

    Returns
    The type of JSON value (json_type::array, json_type::object, json_type::string, json_type::number, json_type::boolean, or json_type::null). @error TAPE_ERROR when the JSON value is a bad token like "}" "," or "alse".
    -

    Definition at line 153 of file value-inl.h.

    +

    Definition at line 167 of file value-inl.h.

    diff --git a/classsimdjson_1_1dom_1_1array.html b/classsimdjson_1_1dom_1_1array.html index 5dd3713bb..5d110c328 100644 --- a/classsimdjson_1_1dom_1_1array.html +++ b/classsimdjson_1_1dom_1_1array.html @@ -132,7 +132,7 @@ simdjson_inline 
    simdjson_warn_unused simdjson_inline simdjson_result< number_type > simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_number_type simdjson_warn_unused simdjson_inline simdjson_result< number_type > simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_number_type ( )

    Detailed Description

    JSON array.

    -

    Definition at line 22 of file array.h.

    +

    Definition at line 13 of file array.h.

    Member Function Documentation

    ◆ at()

    @@ -167,7 +167,7 @@ simdjson_inline 
    -

    Definition at line 112 of file array-inl.h.

    +

    Definition at line 115 of file array-inl.h.

    @@ -206,7 +206,7 @@ simdjson_inline 
    -

    Definition at line 71 of file array-inl.h.

    +

    Definition at line 74 of file array-inl.h.

    @@ -236,7 +236,7 @@ simdjson_inline 
    Return the first array element.

    Part of the std::iterable interface.

    -

    Definition at line 55 of file array-inl.h.

    +

    Definition at line 58 of file array-inl.h.

    @@ -266,7 +266,7 @@ simdjson_inline 
    One past the last array element.

    Part of the std::iterable interface.

    -

    Definition at line 59 of file array-inl.h.

    +

    Definition at line 62 of file array-inl.h.

    @@ -297,7 +297,7 @@ simdjson_inline 
    Note that this is not the same thing as size(), which reports the number of actual elements within an array (not counting its children).

    Since an element can use 1 or 2 slots on the tape, you can only use this to figure out the total size of an array (including its children, recursively) if you know its structure ahead of time.

    -

    Definition at line 67 of file array-inl.h.

    +

    Definition at line 70 of file array-inl.h.

    @@ -327,7 +327,7 @@ simdjson_inline 
    Get the size of the array (number of immediate children).

    It is a saturated value with a maximum of 0xFFFFFF: if the value is 0xFFFFFF then the size is 0xFFFFFF or greater.

    -

    Definition at line 63 of file array-inl.h.

    +

    Definition at line 66 of file array-inl.h.

    @@ -340,7 +340,7 @@ simdjson_inline 
    diff --git a/classsimdjson_1_1dom_1_1array_1_1iterator.html b/classsimdjson_1_1dom_1_1array_1_1iterator.html index e8dbececf..e3dc5e326 100644 --- a/classsimdjson_1_1dom_1_1array_1_1iterator.html +++ b/classsimdjson_1_1dom_1_1array_1_1iterator.html @@ -144,7 +144,7 @@ bool operator> (con

    Detailed Description

    -

    Definition at line 27 of file array.h.

    +

    Definition at line 18 of file array.h.

    Member Function Documentation

    ◆ operator!=()

    @@ -173,7 +173,7 @@ bool operator> (con

    Check if these values come from the same place in the JSON.

    Part of the std::iterator interface.

    -

    Definition at line 138 of file array-inl.h.

    +

    Definition at line 141 of file array-inl.h.

    @@ -203,7 +203,7 @@ bool operator> (con

    Get the next value.

    Part of the std::iterator interface.

    -

    Definition at line 129 of file array-inl.h.

    +

    Definition at line 132 of file array-inl.h.

    @@ -234,7 +234,7 @@ bool operator> (con

    Get the next value.

    Part of the std::iterator interface.

    -

    Definition at line 133 of file array-inl.h.

    +

    Definition at line 136 of file array-inl.h.

    @@ -247,7 +247,7 @@ bool operator> (con diff --git a/classsimdjson_1_1dom_1_1document.html b/classsimdjson_1_1dom_1_1document.html index 3ed5bd9b7..6706c9d6a 100644 --- a/classsimdjson_1_1dom_1_1document.html +++ b/classsimdjson_1_1dom_1_1document.html @@ -118,7 +118,7 @@ Public Member Functions

    A parsed JSON document.

    This class cannot be copied, only moved, to avoid unintended allocations.

    -

    Definition at line 18 of file document.h.

    +

    Definition at line 16 of file document.h.

    Constructor & Destructor Documentation

    ◆ document() [1/2]

    @@ -226,7 +226,7 @@ Public Member Functions diff --git a/classsimdjson_1_1dom_1_1document__stream.html b/classsimdjson_1_1dom_1_1document__stream.html index dcff5f614..02d5fe00b 100644 --- a/classsimdjson_1_1dom_1_1document__stream.html +++ b/classsimdjson_1_1dom_1_1document__stream.html @@ -138,7 +138,7 @@ simdjson_inline

    A forward-only stream of documents.

    Produced by parser::parse_many.

    -

    Definition at line 73 of file document_stream.h.

    +

    Definition at line 72 of file document_stream.h.

    Constructor & Destructor Documentation

    ◆ document_stream()

    @@ -167,10 +167,10 @@ simdjson_inline
    {c++}
    error = parser.parse_many(json).get(docs);
    -
    simdjson_inline document_stream() noexcept
    Construct an uninitialized document_stream.
    -
    simdjson_result< document_stream > parse_many(const uint8_t *buf, size_t len, size_t batch_size=dom::DEFAULT_BATCH_SIZE) noexcept
    Parse a buffer containing many JSON documents.
    Definition: parser-inl.h:155
    +
    simdjson_inline document_stream() noexcept
    Construct an uninitialized document_stream.
    +
    simdjson_result< document_stream > parse_many(const uint8_t *buf, size_t len, size_t batch_size=dom::DEFAULT_BATCH_SIZE) noexcept
    Parse a buffer containing many JSON documents.
    Definition: parser-inl.h:157
    -

    Definition at line 106 of file document_stream-inl.h.

    +

    Definition at line 108 of file document_stream-inl.h.

    @@ -203,7 +203,7 @@ simdjson_inline truncated_bytes() after streaming through all documents, like so:

    document_stream stream = parser.parse_many(json,window); for(auto doc : stream) { // do something with doc } size_t truncated = stream.truncated_bytes();

    -

    Definition at line 258 of file document_stream-inl.h.

    +

    Definition at line 260 of file document_stream-inl.h.

    @@ -216,7 +216,7 @@ simdjson_inline diff --git a/classsimdjson_1_1dom_1_1document__stream_1_1iterator.html b/classsimdjson_1_1dom_1_1document__stream_1_1iterator.html index 9bfdca970..f243e4463 100644 --- a/classsimdjson_1_1dom_1_1document__stream_1_1iterator.html +++ b/classsimdjson_1_1dom_1_1document__stream_1_1iterator.html @@ -135,7 +135,7 @@ simdjson_inline ref

    Detailed Description

    An iterator through a forward-only stream of documents.

    -

    Definition at line 116 of file document_stream.h.

    +

    Definition at line 115 of file document_stream.h.

    Member Function Documentation

    ◆ operator!=()

    @@ -169,7 +169,7 @@ simdjson_inline ref -

    Definition at line 179 of file document_stream-inl.h.

    +

    Definition at line 181 of file document_stream-inl.h.

    @@ -182,7 +182,7 @@ simdjson_inline ref diff --git a/classsimdjson_1_1dom_1_1element.html b/classsimdjson_1_1dom_1_1element.html index 38ffef220..3e9dac2c5 100644 --- a/classsimdjson_1_1dom_1_1element.html +++ b/classsimdjson_1_1dom_1_1element.html @@ -105,7 +105,7 @@ simdjson_inline  Create a new, invalid element.
     
    -simdjson_inline element_type type () const noexcept +simdjson_inline element_type type () const noexcept  The type of this element.
      simdjson_result< arrayget_array () const noexcept @@ -271,7 +271,7 @@ template<>

    A JSON element.

    References an element in a JSON document, representing a JSON null, boolean, string, number, array or object.

    -

    Definition at line 40 of file element.h.

    +

    Definition at line 31 of file element.h.

    Member Function Documentation

    ◆ at() [1/2]

    @@ -309,7 +309,7 @@ template<> -

    Definition at line 391 of file element-inl.h.

    +

    Definition at line 392 of file element-inl.h.

    @@ -343,7 +343,7 @@ template<> -

    Definition at line 398 of file element-inl.h.

    +

    Definition at line 399 of file element-inl.h.

    @@ -381,7 +381,7 @@ template<> -

    Definition at line 401 of file element-inl.h.

    +

    Definition at line 402 of file element-inl.h.

    @@ -416,7 +416,7 @@ template<> -

    Definition at line 404 of file element-inl.h.

    +

    Definition at line 405 of file element-inl.h.

    @@ -457,7 +457,7 @@ template<> -

    Definition at line 372 of file element-inl.h.

    +

    Definition at line 373 of file element-inl.h.

    @@ -493,7 +493,7 @@ template<> -

    Definition at line 356 of file element-inl.h.

    +

    Definition at line 357 of file element-inl.h.

    @@ -529,7 +529,7 @@ template<> -

    Definition at line 359 of file element-inl.h.

    +

    Definition at line 360 of file element-inl.h.

    @@ -575,7 +575,7 @@ template<typename T >
    Returns
    The value cast to the given type, or: INCORRECT_TYPE if the value cannot be cast to the given type.
    -

    Definition at line 220 of file element.h.

    +

    Definition at line 211 of file element.h.

    @@ -627,7 +627,7 @@ template<typename T >
    Returns
    The error that occurred, or SUCCESS if there was no error.
    -

    Definition at line 303 of file element-inl.h.

    +

    Definition at line 304 of file element-inl.h.

    @@ -657,7 +657,7 @@ template<typename T >

    Cast this element to an array.

    Returns
    An object that can be used to iterate the array, or: INCORRECT_TYPE if the JSON element is not an array.
    -

    Definition at line 283 of file element-inl.h.

    +

    Definition at line 284 of file element-inl.h.

    @@ -687,7 +687,7 @@ template<typename T >

    Cast this element to a bool.

    Returns
    A bool value. Returns INCORRECT_TYPE if the JSON element is not a boolean.
    -

    Definition at line 194 of file element-inl.h.

    +

    Definition at line 195 of file element-inl.h.

    @@ -720,7 +720,7 @@ template<typename T >

    It is possible to get a single string_view instance which represents both the string content and its length: see get_string().

    Returns
    A pointer to a null-terminated UTF-8 string. This string is stored in the parser and will be invalidated the next time it parses a document or when it is destroyed. Returns INCORRECT_TYPE if the JSON element is not a string.
    -

    Definition at line 203 of file element-inl.h.

    +

    Definition at line 204 of file element-inl.h.

    @@ -750,7 +750,7 @@ template<typename T >

    Cast this element to a double floating-point.

    Returns
    A double value. Returns INCORRECT_TYPE if the JSON element is not a number.
    -

    Definition at line 261 of file element-inl.h.

    +

    Definition at line 262 of file element-inl.h.

    @@ -780,7 +780,7 @@ template<typename T >

    Cast this element to a signed integer.

    Returns
    A signed 64-bit integer. Returns INCORRECT_TYPE if the JSON element is not an integer, or NUMBER_OUT_OF_RANGE if it is negative.
    -

    Definition at line 246 of file element-inl.h.

    +

    Definition at line 247 of file element-inl.h.

    @@ -810,7 +810,7 @@ template<typename T >

    Cast this element to an object.

    Returns
    An object that can be used to look up or iterate the object's fields, or: INCORRECT_TYPE if the JSON element is not an object.
    -

    Definition at line 292 of file element-inl.h.

    +

    Definition at line 293 of file element-inl.h.

    @@ -841,7 +841,7 @@ template<typename T >

    The string is guaranteed to be valid UTF-8.

    Returns
    An UTF-8 string. The string is stored in the parser and will be invalidated the next time it parses a document or when it is destroyed. Returns INCORRECT_TYPE if the JSON element is not a string.
    -

    Definition at line 223 of file element-inl.h.

    +

    Definition at line 224 of file element-inl.h.

    @@ -872,7 +872,7 @@ template<typename T >

    It is possible to get a single string_view instance which represents both the string content and its length: see get_string().

    Returns
    A string length in bytes. Returns INCORRECT_TYPE if the JSON element is not a string.
    -

    Definition at line 213 of file element-inl.h.

    +

    Definition at line 214 of file element-inl.h.

    @@ -902,7 +902,7 @@ template<typename T >

    Cast this element to an unsigned integer.

    Returns
    An unsigned 64-bit integer. Returns INCORRECT_TYPE if the JSON element is not an integer, or NUMBER_OUT_OF_RANGE if it is too large.
    -

    Definition at line 232 of file element-inl.h.

    +

    Definition at line 233 of file element-inl.h.

    @@ -943,7 +943,7 @@ template<typename T > -

    Definition at line 318 of file element-inl.h.

    +

    Definition at line 319 of file element-inl.h.

    @@ -973,7 +973,7 @@ template<typename T >

    Whether this element is a json array.

    Equivalent to is<array>().

    -

    Definition at line 332 of file element-inl.h.

    +

    Definition at line 333 of file element-inl.h.

    @@ -1003,7 +1003,7 @@ template<typename T >

    Whether this element is a json true or false.

    Equivalent to is<bool>().

    -

    Definition at line 338 of file element-inl.h.

    +

    Definition at line 339 of file element-inl.h.

    @@ -1033,7 +1033,7 @@ template<typename T >

    Whether this element is a json number that fits in a double.

    Equivalent to is<double>().

    -

    Definition at line 337 of file element-inl.h.

    +

    Definition at line 338 of file element-inl.h.

    @@ -1063,7 +1063,7 @@ template<typename T >

    Whether this element is a json number that fits in a signed 64-bit integer.

    Equivalent to is<int64_t>().

    -

    Definition at line 335 of file element-inl.h.

    +

    Definition at line 336 of file element-inl.h.

    @@ -1093,7 +1093,7 @@ template<typename T >

    Whether this element is a json number.

    Both integers and floating points will return true.

    -

    Definition at line 339 of file element-inl.h.

    +

    Definition at line 340 of file element-inl.h.

    @@ -1123,7 +1123,7 @@ template<typename T >

    Whether this element is a json object.

    Equivalent to is<object>().

    -

    Definition at line 333 of file element-inl.h.

    +

    Definition at line 334 of file element-inl.h.

    @@ -1153,7 +1153,7 @@ template<typename T >

    Whether this element is a json string.

    Equivalent to is<std::string_view>() or is<const char *>().

    -

    Definition at line 334 of file element-inl.h.

    +

    Definition at line 335 of file element-inl.h.

    @@ -1183,7 +1183,7 @@ template<typename T >

    Whether this element is a json number that fits in an unsigned 64-bit integer.

    Equivalent to is<uint64_t>().

    -

    Definition at line 336 of file element-inl.h.

    +

    Definition at line 337 of file element-inl.h.

    @@ -1219,7 +1219,7 @@ template<typename T > -

    Definition at line 353 of file element-inl.h.

    +

    Definition at line 354 of file element-inl.h.

    @@ -1255,7 +1255,7 @@ template<typename T > -

    Definition at line 347 of file element-inl.h.

    +

    Definition at line 348 of file element-inl.h.

    @@ -1293,7 +1293,7 @@ template<typename T > -

    Definition at line 348 of file element-inl.h.

    +

    Definition at line 349 of file element-inl.h.

    @@ -1330,7 +1330,7 @@ template<typename T > -

    Definition at line 352 of file element-inl.h.

    +

    Definition at line 353 of file element-inl.h.

    @@ -1367,7 +1367,7 @@ template<typename T > -

    Definition at line 351 of file element-inl.h.

    +

    Definition at line 352 of file element-inl.h.

    @@ -1403,7 +1403,7 @@ template<typename T > -

    Definition at line 354 of file element-inl.h.

    +

    Definition at line 355 of file element-inl.h.

    @@ -1440,7 +1440,7 @@ template<typename T > -

    Definition at line 349 of file element-inl.h.

    +

    Definition at line 350 of file element-inl.h.

    @@ -1477,7 +1477,7 @@ template<typename T > -

    Definition at line 350 of file element-inl.h.

    +

    Definition at line 351 of file element-inl.h.

    @@ -1516,7 +1516,7 @@ template<typename T > -

    Definition at line 368 of file element-inl.h.

    +

    Definition at line 369 of file element-inl.h.

    @@ -1555,7 +1555,7 @@ template<typename T > -

    Definition at line 365 of file element-inl.h.

    +

    Definition at line 366 of file element-inl.h.

    @@ -1628,7 +1628,7 @@ template<typename T > diff --git a/classsimdjson_1_1dom_1_1key__value__pair.html b/classsimdjson_1_1dom_1_1key__value__pair.html index 224ce7aad..1d3d407c2 100644 --- a/classsimdjson_1_1dom_1_1key__value__pair.html +++ b/classsimdjson_1_1dom_1_1key__value__pair.html @@ -112,7 +112,7 @@ std::string_view 

    Detailed Description

    Key/value pair in an object.

    -

    Definition at line 222 of file object.h.

    +

    Definition at line 214 of file object.h.


    The documentation for this class was generated from the following files: -

    Definition at line 89 of file parser-inl.h.

    +

    Definition at line 91 of file parser-inl.h.

    @@ -493,7 +493,7 @@ Parser Capacity -

    Definition at line 96 of file parser-inl.h.

    +

    Definition at line 98 of file parser-inl.h.

    @@ -524,7 +524,7 @@ Parser Capacity

    The parser may reallocate internal buffers as needed up to this amount.

    Returns
    Maximum capacity, in bytes.
    -

    Definition at line 172 of file parser-inl.h.

    +

    Definition at line 174 of file parser-inl.h.

    @@ -554,7 +554,7 @@ Parser Capacity

    The maximum level of nested object and arrays supported by this parser.

    Returns
    Maximum depth, in bytes.
    -

    Definition at line 175 of file parser-inl.h.

    +

    Definition at line 177 of file parser-inl.h.

    @@ -665,7 +665,7 @@ Parser Capacity -

    Definition at line 138 of file parser-inl.h.

    +

    Definition at line 140 of file parser-inl.h.

    @@ -741,7 +741,7 @@ IMPORTANT: Document Lifetime -

    Definition at line 104 of file parser-inl.h.

    +

    Definition at line 106 of file parser-inl.h.

    @@ -829,7 +829,7 @@ Parser Capacity

    This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

    -

    Definition at line 155 of file parser-inl.h.

    +

    Definition at line 157 of file parser-inl.h.

    @@ -869,7 +869,7 @@ Parser Capacity -

    Definition at line 228 of file parser-inl.h.

    +

    Definition at line 230 of file parser-inl.h.

    @@ -883,7 +883,7 @@ Parser Capacity diff --git a/classsimdjson_1_1implementation.html b/classsimdjson_1_1implementation.html index 002c7c481..3494f1447 100644 --- a/classsimdjson_1_1implementation.html +++ b/classsimdjson_1_1implementation.html @@ -117,7 +117,7 @@ Public Member Functions

    An implementation of simdjson for a particular CPU architecture.

    Also used to maintain the currently active implementation. The active implementation is automatically initialized on first use to the most advanced implementation supported by the host.

    -

    Definition at line 51 of file implementation.h.

    +

    Definition at line 45 of file implementation.h.

    Member Function Documentation

    ◆ description()

    @@ -147,7 +147,7 @@ Public Member Functions cout << "simdjson is optimized for " << impl->name() << "(" << impl->description() << ")" << endl;
    Returns
    the description of the implementation, e.g. "Intel/AMD AVX2", "Intel/AMD SSE4.2", "ARM NEON".
    -

    Definition at line 72 of file implementation.h.

    +

    Definition at line 66 of file implementation.h.

    @@ -179,7 +179,7 @@ cout << "simdjson is optimized for " << impl->name() << "(" cout << "simdjson is optimized for " << impl->name() << "(" << impl->description() << ")" << endl;
    Returns
    the name of the implementation, e.g. "haswell", "westmere", "arm64".
    -

    Definition at line 62 of file implementation.h.

    +

    Definition at line 56 of file implementation.h.

    diff --git a/classsimdjson_1_1padded__string__view.html b/classsimdjson_1_1padded__string__view.html index b98e2e0ed..1de0e0925 100644 --- a/classsimdjson_1_1padded__string__view.html +++ b/classsimdjson_1_1padded__string__view.html @@ -187,7 +187,7 @@ size_t Definition at line 14 of file padded_string_view-inl.h.

    +

    Definition at line 8 of file padded_string_view-inl.h.

    @@ -224,7 +224,7 @@ size_t Definition at line 24 of file padded_string_view-inl.h.

    +

    Definition at line 18 of file padded_string_view-inl.h.

    @@ -271,7 +271,7 @@ size_t Definition at line 29 of file padded_string_view-inl.h.

    +

    Definition at line 23 of file padded_string_view-inl.h.

    diff --git a/common__defs_8h_source.html b/common__defs_8h_source.html index 400189965..d4f13ae30 100644 --- a/common__defs_8h_source.html +++ b/common__defs_8h_source.html @@ -95,296 +95,313 @@ $(document).ready(function(){initNavTree('common__defs_8h_source.html',''); init
    2 #define SIMDJSON_COMMON_DEFS_H
    3 
    4 #include <cassert>
    -
    5 #include "simdjson/portability.h"
    -
    6 
    -
    7 namespace simdjson {
    -
    8 
    +
    5 #include "simdjson/compiler_check.h"
    +
    6 #include "simdjson/portability.h"
    +
    7 
    +
    8 namespace simdjson {
    9 namespace internal {
    15 char *to_chars(char *first, const char *last, double value);
    21 double from_chars(const char *first) noexcept;
    22 double from_chars(const char *first, const char* end) noexcept;
    -
    23 
    -
    24 }
    -
    25 
    -
    26 #ifndef SIMDJSON_EXCEPTIONS
    -
    27 #if __cpp_exceptions
    -
    28 #define SIMDJSON_EXCEPTIONS 1
    -
    29 #else
    -
    30 #define SIMDJSON_EXCEPTIONS 0
    +
    23 }
    +
    24 
    +
    25 #ifndef SIMDJSON_EXCEPTIONS
    +
    26 #if __cpp_exceptions
    +
    27 #define SIMDJSON_EXCEPTIONS 1
    +
    28 #else
    +
    29 #define SIMDJSON_EXCEPTIONS 0
    +
    30 #endif
    31 #endif
    -
    32 #endif
    -
    33 
    -
    35 constexpr size_t SIMDJSON_MAXSIZE_BYTES = 0xFFFFFFFF;
    -
    36 
    -
    45 constexpr size_t SIMDJSON_PADDING = 64;
    -
    46 
    -
    52 constexpr size_t DEFAULT_MAX_DEPTH = 1024;
    +
    32 
    +
    33 } // namespace simdjson
    +
    34 
    +
    35 #if defined(__GNUC__)
    +
    36  // Marks a block with a name so that MCA analysis can see it.
    +
    37  #define SIMDJSON_BEGIN_DEBUG_BLOCK(name) __asm volatile("# LLVM-MCA-BEGIN " #name);
    +
    38  #define SIMDJSON_END_DEBUG_BLOCK(name) __asm volatile("# LLVM-MCA-END " #name);
    +
    39  #define SIMDJSON_DEBUG_BLOCK(name, block) BEGIN_DEBUG_BLOCK(name); block; END_DEBUG_BLOCK(name);
    +
    40 #else
    +
    41  #define SIMDJSON_BEGIN_DEBUG_BLOCK(name)
    +
    42  #define SIMDJSON_END_DEBUG_BLOCK(name)
    +
    43  #define SIMDJSON_DEBUG_BLOCK(name, block)
    +
    44 #endif
    +
    45 
    +
    46 // Align to N-byte boundary
    +
    47 #define SIMDJSON_ROUNDUP_N(a, n) (((a) + ((n)-1)) & ~((n)-1))
    +
    48 #define SIMDJSON_ROUNDDOWN_N(a, n) ((a) & ~((n)-1))
    +
    49 
    +
    50 #define SIMDJSON_ISALIGNED_N(ptr, n) (((uintptr_t)(ptr) & ((n)-1)) == 0)
    +
    51 
    +
    52 #if SIMDJSON_REGULAR_VISUAL_STUDIO
    53 
    -
    54 } // namespace simdjson
    -
    55 
    -
    56 #if defined(__GNUC__)
    -
    57  // Marks a block with a name so that MCA analysis can see it.
    -
    58  #define SIMDJSON_BEGIN_DEBUG_BLOCK(name) __asm volatile("# LLVM-MCA-BEGIN " #name);
    -
    59  #define SIMDJSON_END_DEBUG_BLOCK(name) __asm volatile("# LLVM-MCA-END " #name);
    -
    60  #define SIMDJSON_DEBUG_BLOCK(name, block) BEGIN_DEBUG_BLOCK(name); block; END_DEBUG_BLOCK(name);
    -
    61 #else
    -
    62  #define SIMDJSON_BEGIN_DEBUG_BLOCK(name)
    -
    63  #define SIMDJSON_END_DEBUG_BLOCK(name)
    -
    64  #define SIMDJSON_DEBUG_BLOCK(name, block)
    -
    65 #endif
    +
    54  #define simdjson_really_inline __forceinline
    +
    55  #define simdjson_never_inline __declspec(noinline)
    +
    56 
    +
    57  #define simdjson_unused
    +
    58  #define simdjson_warn_unused
    +
    59 
    +
    60  #ifndef simdjson_likely
    +
    61  #define simdjson_likely(x) x
    +
    62  #endif
    +
    63  #ifndef simdjson_unlikely
    +
    64  #define simdjson_unlikely(x) x
    +
    65  #endif
    66 
    -
    67 // Align to N-byte boundary
    -
    68 #define SIMDJSON_ROUNDUP_N(a, n) (((a) + ((n)-1)) & ~((n)-1))
    -
    69 #define SIMDJSON_ROUNDDOWN_N(a, n) ((a) & ~((n)-1))
    -
    70 
    -
    71 #define SIMDJSON_ISALIGNED_N(ptr, n) (((uintptr_t)(ptr) & ((n)-1)) == 0)
    -
    72 
    -
    73 #if SIMDJSON_REGULAR_VISUAL_STUDIO
    -
    74 
    -
    75  #define simdjson_really_inline __forceinline
    -
    76  #define simdjson_never_inline __declspec(noinline)
    -
    77 
    -
    78  #define simdjson_unused
    -
    79  #define simdjson_warn_unused
    -
    80 
    -
    81  #ifndef simdjson_likely
    -
    82  #define simdjson_likely(x) x
    -
    83  #endif
    -
    84  #ifndef simdjson_unlikely
    -
    85  #define simdjson_unlikely(x) x
    -
    86  #endif
    -
    87 
    -
    88  #define SIMDJSON_PUSH_DISABLE_WARNINGS __pragma(warning( push ))
    -
    89  #define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS __pragma(warning( push, 0 ))
    -
    90  #define SIMDJSON_DISABLE_VS_WARNING(WARNING_NUMBER) __pragma(warning( disable : WARNING_NUMBER ))
    -
    91  // Get rid of Intellisense-only warnings (Code Analysis)
    -
    92  // Though __has_include is C++17, it is supported in Visual Studio 2017 or better (_MSC_VER>=1910).
    -
    93  #ifdef __has_include
    -
    94  #if __has_include(<CppCoreCheck\Warnings.h>)
    -
    95  #include <CppCoreCheck\Warnings.h>
    -
    96  #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_VS_WARNING(ALL_CPPCORECHECK_WARNINGS)
    -
    97  #endif
    -
    98  #endif
    -
    99 
    -
    100  #ifndef SIMDJSON_DISABLE_UNDESIRED_WARNINGS
    -
    101  #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS
    -
    102  #endif
    -
    103 
    -
    104  #define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_VS_WARNING(4996)
    -
    105  #define SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING
    -
    106  #define SIMDJSON_POP_DISABLE_WARNINGS __pragma(warning( pop ))
    -
    107 
    -
    108 #else // SIMDJSON_REGULAR_VISUAL_STUDIO
    -
    109 
    -
    110  #define simdjson_really_inline inline __attribute__((always_inline))
    -
    111  #define simdjson_never_inline inline __attribute__((noinline))
    -
    112 
    -
    113  #define simdjson_unused __attribute__((unused))
    -
    114  #define simdjson_warn_unused __attribute__((warn_unused_result))
    -
    115 
    -
    116  #ifndef simdjson_likely
    -
    117  #define simdjson_likely(x) __builtin_expect(!!(x), 1)
    -
    118  #endif
    -
    119  #ifndef simdjson_unlikely
    -
    120  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
    -
    121  #endif
    -
    122 
    -
    123  #define SIMDJSON_PUSH_DISABLE_WARNINGS _Pragma("GCC diagnostic push")
    -
    124  // gcc doesn't seem to disable all warnings with all and extra, add warnings here as necessary
    -
    125  // We do it separately for clang since it has different warnings.
    -
    126  #ifdef __clang__
    -
    127  // clang is missing -Wmaybe-uninitialized.
    -
    128  #define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS SIMDJSON_PUSH_DISABLE_WARNINGS \
    -
    129  SIMDJSON_DISABLE_GCC_WARNING(-Weffc++) \
    -
    130  SIMDJSON_DISABLE_GCC_WARNING(-Wall) \
    -
    131  SIMDJSON_DISABLE_GCC_WARNING(-Wconversion) \
    -
    132  SIMDJSON_DISABLE_GCC_WARNING(-Wextra) \
    -
    133  SIMDJSON_DISABLE_GCC_WARNING(-Wattributes) \
    -
    134  SIMDJSON_DISABLE_GCC_WARNING(-Wimplicit-fallthrough) \
    -
    135  SIMDJSON_DISABLE_GCC_WARNING(-Wnon-virtual-dtor) \
    -
    136  SIMDJSON_DISABLE_GCC_WARNING(-Wreturn-type) \
    -
    137  SIMDJSON_DISABLE_GCC_WARNING(-Wshadow) \
    -
    138  SIMDJSON_DISABLE_GCC_WARNING(-Wunused-parameter) \
    -
    139  SIMDJSON_DISABLE_GCC_WARNING(-Wunused-variable)
    -
    140  #else // __clang__
    -
    141  #define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS SIMDJSON_PUSH_DISABLE_WARNINGS \
    -
    142  SIMDJSON_DISABLE_GCC_WARNING(-Weffc++) \
    -
    143  SIMDJSON_DISABLE_GCC_WARNING(-Wall) \
    -
    144  SIMDJSON_DISABLE_GCC_WARNING(-Wconversion) \
    -
    145  SIMDJSON_DISABLE_GCC_WARNING(-Wextra) \
    -
    146  SIMDJSON_DISABLE_GCC_WARNING(-Wattributes) \
    -
    147  SIMDJSON_DISABLE_GCC_WARNING(-Wimplicit-fallthrough) \
    -
    148  SIMDJSON_DISABLE_GCC_WARNING(-Wnon-virtual-dtor) \
    -
    149  SIMDJSON_DISABLE_GCC_WARNING(-Wreturn-type) \
    -
    150  SIMDJSON_DISABLE_GCC_WARNING(-Wshadow) \
    -
    151  SIMDJSON_DISABLE_GCC_WARNING(-Wunused-parameter) \
    -
    152  SIMDJSON_DISABLE_GCC_WARNING(-Wunused-variable) \
    -
    153  SIMDJSON_DISABLE_GCC_WARNING(-Wmaybe-uninitialized) \
    -
    154  SIMDJSON_DISABLE_GCC_WARNING(-Wformat-security)
    -
    155  #endif // __clang__
    -
    156 
    -
    157  #define SIMDJSON_PRAGMA(P) _Pragma(#P)
    -
    158  #define SIMDJSON_DISABLE_GCC_WARNING(WARNING) SIMDJSON_PRAGMA(GCC diagnostic ignored #WARNING)
    -
    159  #if SIMDJSON_CLANG_VISUAL_STUDIO
    -
    160  #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include)
    -
    161  #else
    -
    162  #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS
    -
    163  #endif
    -
    164  #define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_GCC_WARNING(-Wdeprecated-declarations)
    -
    165  #define SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING SIMDJSON_DISABLE_GCC_WARNING(-Wstrict-overflow)
    -
    166  #define SIMDJSON_POP_DISABLE_WARNINGS _Pragma("GCC diagnostic pop")
    -
    167 
    -
    168 
    +
    67  #define SIMDJSON_PUSH_DISABLE_WARNINGS __pragma(warning( push ))
    +
    68  #define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS __pragma(warning( push, 0 ))
    +
    69  #define SIMDJSON_DISABLE_VS_WARNING(WARNING_NUMBER) __pragma(warning( disable : WARNING_NUMBER ))
    +
    70  // Get rid of Intellisense-only warnings (Code Analysis)
    +
    71  // Though __has_include is C++17, it is supported in Visual Studio 2017 or better (_MSC_VER>=1910).
    +
    72  #ifdef __has_include
    +
    73  #if __has_include(<CppCoreCheck\Warnings.h>)
    +
    74  #include <CppCoreCheck\Warnings.h>
    +
    75  #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_VS_WARNING(ALL_CPPCORECHECK_WARNINGS)
    +
    76  #endif
    +
    77  #endif
    +
    78 
    +
    79  #ifndef SIMDJSON_DISABLE_UNDESIRED_WARNINGS
    +
    80  #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS
    +
    81  #endif
    +
    82 
    +
    83  #define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_VS_WARNING(4996)
    +
    84  #define SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING
    +
    85  #define SIMDJSON_POP_DISABLE_WARNINGS __pragma(warning( pop ))
    +
    86 
    +
    87  #define SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS
    +
    88  #define SIMDJSON_POP_DISABLE_UNUSED_WARNINGS
    +
    89 
    +
    90 #else // SIMDJSON_REGULAR_VISUAL_STUDIO
    +
    91 
    +
    92  #define simdjson_really_inline inline __attribute__((always_inline))
    +
    93  #define simdjson_never_inline inline __attribute__((noinline))
    +
    94 
    +
    95  #define simdjson_unused __attribute__((unused))
    +
    96  #define simdjson_warn_unused __attribute__((warn_unused_result))
    +
    97 
    +
    98  #ifndef simdjson_likely
    +
    99  #define simdjson_likely(x) __builtin_expect(!!(x), 1)
    +
    100  #endif
    +
    101  #ifndef simdjson_unlikely
    +
    102  #define simdjson_unlikely(x) __builtin_expect(!!(x), 0)
    +
    103  #endif
    +
    104 
    +
    105  #define SIMDJSON_PUSH_DISABLE_WARNINGS _Pragma("GCC diagnostic push")
    +
    106  // gcc doesn't seem to disable all warnings with all and extra, add warnings here as necessary
    +
    107  // We do it separately for clang since it has different warnings.
    +
    108  #ifdef __clang__
    +
    109  // clang is missing -Wmaybe-uninitialized.
    +
    110  #define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS SIMDJSON_PUSH_DISABLE_WARNINGS \
    +
    111  SIMDJSON_DISABLE_GCC_WARNING(-Weffc++) \
    +
    112  SIMDJSON_DISABLE_GCC_WARNING(-Wall) \
    +
    113  SIMDJSON_DISABLE_GCC_WARNING(-Wconversion) \
    +
    114  SIMDJSON_DISABLE_GCC_WARNING(-Wextra) \
    +
    115  SIMDJSON_DISABLE_GCC_WARNING(-Wattributes) \
    +
    116  SIMDJSON_DISABLE_GCC_WARNING(-Wimplicit-fallthrough) \
    +
    117  SIMDJSON_DISABLE_GCC_WARNING(-Wnon-virtual-dtor) \
    +
    118  SIMDJSON_DISABLE_GCC_WARNING(-Wreturn-type) \
    +
    119  SIMDJSON_DISABLE_GCC_WARNING(-Wshadow) \
    +
    120  SIMDJSON_DISABLE_GCC_WARNING(-Wunused-parameter) \
    +
    121  SIMDJSON_DISABLE_GCC_WARNING(-Wunused-variable)
    +
    122  #else // __clang__
    +
    123  #define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS SIMDJSON_PUSH_DISABLE_WARNINGS \
    +
    124  SIMDJSON_DISABLE_GCC_WARNING(-Weffc++) \
    +
    125  SIMDJSON_DISABLE_GCC_WARNING(-Wall) \
    +
    126  SIMDJSON_DISABLE_GCC_WARNING(-Wconversion) \
    +
    127  SIMDJSON_DISABLE_GCC_WARNING(-Wextra) \
    +
    128  SIMDJSON_DISABLE_GCC_WARNING(-Wattributes) \
    +
    129  SIMDJSON_DISABLE_GCC_WARNING(-Wimplicit-fallthrough) \
    +
    130  SIMDJSON_DISABLE_GCC_WARNING(-Wnon-virtual-dtor) \
    +
    131  SIMDJSON_DISABLE_GCC_WARNING(-Wreturn-type) \
    +
    132  SIMDJSON_DISABLE_GCC_WARNING(-Wshadow) \
    +
    133  SIMDJSON_DISABLE_GCC_WARNING(-Wunused-parameter) \
    +
    134  SIMDJSON_DISABLE_GCC_WARNING(-Wunused-variable) \
    +
    135  SIMDJSON_DISABLE_GCC_WARNING(-Wmaybe-uninitialized) \
    +
    136  SIMDJSON_DISABLE_GCC_WARNING(-Wformat-security)
    +
    137  #endif // __clang__
    +
    138 
    +
    139  #define SIMDJSON_PRAGMA(P) _Pragma(#P)
    +
    140  #define SIMDJSON_DISABLE_GCC_WARNING(WARNING) SIMDJSON_PRAGMA(GCC diagnostic ignored #WARNING)
    +
    141  #if SIMDJSON_CLANG_VISUAL_STUDIO
    +
    142  #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include)
    +
    143  #else
    +
    144  #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS
    +
    145  #endif
    +
    146  #define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_GCC_WARNING(-Wdeprecated-declarations)
    +
    147  #define SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING SIMDJSON_DISABLE_GCC_WARNING(-Wstrict-overflow)
    +
    148  #define SIMDJSON_POP_DISABLE_WARNINGS _Pragma("GCC diagnostic pop")
    +
    149 
    +
    150  #define SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS SIMDJSON_PUSH_DISABLE_WARNINGS \
    +
    151  SIMDJSON_DISABLE_GCC_WARNING(-Wunused)
    +
    152  #define SIMDJSON_POP_DISABLE_UNUSED_WARNINGS SIMDJSON_POP_DISABLE_WARNINGS
    +
    153 
    +
    154 
    +
    155 
    +
    156 #endif // MSC_VER
    +
    157 
    +
    158 #if defined(simdjson_inline)
    +
    159  // Prefer the user's definition of simdjson_inline; don't define it ourselves.
    +
    160 #elif defined(__GNUC__) && !defined(__OPTIMIZE__)
    +
    161  // If optimizations are disabled, forcing inlining can lead to significant
    +
    162  // code bloat and high compile times. Don't use simdjson_really_inline for
    +
    163  // unoptimized builds.
    +
    164  #define simdjson_inline inline
    +
    165 #else
    +
    166  // Force inlining for most simdjson functions.
    +
    167  #define simdjson_inline simdjson_really_inline
    +
    168 #endif
    169 
    -
    170 #endif // MSC_VER
    -
    171 
    -
    172 #if defined(simdjson_inline)
    -
    173  // Prefer the user's definition of simdjson_inline; don't define it ourselves.
    -
    174 #elif defined(__GNUC__) && !defined(__OPTIMIZE__)
    -
    175  // If optimizations are disabled, forcing inlining can lead to significant
    -
    176  // code bloat and high compile times. Don't use simdjson_really_inline for
    -
    177  // unoptimized builds.
    -
    178  #define simdjson_inline inline
    -
    179 #else
    -
    180  // Force inlining for most simdjson functions.
    -
    181  #define simdjson_inline simdjson_really_inline
    -
    182 #endif
    -
    183 
    -
    184 #if SIMDJSON_VISUAL_STUDIO
    -
    200  #if SIMDJSON_BUILDING_WINDOWS_DYNAMIC_LIBRARY
    -
    201  // We set SIMDJSON_BUILDING_WINDOWS_DYNAMIC_LIBRARY when we build a DLL under Windows.
    -
    202  // It should never happen that both SIMDJSON_BUILDING_WINDOWS_DYNAMIC_LIBRARY and
    -
    203  // SIMDJSON_USING_WINDOWS_DYNAMIC_LIBRARY are set.
    -
    204  #define SIMDJSON_DLLIMPORTEXPORT __declspec(dllexport)
    -
    205  #elif SIMDJSON_USING_WINDOWS_DYNAMIC_LIBRARY
    -
    206  // Windows user who call a dynamic library should set SIMDJSON_USING_WINDOWS_DYNAMIC_LIBRARY to 1.
    -
    207  #define SIMDJSON_DLLIMPORTEXPORT __declspec(dllimport)
    -
    208  #else
    -
    209  // We assume by default static linkage
    +
    170 #if SIMDJSON_VISUAL_STUDIO
    +
    186  #if SIMDJSON_BUILDING_WINDOWS_DYNAMIC_LIBRARY
    +
    187  // We set SIMDJSON_BUILDING_WINDOWS_DYNAMIC_LIBRARY when we build a DLL under Windows.
    +
    188  // It should never happen that both SIMDJSON_BUILDING_WINDOWS_DYNAMIC_LIBRARY and
    +
    189  // SIMDJSON_USING_WINDOWS_DYNAMIC_LIBRARY are set.
    +
    190  #define SIMDJSON_DLLIMPORTEXPORT __declspec(dllexport)
    +
    191  #elif SIMDJSON_USING_WINDOWS_DYNAMIC_LIBRARY
    +
    192  // Windows user who call a dynamic library should set SIMDJSON_USING_WINDOWS_DYNAMIC_LIBRARY to 1.
    +
    193  #define SIMDJSON_DLLIMPORTEXPORT __declspec(dllimport)
    +
    194  #else
    +
    195  // We assume by default static linkage
    +
    196  #define SIMDJSON_DLLIMPORTEXPORT
    +
    197  #endif
    +
    198 
    +
    203 #if SIMDJSON_USING_LIBRARY
    +
    204 #define SIMDJSON_DLLIMPORTEXPORT __declspec(dllimport)
    +
    205 #endif
    +
    209 #else
    210  #define SIMDJSON_DLLIMPORTEXPORT
    -
    211  #endif
    +
    211 #endif
    212 
    -
    217 #if SIMDJSON_USING_LIBRARY
    -
    218 #define SIMDJSON_DLLIMPORTEXPORT __declspec(dllimport)
    -
    219 #endif
    -
    223 #else
    -
    224  #define SIMDJSON_DLLIMPORTEXPORT
    +
    213 // C++17 requires string_view.
    +
    214 #if SIMDJSON_CPLUSPLUS17
    +
    215 #define SIMDJSON_HAS_STRING_VIEW
    +
    216 #include <string_view> // by the standard, this has to be safe.
    +
    217 #endif
    +
    218 
    +
    219 // This macro (__cpp_lib_string_view) has to be defined
    +
    220 // for C++17 and better, but if it is otherwise defined,
    +
    221 // we are going to assume that string_view is available
    +
    222 // even if we do not have C++17 support.
    +
    223 #ifdef __cpp_lib_string_view
    +
    224 #define SIMDJSON_HAS_STRING_VIEW
    225 #endif
    226 
    -
    227 // C++17 requires string_view.
    -
    228 #if SIMDJSON_CPLUSPLUS17
    -
    229 #define SIMDJSON_HAS_STRING_VIEW
    -
    230 #include <string_view> // by the standard, this has to be safe.
    -
    231 #endif
    -
    232 
    -
    233 // This macro (__cpp_lib_string_view) has to be defined
    -
    234 // for C++17 and better, but if it is otherwise defined,
    -
    235 // we are going to assume that string_view is available
    -
    236 // even if we do not have C++17 support.
    -
    237 #ifdef __cpp_lib_string_view
    -
    238 #define SIMDJSON_HAS_STRING_VIEW
    -
    239 #endif
    -
    240 
    -
    241 // Some systems have string_view even if we do not have C++17 support,
    -
    242 // and even if __cpp_lib_string_view is undefined, it is the case
    -
    243 // with Apple clang version 11.
    -
    244 // We must handle it. *This is important.*
    -
    245 #ifndef SIMDJSON_HAS_STRING_VIEW
    -
    246 #if defined __has_include
    -
    247 // do not combine the next #if with the previous one (unsafe)
    -
    248 #if __has_include (<string_view>)
    -
    249 // now it is safe to trigger the include
    -
    250 #include <string_view> // though the file is there, it does not follow that we got the implementation
    -
    251 #if defined(_LIBCPP_STRING_VIEW)
    -
    252 // Ah! So we under libc++ which under its Library Fundamentals Technical Specification, which preceded C++17,
    -
    253 // included string_view.
    -
    254 // This means that we have string_view *even though* we may not have C++17.
    -
    255 #define SIMDJSON_HAS_STRING_VIEW
    -
    256 #endif // _LIBCPP_STRING_VIEW
    -
    257 #endif // __has_include (<string_view>)
    -
    258 #endif // defined __has_include
    -
    259 #endif // def SIMDJSON_HAS_STRING_VIEW
    -
    260 // end of complicated but important routine to try to detect string_view.
    -
    261 
    -
    262 //
    -
    263 // Backfill std::string_view using nonstd::string_view on systems where
    -
    264 // we expect that string_view is missing. Important: if we get this wrong,
    -
    265 // we will end up with two string_view definitions and potential trouble.
    -
    266 // That is why we work so hard above to avoid it.
    -
    267 //
    -
    268 #ifndef SIMDJSON_HAS_STRING_VIEW
    -
    269 SIMDJSON_PUSH_DISABLE_ALL_WARNINGS
    -
    270 #include "simdjson/nonstd/string_view.hpp"
    -
    271 SIMDJSON_POP_DISABLE_WARNINGS
    -
    272 
    -
    273 namespace std {
    -
    274  using string_view = nonstd::string_view;
    -
    275 }
    -
    276 #endif // SIMDJSON_HAS_STRING_VIEW
    -
    277 #undef SIMDJSON_HAS_STRING_VIEW // We are not going to need this macro anymore.
    -
    278 
    -
    280 #define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
    -
    281 
    -
    282 // Unless the programmer has already set SIMDJSON_DEVELOPMENT_CHECKS,
    -
    283 // we want to set it under debug builds. We detect a debug build
    -
    284 // under Visual Studio when the _DEBUG macro is set. Under the other
    -
    285 // compilers, we use the fact that they define __OPTIMIZE__ whenever
    -
    286 // they allow optimizations.
    -
    287 // It is possible that this could miss some cases where SIMDJSON_DEVELOPMENT_CHECKS
    -
    288 // is helpful, but the programmer can set the macro SIMDJSON_DEVELOPMENT_CHECKS.
    -
    289 // It could also wrongly set SIMDJSON_DEVELOPMENT_CHECKS (e.g., if the programmer
    -
    290 // sets _DEBUG in a release build under Visual Studio, or if some compiler fails to
    -
    291 // set the __OPTIMIZE__ macro).
    -
    292 #ifndef SIMDJSON_DEVELOPMENT_CHECKS
    -
    293 #ifdef _MSC_VER
    -
    294 // Visual Studio seems to set _DEBUG for debug builds.
    -
    295 #ifdef _DEBUG
    -
    296 #define SIMDJSON_DEVELOPMENT_CHECKS 1
    -
    297 #endif // _DEBUG
    -
    298 #else // _MSC_VER
    -
    299 // All other compilers appear to set __OPTIMIZE__ to a positive integer
    -
    300 // when the compiler is optimizing.
    -
    301 #ifndef __OPTIMIZE__
    -
    302 #define SIMDJSON_DEVELOPMENT_CHECKS 1
    -
    303 #endif // __OPTIMIZE__
    -
    304 #endif // _MSC_VER
    -
    305 #endif // SIMDJSON_DEVELOPMENT_CHECKS
    -
    306 
    -
    307 // The SIMDJSON_CHECK_EOF macro is a feature flag for the "don't require padding"
    -
    308 // feature.
    -
    309 
    -
    310 #if SIMDJSON_CPLUSPLUS17
    -
    311 // if we have C++, then fallthrough is a default attribute
    -
    312 # define simdjson_fallthrough [[fallthrough]]
    -
    313 // check if we have __attribute__ support
    -
    314 #elif defined(__has_attribute)
    -
    315 // check if we have the __fallthrough__ attribute
    -
    316 #if __has_attribute(__fallthrough__)
    -
    317 // we are good to go:
    -
    318 # define simdjson_fallthrough __attribute__((__fallthrough__))
    -
    319 #endif // __has_attribute(__fallthrough__)
    -
    320 #endif // SIMDJSON_CPLUSPLUS17
    -
    321 // on some systems, we simply do not have support for fallthrough, so use a default:
    -
    322 #ifndef simdjson_fallthrough
    -
    323 # define simdjson_fallthrough do {} while (0) /* fallthrough */
    -
    324 #endif // simdjson_fallthrough
    -
    325 
    -
    326 
    -
    327 #if SIMDJSON_DEVELOPMENT_CHECKS
    -
    328 #define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { assert ((expr)); } while (0)
    -
    329 #else
    -
    330 #define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
    -
    331 #endif
    -
    332 
    -
    333 #ifndef SIMDJSON_UTF8VALIDATION
    -
    334 #define SIMDJSON_UTF8VALIDATION 1
    +
    227 // Some systems have string_view even if we do not have C++17 support,
    +
    228 // and even if __cpp_lib_string_view is undefined, it is the case
    +
    229 // with Apple clang version 11.
    +
    230 // We must handle it. *This is important.*
    +
    231 #ifndef SIMDJSON_HAS_STRING_VIEW
    +
    232 #if defined __has_include
    +
    233 // do not combine the next #if with the previous one (unsafe)
    +
    234 #if __has_include (<string_view>)
    +
    235 // now it is safe to trigger the include
    +
    236 #include <string_view> // though the file is there, it does not follow that we got the implementation
    +
    237 #if defined(_LIBCPP_STRING_VIEW)
    +
    238 // Ah! So we under libc++ which under its Library Fundamentals Technical Specification, which preceded C++17,
    +
    239 // included string_view.
    +
    240 // This means that we have string_view *even though* we may not have C++17.
    +
    241 #define SIMDJSON_HAS_STRING_VIEW
    +
    242 #endif // _LIBCPP_STRING_VIEW
    +
    243 #endif // __has_include (<string_view>)
    +
    244 #endif // defined __has_include
    +
    245 #endif // def SIMDJSON_HAS_STRING_VIEW
    +
    246 // end of complicated but important routine to try to detect string_view.
    +
    247 
    +
    248 //
    +
    249 // Backfill std::string_view using nonstd::string_view on systems where
    +
    250 // we expect that string_view is missing. Important: if we get this wrong,
    +
    251 // we will end up with two string_view definitions and potential trouble.
    +
    252 // That is why we work so hard above to avoid it.
    +
    253 //
    +
    254 #ifndef SIMDJSON_HAS_STRING_VIEW
    +
    255 SIMDJSON_PUSH_DISABLE_ALL_WARNINGS
    +
    256 #include "simdjson/nonstd/string_view.hpp"
    +
    257 SIMDJSON_POP_DISABLE_WARNINGS
    +
    258 
    +
    259 namespace std {
    +
    260  using string_view = nonstd::string_view;
    +
    261 }
    +
    262 #endif // SIMDJSON_HAS_STRING_VIEW
    +
    263 #undef SIMDJSON_HAS_STRING_VIEW // We are not going to need this macro anymore.
    +
    264 
    +
    266 #define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } }
    +
    267 
    +
    268 // Unless the programmer has already set SIMDJSON_DEVELOPMENT_CHECKS,
    +
    269 // we want to set it under debug builds. We detect a debug build
    +
    270 // under Visual Studio when the _DEBUG macro is set. Under the other
    +
    271 // compilers, we use the fact that they define __OPTIMIZE__ whenever
    +
    272 // they allow optimizations.
    +
    273 // It is possible that this could miss some cases where SIMDJSON_DEVELOPMENT_CHECKS
    +
    274 // is helpful, but the programmer can set the macro SIMDJSON_DEVELOPMENT_CHECKS.
    +
    275 // It could also wrongly set SIMDJSON_DEVELOPMENT_CHECKS (e.g., if the programmer
    +
    276 // sets _DEBUG in a release build under Visual Studio, or if some compiler fails to
    +
    277 // set the __OPTIMIZE__ macro).
    +
    278 #ifndef SIMDJSON_DEVELOPMENT_CHECKS
    +
    279 #ifdef _MSC_VER
    +
    280 // Visual Studio seems to set _DEBUG for debug builds.
    +
    281 #ifdef _DEBUG
    +
    282 #define SIMDJSON_DEVELOPMENT_CHECKS 1
    +
    283 #endif // _DEBUG
    +
    284 #else // _MSC_VER
    +
    285 // All other compilers appear to set __OPTIMIZE__ to a positive integer
    +
    286 // when the compiler is optimizing.
    +
    287 #ifndef __OPTIMIZE__
    +
    288 #define SIMDJSON_DEVELOPMENT_CHECKS 1
    +
    289 #endif // __OPTIMIZE__
    +
    290 #endif // _MSC_VER
    +
    291 #endif // SIMDJSON_DEVELOPMENT_CHECKS
    +
    292 
    +
    293 // The SIMDJSON_CHECK_EOF macro is a feature flag for the "don't require padding"
    +
    294 // feature.
    +
    295 
    +
    296 #if SIMDJSON_CPLUSPLUS17
    +
    297 // if we have C++, then fallthrough is a default attribute
    +
    298 # define simdjson_fallthrough [[fallthrough]]
    +
    299 // check if we have __attribute__ support
    +
    300 #elif defined(__has_attribute)
    +
    301 // check if we have the __fallthrough__ attribute
    +
    302 #if __has_attribute(__fallthrough__)
    +
    303 // we are good to go:
    +
    304 # define simdjson_fallthrough __attribute__((__fallthrough__))
    +
    305 #endif // __has_attribute(__fallthrough__)
    +
    306 #endif // SIMDJSON_CPLUSPLUS17
    +
    307 // on some systems, we simply do not have support for fallthrough, so use a default:
    +
    308 #ifndef simdjson_fallthrough
    +
    309 # define simdjson_fallthrough do {} while (0) /* fallthrough */
    +
    310 #endif // simdjson_fallthrough
    +
    311 
    +
    312 #if SIMDJSON_DEVELOPMENT_CHECKS
    +
    313 #define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { assert ((expr)); } while (0)
    +
    314 #else
    +
    315 #define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0)
    +
    316 #endif
    +
    317 
    +
    318 #ifndef SIMDJSON_UTF8VALIDATION
    +
    319 #define SIMDJSON_UTF8VALIDATION 1
    +
    320 #endif
    +
    321 
    +
    322 #ifdef __has_include
    +
    323 // How do we detect that a compiler supports vbmi2?
    +
    324 // For sure if the following header is found, we are ok?
    +
    325 #if __has_include(<avx512vbmi2intrin.h>)
    +
    326 #define SIMDJSON_COMPILER_SUPPORTS_VBMI2 1
    +
    327 #endif
    +
    328 #endif
    +
    329 
    +
    330 #ifdef _MSC_VER
    +
    331 #if _MSC_VER >= 1920
    +
    332 // Visual Studio 2019 and up support VBMI2 under x64 even if the header
    +
    333 // avx512vbmi2intrin.h is not found.
    +
    334 #define SIMDJSON_COMPILER_SUPPORTS_VBMI2 1
    335 #endif
    -
    336 
    -
    337 #endif // SIMDJSON_COMMON_DEFS_H
    -
    We want to support argument-dependent lookup (ADL).
    -
    constexpr size_t DEFAULT_MAX_DEPTH
    By default, simdjson supports this many nested objects and arrays.
    Definition: common_defs.h:52
    -
    constexpr size_t SIMDJSON_MAXSIZE_BYTES
    The maximum document size supported by simdjson.
    Definition: common_defs.h:35
    -
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: common_defs.h:45
    +
    336 #endif
    +
    337 
    +
    338 // By default, we allow AVX512.
    +
    339 #ifndef SIMDJSON_AVX512_ALLOWED
    +
    340 #define SIMDJSON_AVX512_ALLOWED 1
    +
    341 #endif
    +
    342 
    +
    343 #endif // SIMDJSON_COMMON_DEFS_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/ondemand-inl_8h_source.html b/dependencies_8h_source.html similarity index 77% rename from ondemand-inl_8h_source.html rename to dependencies_8h_source.html index 7e924535c..ec61f9b98 100644 --- a/ondemand-inl_8h_source.html +++ b/dependencies_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/generic/ondemand-inl.h Source File +simdjson: include/simdjson/generic/dependencies.h Source File @@ -68,7 +68,7 @@ $(function() {
    @@ -88,31 +88,33 @@ $(document).ready(function(){initNavTree('ondemand-inl_8h_source.html',''); init
    -
    ondemand-inl.h
    +
    dependencies.h
    -
    1 #include "simdjson/generic/ondemand/json_type-inl.h"
    -
    2 #include "simdjson/generic/ondemand/logger-inl.h"
    -
    3 #include "simdjson/generic/ondemand/raw_json_string-inl.h"
    -
    4 #include "simdjson/generic/ondemand/token_iterator-inl.h"
    -
    5 #include "simdjson/generic/ondemand/json_iterator-inl.h"
    -
    6 #include "simdjson/generic/ondemand/value_iterator-inl.h"
    -
    7 #include "simdjson/generic/ondemand/array_iterator-inl.h"
    -
    8 #include "simdjson/generic/ondemand/object_iterator-inl.h"
    -
    9 #include "simdjson/generic/ondemand/array-inl.h"
    -
    10 #include "simdjson/generic/ondemand/document-inl.h"
    -
    11 #include "simdjson/generic/ondemand/value-inl.h"
    -
    12 #include "simdjson/generic/ondemand/field-inl.h"
    -
    13 #include "simdjson/generic/ondemand/object-inl.h"
    -
    14 #include "simdjson/generic/ondemand/parser-inl.h"
    -
    15 #include "simdjson/generic/ondemand/document_stream-inl.h"
    -
    16 #include "simdjson/generic/ondemand/serialization-inl.h"
    +
    1 #ifdef SIMDJSON_AMALGAMATED
    +
    2 #error simdjson/generic/dependencies.h must be included before defining SIMDJSON_AMALGAMATED!
    +
    3 #endif
    +
    4 
    +
    5 #ifndef SIMDJSON_GENERIC_DEPENDENCIES_H
    +
    6 #define SIMDJSON_GENERIC_DEPENDENCIES_H
    +
    7 
    +
    8 // Internal headers needed for generics.
    +
    9 // All includes referencing simdjson headers *not* under simdjson/generic must be here!
    +
    10 // Otherwise, amalgamation will fail.
    +
    11 #include "simdjson/dom/document.h"
    +
    12 #include "simdjson/internal/dom_parser_implementation.h"
    +
    13 #include "simdjson/internal/jsoncharutils_tables.h"
    +
    14 #include "simdjson/internal/numberparsing_tables.h"
    +
    15 #include "simdjson/internal/simdprune_tables.h"
    +
    16 #include "simdjson/padded_string_view.h"
    +
    17 
    +
    18 #endif // SIMDJSON_GENERIC_DEPENDENCIES_H
    diff --git a/dir_0d145e48adcb2584d6aad0aa1d711d9e.js b/dir_0d145e48adcb2584d6aad0aa1d711d9e.js index 250adba90..9f596e01f 100644 --- a/dir_0d145e48adcb2584d6aad0aa1d711d9e.js +++ b/dir_0d145e48adcb2584d6aad0aa1d711d9e.js @@ -1,12 +1,14 @@ var dir_0d145e48adcb2584d6aad0aa1d711d9e = [ + [ "base.h", "westmere_2base_8h_source.html", null ], [ "begin.h", "westmere_2begin_8h_source.html", null ], [ "bitmanipulation.h", "westmere_2bitmanipulation_8h_source.html", null ], [ "bitmask.h", "westmere_2bitmask_8h_source.html", null ], [ "end.h", "westmere_2end_8h_source.html", null ], [ "implementation.h", "westmere_2implementation_8h_source.html", null ], [ "intrinsics.h", "westmere_2intrinsics_8h_source.html", null ], - [ "numberparsing.h", "westmere_2numberparsing_8h_source.html", null ], + [ "numberparsing_defs.h", "westmere_2numberparsing__defs_8h_source.html", null ], + [ "ondemand.h", "westmere_2ondemand_8h_source.html", null ], [ "simd.h", "westmere_2simd_8h_source.html", null ], - [ "stringparsing.h", "westmere_2stringparsing_8h_source.html", null ] + [ "stringparsing_defs.h", "westmere_2stringparsing__defs_8h_source.html", null ] ]; \ No newline at end of file diff --git a/dir_0fee190c3bc9a7d22e6d44901a62fa54.js b/dir_0fee190c3bc9a7d22e6d44901a62fa54.js index 4a353eda0..4ce11ef73 100644 --- a/dir_0fee190c3bc9a7d22e6d44901a62fa54.js +++ b/dir_0fee190c3bc9a7d22e6d44901a62fa54.js @@ -1,6 +1,8 @@ var dir_0fee190c3bc9a7d22e6d44901a62fa54 = [ + [ "atomic_ptr.h", "atomic__ptr_8h_source.html", null ], [ "dom_parser_implementation.h", "internal_2dom__parser__implementation_8h_source.html", null ], + [ "instruction_set.h", "instruction__set_8h_source.html", null ], [ "isadetection.h", "isadetection_8h_source.html", null ], [ "jsoncharutils_tables.h", "jsoncharutils__tables_8h_source.html", null ], [ "jsonformatutils.h", "jsonformatutils_8h_source.html", null ], diff --git a/dir_438095d7beafc60159803dc5832a82bd.js b/dir_438095d7beafc60159803dc5832a82bd.js index 0868258ac..aa8f37234 100644 --- a/dir_438095d7beafc60159803dc5832a82bd.js +++ b/dir_438095d7beafc60159803dc5832a82bd.js @@ -2,6 +2,7 @@ var dir_438095d7beafc60159803dc5832a82bd = [ [ "array-inl.h", "dom_2array-inl_8h_source.html", null ], [ "array.h", "dom_2array_8h_source.html", null ], + [ "base.h", "dom_2base_8h_source.html", null ], [ "document-inl.h", "dom_2document-inl_8h_source.html", null ], [ "document.h", "dom_2document_8h_source.html", null ], [ "document_stream-inl.h", "dom_2document__stream-inl_8h_source.html", null ], diff --git a/dir_49a0b2767ded4a45005c5d6720a18cd1.html b/dir_49a0b2767ded4a45005c5d6720a18cd1.html index 08c410bbb..8214b8161 100644 --- a/dir_49a0b2767ded4a45005c5d6720a18cd1.html +++ b/dir_49a0b2767ded4a45005c5d6720a18cd1.html @@ -97,9 +97,6 @@ Directories - - -

    Files

    file  implementation-base.h [code]
     Includes common stuff needed for implementations.
     
    file  simdjson.h [code]
     
    diff --git a/dir_49a0b2767ded4a45005c5d6720a18cd1.js b/dir_49a0b2767ded4a45005c5d6720a18cd1.js index 8319c98d3..df76abfc9 100644 --- a/dir_49a0b2767ded4a45005c5d6720a18cd1.js +++ b/dir_49a0b2767ded4a45005c5d6720a18cd1.js @@ -1,6 +1,7 @@ var dir_49a0b2767ded4a45005c5d6720a18cd1 = [ [ "arm64", "dir_76d8247d4498211a7d04a3794a38eb71.html", "dir_76d8247d4498211a7d04a3794a38eb71" ], + [ "builtin", "dir_cae07bd9608c9724f8cbc862866fc74a.html", "dir_cae07bd9608c9724f8cbc862866fc74a" ], [ "dom", "dir_438095d7beafc60159803dc5832a82bd.html", "dir_438095d7beafc60159803dc5832a82bd" ], [ "fallback", "dir_bdd5d78d80e110a51a7313218161f5b4.html", "dir_bdd5d78d80e110a51a7313218161f5b4" ], [ "generic", "dir_53368a02099cf3699f2996a5d88d70b6.html", "dir_53368a02099cf3699f2996a5d88d70b6" ], @@ -21,11 +22,11 @@ var dir_49a0b2767ded4a45005c5d6720a18cd1 = [ "fallback.h", "fallback_8h_source.html", null ], [ "haswell.h", "haswell_8h_source.html", null ], [ "icelake.h", "icelake_8h_source.html", null ], - [ "implementation-base.h", "implementation-base_8h.html", null ], [ "implementation.h", "implementation_8h_source.html", null ], - [ "implementations.h", "implementations_8h_source.html", null ], + [ "implementation_detection.h", "implementation__detection_8h_source.html", null ], [ "jsonioutil.h", "jsonioutil_8h_source.html", null ], [ "minify.h", "minify_8h_source.html", null ], + [ "ondemand.h", "ondemand_8h_source.html", null ], [ "padded_string-inl.h", "padded__string-inl_8h_source.html", null ], [ "padded_string.h", "padded__string_8h_source.html", null ], [ "padded_string_view-inl.h", "padded__string__view-inl_8h_source.html", null ], diff --git a/dir_53368a02099cf3699f2996a5d88d70b6.js b/dir_53368a02099cf3699f2996a5d88d70b6.js index 33e8e0a16..3f17b354d 100644 --- a/dir_53368a02099cf3699f2996a5d88d70b6.js +++ b/dir_53368a02099cf3699f2996a5d88d70b6.js @@ -1,12 +1,13 @@ var dir_53368a02099cf3699f2996a5d88d70b6 = [ [ "ondemand", "dir_7796bb4b727f918c96faee1bdd50e49a.html", "dir_7796bb4b727f918c96faee1bdd50e49a" ], + [ "amalgamated.h", "amalgamated_8h_source.html", null ], [ "atomparsing.h", "atomparsing_8h_source.html", null ], + [ "base.h", "generic_2base_8h_source.html", null ], + [ "dependencies.h", "dependencies_8h_source.html", null ], [ "dom_parser_implementation.h", "generic_2dom__parser__implementation_8h_source.html", null ], [ "implementation_simdjson_result_base-inl.h", "implementation__simdjson__result__base-inl_8h_source.html", null ], [ "implementation_simdjson_result_base.h", "implementation__simdjson__result__base_8h_source.html", null ], [ "jsoncharutils.h", "jsoncharutils_8h_source.html", null ], - [ "numberparsing.h", "generic_2numberparsing_8h_source.html", null ], - [ "ondemand-inl.h", "ondemand-inl_8h_source.html", null ], - [ "ondemand.h", "ondemand_8h_source.html", null ] + [ "numberparsing.h", "numberparsing_8h_source.html", null ] ]; \ No newline at end of file diff --git a/dir_76d8247d4498211a7d04a3794a38eb71.js b/dir_76d8247d4498211a7d04a3794a38eb71.js index 5105fab32..8945dd963 100644 --- a/dir_76d8247d4498211a7d04a3794a38eb71.js +++ b/dir_76d8247d4498211a7d04a3794a38eb71.js @@ -1,12 +1,14 @@ var dir_76d8247d4498211a7d04a3794a38eb71 = [ + [ "base.h", "arm64_2base_8h_source.html", null ], [ "begin.h", "arm64_2begin_8h_source.html", null ], [ "bitmanipulation.h", "arm64_2bitmanipulation_8h_source.html", null ], [ "bitmask.h", "arm64_2bitmask_8h_source.html", null ], [ "end.h", "arm64_2end_8h_source.html", null ], [ "implementation.h", "arm64_2implementation_8h_source.html", null ], [ "intrinsics.h", "arm64_2intrinsics_8h_source.html", null ], - [ "numberparsing.h", "arm64_2numberparsing_8h_source.html", null ], + [ "numberparsing_defs.h", "arm64_2numberparsing__defs_8h_source.html", null ], + [ "ondemand.h", "arm64_2ondemand_8h_source.html", null ], [ "simd.h", "arm64_2simd_8h_source.html", null ], - [ "stringparsing.h", "arm64_2stringparsing_8h_source.html", null ] + [ "stringparsing_defs.h", "arm64_2stringparsing__defs_8h_source.html", null ] ]; \ No newline at end of file diff --git a/dir_7796bb4b727f918c96faee1bdd50e49a.js b/dir_7796bb4b727f918c96faee1bdd50e49a.js index 59f62fe13..147cfc99c 100644 --- a/dir_7796bb4b727f918c96faee1bdd50e49a.js +++ b/dir_7796bb4b727f918c96faee1bdd50e49a.js @@ -1,9 +1,12 @@ var dir_7796bb4b727f918c96faee1bdd50e49a = [ + [ "amalgamated.h", "ondemand_2amalgamated_8h_source.html", null ], [ "array-inl.h", "generic_2ondemand_2array-inl_8h_source.html", null ], [ "array.h", "generic_2ondemand_2array_8h_source.html", null ], [ "array_iterator-inl.h", "array__iterator-inl_8h_source.html", null ], [ "array_iterator.h", "array__iterator_8h_source.html", null ], + [ "base.h", "generic_2ondemand_2base_8h_source.html", null ], + [ "dependencies.h", "ondemand_2dependencies_8h_source.html", null ], [ "document-inl.h", "generic_2ondemand_2document-inl_8h_source.html", null ], [ "document.h", "generic_2ondemand_2document_8h_source.html", null ], [ "document_stream-inl.h", "generic_2ondemand_2document__stream-inl_8h_source.html", null ], @@ -28,7 +31,6 @@ var dir_7796bb4b727f918c96faee1bdd50e49a = [ "serialization.h", "generic_2ondemand_2serialization_8h_source.html", null ], [ "token_iterator-inl.h", "token__iterator-inl_8h_source.html", null ], [ "token_iterator.h", "token__iterator_8h_source.html", null ], - [ "token_position.h", "token__position_8h_source.html", null ], [ "value-inl.h", "value-inl_8h_source.html", null ], [ "value.h", "value_8h_source.html", null ], [ "value_iterator-inl.h", "value__iterator-inl_8h_source.html", null ], diff --git a/dir_9b01d0736ef91c92ca1a5074971144b1.js b/dir_9b01d0736ef91c92ca1a5074971144b1.js index 21b521339..c5d9b5f9d 100644 --- a/dir_9b01d0736ef91c92ca1a5074971144b1.js +++ b/dir_9b01d0736ef91c92ca1a5074971144b1.js @@ -1,12 +1,14 @@ var dir_9b01d0736ef91c92ca1a5074971144b1 = [ + [ "base.h", "ppc64_2base_8h_source.html", null ], [ "begin.h", "ppc64_2begin_8h_source.html", null ], [ "bitmanipulation.h", "ppc64_2bitmanipulation_8h_source.html", null ], [ "bitmask.h", "ppc64_2bitmask_8h_source.html", null ], [ "end.h", "ppc64_2end_8h_source.html", null ], [ "implementation.h", "ppc64_2implementation_8h_source.html", null ], [ "intrinsics.h", "ppc64_2intrinsics_8h_source.html", null ], - [ "numberparsing.h", "ppc64_2numberparsing_8h_source.html", null ], + [ "numberparsing_defs.h", "ppc64_2numberparsing__defs_8h_source.html", null ], + [ "ondemand.h", "ppc64_2ondemand_8h_source.html", null ], [ "simd.h", "ppc64_2simd_8h_source.html", null ], - [ "stringparsing.h", "ppc64_2stringparsing_8h_source.html", null ] + [ "stringparsing_defs.h", "ppc64_2stringparsing__defs_8h_source.html", null ] ]; \ No newline at end of file diff --git a/dir_b35ffb90479583e132afc246e9b6e77a.js b/dir_b35ffb90479583e132afc246e9b6e77a.js index ae121eefd..eec0efce6 100644 --- a/dir_b35ffb90479583e132afc246e9b6e77a.js +++ b/dir_b35ffb90479583e132afc246e9b6e77a.js @@ -1,12 +1,14 @@ var dir_b35ffb90479583e132afc246e9b6e77a = [ + [ "base.h", "haswell_2base_8h_source.html", null ], [ "begin.h", "haswell_2begin_8h_source.html", null ], [ "bitmanipulation.h", "haswell_2bitmanipulation_8h_source.html", null ], [ "bitmask.h", "haswell_2bitmask_8h_source.html", null ], [ "end.h", "haswell_2end_8h_source.html", null ], [ "implementation.h", "haswell_2implementation_8h_source.html", null ], [ "intrinsics.h", "haswell_2intrinsics_8h_source.html", null ], - [ "numberparsing.h", "haswell_2numberparsing_8h_source.html", null ], + [ "numberparsing_defs.h", "haswell_2numberparsing__defs_8h_source.html", null ], + [ "ondemand.h", "haswell_2ondemand_8h_source.html", null ], [ "simd.h", "haswell_2simd_8h_source.html", null ], - [ "stringparsing.h", "haswell_2stringparsing_8h_source.html", null ] + [ "stringparsing_defs.h", "haswell_2stringparsing__defs_8h_source.html", null ] ]; \ No newline at end of file diff --git a/dir_ba336e6e255a3bf0b1427b51513cdc60.js b/dir_ba336e6e255a3bf0b1427b51513cdc60.js index ea79d06c8..7b77dfabb 100644 --- a/dir_ba336e6e255a3bf0b1427b51513cdc60.js +++ b/dir_ba336e6e255a3bf0b1427b51513cdc60.js @@ -1,12 +1,14 @@ var dir_ba336e6e255a3bf0b1427b51513cdc60 = [ + [ "base.h", "icelake_2base_8h_source.html", null ], [ "begin.h", "icelake_2begin_8h_source.html", null ], [ "bitmanipulation.h", "icelake_2bitmanipulation_8h_source.html", null ], [ "bitmask.h", "icelake_2bitmask_8h_source.html", null ], [ "end.h", "icelake_2end_8h_source.html", null ], [ "implementation.h", "icelake_2implementation_8h_source.html", null ], [ "intrinsics.h", "icelake_2intrinsics_8h_source.html", null ], - [ "numberparsing.h", "icelake_2numberparsing_8h_source.html", null ], + [ "numberparsing_defs.h", "icelake_2numberparsing__defs_8h_source.html", null ], + [ "ondemand.h", "icelake_2ondemand_8h_source.html", null ], [ "simd.h", "icelake_2simd_8h_source.html", null ], - [ "stringparsing.h", "icelake_2stringparsing_8h_source.html", null ] + [ "stringparsing_defs.h", "icelake_2stringparsing__defs_8h_source.html", null ] ]; \ No newline at end of file diff --git a/dir_bdd5d78d80e110a51a7313218161f5b4.js b/dir_bdd5d78d80e110a51a7313218161f5b4.js index d3947d4fe..61e6e6599 100644 --- a/dir_bdd5d78d80e110a51a7313218161f5b4.js +++ b/dir_bdd5d78d80e110a51a7313218161f5b4.js @@ -1,9 +1,11 @@ var dir_bdd5d78d80e110a51a7313218161f5b4 = [ + [ "base.h", "fallback_2base_8h_source.html", null ], [ "begin.h", "fallback_2begin_8h_source.html", null ], [ "bitmanipulation.h", "fallback_2bitmanipulation_8h_source.html", null ], [ "end.h", "fallback_2end_8h_source.html", null ], [ "implementation.h", "fallback_2implementation_8h_source.html", null ], - [ "numberparsing.h", "fallback_2numberparsing_8h_source.html", null ], - [ "stringparsing.h", "fallback_2stringparsing_8h_source.html", null ] + [ "numberparsing_defs.h", "fallback_2numberparsing__defs_8h_source.html", null ], + [ "ondemand.h", "fallback_2ondemand_8h_source.html", null ], + [ "stringparsing_defs.h", "fallback_2stringparsing__defs_8h_source.html", null ] ]; \ No newline at end of file diff --git a/implementation-base_8h.html b/dir_cae07bd9608c9724f8cbc862866fc74a.html similarity index 82% rename from implementation-base_8h.html rename to dir_cae07bd9608c9724f8cbc862866fc74a.html index ac8d7f696..35fcd2afb 100644 --- a/implementation-base_8h.html +++ b/dir_cae07bd9608c9724f8cbc862866fc74a.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/implementation-base.h File Reference +simdjson: include/simdjson/builtin Directory Reference @@ -68,7 +68,7 @@ $(function() {
    @@ -88,24 +88,15 @@ $(document).ready(function(){initNavTree('implementation-base_8h.html',''); init
    -
    implementation-base.h File Reference
    +
    builtin Directory Reference
    - -

    Includes common stuff needed for implementations. -More...

    - -

    Go to the source code of this file.

    -

    Detailed Description

    -

    Includes common stuff needed for implementations.

    - -

    Definition in file implementation-base.h.

    -
    + diff --git a/dir_cae07bd9608c9724f8cbc862866fc74a.js b/dir_cae07bd9608c9724f8cbc862866fc74a.js new file mode 100644 index 000000000..e0c109de0 --- /dev/null +++ b/dir_cae07bd9608c9724f8cbc862866fc74a.js @@ -0,0 +1,6 @@ +var dir_cae07bd9608c9724f8cbc862866fc74a = +[ + [ "base.h", "builtin_2base_8h_source.html", null ], + [ "implementation.h", "builtin_2implementation_8h_source.html", null ], + [ "ondemand.h", "builtin_2ondemand_8h_source.html", null ] +]; \ No newline at end of file diff --git a/dom_2array-inl_8h_source.html b/dom_2array-inl_8h_source.html index 017d78bc2..76ff32a2b 100644 --- a/dom_2array-inl_8h_source.html +++ b/dom_2array-inl_8h_source.html @@ -94,196 +94,199 @@ $(document).ready(function(){initNavTree('dom_2array-inl_8h_source.html',''); in
    1 #ifndef SIMDJSON_INLINE_ARRAY_H
    2 #define SIMDJSON_INLINE_ARRAY_H
    3 
    -
    4 // Inline implementations go in here.
    +
    4 #include <utility>
    5 
    6 #include "simdjson/dom/array.h"
    7 #include "simdjson/dom/element.h"
    -
    8 #include <utility>
    -
    9 
    -
    10 namespace simdjson {
    -
    11 
    -
    12 //
    -
    13 // simdjson_result<dom::array> inline implementation
    -
    14 //
    -
    15 simdjson_inline simdjson_result<dom::array>::simdjson_result() noexcept
    -
    16  : internal::simdjson_result_base<dom::array>() {}
    -
    17 simdjson_inline simdjson_result<dom::array>::simdjson_result(dom::array value) noexcept
    -
    18  : internal::simdjson_result_base<dom::array>(std::forward<dom::array>(value)) {}
    -
    19 simdjson_inline simdjson_result<dom::array>::simdjson_result(error_code error) noexcept
    -
    20  : internal::simdjson_result_base<dom::array>(error) {}
    -
    21 
    -
    22 #if SIMDJSON_EXCEPTIONS
    -
    23 
    -
    24 inline dom::array::iterator simdjson_result<dom::array>::begin() const noexcept(false) {
    -
    25  if (error()) { throw simdjson_error(error()); }
    -
    26  return first.begin();
    -
    27 }
    -
    28 inline dom::array::iterator simdjson_result<dom::array>::end() const noexcept(false) {
    -
    29  if (error()) { throw simdjson_error(error()); }
    -
    30  return first.end();
    -
    31 }
    -
    32 inline size_t simdjson_result<dom::array>::size() const noexcept(false) {
    -
    33  if (error()) { throw simdjson_error(error()); }
    -
    34  return first.size();
    -
    35 }
    -
    36 
    -
    37 #endif // SIMDJSON_EXCEPTIONS
    -
    38 
    -
    39 inline simdjson_result<dom::element> simdjson_result<dom::array>::at_pointer(std::string_view json_pointer) const noexcept {
    -
    40  if (error()) { return error(); }
    -
    41  return first.at_pointer(json_pointer);
    -
    42 }
    -
    43 inline simdjson_result<dom::element> simdjson_result<dom::array>::at(size_t index) const noexcept {
    -
    44  if (error()) { return error(); }
    -
    45  return first.at(index);
    -
    46 }
    -
    47 
    -
    48 namespace dom {
    -
    49 
    -
    50 //
    -
    51 // array inline implementation
    -
    52 //
    -
    53 simdjson_inline array::array() noexcept : tape{} {}
    -
    54 simdjson_inline array::array(const internal::tape_ref &_tape) noexcept : tape{_tape} {}
    -
    55 inline array::iterator array::begin() const noexcept {
    -
    56  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    57  return internal::tape_ref(tape.doc, tape.json_index + 1);
    -
    58 }
    -
    59 inline array::iterator array::end() const noexcept {
    -
    60  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    61  return internal::tape_ref(tape.doc, tape.after_element() - 1);
    -
    62 }
    -
    63 inline size_t array::size() const noexcept {
    -
    64  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    65  return tape.scope_count();
    -
    66 }
    -
    67 inline size_t array::number_of_slots() const noexcept {
    -
    68  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    69  return tape.matching_brace_index() - tape.json_index;
    -
    70 }
    -
    71 inline simdjson_result<element> array::at_pointer(std::string_view json_pointer) const noexcept {
    -
    72  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    73  if(json_pointer.empty()) { // an empty string means that we return the current node
    -
    74  return element(this->tape); // copy the current node
    -
    75  } else if(json_pointer[0] != '/') { // otherwise there is an error
    -
    76  return INVALID_JSON_POINTER;
    -
    77  }
    -
    78  json_pointer = json_pointer.substr(1);
    -
    79  // - means "the append position" or "the element after the end of the array"
    -
    80  // We don't support this, because we're returning a real element, not a position.
    -
    81  if (json_pointer == "-") { return INDEX_OUT_OF_BOUNDS; }
    -
    82 
    -
    83  // Read the array index
    -
    84  size_t array_index = 0;
    -
    85  size_t i;
    -
    86  for (i = 0; i < json_pointer.length() && json_pointer[i] != '/'; i++) {
    -
    87  uint8_t digit = uint8_t(json_pointer[i] - '0');
    -
    88  // Check for non-digit in array index. If it's there, we're trying to get a field in an object
    -
    89  if (digit > 9) { return INCORRECT_TYPE; }
    -
    90  array_index = array_index*10 + digit;
    -
    91  }
    -
    92 
    -
    93  // 0 followed by other digits is invalid
    -
    94  if (i > 1 && json_pointer[0] == '0') { return INVALID_JSON_POINTER; } // "JSON pointer array index has other characters after 0"
    +
    8 #include "simdjson/error-inl.h"
    +
    9 #include "simdjson/internal/tape_ref-inl.h"
    +
    10 
    +
    11 #include <limits>
    +
    12 
    +
    13 namespace simdjson {
    +
    14 
    +
    15 //
    +
    16 // simdjson_result<dom::array> inline implementation
    +
    17 //
    +
    18 simdjson_inline simdjson_result<dom::array>::simdjson_result() noexcept
    +
    19  : internal::simdjson_result_base<dom::array>() {}
    +
    20 simdjson_inline simdjson_result<dom::array>::simdjson_result(dom::array value) noexcept
    +
    21  : internal::simdjson_result_base<dom::array>(std::forward<dom::array>(value)) {}
    +
    22 simdjson_inline simdjson_result<dom::array>::simdjson_result(error_code error) noexcept
    +
    23  : internal::simdjson_result_base<dom::array>(error) {}
    +
    24 
    +
    25 #if SIMDJSON_EXCEPTIONS
    +
    26 
    +
    27 inline dom::array::iterator simdjson_result<dom::array>::begin() const noexcept(false) {
    +
    28  if (error()) { throw simdjson_error(error()); }
    +
    29  return first.begin();
    +
    30 }
    +
    31 inline dom::array::iterator simdjson_result<dom::array>::end() const noexcept(false) {
    +
    32  if (error()) { throw simdjson_error(error()); }
    +
    33  return first.end();
    +
    34 }
    +
    35 inline size_t simdjson_result<dom::array>::size() const noexcept(false) {
    +
    36  if (error()) { throw simdjson_error(error()); }
    +
    37  return first.size();
    +
    38 }
    +
    39 
    +
    40 #endif // SIMDJSON_EXCEPTIONS
    +
    41 
    +
    42 inline simdjson_result<dom::element> simdjson_result<dom::array>::at_pointer(std::string_view json_pointer) const noexcept {
    +
    43  if (error()) { return error(); }
    +
    44  return first.at_pointer(json_pointer);
    +
    45 }
    +
    46 inline simdjson_result<dom::element> simdjson_result<dom::array>::at(size_t index) const noexcept {
    +
    47  if (error()) { return error(); }
    +
    48  return first.at(index);
    +
    49 }
    +
    50 
    +
    51 namespace dom {
    +
    52 
    +
    53 //
    +
    54 // array inline implementation
    +
    55 //
    +
    56 simdjson_inline array::array() noexcept : tape{} {}
    +
    57 simdjson_inline array::array(const internal::tape_ref &_tape) noexcept : tape{_tape} {}
    +
    58 inline array::iterator array::begin() const noexcept {
    +
    59  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    60  return internal::tape_ref(tape.doc, tape.json_index + 1);
    +
    61 }
    +
    62 inline array::iterator array::end() const noexcept {
    +
    63  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    64  return internal::tape_ref(tape.doc, tape.after_element() - 1);
    +
    65 }
    +
    66 inline size_t array::size() const noexcept {
    +
    67  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    68  return tape.scope_count();
    +
    69 }
    +
    70 inline size_t array::number_of_slots() const noexcept {
    +
    71  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    72  return tape.matching_brace_index() - tape.json_index;
    +
    73 }
    +
    74 inline simdjson_result<element> array::at_pointer(std::string_view json_pointer) const noexcept {
    +
    75  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    76  if(json_pointer.empty()) { // an empty string means that we return the current node
    +
    77  return element(this->tape); // copy the current node
    +
    78  } else if(json_pointer[0] != '/') { // otherwise there is an error
    +
    79  return INVALID_JSON_POINTER;
    +
    80  }
    +
    81  json_pointer = json_pointer.substr(1);
    +
    82  // - means "the append position" or "the element after the end of the array"
    +
    83  // We don't support this, because we're returning a real element, not a position.
    +
    84  if (json_pointer == "-") { return INDEX_OUT_OF_BOUNDS; }
    +
    85 
    +
    86  // Read the array index
    +
    87  size_t array_index = 0;
    +
    88  size_t i;
    +
    89  for (i = 0; i < json_pointer.length() && json_pointer[i] != '/'; i++) {
    +
    90  uint8_t digit = uint8_t(json_pointer[i] - '0');
    +
    91  // Check for non-digit in array index. If it's there, we're trying to get a field in an object
    +
    92  if (digit > 9) { return INCORRECT_TYPE; }
    +
    93  array_index = array_index*10 + digit;
    +
    94  }
    95 
    -
    96  // Empty string is invalid; so is a "/" with no digits before it
    -
    97  if (i == 0) { return INVALID_JSON_POINTER; } // "Empty string in JSON pointer array index"
    +
    96  // 0 followed by other digits is invalid
    +
    97  if (i > 1 && json_pointer[0] == '0') { return INVALID_JSON_POINTER; } // "JSON pointer array index has other characters after 0"
    98 
    -
    99  // Get the child
    -
    100  auto child = array(tape).at(array_index);
    -
    101  // If there is an error, it ends here
    -
    102  if(child.error()) {
    -
    103  return child;
    -
    104  }
    -
    105  // If there is a /, we're not done yet, call recursively.
    -
    106  if (i < json_pointer.length()) {
    -
    107  child = child.at_pointer(json_pointer.substr(i));
    -
    108  }
    -
    109  return child;
    -
    110 }
    -
    111 
    -
    112 inline simdjson_result<element> array::at(size_t index) const noexcept {
    -
    113  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    114  size_t i=0;
    -
    115  for (auto element : *this) {
    -
    116  if (i == index) { return element; }
    -
    117  i++;
    -
    118  }
    -
    119  return INDEX_OUT_OF_BOUNDS;
    -
    120 }
    -
    121 
    -
    122 //
    -
    123 // array::iterator inline implementation
    -
    124 //
    -
    125 simdjson_inline array::iterator::iterator(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
    -
    126 inline element array::iterator::operator*() const noexcept {
    -
    127  return element(tape);
    -
    128 }
    - -
    130  tape.json_index = tape.after_element();
    -
    131  return *this;
    -
    132 }
    - -
    134  array::iterator out = *this;
    -
    135  ++*this;
    -
    136  return out;
    -
    137 }
    -
    138 inline bool array::iterator::operator!=(const array::iterator& other) const noexcept {
    -
    139  return tape.json_index != other.tape.json_index;
    +
    99  // Empty string is invalid; so is a "/" with no digits before it
    +
    100  if (i == 0) { return INVALID_JSON_POINTER; } // "Empty string in JSON pointer array index"
    +
    101 
    +
    102  // Get the child
    +
    103  auto child = array(tape).at(array_index);
    +
    104  // If there is an error, it ends here
    +
    105  if(child.error()) {
    +
    106  return child;
    +
    107  }
    +
    108  // If there is a /, we're not done yet, call recursively.
    +
    109  if (i < json_pointer.length()) {
    +
    110  child = child.at_pointer(json_pointer.substr(i));
    +
    111  }
    +
    112  return child;
    +
    113 }
    +
    114 
    +
    115 inline simdjson_result<element> array::at(size_t index) const noexcept {
    +
    116  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    117  size_t i=0;
    +
    118  for (auto element : *this) {
    +
    119  if (i == index) { return element; }
    +
    120  i++;
    +
    121  }
    +
    122  return INDEX_OUT_OF_BOUNDS;
    +
    123 }
    +
    124 
    +
    125 //
    +
    126 // array::iterator inline implementation
    +
    127 //
    +
    128 simdjson_inline array::iterator::iterator(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
    +
    129 inline element array::iterator::operator*() const noexcept {
    +
    130  return element(tape);
    +
    131 }
    + +
    133  tape.json_index = tape.after_element();
    +
    134  return *this;
    +
    135 }
    + +
    137  array::iterator out = *this;
    +
    138  ++*this;
    +
    139  return out;
    140 }
    -
    141 inline bool array::iterator::operator==(const array::iterator& other) const noexcept {
    -
    142  return tape.json_index == other.tape.json_index;
    +
    141 inline bool array::iterator::operator!=(const array::iterator& other) const noexcept {
    +
    142  return tape.json_index != other.tape.json_index;
    143 }
    -
    144 inline bool array::iterator::operator<(const array::iterator& other) const noexcept {
    -
    145  return tape.json_index < other.tape.json_index;
    +
    144 inline bool array::iterator::operator==(const array::iterator& other) const noexcept {
    +
    145  return tape.json_index == other.tape.json_index;
    146 }
    -
    147 inline bool array::iterator::operator<=(const array::iterator& other) const noexcept {
    -
    148  return tape.json_index <= other.tape.json_index;
    +
    147 inline bool array::iterator::operator<(const array::iterator& other) const noexcept {
    +
    148  return tape.json_index < other.tape.json_index;
    149 }
    -
    150 inline bool array::iterator::operator>=(const array::iterator& other) const noexcept {
    -
    151  return tape.json_index >= other.tape.json_index;
    +
    150 inline bool array::iterator::operator<=(const array::iterator& other) const noexcept {
    +
    151  return tape.json_index <= other.tape.json_index;
    152 }
    -
    153 inline bool array::iterator::operator>(const array::iterator& other) const noexcept {
    -
    154  return tape.json_index > other.tape.json_index;
    +
    153 inline bool array::iterator::operator>=(const array::iterator& other) const noexcept {
    +
    154  return tape.json_index >= other.tape.json_index;
    155 }
    -
    156 
    -
    157 } // namespace dom
    -
    158 
    +
    156 inline bool array::iterator::operator>(const array::iterator& other) const noexcept {
    +
    157  return tape.json_index > other.tape.json_index;
    +
    158 }
    159 
    -
    160 } // namespace simdjson
    +
    160 } // namespace dom
    161 
    -
    162 #include "simdjson/dom/element-inl.h"
    -
    163 
    -
    164 #if defined(__cpp_lib_ranges)
    -
    165 static_assert(std::ranges::view<simdjson::dom::array>);
    -
    166 static_assert(std::ranges::sized_range<simdjson::dom::array>);
    -
    167 #if SIMDJSON_EXCEPTIONS
    -
    168 static_assert(std::ranges::view<simdjson::simdjson_result<simdjson::dom::array>>);
    -
    169 static_assert(std::ranges::sized_range<simdjson::simdjson_result<simdjson::dom::array>>);
    -
    170 #endif // SIMDJSON_EXCEPTIONS
    -
    171 #endif // defined(__cpp_lib_ranges)
    -
    172 
    -
    173 #endif // SIMDJSON_INLINE_ARRAY_H
    - -
    bool operator!=(const iterator &other) const noexcept
    Check if these values come from the same place in the JSON.
    Definition: array-inl.h:138
    -
    iterator & operator++() noexcept
    Get the next value.
    Definition: array-inl.h:129
    -
    value_type operator*() const noexcept
    Get the actual value.
    Definition: array-inl.h:126
    -
    JSON array.
    Definition: array.h:22
    -
    size_t number_of_slots() const noexcept
    Get the total number of slots used by this array on the tape.
    Definition: array-inl.h:67
    -
    iterator end() const noexcept
    One past the last array element.
    Definition: array-inl.h:59
    -
    size_t size() const noexcept
    Get the size of the array (number of immediate children).
    Definition: array-inl.h:63
    -
    simdjson_result< element > at(size_t index) const noexcept
    Get the value at the given index.
    Definition: array-inl.h:112
    -
    simdjson_result< element > at_pointer(std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: array-inl.h:71
    -
    simdjson_inline array() noexcept
    Create a new, invalid array.
    Definition: array-inl.h:53
    -
    iterator begin() const noexcept
    Return the first array element.
    Definition: array-inl.h:55
    -
    A JSON element.
    Definition: element.h:40
    -
    We want to support argument-dependent lookup (ADL).
    +
    162 
    +
    163 } // namespace simdjson
    +
    164 
    +
    165 #include "simdjson/dom/element-inl.h"
    +
    166 
    +
    167 #if defined(__cpp_lib_ranges)
    +
    168 static_assert(std::ranges::view<simdjson::dom::array>);
    +
    169 static_assert(std::ranges::sized_range<simdjson::dom::array>);
    +
    170 #if SIMDJSON_EXCEPTIONS
    +
    171 static_assert(std::ranges::view<simdjson::simdjson_result<simdjson::dom::array>>);
    +
    172 static_assert(std::ranges::sized_range<simdjson::simdjson_result<simdjson::dom::array>>);
    +
    173 #endif // SIMDJSON_EXCEPTIONS
    +
    174 #endif // defined(__cpp_lib_ranges)
    +
    175 
    +
    176 #endif // SIMDJSON_INLINE_ARRAY_H
    + +
    bool operator!=(const iterator &other) const noexcept
    Check if these values come from the same place in the JSON.
    Definition: array-inl.h:141
    +
    iterator & operator++() noexcept
    Get the next value.
    Definition: array-inl.h:132
    +
    value_type operator*() const noexcept
    Get the actual value.
    Definition: array-inl.h:129
    +
    JSON array.
    Definition: array.h:13
    +
    size_t number_of_slots() const noexcept
    Get the total number of slots used by this array on the tape.
    Definition: array-inl.h:70
    +
    iterator end() const noexcept
    One past the last array element.
    Definition: array-inl.h:62
    +
    size_t size() const noexcept
    Get the size of the array (number of immediate children).
    Definition: array-inl.h:66
    +
    simdjson_result< element > at(size_t index) const noexcept
    Get the value at the given index.
    Definition: array-inl.h:115
    +
    simdjson_result< element > at_pointer(std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: array-inl.h:74
    +
    simdjson_inline array() noexcept
    Create a new, invalid array.
    Definition: array-inl.h:56
    +
    iterator begin() const noexcept
    Return the first array element.
    Definition: array-inl.h:58
    +
    A JSON element.
    Definition: element.h:31
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ INCORRECT_TYPE
    JSON element has a different type than user expected.
    Definition: error.h:34
    @ INDEX_OUT_OF_BOUNDS
    JSON array index too large.
    Definition: error.h:36
    @ INVALID_JSON_POINTER
    Invalid JSON pointer reference.
    Definition: error.h:39
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    diff --git a/dom_2array_8h_source.html b/dom_2array_8h_source.html index 2d854b223..6eca3250f 100644 --- a/dom_2array_8h_source.html +++ b/dom_2array_8h_source.html @@ -94,123 +94,114 @@ $(document).ready(function(){initNavTree('dom_2array_8h_source.html',''); initRe
    1 #ifndef SIMDJSON_DOM_ARRAY_H
    2 #define SIMDJSON_DOM_ARRAY_H
    3 
    -
    4 #include "simdjson/common_defs.h"
    -
    5 #include "simdjson/error.h"
    -
    6 #include "simdjson/internal/tape_ref.h"
    -
    7 
    -
    8 namespace simdjson {
    +
    4 #include "simdjson/dom/base.h"
    +
    5 #include "simdjson/internal/tape_ref.h"
    +
    6 
    +
    7 namespace simdjson {
    +
    8 namespace dom {
    9 
    -
    10 namespace internal {
    -
    11 template<typename T>
    -
    12 class string_builder;
    -
    13 }
    -
    14 namespace dom {
    -
    15 
    -
    16 class document;
    -
    17 class element;
    -
    18 
    -
    22 class array {
    -
    23 public:
    -
    25  simdjson_inline array() noexcept;
    -
    26 
    -
    27  class iterator {
    -
    28  public:
    -
    29  using value_type = element;
    -
    30  using difference_type = std::ptrdiff_t;
    -
    31 
    -
    35  inline value_type operator*() const noexcept;
    -
    41  inline iterator& operator++() noexcept;
    -
    47  inline iterator operator++(int) noexcept;
    -
    53  inline bool operator!=(const iterator& other) const noexcept;
    -
    54  inline bool operator==(const iterator& other) const noexcept;
    -
    55 
    -
    56  inline bool operator<(const iterator& other) const noexcept;
    -
    57  inline bool operator<=(const iterator& other) const noexcept;
    -
    58  inline bool operator>=(const iterator& other) const noexcept;
    -
    59  inline bool operator>(const iterator& other) const noexcept;
    +
    13 class array {
    +
    14 public:
    +
    16  simdjson_inline array() noexcept;
    +
    17 
    +
    18  class iterator {
    +
    19  public:
    +
    20  using value_type = element;
    +
    21  using difference_type = std::ptrdiff_t;
    +
    22 
    +
    26  inline value_type operator*() const noexcept;
    +
    32  inline iterator& operator++() noexcept;
    +
    38  inline iterator operator++(int) noexcept;
    +
    44  inline bool operator!=(const iterator& other) const noexcept;
    +
    45  inline bool operator==(const iterator& other) const noexcept;
    +
    46 
    +
    47  inline bool operator<(const iterator& other) const noexcept;
    +
    48  inline bool operator<=(const iterator& other) const noexcept;
    +
    49  inline bool operator>=(const iterator& other) const noexcept;
    +
    50  inline bool operator>(const iterator& other) const noexcept;
    +
    51 
    +
    52  iterator() noexcept = default;
    +
    53  iterator(const iterator&) noexcept = default;
    +
    54  iterator& operator=(const iterator&) noexcept = default;
    +
    55  private:
    +
    56  simdjson_inline iterator(const internal::tape_ref &tape) noexcept;
    +
    57  internal::tape_ref tape;
    +
    58  friend class array;
    +
    59  };
    60 
    -
    61  iterator() noexcept = default;
    -
    62  iterator(const iterator&) noexcept = default;
    -
    63  iterator& operator=(const iterator&) noexcept = default;
    -
    64  private:
    -
    65  simdjson_inline iterator(const internal::tape_ref &tape) noexcept;
    -
    66  internal::tape_ref tape;
    -
    67  friend class array;
    -
    68  };
    -
    69 
    -
    75  inline iterator begin() const noexcept;
    -
    81  inline iterator end() const noexcept;
    -
    87  inline size_t size() const noexcept;
    -
    98  inline size_t number_of_slots() const noexcept;
    -
    115  inline simdjson_result<element> at_pointer(std::string_view json_pointer) const noexcept;
    -
    116 
    -
    133  inline simdjson_result<element> at(size_t index) const noexcept;
    +
    66  inline iterator begin() const noexcept;
    +
    72  inline iterator end() const noexcept;
    +
    78  inline size_t size() const noexcept;
    +
    89  inline size_t number_of_slots() const noexcept;
    +
    106  inline simdjson_result<element> at_pointer(std::string_view json_pointer) const noexcept;
    +
    107 
    +
    124  inline simdjson_result<element> at(size_t index) const noexcept;
    +
    125 
    +
    126 private:
    +
    127  simdjson_inline array(const internal::tape_ref &tape) noexcept;
    +
    128  internal::tape_ref tape;
    +
    129  friend class element;
    +
    130  friend struct simdjson_result<element>;
    +
    131  template<typename T>
    +
    132  friend class simdjson::internal::string_builder;
    +
    133 };
    134 
    -
    135 private:
    -
    136  simdjson_inline array(const internal::tape_ref &tape) noexcept;
    -
    137  internal::tape_ref tape;
    -
    138  friend class element;
    -
    139  friend struct simdjson_result<element>;
    -
    140  template<typename T>
    -
    141  friend class simdjson::internal::string_builder;
    -
    142 };
    -
    143 
    -
    144 
    -
    145 } // namespace dom
    -
    146 
    -
    148 template<>
    -
    149 struct simdjson_result<dom::array> : public internal::simdjson_result_base<dom::array> {
    -
    150 public:
    -
    151  simdjson_inline simdjson_result() noexcept;
    -
    152  simdjson_inline simdjson_result(dom::array value) noexcept;
    -
    153  simdjson_inline simdjson_result(error_code error) noexcept;
    -
    154 
    -
    155  inline simdjson_result<dom::element> at_pointer(std::string_view json_pointer) const noexcept;
    -
    156  inline simdjson_result<dom::element> at(size_t index) const noexcept;
    +
    135 
    +
    136 } // namespace dom
    +
    137 
    +
    139 template<>
    +
    140 struct simdjson_result<dom::array> : public internal::simdjson_result_base<dom::array> {
    +
    141 public:
    +
    142  simdjson_inline simdjson_result() noexcept;
    +
    143  simdjson_inline simdjson_result(dom::array value) noexcept;
    +
    144  simdjson_inline simdjson_result(error_code error) noexcept;
    +
    145 
    +
    146  inline simdjson_result<dom::element> at_pointer(std::string_view json_pointer) const noexcept;
    +
    147  inline simdjson_result<dom::element> at(size_t index) const noexcept;
    +
    148 
    +
    149 #if SIMDJSON_EXCEPTIONS
    +
    150  inline dom::array::iterator begin() const noexcept(false);
    +
    151  inline dom::array::iterator end() const noexcept(false);
    +
    152  inline size_t size() const noexcept(false);
    +
    153 #endif // SIMDJSON_EXCEPTIONS
    +
    154 };
    +
    155 
    +
    156 
    157 
    -
    158 #if SIMDJSON_EXCEPTIONS
    -
    159  inline dom::array::iterator begin() const noexcept(false);
    -
    160  inline dom::array::iterator end() const noexcept(false);
    -
    161  inline size_t size() const noexcept(false);
    -
    162 #endif // SIMDJSON_EXCEPTIONS
    -
    163 };
    -
    164 
    -
    165 
    -
    166 
    -
    167 } // namespace simdjson
    -
    168 
    -
    169 #if defined(__cpp_lib_ranges)
    -
    170 #include <ranges>
    -
    171 
    -
    172 namespace std {
    -
    173 namespace ranges {
    -
    174 template<>
    -
    175 inline constexpr bool enable_view<simdjson::dom::array> = true;
    -
    176 #if SIMDJSON_EXCEPTIONS
    -
    177 template<>
    -
    178 inline constexpr bool enable_view<simdjson::simdjson_result<simdjson::dom::array>> = true;
    -
    179 #endif // SIMDJSON_EXCEPTIONS
    -
    180 } // namespace ranges
    -
    181 } // namespace std
    -
    182 #endif // defined(__cpp_lib_ranges)
    -
    183 
    -
    184 #endif // SIMDJSON_DOM_ARRAY_H
    - -
    bool operator!=(const iterator &other) const noexcept
    Check if these values come from the same place in the JSON.
    Definition: array-inl.h:138
    -
    iterator & operator++() noexcept
    Get the next value.
    Definition: array-inl.h:129
    -
    value_type operator*() const noexcept
    Get the actual value.
    Definition: array-inl.h:126
    -
    JSON array.
    Definition: array.h:22
    -
    size_t number_of_slots() const noexcept
    Get the total number of slots used by this array on the tape.
    Definition: array-inl.h:67
    -
    iterator end() const noexcept
    One past the last array element.
    Definition: array-inl.h:59
    -
    size_t size() const noexcept
    Get the size of the array (number of immediate children).
    Definition: array-inl.h:63
    -
    simdjson_result< element > at(size_t index) const noexcept
    Get the value at the given index.
    Definition: array-inl.h:112
    -
    simdjson_result< element > at_pointer(std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: array-inl.h:71
    -
    simdjson_inline array() noexcept
    Create a new, invalid array.
    Definition: array-inl.h:53
    -
    iterator begin() const noexcept
    Return the first array element.
    Definition: array-inl.h:55
    -
    A JSON element.
    Definition: element.h:40
    -
    We want to support argument-dependent lookup (ADL).
    +
    158 } // namespace simdjson
    +
    159 
    +
    160 #if defined(__cpp_lib_ranges)
    +
    161 #include <ranges>
    +
    162 
    +
    163 namespace std {
    +
    164 namespace ranges {
    +
    165 template<>
    +
    166 inline constexpr bool enable_view<simdjson::dom::array> = true;
    +
    167 #if SIMDJSON_EXCEPTIONS
    +
    168 template<>
    +
    169 inline constexpr bool enable_view<simdjson::simdjson_result<simdjson::dom::array>> = true;
    +
    170 #endif // SIMDJSON_EXCEPTIONS
    +
    171 } // namespace ranges
    +
    172 } // namespace std
    +
    173 #endif // defined(__cpp_lib_ranges)
    +
    174 
    +
    175 #endif // SIMDJSON_DOM_ARRAY_H
    + +
    bool operator!=(const iterator &other) const noexcept
    Check if these values come from the same place in the JSON.
    Definition: array-inl.h:141
    +
    iterator & operator++() noexcept
    Get the next value.
    Definition: array-inl.h:132
    +
    value_type operator*() const noexcept
    Get the actual value.
    Definition: array-inl.h:129
    +
    JSON array.
    Definition: array.h:13
    +
    size_t number_of_slots() const noexcept
    Get the total number of slots used by this array on the tape.
    Definition: array-inl.h:70
    +
    iterator end() const noexcept
    One past the last array element.
    Definition: array-inl.h:62
    +
    size_t size() const noexcept
    Get the size of the array (number of immediate children).
    Definition: array-inl.h:66
    +
    simdjson_result< element > at(size_t index) const noexcept
    Get the value at the given index.
    Definition: array-inl.h:115
    +
    simdjson_result< element > at_pointer(std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: array-inl.h:74
    +
    simdjson_inline array() noexcept
    Create a new, invalid array.
    Definition: array-inl.h:56
    +
    iterator begin() const noexcept
    Return the first array element.
    Definition: array-inl.h:58
    +
    A JSON element.
    Definition: element.h:31
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    -
    The result of a JSON navigation that may fail.
    Definition: element.h:482
    +
    The result of a JSON navigation that may fail.
    Definition: element.h:473
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    diff --git a/fallback_2numberparsing_8h_source.html b/dom_2base_8h_source.html similarity index 54% rename from fallback_2numberparsing_8h_source.html rename to dom_2base_8h_source.html index b932a5279..7d8ea801b 100644 --- a/fallback_2numberparsing_8h_source.html +++ b/dom_2base_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/fallback/numberparsing.h Source File +simdjson: include/simdjson/dom/base.h Source File @@ -68,7 +68,7 @@ $(function() {
    @@ -88,50 +88,53 @@ $(document).ready(function(){initNavTree('fallback_2numberparsing_8h_source.html
    -
    numberparsing.h
    +
    base.h
    -
    1 #ifndef SIMDJSON_FALLBACK_NUMBERPARSING_H
    -
    2 #define SIMDJSON_FALLBACK_NUMBERPARSING_H
    +
    1 #ifndef SIMDJSON_DOM_BASE_H
    +
    2 #define SIMDJSON_DOM_BASE_H
    3 
    -
    4 #ifdef JSON_TEST_NUMBERS // for unit testing
    -
    5 void found_invalid_number(const uint8_t *buf);
    -
    6 void found_integer(int64_t result, const uint8_t *buf);
    -
    7 void found_unsigned_integer(uint64_t result, const uint8_t *buf);
    -
    8 void found_float(double result, const uint8_t *buf);
    -
    9 #endif
    -
    10 
    -
    11 namespace simdjson {
    -
    12 namespace SIMDJSON_IMPLEMENTATION {
    -
    13 namespace numberparsing {
    -
    14 // credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/
    -
    16 static simdjson_inline uint32_t parse_eight_digits_unrolled(const char *chars) {
    -
    17  uint64_t val;
    -
    18  memcpy(&val, chars, sizeof(uint64_t));
    -
    19  val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8;
    -
    20  val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16;
    -
    21  return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32);
    -
    22 }
    -
    24 static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) {
    -
    25  return parse_eight_digits_unrolled(reinterpret_cast<const char *>(chars));
    -
    26 }
    -
    27 
    -
    28 } // namespace numberparsing
    -
    29 } // namespace SIMDJSON_IMPLEMENTATION
    -
    30 } // namespace simdjson
    -
    31 
    -
    32 #define SIMDJSON_SWAR_NUMBER_PARSING 1
    -
    33 
    -
    34 #include "simdjson/generic/numberparsing.h"
    -
    35 
    -
    36 #endif // SIMDJSON_FALLBACK_NUMBERPARSING_H
    -
    We want to support argument-dependent lookup (ADL).
    +
    4 #include "simdjson/base.h"
    +
    5 
    +
    6 namespace simdjson {
    +
    7 
    +
    11 namespace dom {
    +
    12 
    +
    14 static constexpr size_t DEFAULT_BATCH_SIZE = 1000000;
    +
    23 static constexpr size_t MINIMAL_BATCH_SIZE = 32;
    +
    24 
    +
    28 static constexpr size_t MINIMAL_DOCUMENT_CAPACITY = 32;
    +
    29 
    +
    30 class array;
    +
    31 class document;
    +
    32 class document_stream;
    +
    33 class element;
    +
    34 class key_value_pair;
    +
    35 class object;
    +
    36 class parser;
    +
    37 
    +
    38 } // namespace dom
    +
    39 
    +
    40 namespace internal {
    +
    41 
    +
    42 template<typename T>
    +
    43 class string_builder;
    +
    44 class tape_ref;
    +
    45 
    +
    46 } // namespace internal
    +
    47 
    +
    48 } // namespace simdjson
    +
    49 
    +
    50 #endif // SIMDJSON_DOM_BASE_H
    +
    @ object
    A JSON object ( { "a": 1, "b" 2, ... } )
    + +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/dom_2document-inl_8h_source.html b/dom_2document-inl_8h_source.html index 8b3c200a6..cb3244717 100644 --- a/dom_2document-inl_8h_source.html +++ b/dom_2document-inl_8h_source.html @@ -98,164 +98,162 @@ $(document).ready(function(){initNavTree('dom_2document-inl_8h_source.html','');
    5 
    6 #include "simdjson/dom/document.h"
    7 #include "simdjson/dom/element.h"
    -
    8 #include "simdjson/internal/tape_ref.h"
    +
    8 #include "simdjson/internal/tape_ref-inl.h"
    9 #include "simdjson/internal/jsonformatutils.h"
    -
    10 #include <ostream>
    -
    11 #include <cstring>
    -
    12 
    -
    13 namespace simdjson {
    -
    14 namespace dom {
    -
    15 
    +
    10 
    +
    11 namespace simdjson {
    +
    12 namespace dom {
    +
    13 
    +
    14 //
    +
    15 // document inline implementation
    16 //
    -
    17 // document inline implementation
    -
    18 //
    -
    19 inline element document::root() const noexcept {
    -
    20  return element(internal::tape_ref(this, 1));
    -
    21 }
    -
    22 simdjson_warn_unused
    -
    23 inline size_t document::capacity() const noexcept {
    -
    24  return allocated_capacity;
    -
    25 }
    -
    26 
    -
    27 simdjson_warn_unused
    -
    28 inline error_code document::allocate(size_t capacity) noexcept {
    -
    29  if (capacity == 0) {
    -
    30  string_buf.reset();
    -
    31  tape.reset();
    -
    32  allocated_capacity = 0;
    -
    33  return SUCCESS;
    -
    34  }
    -
    35 
    -
    36  // a pathological input like "[[[[..." would generate capacity tape elements, so
    -
    37  // need a capacity of at least capacity + 1, but it is also possible to do
    -
    38  // worse with "[7,7,7,7,6,7,7,7,6,7,7,6,[7,7,7,7,6,7,7,7,6,7,7,6,7,7,7,7,7,7,6"
    -
    39  //where capacity + 1 tape elements are
    -
    40  // generated, see issue https://github.com/simdjson/simdjson/issues/345
    -
    41  size_t tape_capacity = SIMDJSON_ROUNDUP_N(capacity + 3, 64);
    -
    42  // a document with only zero-length strings... could have capacity/3 string
    -
    43  // and we would need capacity/3 * 5 bytes on the string buffer
    -
    44  size_t string_capacity = SIMDJSON_ROUNDUP_N(5 * capacity / 3 + SIMDJSON_PADDING, 64);
    -
    45  string_buf.reset( new (std::nothrow) uint8_t[string_capacity]);
    -
    46  tape.reset(new (std::nothrow) uint64_t[tape_capacity]);
    -
    47  if(!(string_buf && tape)) {
    -
    48  allocated_capacity = 0;
    -
    49  string_buf.reset();
    -
    50  tape.reset();
    -
    51  return MEMALLOC;
    -
    52  }
    -
    53  // Technically the allocated_capacity might be larger than capacity
    -
    54  // so the next line is pessimistic.
    -
    55  allocated_capacity = capacity;
    -
    56  return SUCCESS;
    -
    57 }
    -
    58 
    -
    59 inline bool document::dump_raw_tape(std::ostream &os) const noexcept {
    -
    60  uint32_t string_length;
    -
    61  size_t tape_idx = 0;
    -
    62  uint64_t tape_val = tape[tape_idx];
    -
    63  uint8_t type = uint8_t(tape_val >> 56);
    -
    64  os << tape_idx << " : " << type;
    -
    65  tape_idx++;
    -
    66  size_t how_many = 0;
    -
    67  if (type == 'r') {
    -
    68  how_many = size_t(tape_val & internal::JSON_VALUE_MASK);
    -
    69  } else {
    -
    70  // Error: no starting root node?
    -
    71  return false;
    -
    72  }
    -
    73  os << "\t// pointing to " << how_many << " (right after last node)\n";
    -
    74  uint64_t payload;
    -
    75  for (; tape_idx < how_many; tape_idx++) {
    -
    76  os << tape_idx << " : ";
    -
    77  tape_val = tape[tape_idx];
    -
    78  payload = tape_val & internal::JSON_VALUE_MASK;
    -
    79  type = uint8_t(tape_val >> 56);
    -
    80  switch (type) {
    -
    81  case '"': // we have a string
    -
    82  os << "string \"";
    -
    83  std::memcpy(&string_length, string_buf.get() + payload, sizeof(uint32_t));
    -
    84  os << internal::escape_json_string(std::string_view(
    -
    85  reinterpret_cast<const char *>(string_buf.get() + payload + sizeof(uint32_t)),
    -
    86  string_length
    -
    87  ));
    -
    88  os << '"';
    -
    89  os << '\n';
    -
    90  break;
    -
    91  case 'l': // we have a long int
    -
    92  if (tape_idx + 1 >= how_many) {
    -
    93  return false;
    -
    94  }
    -
    95  os << "integer " << static_cast<int64_t>(tape[++tape_idx]) << "\n";
    -
    96  break;
    -
    97  case 'u': // we have a long uint
    -
    98  if (tape_idx + 1 >= how_many) {
    -
    99  return false;
    -
    100  }
    -
    101  os << "unsigned integer " << tape[++tape_idx] << "\n";
    -
    102  break;
    -
    103  case 'd': // we have a double
    -
    104  os << "float ";
    -
    105  if (tape_idx + 1 >= how_many) {
    -
    106  return false;
    -
    107  }
    -
    108  double answer;
    -
    109  std::memcpy(&answer, &tape[++tape_idx], sizeof(answer));
    -
    110  os << answer << '\n';
    -
    111  break;
    -
    112  case 'n': // we have a null
    -
    113  os << "null\n";
    -
    114  break;
    -
    115  case 't': // we have a true
    -
    116  os << "true\n";
    -
    117  break;
    -
    118  case 'f': // we have a false
    -
    119  os << "false\n";
    -
    120  break;
    -
    121  case '{': // we have an object
    -
    122  os << "{\t// pointing to next tape location " << uint32_t(payload)
    -
    123  << " (first node after the scope), "
    -
    124  << " saturated count "
    -
    125  << ((payload >> 32) & internal::JSON_COUNT_MASK)<< "\n";
    -
    126  break; case '}': // we end an object
    -
    127  os << "}\t// pointing to previous tape location " << uint32_t(payload)
    -
    128  << " (start of the scope)\n";
    -
    129  break;
    -
    130  case '[': // we start an array
    -
    131  os << "[\t// pointing to next tape location " << uint32_t(payload)
    -
    132  << " (first node after the scope), "
    -
    133  << " saturated count "
    -
    134  << ((payload >> 32) & internal::JSON_COUNT_MASK)<< "\n";
    -
    135  break;
    -
    136  case ']': // we end an array
    -
    137  os << "]\t// pointing to previous tape location " << uint32_t(payload)
    -
    138  << " (start of the scope)\n";
    -
    139  break;
    -
    140  case 'r': // we start and end with the root node
    -
    141  // should we be hitting the root node?
    +
    17 inline element document::root() const noexcept {
    +
    18  return element(internal::tape_ref(this, 1));
    +
    19 }
    +
    20 simdjson_warn_unused
    +
    21 inline size_t document::capacity() const noexcept {
    +
    22  return allocated_capacity;
    +
    23 }
    +
    24 
    +
    25 simdjson_warn_unused
    +
    26 inline error_code document::allocate(size_t capacity) noexcept {
    +
    27  if (capacity == 0) {
    +
    28  string_buf.reset();
    +
    29  tape.reset();
    +
    30  allocated_capacity = 0;
    +
    31  return SUCCESS;
    +
    32  }
    +
    33 
    +
    34  // a pathological input like "[[[[..." would generate capacity tape elements, so
    +
    35  // need a capacity of at least capacity + 1, but it is also possible to do
    +
    36  // worse with "[7,7,7,7,6,7,7,7,6,7,7,6,[7,7,7,7,6,7,7,7,6,7,7,6,7,7,7,7,7,7,6"
    +
    37  //where capacity + 1 tape elements are
    +
    38  // generated, see issue https://github.com/simdjson/simdjson/issues/345
    +
    39  size_t tape_capacity = SIMDJSON_ROUNDUP_N(capacity + 3, 64);
    +
    40  // a document with only zero-length strings... could have capacity/3 string
    +
    41  // and we would need capacity/3 * 5 bytes on the string buffer
    +
    42  size_t string_capacity = SIMDJSON_ROUNDUP_N(5 * capacity / 3 + SIMDJSON_PADDING, 64);
    +
    43  string_buf.reset( new (std::nothrow) uint8_t[string_capacity]);
    +
    44  tape.reset(new (std::nothrow) uint64_t[tape_capacity]);
    +
    45  if(!(string_buf && tape)) {
    +
    46  allocated_capacity = 0;
    +
    47  string_buf.reset();
    +
    48  tape.reset();
    +
    49  return MEMALLOC;
    +
    50  }
    +
    51  // Technically the allocated_capacity might be larger than capacity
    +
    52  // so the next line is pessimistic.
    +
    53  allocated_capacity = capacity;
    +
    54  return SUCCESS;
    +
    55 }
    +
    56 
    +
    57 inline bool document::dump_raw_tape(std::ostream &os) const noexcept {
    +
    58  uint32_t string_length;
    +
    59  size_t tape_idx = 0;
    +
    60  uint64_t tape_val = tape[tape_idx];
    +
    61  uint8_t type = uint8_t(tape_val >> 56);
    +
    62  os << tape_idx << " : " << type;
    +
    63  tape_idx++;
    +
    64  size_t how_many = 0;
    +
    65  if (type == 'r') {
    +
    66  how_many = size_t(tape_val & internal::JSON_VALUE_MASK);
    +
    67  } else {
    +
    68  // Error: no starting root node?
    +
    69  return false;
    +
    70  }
    +
    71  os << "\t// pointing to " << how_many << " (right after last node)\n";
    +
    72  uint64_t payload;
    +
    73  for (; tape_idx < how_many; tape_idx++) {
    +
    74  os << tape_idx << " : ";
    +
    75  tape_val = tape[tape_idx];
    +
    76  payload = tape_val & internal::JSON_VALUE_MASK;
    +
    77  type = uint8_t(tape_val >> 56);
    +
    78  switch (type) {
    +
    79  case '"': // we have a string
    +
    80  os << "string \"";
    +
    81  std::memcpy(&string_length, string_buf.get() + payload, sizeof(uint32_t));
    +
    82  os << internal::escape_json_string(std::string_view(
    +
    83  reinterpret_cast<const char *>(string_buf.get() + payload + sizeof(uint32_t)),
    +
    84  string_length
    +
    85  ));
    +
    86  os << '"';
    +
    87  os << '\n';
    +
    88  break;
    +
    89  case 'l': // we have a long int
    +
    90  if (tape_idx + 1 >= how_many) {
    +
    91  return false;
    +
    92  }
    +
    93  os << "integer " << static_cast<int64_t>(tape[++tape_idx]) << "\n";
    +
    94  break;
    +
    95  case 'u': // we have a long uint
    +
    96  if (tape_idx + 1 >= how_many) {
    +
    97  return false;
    +
    98  }
    +
    99  os << "unsigned integer " << tape[++tape_idx] << "\n";
    +
    100  break;
    +
    101  case 'd': // we have a double
    +
    102  os << "float ";
    +
    103  if (tape_idx + 1 >= how_many) {
    +
    104  return false;
    +
    105  }
    +
    106  double answer;
    +
    107  std::memcpy(&answer, &tape[++tape_idx], sizeof(answer));
    +
    108  os << answer << '\n';
    +
    109  break;
    +
    110  case 'n': // we have a null
    +
    111  os << "null\n";
    +
    112  break;
    +
    113  case 't': // we have a true
    +
    114  os << "true\n";
    +
    115  break;
    +
    116  case 'f': // we have a false
    +
    117  os << "false\n";
    +
    118  break;
    +
    119  case '{': // we have an object
    +
    120  os << "{\t// pointing to next tape location " << uint32_t(payload)
    +
    121  << " (first node after the scope), "
    +
    122  << " saturated count "
    +
    123  << ((payload >> 32) & internal::JSON_COUNT_MASK)<< "\n";
    +
    124  break; case '}': // we end an object
    +
    125  os << "}\t// pointing to previous tape location " << uint32_t(payload)
    +
    126  << " (start of the scope)\n";
    +
    127  break;
    +
    128  case '[': // we start an array
    +
    129  os << "[\t// pointing to next tape location " << uint32_t(payload)
    +
    130  << " (first node after the scope), "
    +
    131  << " saturated count "
    +
    132  << ((payload >> 32) & internal::JSON_COUNT_MASK)<< "\n";
    +
    133  break;
    +
    134  case ']': // we end an array
    +
    135  os << "]\t// pointing to previous tape location " << uint32_t(payload)
    +
    136  << " (start of the scope)\n";
    +
    137  break;
    +
    138  case 'r': // we start and end with the root node
    +
    139  // should we be hitting the root node?
    +
    140  return false;
    +
    141  default:
    142  return false;
    -
    143  default:
    -
    144  return false;
    -
    145  }
    -
    146  }
    -
    147  tape_val = tape[tape_idx];
    -
    148  payload = tape_val & internal::JSON_VALUE_MASK;
    -
    149  type = uint8_t(tape_val >> 56);
    -
    150  os << tape_idx << " : " << type << "\t// pointing to " << payload
    -
    151  << " (start root)\n";
    -
    152  return true;
    -
    153 }
    -
    154 
    -
    155 } // namespace dom
    -
    156 } // namespace simdjson
    -
    157 
    -
    158 #endif // SIMDJSON_INLINE_DOCUMENT_H
    -
    element root() const noexcept
    Get the root element of this document as a JSON array.
    Definition: document-inl.h:19
    -
    A JSON element.
    Definition: element.h:40
    -
    We want to support argument-dependent lookup (ADL).
    +
    143  }
    +
    144  }
    +
    145  tape_val = tape[tape_idx];
    +
    146  payload = tape_val & internal::JSON_VALUE_MASK;
    +
    147  type = uint8_t(tape_val >> 56);
    +
    148  os << tape_idx << " : " << type << "\t// pointing to " << payload
    +
    149  << " (start root)\n";
    +
    150  return true;
    +
    151 }
    +
    152 
    +
    153 } // namespace dom
    +
    154 } // namespace simdjson
    +
    155 
    +
    156 #endif // SIMDJSON_INLINE_DOCUMENT_H
    +
    element root() const noexcept
    Get the root element of this document as a JSON array.
    Definition: document-inl.h:17
    +
    A JSON element.
    Definition: element.h:31
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ MEMALLOC
    Error allocating memory, most likely out of memory.
    Definition: error.h:20
    @ SUCCESS
    No error.
    Definition: error.h:18
    -
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: common_defs.h:45
    +
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: base.h:30
    diff --git a/dom_2document_8h_source.html b/dom_2document_8h_source.html index 6cce54a8c..5fa6b3898 100644 --- a/dom_2document_8h_source.html +++ b/dom_2document_8h_source.html @@ -94,50 +94,48 @@ $(document).ready(function(){initNavTree('dom_2document_8h_source.html',''); ini
    1 #ifndef SIMDJSON_DOM_DOCUMENT_H
    2 #define SIMDJSON_DOM_DOCUMENT_H
    3 
    -
    4 #include "simdjson/common_defs.h"
    -
    5 #include <memory>
    -
    6 #include <ostream>
    +
    4 #include "simdjson/dom/base.h"
    +
    5 
    +
    6 #include <memory>
    7 
    8 namespace simdjson {
    9 namespace dom {
    10 
    -
    11 class element;
    -
    12 
    -
    18 class document {
    -
    19 public:
    -
    25  document() noexcept = default;
    -
    26  ~document() noexcept = default;
    -
    27 
    -
    33  document(document &&other) noexcept = default;
    -
    35  document(const document &) = delete; // Disallow copying
    -
    41  document &operator=(document &&other) noexcept = default;
    -
    43  document &operator=(const document &) = delete; // Disallow copying
    -
    44 
    -
    48  element root() const noexcept;
    -
    49 
    -
    56  bool dump_raw_tape(std::ostream &os) const noexcept;
    -
    57 
    -
    59  std::unique_ptr<uint64_t[]> tape{};
    -
    60 
    -
    65  std::unique_ptr<uint8_t[]> string_buf{};
    -
    77  error_code allocate(size_t len) noexcept;
    -
    82  size_t capacity() const noexcept;
    -
    83 
    -
    84 
    -
    85 private:
    -
    86  size_t allocated_capacity{0};
    -
    87  friend class parser;
    -
    88 }; // class document
    -
    89 
    -
    90 } // namespace dom
    -
    91 } // namespace simdjson
    -
    92 
    -
    93 #endif // SIMDJSON_DOM_DOCUMENT_H
    -
    A parsed JSON document.
    Definition: document.h:18
    +
    16 class document {
    +
    17 public:
    +
    23  document() noexcept = default;
    +
    24  ~document() noexcept = default;
    +
    25 
    +
    31  document(document &&other) noexcept = default;
    +
    33  document(const document &) = delete; // Disallow copying
    +
    39  document &operator=(document &&other) noexcept = default;
    +
    41  document &operator=(const document &) = delete; // Disallow copying
    +
    42 
    +
    46  element root() const noexcept;
    +
    47 
    +
    54  bool dump_raw_tape(std::ostream &os) const noexcept;
    +
    55 
    +
    57  std::unique_ptr<uint64_t[]> tape{};
    +
    58 
    +
    63  std::unique_ptr<uint8_t[]> string_buf{};
    +
    75  error_code allocate(size_t len) noexcept;
    +
    80  size_t capacity() const noexcept;
    +
    81 
    +
    82 
    +
    83 private:
    +
    84  size_t allocated_capacity{0};
    +
    85  friend class parser;
    +
    86 }; // class document
    +
    87 
    +
    88 } // namespace dom
    +
    89 } // namespace simdjson
    +
    90 
    +
    91 #endif // SIMDJSON_DOM_DOCUMENT_H
    +
    A parsed JSON document.
    Definition: document.h:16
    document() noexcept=default
    Create a document container with zero capacity.
    -
    element root() const noexcept
    Get the root element of this document as a JSON array.
    Definition: document-inl.h:19
    -
    A JSON element.
    Definition: element.h:40
    -
    We want to support argument-dependent lookup (ADL).
    +
    element root() const noexcept
    Get the root element of this document as a JSON array.
    Definition: document-inl.h:17
    +
    A JSON element.
    Definition: element.h:31
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    diff --git a/dom_2document__stream-inl_8h_source.html b/dom_2document__stream-inl_8h_source.html index 6b9a617dc..934b61149 100644 --- a/dom_2document__stream-inl_8h_source.html +++ b/dom_2document__stream-inl_8h_source.html @@ -95,355 +95,357 @@ $(document).ready(function(){initNavTree('dom_2document__stream-inl_8h_source.ht
    2 #define SIMDJSON_INLINE_DOCUMENT_STREAM_H
    3 
    4 #include "simdjson/dom/document_stream.h"
    -
    5 #include <algorithm>
    -
    6 #include <limits>
    -
    7 #include <stdexcept>
    -
    8 namespace simdjson {
    -
    9 namespace dom {
    -
    10 
    -
    11 #ifdef SIMDJSON_THREADS_ENABLED
    -
    12 inline void stage1_worker::finish() {
    -
    13  // After calling "run" someone would call finish() to wait
    -
    14  // for the end of the processing.
    -
    15  // This function will wait until either the thread has done
    -
    16  // the processing or, else, the destructor has been called.
    -
    17  std::unique_lock<std::mutex> lock(locking_mutex);
    -
    18  cond_var.wait(lock, [this]{return has_work == false;});
    -
    19 }
    -
    20 
    -
    21 inline stage1_worker::~stage1_worker() {
    -
    22  // The thread may never outlive the stage1_worker instance
    -
    23  // and will always be stopped/joined before the stage1_worker
    -
    24  // instance is gone.
    -
    25  stop_thread();
    -
    26 }
    -
    27 
    -
    28 inline void stage1_worker::start_thread() {
    -
    29  std::unique_lock<std::mutex> lock(locking_mutex);
    -
    30  if(thread.joinable()) {
    -
    31  return; // This should never happen but we never want to create more than one thread.
    -
    32  }
    -
    33  thread = std::thread([this]{
    -
    34  while(true) {
    -
    35  std::unique_lock<std::mutex> thread_lock(locking_mutex);
    -
    36  // We wait for either "run" or "stop_thread" to be called.
    -
    37  cond_var.wait(thread_lock, [this]{return has_work || !can_work;});
    -
    38  // If, for some reason, the stop_thread() method was called (i.e., the
    -
    39  // destructor of stage1_worker is called, then we want to immediately destroy
    -
    40  // the thread (and not do any more processing).
    -
    41  if(!can_work) {
    -
    42  break;
    -
    43  }
    -
    44  this->owner->stage1_thread_error = this->owner->run_stage1(*this->stage1_thread_parser,
    -
    45  this->_next_batch_start);
    -
    46  this->has_work = false;
    -
    47  // The condition variable call should be moved after thread_lock.unlock() for performance
    -
    48  // reasons but thread sanitizers may report it as a data race if we do.
    -
    49  // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock
    -
    50  cond_var.notify_one(); // will notify "finish"
    -
    51  thread_lock.unlock();
    -
    52  }
    -
    53  }
    -
    54  );
    -
    55 }
    -
    56 
    -
    57 
    -
    58 inline void stage1_worker::stop_thread() {
    -
    59  std::unique_lock<std::mutex> lock(locking_mutex);
    -
    60  // We have to make sure that all locks can be released.
    -
    61  can_work = false;
    -
    62  has_work = false;
    -
    63  cond_var.notify_all();
    -
    64  lock.unlock();
    -
    65  if(thread.joinable()) {
    -
    66  thread.join();
    -
    67  }
    -
    68 }
    -
    69 
    -
    70 inline void stage1_worker::run(document_stream * ds, dom::parser * stage1, size_t next_batch_start) {
    -
    71  std::unique_lock<std::mutex> lock(locking_mutex);
    -
    72  owner = ds;
    -
    73  _next_batch_start = next_batch_start;
    -
    74  stage1_thread_parser = stage1;
    -
    75  has_work = true;
    -
    76  // The condition variable call should be moved after thread_lock.unlock() for performance
    -
    77  // reasons but thread sanitizers may report it as a data race if we do.
    -
    78  // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock
    -
    79  cond_var.notify_one(); // will notify the thread lock that we have work
    -
    80  lock.unlock();
    -
    81 }
    -
    82 #endif
    -
    83 
    -
    84 simdjson_inline document_stream::document_stream(
    -
    85  dom::parser &_parser,
    -
    86  const uint8_t *_buf,
    -
    87  size_t _len,
    -
    88  size_t _batch_size
    -
    89 ) noexcept
    -
    90  : parser{&_parser},
    -
    91  buf{_buf},
    -
    92  len{_len},
    -
    93  batch_size{_batch_size <= MINIMAL_BATCH_SIZE ? MINIMAL_BATCH_SIZE : _batch_size},
    -
    94  error{SUCCESS}
    -
    95 #ifdef SIMDJSON_THREADS_ENABLED
    -
    96  , use_thread(_parser.threaded) // we need to make a copy because _parser.threaded can change
    -
    97 #endif
    -
    98 {
    -
    99 #ifdef SIMDJSON_THREADS_ENABLED
    -
    100  if(worker.get() == nullptr) {
    -
    101  error = MEMALLOC;
    -
    102  }
    -
    103 #endif
    -
    104 }
    -
    105 
    -
    106 simdjson_inline document_stream::document_stream() noexcept
    -
    107  : parser{nullptr},
    -
    108  buf{nullptr},
    -
    109  len{0},
    -
    110  batch_size{0},
    -
    111  error{UNINITIALIZED}
    -
    112 #ifdef SIMDJSON_THREADS_ENABLED
    -
    113  , use_thread(false)
    -
    114 #endif
    -
    115 {
    -
    116 }
    -
    117 
    -
    118 simdjson_inline document_stream::~document_stream() noexcept {
    -
    119 #ifdef SIMDJSON_THREADS_ENABLED
    -
    120  worker.reset();
    -
    121 #endif
    -
    122 }
    -
    123 
    -
    124 simdjson_inline document_stream::iterator::iterator() noexcept
    -
    125  : stream{nullptr}, finished{true} {
    -
    126 }
    -
    127 
    - -
    129  start();
    -
    130  // If there are no documents, we're finished.
    -
    131  return iterator(this, error == EMPTY);
    -
    132 }
    -
    133 
    - -
    135  return iterator(this, true);
    -
    136 }
    -
    137 
    -
    138 simdjson_inline document_stream::iterator::iterator(document_stream* _stream, bool is_end) noexcept
    -
    139  : stream{_stream}, finished{is_end} {
    -
    140 }
    -
    141 
    - -
    143  // Note that in case of error, we do not yet mark
    -
    144  // the iterator as "finished": this detection is done
    -
    145  // in the operator++ function since it is possible
    -
    146  // to call operator++ repeatedly while omitting
    -
    147  // calls to operator*.
    -
    148  if (stream->error) { return stream->error; }
    -
    149  return stream->parser->doc.root();
    -
    150 }
    -
    151 
    - -
    153  // If there is an error, then we want the iterator
    -
    154  // to be finished, no matter what. (E.g., we do not
    -
    155  // keep generating documents with errors, or go beyond
    -
    156  // a document with errors.)
    -
    157  //
    -
    158  // Users do not have to call "operator*()" when they use operator++,
    -
    159  // so we need to end the stream in the operator++ function.
    -
    160  //
    -
    161  // Note that setting finished = true is essential otherwise
    -
    162  // we would enter an infinite loop.
    -
    163  if (stream->error) { finished = true; }
    -
    164  // Note that stream->error() is guarded against error conditions
    -
    165  // (it will immediately return if stream->error casts to false).
    -
    166  // In effect, this next function does nothing when (stream->error)
    -
    167  // is true (hence the risk of an infinite loop).
    -
    168  stream->next();
    -
    169  // If that was the last document, we're finished.
    -
    170  // It is the only type of error we do not want to appear
    -
    171  // in operator*.
    -
    172  if (stream->error == EMPTY) { finished = true; }
    -
    173  // If we had any other kind of error (not EMPTY) then we want
    -
    174  // to pass it along to the operator* and we cannot mark the result
    -
    175  // as "finished" just yet.
    -
    176  return *this;
    -
    177 }
    -
    178 
    -
    179 simdjson_inline bool document_stream::iterator::operator!=(const document_stream::iterator &other) const noexcept {
    -
    180  return finished != other.finished;
    -
    181 }
    -
    182 
    -
    183 inline void document_stream::start() noexcept {
    -
    184  if (error) { return; }
    -
    185  error = parser->ensure_capacity(batch_size);
    +
    5 #include "simdjson/internal/dom_parser_implementation.h"
    +
    6 #include "simdjson/error-inl.h"
    +
    7 #include "simdjson/dom/element-inl.h"
    +
    8 #include "simdjson/dom/parser-inl.h"
    +
    9 
    +
    10 namespace simdjson {
    +
    11 namespace dom {
    +
    12 
    +
    13 #ifdef SIMDJSON_THREADS_ENABLED
    +
    14 inline void stage1_worker::finish() {
    +
    15  // After calling "run" someone would call finish() to wait
    +
    16  // for the end of the processing.
    +
    17  // This function will wait until either the thread has done
    +
    18  // the processing or, else, the destructor has been called.
    +
    19  std::unique_lock<std::mutex> lock(locking_mutex);
    +
    20  cond_var.wait(lock, [this]{return has_work == false;});
    +
    21 }
    +
    22 
    +
    23 inline stage1_worker::~stage1_worker() {
    +
    24  // The thread may never outlive the stage1_worker instance
    +
    25  // and will always be stopped/joined before the stage1_worker
    +
    26  // instance is gone.
    +
    27  stop_thread();
    +
    28 }
    +
    29 
    +
    30 inline void stage1_worker::start_thread() {
    +
    31  std::unique_lock<std::mutex> lock(locking_mutex);
    +
    32  if(thread.joinable()) {
    +
    33  return; // This should never happen but we never want to create more than one thread.
    +
    34  }
    +
    35  thread = std::thread([this]{
    +
    36  while(true) {
    +
    37  std::unique_lock<std::mutex> thread_lock(locking_mutex);
    +
    38  // We wait for either "run" or "stop_thread" to be called.
    +
    39  cond_var.wait(thread_lock, [this]{return has_work || !can_work;});
    +
    40  // If, for some reason, the stop_thread() method was called (i.e., the
    +
    41  // destructor of stage1_worker is called, then we want to immediately destroy
    +
    42  // the thread (and not do any more processing).
    +
    43  if(!can_work) {
    +
    44  break;
    +
    45  }
    +
    46  this->owner->stage1_thread_error = this->owner->run_stage1(*this->stage1_thread_parser,
    +
    47  this->_next_batch_start);
    +
    48  this->has_work = false;
    +
    49  // The condition variable call should be moved after thread_lock.unlock() for performance
    +
    50  // reasons but thread sanitizers may report it as a data race if we do.
    +
    51  // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock
    +
    52  cond_var.notify_one(); // will notify "finish"
    +
    53  thread_lock.unlock();
    +
    54  }
    +
    55  }
    +
    56  );
    +
    57 }
    +
    58 
    +
    59 
    +
    60 inline void stage1_worker::stop_thread() {
    +
    61  std::unique_lock<std::mutex> lock(locking_mutex);
    +
    62  // We have to make sure that all locks can be released.
    +
    63  can_work = false;
    +
    64  has_work = false;
    +
    65  cond_var.notify_all();
    +
    66  lock.unlock();
    +
    67  if(thread.joinable()) {
    +
    68  thread.join();
    +
    69  }
    +
    70 }
    +
    71 
    +
    72 inline void stage1_worker::run(document_stream * ds, dom::parser * stage1, size_t next_batch_start) {
    +
    73  std::unique_lock<std::mutex> lock(locking_mutex);
    +
    74  owner = ds;
    +
    75  _next_batch_start = next_batch_start;
    +
    76  stage1_thread_parser = stage1;
    +
    77  has_work = true;
    +
    78  // The condition variable call should be moved after thread_lock.unlock() for performance
    +
    79  // reasons but thread sanitizers may report it as a data race if we do.
    +
    80  // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock
    +
    81  cond_var.notify_one(); // will notify the thread lock that we have work
    +
    82  lock.unlock();
    +
    83 }
    +
    84 #endif
    +
    85 
    +
    86 simdjson_inline document_stream::document_stream(
    +
    87  dom::parser &_parser,
    +
    88  const uint8_t *_buf,
    +
    89  size_t _len,
    +
    90  size_t _batch_size
    +
    91 ) noexcept
    +
    92  : parser{&_parser},
    +
    93  buf{_buf},
    +
    94  len{_len},
    +
    95  batch_size{_batch_size <= MINIMAL_BATCH_SIZE ? MINIMAL_BATCH_SIZE : _batch_size},
    +
    96  error{SUCCESS}
    +
    97 #ifdef SIMDJSON_THREADS_ENABLED
    +
    98  , use_thread(_parser.threaded) // we need to make a copy because _parser.threaded can change
    +
    99 #endif
    +
    100 {
    +
    101 #ifdef SIMDJSON_THREADS_ENABLED
    +
    102  if(worker.get() == nullptr) {
    +
    103  error = MEMALLOC;
    +
    104  }
    +
    105 #endif
    +
    106 }
    +
    107 
    +
    108 simdjson_inline document_stream::document_stream() noexcept
    +
    109  : parser{nullptr},
    +
    110  buf{nullptr},
    +
    111  len{0},
    +
    112  batch_size{0},
    +
    113  error{UNINITIALIZED}
    +
    114 #ifdef SIMDJSON_THREADS_ENABLED
    +
    115  , use_thread(false)
    +
    116 #endif
    +
    117 {
    +
    118 }
    +
    119 
    +
    120 simdjson_inline document_stream::~document_stream() noexcept {
    +
    121 #ifdef SIMDJSON_THREADS_ENABLED
    +
    122  worker.reset();
    +
    123 #endif
    +
    124 }
    +
    125 
    +
    126 simdjson_inline document_stream::iterator::iterator() noexcept
    +
    127  : stream{nullptr}, finished{true} {
    +
    128 }
    +
    129 
    + +
    131  start();
    +
    132  // If there are no documents, we're finished.
    +
    133  return iterator(this, error == EMPTY);
    +
    134 }
    +
    135 
    + +
    137  return iterator(this, true);
    +
    138 }
    +
    139 
    +
    140 simdjson_inline document_stream::iterator::iterator(document_stream* _stream, bool is_end) noexcept
    +
    141  : stream{_stream}, finished{is_end} {
    +
    142 }
    +
    143 
    + +
    145  // Note that in case of error, we do not yet mark
    +
    146  // the iterator as "finished": this detection is done
    +
    147  // in the operator++ function since it is possible
    +
    148  // to call operator++ repeatedly while omitting
    +
    149  // calls to operator*.
    +
    150  if (stream->error) { return stream->error; }
    +
    151  return stream->parser->doc.root();
    +
    152 }
    +
    153 
    + +
    155  // If there is an error, then we want the iterator
    +
    156  // to be finished, no matter what. (E.g., we do not
    +
    157  // keep generating documents with errors, or go beyond
    +
    158  // a document with errors.)
    +
    159  //
    +
    160  // Users do not have to call "operator*()" when they use operator++,
    +
    161  // so we need to end the stream in the operator++ function.
    +
    162  //
    +
    163  // Note that setting finished = true is essential otherwise
    +
    164  // we would enter an infinite loop.
    +
    165  if (stream->error) { finished = true; }
    +
    166  // Note that stream->error() is guarded against error conditions
    +
    167  // (it will immediately return if stream->error casts to false).
    +
    168  // In effect, this next function does nothing when (stream->error)
    +
    169  // is true (hence the risk of an infinite loop).
    +
    170  stream->next();
    +
    171  // If that was the last document, we're finished.
    +
    172  // It is the only type of error we do not want to appear
    +
    173  // in operator*.
    +
    174  if (stream->error == EMPTY) { finished = true; }
    +
    175  // If we had any other kind of error (not EMPTY) then we want
    +
    176  // to pass it along to the operator* and we cannot mark the result
    +
    177  // as "finished" just yet.
    +
    178  return *this;
    +
    179 }
    +
    180 
    +
    181 simdjson_inline bool document_stream::iterator::operator!=(const document_stream::iterator &other) const noexcept {
    +
    182  return finished != other.finished;
    +
    183 }
    +
    184 
    +
    185 inline void document_stream::start() noexcept {
    186  if (error) { return; }
    -
    187  // Always run the first stage 1 parse immediately
    -
    188  batch_start = 0;
    -
    189  error = run_stage1(*parser, batch_start);
    -
    190  while(error == EMPTY) {
    -
    191  // In exceptional cases, we may start with an empty block
    -
    192  batch_start = next_batch_start();
    -
    193  if (batch_start >= len) { return; }
    -
    194  error = run_stage1(*parser, batch_start);
    -
    195  }
    -
    196  if (error) { return; }
    -
    197 #ifdef SIMDJSON_THREADS_ENABLED
    -
    198  if (use_thread && next_batch_start() < len) {
    -
    199  // Kick off the first thread if needed
    -
    200  error = stage1_thread_parser.ensure_capacity(batch_size);
    -
    201  if (error) { return; }
    -
    202  worker->start_thread();
    -
    203  start_stage1_thread();
    -
    204  if (error) { return; }
    -
    205  }
    -
    206 #endif // SIMDJSON_THREADS_ENABLED
    -
    207  next();
    -
    208 }
    -
    209 
    -
    210 simdjson_inline size_t document_stream::iterator::current_index() const noexcept {
    -
    211  return stream->doc_index;
    -
    212 }
    -
    213 
    -
    214 simdjson_inline std::string_view document_stream::iterator::source() const noexcept {
    -
    215  const char* start = reinterpret_cast<const char*>(stream->buf) + current_index();
    -
    216  bool object_or_array = ((*start == '[') || (*start == '{'));
    -
    217  if(object_or_array) {
    -
    218  size_t next_doc_index = stream->batch_start + stream->parser->implementation->structural_indexes[stream->parser->implementation->next_structural_index - 1];
    -
    219  return std::string_view(start, next_doc_index - current_index() + 1);
    -
    220  } else {
    -
    221  size_t next_doc_index = stream->batch_start + stream->parser->implementation->structural_indexes[stream->parser->implementation->next_structural_index];
    -
    222  return std::string_view(reinterpret_cast<const char*>(stream->buf) + current_index(), next_doc_index - current_index() - 1);
    -
    223  }
    -
    224 }
    -
    225 
    -
    226 
    -
    227 inline void document_stream::next() noexcept {
    -
    228  // We always exit at once, once in an error condition.
    -
    229  if (error) { return; }
    -
    230 
    -
    231  // Load the next document from the batch
    -
    232  doc_index = batch_start + parser->implementation->structural_indexes[parser->implementation->next_structural_index];
    -
    233  error = parser->implementation->stage2_next(parser->doc);
    -
    234  // If that was the last document in the batch, load another batch (if available)
    -
    235  while (error == EMPTY) {
    -
    236  batch_start = next_batch_start();
    -
    237  if (batch_start >= len) { break; }
    -
    238 
    -
    239 #ifdef SIMDJSON_THREADS_ENABLED
    -
    240  if(use_thread) {
    -
    241  load_from_stage1_thread();
    -
    242  } else {
    -
    243  error = run_stage1(*parser, batch_start);
    -
    244  }
    -
    245 #else
    -
    246  error = run_stage1(*parser, batch_start);
    -
    247 #endif
    -
    248  if (error) { continue; } // If the error was EMPTY, we may want to load another batch.
    -
    249  // Run stage 2 on the first document in the batch
    -
    250  doc_index = batch_start + parser->implementation->structural_indexes[parser->implementation->next_structural_index];
    -
    251  error = parser->implementation->stage2_next(parser->doc);
    -
    252  }
    -
    253 }
    -
    254 inline size_t document_stream::size_in_bytes() const noexcept {
    -
    255  return len;
    -
    256 }
    -
    257 
    -
    258 inline size_t document_stream::truncated_bytes() const noexcept {
    -
    259  if(error == CAPACITY) { return len - batch_start; }
    -
    260  return parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] - parser->implementation->structural_indexes[parser->implementation->n_structural_indexes + 1];
    -
    261 }
    -
    262 
    -
    263 inline size_t document_stream::next_batch_start() const noexcept {
    -
    264  return batch_start + parser->implementation->structural_indexes[parser->implementation->n_structural_indexes];
    -
    265 }
    -
    266 
    -
    267 inline error_code document_stream::run_stage1(dom::parser &p, size_t _batch_start) noexcept {
    -
    268  size_t remaining = len - _batch_start;
    -
    269  if (remaining <= batch_size) {
    -
    270  return p.implementation->stage1(&buf[_batch_start], remaining, stage1_mode::streaming_final);
    -
    271  } else {
    -
    272  return p.implementation->stage1(&buf[_batch_start], batch_size, stage1_mode::streaming_partial);
    -
    273  }
    -
    274 }
    -
    275 
    -
    276 #ifdef SIMDJSON_THREADS_ENABLED
    +
    187  error = parser->ensure_capacity(batch_size);
    +
    188  if (error) { return; }
    +
    189  // Always run the first stage 1 parse immediately
    +
    190  batch_start = 0;
    +
    191  error = run_stage1(*parser, batch_start);
    +
    192  while(error == EMPTY) {
    +
    193  // In exceptional cases, we may start with an empty block
    +
    194  batch_start = next_batch_start();
    +
    195  if (batch_start >= len) { return; }
    +
    196  error = run_stage1(*parser, batch_start);
    +
    197  }
    +
    198  if (error) { return; }
    +
    199 #ifdef SIMDJSON_THREADS_ENABLED
    +
    200  if (use_thread && next_batch_start() < len) {
    +
    201  // Kick off the first thread if needed
    +
    202  error = stage1_thread_parser.ensure_capacity(batch_size);
    +
    203  if (error) { return; }
    +
    204  worker->start_thread();
    +
    205  start_stage1_thread();
    +
    206  if (error) { return; }
    +
    207  }
    +
    208 #endif // SIMDJSON_THREADS_ENABLED
    +
    209  next();
    +
    210 }
    +
    211 
    +
    212 simdjson_inline size_t document_stream::iterator::current_index() const noexcept {
    +
    213  return stream->doc_index;
    +
    214 }
    +
    215 
    +
    216 simdjson_inline std::string_view document_stream::iterator::source() const noexcept {
    +
    217  const char* start = reinterpret_cast<const char*>(stream->buf) + current_index();
    +
    218  bool object_or_array = ((*start == '[') || (*start == '{'));
    +
    219  if(object_or_array) {
    +
    220  size_t next_doc_index = stream->batch_start + stream->parser->implementation->structural_indexes[stream->parser->implementation->next_structural_index - 1];
    +
    221  return std::string_view(start, next_doc_index - current_index() + 1);
    +
    222  } else {
    +
    223  size_t next_doc_index = stream->batch_start + stream->parser->implementation->structural_indexes[stream->parser->implementation->next_structural_index];
    +
    224  return std::string_view(reinterpret_cast<const char*>(stream->buf) + current_index(), next_doc_index - current_index() - 1);
    +
    225  }
    +
    226 }
    +
    227 
    +
    228 
    +
    229 inline void document_stream::next() noexcept {
    +
    230  // We always exit at once, once in an error condition.
    +
    231  if (error) { return; }
    +
    232 
    +
    233  // Load the next document from the batch
    +
    234  doc_index = batch_start + parser->implementation->structural_indexes[parser->implementation->next_structural_index];
    +
    235  error = parser->implementation->stage2_next(parser->doc);
    +
    236  // If that was the last document in the batch, load another batch (if available)
    +
    237  while (error == EMPTY) {
    +
    238  batch_start = next_batch_start();
    +
    239  if (batch_start >= len) { break; }
    +
    240 
    +
    241 #ifdef SIMDJSON_THREADS_ENABLED
    +
    242  if(use_thread) {
    +
    243  load_from_stage1_thread();
    +
    244  } else {
    +
    245  error = run_stage1(*parser, batch_start);
    +
    246  }
    +
    247 #else
    +
    248  error = run_stage1(*parser, batch_start);
    +
    249 #endif
    +
    250  if (error) { continue; } // If the error was EMPTY, we may want to load another batch.
    +
    251  // Run stage 2 on the first document in the batch
    +
    252  doc_index = batch_start + parser->implementation->structural_indexes[parser->implementation->next_structural_index];
    +
    253  error = parser->implementation->stage2_next(parser->doc);
    +
    254  }
    +
    255 }
    +
    256 inline size_t document_stream::size_in_bytes() const noexcept {
    +
    257  return len;
    +
    258 }
    +
    259 
    +
    260 inline size_t document_stream::truncated_bytes() const noexcept {
    +
    261  if(error == CAPACITY) { return len - batch_start; }
    +
    262  return parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] - parser->implementation->structural_indexes[parser->implementation->n_structural_indexes + 1];
    +
    263 }
    +
    264 
    +
    265 inline size_t document_stream::next_batch_start() const noexcept {
    +
    266  return batch_start + parser->implementation->structural_indexes[parser->implementation->n_structural_indexes];
    +
    267 }
    +
    268 
    +
    269 inline error_code document_stream::run_stage1(dom::parser &p, size_t _batch_start) noexcept {
    +
    270  size_t remaining = len - _batch_start;
    +
    271  if (remaining <= batch_size) {
    +
    272  return p.implementation->stage1(&buf[_batch_start], remaining, stage1_mode::streaming_final);
    +
    273  } else {
    +
    274  return p.implementation->stage1(&buf[_batch_start], batch_size, stage1_mode::streaming_partial);
    +
    275  }
    +
    276 }
    277 
    -
    278 inline void document_stream::load_from_stage1_thread() noexcept {
    -
    279  worker->finish();
    -
    280  // Swap to the parser that was loaded up in the thread. Make sure the parser has
    -
    281  // enough memory to swap to, as well.
    -
    282  std::swap(*parser, stage1_thread_parser);
    -
    283  error = stage1_thread_error;
    -
    284  if (error) { return; }
    -
    285 
    -
    286  // If there's anything left, start the stage 1 thread!
    -
    287  if (next_batch_start() < len) {
    -
    288  start_stage1_thread();
    -
    289  }
    -
    290 }
    -
    291 
    -
    292 inline void document_stream::start_stage1_thread() noexcept {
    -
    293  // we call the thread on a lambda that will update
    -
    294  // this->stage1_thread_error
    -
    295  // there is only one thread that may write to this value
    -
    296  // TODO this is NOT exception-safe.
    -
    297  this->stage1_thread_error = UNINITIALIZED; // In case something goes wrong, make sure it's an error
    -
    298  size_t _next_batch_start = this->next_batch_start();
    -
    299 
    -
    300  worker->run(this, & this->stage1_thread_parser, _next_batch_start);
    -
    301 }
    -
    302 
    -
    303 #endif // SIMDJSON_THREADS_ENABLED
    +
    278 #ifdef SIMDJSON_THREADS_ENABLED
    +
    279 
    +
    280 inline void document_stream::load_from_stage1_thread() noexcept {
    +
    281  worker->finish();
    +
    282  // Swap to the parser that was loaded up in the thread. Make sure the parser has
    +
    283  // enough memory to swap to, as well.
    +
    284  std::swap(*parser, stage1_thread_parser);
    +
    285  error = stage1_thread_error;
    +
    286  if (error) { return; }
    +
    287 
    +
    288  // If there's anything left, start the stage 1 thread!
    +
    289  if (next_batch_start() < len) {
    +
    290  start_stage1_thread();
    +
    291  }
    +
    292 }
    +
    293 
    +
    294 inline void document_stream::start_stage1_thread() noexcept {
    +
    295  // we call the thread on a lambda that will update
    +
    296  // this->stage1_thread_error
    +
    297  // there is only one thread that may write to this value
    +
    298  // TODO this is NOT exception-safe.
    +
    299  this->stage1_thread_error = UNINITIALIZED; // In case something goes wrong, make sure it's an error
    +
    300  size_t _next_batch_start = this->next_batch_start();
    +
    301 
    +
    302  worker->run(this, & this->stage1_thread_parser, _next_batch_start);
    +
    303 }
    304 
    -
    305 } // namespace dom
    +
    305 #endif // SIMDJSON_THREADS_ENABLED
    306 
    -
    307 simdjson_inline simdjson_result<dom::document_stream>::simdjson_result() noexcept
    -
    308  : simdjson_result_base() {
    -
    309 }
    -
    310 simdjson_inline simdjson_result<dom::document_stream>::simdjson_result(error_code error) noexcept
    -
    311  : simdjson_result_base(error) {
    -
    312 }
    -
    313 simdjson_inline simdjson_result<dom::document_stream>::simdjson_result(dom::document_stream &&value) noexcept
    -
    314  : simdjson_result_base(std::forward<dom::document_stream>(value)) {
    -
    315 }
    -
    316 
    -
    317 #if SIMDJSON_EXCEPTIONS
    -
    318 simdjson_inline dom::document_stream::iterator simdjson_result<dom::document_stream>::begin() noexcept(false) {
    -
    319  if (error()) { throw simdjson_error(error()); }
    -
    320  return first.begin();
    -
    321 }
    -
    322 simdjson_inline dom::document_stream::iterator simdjson_result<dom::document_stream>::end() noexcept(false) {
    -
    323  if (error()) { throw simdjson_error(error()); }
    -
    324  return first.end();
    -
    325 }
    -
    326 #else // SIMDJSON_EXCEPTIONS
    -
    327 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    -
    328 simdjson_inline dom::document_stream::iterator simdjson_result<dom::document_stream>::begin() noexcept {
    -
    329  first.error = error();
    -
    330  return first.begin();
    -
    331 }
    -
    332 simdjson_inline dom::document_stream::iterator simdjson_result<dom::document_stream>::end() noexcept {
    -
    333  first.error = error();
    -
    334  return first.end();
    -
    335 }
    -
    336 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    -
    337 #endif // SIMDJSON_EXCEPTIONS
    -
    338 
    -
    339 } // namespace simdjson
    -
    340 #endif // SIMDJSON_INLINE_DOCUMENT_STREAM_H
    -
    An iterator through a forward-only stream of documents.
    -
    simdjson_inline reference operator*() noexcept
    Get the current document (or error).
    -
    simdjson_inline bool operator!=(const iterator &other) const noexcept
    Check if we're at the end yet.
    -
    simdjson_inline iterator() noexcept
    Default constructor.
    -
    iterator & operator++() noexcept
    Advance to the next document (prefix).
    -
    A forward-only stream of documents.
    -
    size_t size_in_bytes() const noexcept
    Returns the input size in bytes.
    -
    size_t truncated_bytes() const noexcept
    After iterating through the stream, this method returns the number of bytes that were not parsed at t...
    -
    simdjson_inline iterator begin() noexcept
    Start iterating the documents in the stream.
    -
    simdjson_inline iterator end() noexcept
    The end of the stream, for iterator comparison purposes.
    -
    simdjson_inline document_stream() noexcept
    Construct an uninitialized document_stream.
    -
    A persistent document parser.
    Definition: parser.h:58
    -
    We want to support argument-dependent lookup (ADL).
    +
    307 } // namespace dom
    +
    308 
    +
    309 simdjson_inline simdjson_result<dom::document_stream>::simdjson_result() noexcept
    +
    310  : simdjson_result_base() {
    +
    311 }
    +
    312 simdjson_inline simdjson_result<dom::document_stream>::simdjson_result(error_code error) noexcept
    +
    313  : simdjson_result_base(error) {
    +
    314 }
    +
    315 simdjson_inline simdjson_result<dom::document_stream>::simdjson_result(dom::document_stream &&value) noexcept
    +
    316  : simdjson_result_base(std::forward<dom::document_stream>(value)) {
    +
    317 }
    +
    318 
    +
    319 #if SIMDJSON_EXCEPTIONS
    +
    320 simdjson_inline dom::document_stream::iterator simdjson_result<dom::document_stream>::begin() noexcept(false) {
    +
    321  if (error()) { throw simdjson_error(error()); }
    +
    322  return first.begin();
    +
    323 }
    +
    324 simdjson_inline dom::document_stream::iterator simdjson_result<dom::document_stream>::end() noexcept(false) {
    +
    325  if (error()) { throw simdjson_error(error()); }
    +
    326  return first.end();
    +
    327 }
    +
    328 #else // SIMDJSON_EXCEPTIONS
    +
    329 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    +
    330 simdjson_inline dom::document_stream::iterator simdjson_result<dom::document_stream>::begin() noexcept {
    +
    331  first.error = error();
    +
    332  return first.begin();
    +
    333 }
    +
    334 simdjson_inline dom::document_stream::iterator simdjson_result<dom::document_stream>::end() noexcept {
    +
    335  first.error = error();
    +
    336  return first.end();
    +
    337 }
    +
    338 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    +
    339 #endif // SIMDJSON_EXCEPTIONS
    +
    340 
    +
    341 } // namespace simdjson
    +
    342 #endif // SIMDJSON_INLINE_DOCUMENT_STREAM_H
    +
    An iterator through a forward-only stream of documents.
    +
    simdjson_inline reference operator*() noexcept
    Get the current document (or error).
    +
    simdjson_inline bool operator!=(const iterator &other) const noexcept
    Check if we're at the end yet.
    +
    simdjson_inline iterator() noexcept
    Default constructor.
    +
    iterator & operator++() noexcept
    Advance to the next document (prefix).
    +
    A forward-only stream of documents.
    +
    size_t size_in_bytes() const noexcept
    Returns the input size in bytes.
    +
    size_t truncated_bytes() const noexcept
    After iterating through the stream, this method returns the number of bytes that were not parsed at t...
    +
    simdjson_inline iterator begin() noexcept
    Start iterating the documents in the stream.
    +
    simdjson_inline iterator end() noexcept
    The end of the stream, for iterator comparison purposes.
    +
    simdjson_inline document_stream() noexcept
    Construct an uninitialized document_stream.
    +
    A persistent document parser.
    Definition: parser.h:30
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ CAPACITY
    This parser can't support a document that big.
    Definition: error.h:19
    @ EMPTY
    no structural element found
    Definition: error.h:30
    @@ -451,7 +453,7 @@ $(document).ready(function(){initNavTree('dom_2document__stream-inl_8h_source.ht
    @ SUCCESS
    No error.
    Definition: error.h:18
    @ UNINITIALIZED
    unknown error, or uninitialized document
    Definition: error.h:29
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    diff --git a/dom_2document__stream_8h_source.html b/dom_2document__stream_8h_source.html index 5c5a7b038..0d4b20183 100644 --- a/dom_2document__stream_8h_source.html +++ b/dom_2document__stream_8h_source.html @@ -94,9 +94,9 @@ $(document).ready(function(){initNavTree('dom_2document__stream_8h_source.html',
    1 #ifndef SIMDJSON_DOCUMENT_STREAM_H
    2 #define SIMDJSON_DOCUMENT_STREAM_H
    3 
    -
    4 #include "simdjson/common_defs.h"
    +
    4 #include "simdjson/dom/base.h"
    5 #include "simdjson/dom/parser.h"
    -
    6 #include "simdjson/error.h"
    +
    6 
    7 #ifdef SIMDJSON_THREADS_ENABLED
    8 #include <thread>
    9 #include <mutex>
    @@ -106,155 +106,154 @@ $(document).ready(function(){initNavTree('dom_2document__stream_8h_source.html',
    13 namespace simdjson {
    14 namespace dom {
    15 
    -
    16 
    -
    17 #ifdef SIMDJSON_THREADS_ENABLED
    -
    19 struct stage1_worker {
    -
    20  stage1_worker() noexcept = default;
    -
    21  stage1_worker(const stage1_worker&) = delete;
    -
    22  stage1_worker(stage1_worker&&) = delete;
    -
    23  stage1_worker operator=(const stage1_worker&) = delete;
    -
    24  ~stage1_worker();
    -
    29  void start_thread();
    -
    34  void run(document_stream * ds, dom::parser * stage1, size_t next_batch_start);
    -
    36  void finish();
    -
    37 
    -
    38 private:
    -
    39 
    -
    45  void stop_thread();
    -
    46 
    -
    47  std::thread thread{};
    -
    49  dom::parser * stage1_thread_parser{};
    -
    50  size_t _next_batch_start{};
    -
    51  document_stream * owner{};
    -
    56  bool has_work{false};
    -
    57  bool can_work{true};
    -
    58 
    -
    62  std::mutex locking_mutex{};
    -
    63  std::condition_variable cond_var{};
    -
    64 };
    -
    65 #endif
    -
    66 
    - -
    74 public:
    -
    83  simdjson_inline document_stream() noexcept;
    -
    85  simdjson_inline document_stream(document_stream &&other) noexcept = default;
    -
    87  simdjson_inline document_stream &operator=(document_stream &&other) noexcept = default;
    -
    88 
    -
    89  simdjson_inline ~document_stream() noexcept;
    -
    93  inline size_t size_in_bytes() const noexcept;
    -
    112  inline size_t truncated_bytes() const noexcept;
    -
    116  class iterator {
    -
    117  public:
    - -
    119  using reference = value_type;
    -
    120 
    -
    121  using difference_type = std::ptrdiff_t;
    -
    122 
    -
    123  using iterator_category = std::input_iterator_tag;
    -
    124 
    -
    128  simdjson_inline iterator() noexcept;
    -
    132  simdjson_inline reference operator*() noexcept;
    -
    136  inline iterator& operator++() noexcept;
    -
    141  simdjson_inline bool operator!=(const iterator &other) const noexcept;
    -
    157  simdjson_inline size_t current_index() const noexcept;
    -
    177  simdjson_inline std::string_view source() const noexcept;
    -
    178 
    -
    179  private:
    -
    180  simdjson_inline iterator(document_stream *s, bool finished) noexcept;
    -
    182  document_stream* stream;
    -
    184  bool finished;
    -
    185  friend class document_stream;
    -
    186  };
    -
    187 
    -
    191  simdjson_inline iterator begin() noexcept;
    -
    195  simdjson_inline iterator end() noexcept;
    -
    196 
    -
    197 private:
    -
    198 
    -
    199  document_stream &operator=(const document_stream &) = delete; // Disallow copying
    -
    200  document_stream(const document_stream &other) = delete; // Disallow copying
    -
    201 
    -
    211  simdjson_inline document_stream(
    -
    212  dom::parser &parser,
    -
    213  const uint8_t *buf,
    -
    214  size_t len,
    -
    215  size_t batch_size
    -
    216  ) noexcept;
    -
    217 
    -
    222  inline void start() noexcept;
    -
    223 
    -
    248  inline void next() noexcept;
    -
    249 
    -
    254  inline void load_batch() noexcept;
    -
    255 
    -
    257  inline size_t next_batch_start() const noexcept;
    -
    258 
    -
    260  inline error_code run_stage1(dom::parser &p, size_t batch_start) noexcept;
    -
    261 
    -
    262  dom::parser *parser;
    -
    263  const uint8_t *buf;
    -
    264  size_t len;
    -
    265  size_t batch_size;
    -
    267  error_code error;
    -
    268  size_t batch_start{0};
    -
    269  size_t doc_index{};
    -
    270 #ifdef SIMDJSON_THREADS_ENABLED
    -
    272  bool use_thread;
    -
    273 
    -
    274  inline void load_from_stage1_thread() noexcept;
    -
    275 
    -
    277  inline void start_stage1_thread() noexcept;
    -
    278 
    -
    280  inline void finish_stage1_thread() noexcept;
    -
    281 
    -
    283  error_code stage1_thread_error{UNINITIALIZED};
    -
    285  friend struct stage1_worker;
    -
    286  std::unique_ptr<stage1_worker> worker{new(std::nothrow) stage1_worker()};
    -
    291  dom::parser stage1_thread_parser{};
    -
    292 #endif // SIMDJSON_THREADS_ENABLED
    -
    293 
    -
    294  friend class dom::parser;
    -
    295  friend struct simdjson_result<dom::document_stream>;
    -
    296  friend struct internal::simdjson_result_base<dom::document_stream>;
    -
    297 
    -
    298 }; // class document_stream
    -
    299 
    -
    300 } // namespace dom
    -
    301 
    -
    302 template<>
    -
    303 struct simdjson_result<dom::document_stream> : public internal::simdjson_result_base<dom::document_stream> {
    -
    304 public:
    -
    305  simdjson_inline simdjson_result() noexcept;
    -
    306  simdjson_inline simdjson_result(error_code error) noexcept;
    -
    307  simdjson_inline simdjson_result(dom::document_stream &&value) noexcept;
    -
    308 
    -
    309 #if SIMDJSON_EXCEPTIONS
    -
    310  simdjson_inline dom::document_stream::iterator begin() noexcept(false);
    -
    311  simdjson_inline dom::document_stream::iterator end() noexcept(false);
    -
    312 #else // SIMDJSON_EXCEPTIONS
    -
    313 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    -
    314  [[deprecated("parse_many() and load_many() may return errors. Use document_stream stream; error = parser.parse_many().get(doc); instead.")]]
    -
    315  simdjson_inline dom::document_stream::iterator begin() noexcept;
    -
    316  [[deprecated("parse_many() and load_many() may return errors. Use document_stream stream; error = parser.parse_many().get(doc); instead.")]]
    -
    317  simdjson_inline dom::document_stream::iterator end() noexcept;
    -
    318 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    -
    319 #endif // SIMDJSON_EXCEPTIONS
    -
    320 }; // struct simdjson_result<dom::document_stream>
    -
    321 
    -
    322 } // namespace simdjson
    -
    323 
    -
    324 #endif // SIMDJSON_DOCUMENT_STREAM_H
    -
    An iterator through a forward-only stream of documents.
    -
    A forward-only stream of documents.
    +
    16 #ifdef SIMDJSON_THREADS_ENABLED
    +
    18 struct stage1_worker {
    +
    19  stage1_worker() noexcept = default;
    +
    20  stage1_worker(const stage1_worker&) = delete;
    +
    21  stage1_worker(stage1_worker&&) = delete;
    +
    22  stage1_worker operator=(const stage1_worker&) = delete;
    +
    23  ~stage1_worker();
    +
    28  void start_thread();
    +
    33  void run(document_stream * ds, dom::parser * stage1, size_t next_batch_start);
    +
    35  void finish();
    +
    36 
    +
    37 private:
    +
    38 
    +
    44  void stop_thread();
    +
    45 
    +
    46  std::thread thread{};
    +
    48  dom::parser * stage1_thread_parser{};
    +
    49  size_t _next_batch_start{};
    +
    50  document_stream * owner{};
    +
    55  bool has_work{false};
    +
    56  bool can_work{true};
    +
    57 
    +
    61  std::mutex locking_mutex{};
    +
    62  std::condition_variable cond_var{};
    +
    63 };
    +
    64 #endif
    +
    65 
    + +
    73 public:
    +
    82  simdjson_inline document_stream() noexcept;
    +
    84  simdjson_inline document_stream(document_stream &&other) noexcept = default;
    +
    86  simdjson_inline document_stream &operator=(document_stream &&other) noexcept = default;
    +
    87 
    +
    88  simdjson_inline ~document_stream() noexcept;
    +
    92  inline size_t size_in_bytes() const noexcept;
    +
    111  inline size_t truncated_bytes() const noexcept;
    +
    115  class iterator {
    +
    116  public:
    + +
    118  using reference = value_type;
    +
    119 
    +
    120  using difference_type = std::ptrdiff_t;
    +
    121 
    +
    122  using iterator_category = std::input_iterator_tag;
    +
    123 
    +
    127  simdjson_inline iterator() noexcept;
    +
    131  simdjson_inline reference operator*() noexcept;
    +
    135  inline iterator& operator++() noexcept;
    +
    140  simdjson_inline bool operator!=(const iterator &other) const noexcept;
    +
    156  simdjson_inline size_t current_index() const noexcept;
    +
    176  simdjson_inline std::string_view source() const noexcept;
    +
    177 
    +
    178  private:
    +
    179  simdjson_inline iterator(document_stream *s, bool finished) noexcept;
    +
    181  document_stream* stream;
    +
    183  bool finished;
    +
    184  friend class document_stream;
    +
    185  };
    +
    186 
    +
    190  simdjson_inline iterator begin() noexcept;
    +
    194  simdjson_inline iterator end() noexcept;
    +
    195 
    +
    196 private:
    +
    197 
    +
    198  document_stream &operator=(const document_stream &) = delete; // Disallow copying
    +
    199  document_stream(const document_stream &other) = delete; // Disallow copying
    +
    200 
    +
    210  simdjson_inline document_stream(
    +
    211  dom::parser &parser,
    +
    212  const uint8_t *buf,
    +
    213  size_t len,
    +
    214  size_t batch_size
    +
    215  ) noexcept;
    +
    216 
    +
    221  inline void start() noexcept;
    +
    222 
    +
    247  inline void next() noexcept;
    +
    248 
    +
    253  inline void load_batch() noexcept;
    +
    254 
    +
    256  inline size_t next_batch_start() const noexcept;
    +
    257 
    +
    259  inline error_code run_stage1(dom::parser &p, size_t batch_start) noexcept;
    +
    260 
    +
    261  dom::parser *parser;
    +
    262  const uint8_t *buf;
    +
    263  size_t len;
    +
    264  size_t batch_size;
    +
    266  error_code error;
    +
    267  size_t batch_start{0};
    +
    268  size_t doc_index{};
    +
    269 #ifdef SIMDJSON_THREADS_ENABLED
    +
    271  bool use_thread;
    +
    272 
    +
    273  inline void load_from_stage1_thread() noexcept;
    +
    274 
    +
    276  inline void start_stage1_thread() noexcept;
    +
    277 
    +
    279  inline void finish_stage1_thread() noexcept;
    +
    280 
    +
    282  error_code stage1_thread_error{UNINITIALIZED};
    +
    284  friend struct stage1_worker;
    +
    285  std::unique_ptr<stage1_worker> worker{new(std::nothrow) stage1_worker()};
    +
    290  dom::parser stage1_thread_parser{};
    +
    291 #endif // SIMDJSON_THREADS_ENABLED
    +
    292 
    +
    293  friend class dom::parser;
    +
    294  friend struct simdjson_result<dom::document_stream>;
    +
    295  friend struct internal::simdjson_result_base<dom::document_stream>;
    +
    296 
    +
    297 }; // class document_stream
    +
    298 
    +
    299 } // namespace dom
    +
    300 
    +
    301 template<>
    +
    302 struct simdjson_result<dom::document_stream> : public internal::simdjson_result_base<dom::document_stream> {
    +
    303 public:
    +
    304  simdjson_inline simdjson_result() noexcept;
    +
    305  simdjson_inline simdjson_result(error_code error) noexcept;
    +
    306  simdjson_inline simdjson_result(dom::document_stream &&value) noexcept;
    +
    307 
    +
    308 #if SIMDJSON_EXCEPTIONS
    +
    309  simdjson_inline dom::document_stream::iterator begin() noexcept(false);
    +
    310  simdjson_inline dom::document_stream::iterator end() noexcept(false);
    +
    311 #else // SIMDJSON_EXCEPTIONS
    +
    312 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    +
    313  [[deprecated("parse_many() and load_many() may return errors. Use document_stream stream; error = parser.parse_many().get(doc); instead.")]]
    +
    314  simdjson_inline dom::document_stream::iterator begin() noexcept;
    +
    315  [[deprecated("parse_many() and load_many() may return errors. Use document_stream stream; error = parser.parse_many().get(doc); instead.")]]
    +
    316  simdjson_inline dom::document_stream::iterator end() noexcept;
    +
    317 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    +
    318 #endif // SIMDJSON_EXCEPTIONS
    +
    319 }; // struct simdjson_result<dom::document_stream>
    +
    320 
    +
    321 } // namespace simdjson
    +
    322 
    +
    323 #endif // SIMDJSON_DOCUMENT_STREAM_H
    +
    An iterator through a forward-only stream of documents.
    +
    A forward-only stream of documents.
    simdjson_inline document_stream & operator=(document_stream &&other) noexcept=default
    Move one document_stream to another.
    -
    size_t size_in_bytes() const noexcept
    Returns the input size in bytes.
    -
    size_t truncated_bytes() const noexcept
    After iterating through the stream, this method returns the number of bytes that were not parsed at t...
    -
    simdjson_inline iterator begin() noexcept
    Start iterating the documents in the stream.
    +
    size_t size_in_bytes() const noexcept
    Returns the input size in bytes.
    +
    size_t truncated_bytes() const noexcept
    After iterating through the stream, this method returns the number of bytes that were not parsed at t...
    +
    simdjson_inline iterator begin() noexcept
    Start iterating the documents in the stream.
    simdjson_inline document_stream(document_stream &&other) noexcept=default
    Move one document_stream to another.
    -
    simdjson_inline iterator end() noexcept
    The end of the stream, for iterator comparison purposes.
    -
    simdjson_inline document_stream() noexcept
    Construct an uninitialized document_stream.
    -
    A persistent document parser.
    Definition: parser.h:58
    -
    We want to support argument-dependent lookup (ADL).
    +
    simdjson_inline iterator end() noexcept
    The end of the stream, for iterator comparison purposes.
    +
    simdjson_inline document_stream() noexcept
    Construct an uninitialized document_stream.
    +
    A persistent document parser.
    Definition: parser.h:30
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ UNINITIALIZED
    unknown error, or uninitialized document
    Definition: error.h:29
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    diff --git a/dom_2object-inl_8h_source.html b/dom_2object-inl_8h_source.html index fa6535358..567233174 100644 --- a/dom_2object-inl_8h_source.html +++ b/dom_2object-inl_8h_source.html @@ -94,272 +94,269 @@ $(document).ready(function(){initNavTree('dom_2object-inl_8h_source.html',''); i
    1 #ifndef SIMDJSON_INLINE_OBJECT_H
    2 #define SIMDJSON_INLINE_OBJECT_H
    3 
    -
    4 #include "simdjson/dom/element.h"
    -
    5 #include "simdjson/dom/object.h"
    -
    6 #include "simdjson/portability.h"
    -
    7 #include <cstring>
    -
    8 #include <string>
    -
    9 
    -
    10 namespace simdjson {
    -
    11 
    -
    12 //
    -
    13 // simdjson_result<dom::object> inline implementation
    -
    14 //
    -
    15 simdjson_inline simdjson_result<dom::object>::simdjson_result() noexcept
    -
    16  : internal::simdjson_result_base<dom::object>() {}
    -
    17 simdjson_inline simdjson_result<dom::object>::simdjson_result(dom::object value) noexcept
    -
    18  : internal::simdjson_result_base<dom::object>(std::forward<dom::object>(value)) {}
    -
    19 simdjson_inline simdjson_result<dom::object>::simdjson_result(error_code error) noexcept
    -
    20  : internal::simdjson_result_base<dom::object>(error) {}
    -
    21 
    -
    22 inline simdjson_result<dom::element> simdjson_result<dom::object>::operator[](std::string_view key) const noexcept {
    -
    23  if (error()) { return error(); }
    -
    24  return first[key];
    -
    25 }
    -
    26 inline simdjson_result<dom::element> simdjson_result<dom::object>::operator[](const char *key) const noexcept {
    -
    27  if (error()) { return error(); }
    -
    28  return first[key];
    -
    29 }
    -
    30 inline simdjson_result<dom::element> simdjson_result<dom::object>::at_pointer(std::string_view json_pointer) const noexcept {
    -
    31  if (error()) { return error(); }
    -
    32  return first.at_pointer(json_pointer);
    -
    33 }
    -
    34 inline simdjson_result<dom::element> simdjson_result<dom::object>::at_key(std::string_view key) const noexcept {
    -
    35  if (error()) { return error(); }
    -
    36  return first.at_key(key);
    -
    37 }
    -
    38 inline simdjson_result<dom::element> simdjson_result<dom::object>::at_key_case_insensitive(std::string_view key) const noexcept {
    -
    39  if (error()) { return error(); }
    -
    40  return first.at_key_case_insensitive(key);
    -
    41 }
    -
    42 
    -
    43 #if SIMDJSON_EXCEPTIONS
    -
    44 
    -
    45 inline dom::object::iterator simdjson_result<dom::object>::begin() const noexcept(false) {
    -
    46  if (error()) { throw simdjson_error(error()); }
    -
    47  return first.begin();
    -
    48 }
    -
    49 inline dom::object::iterator simdjson_result<dom::object>::end() const noexcept(false) {
    -
    50  if (error()) { throw simdjson_error(error()); }
    -
    51  return first.end();
    -
    52 }
    -
    53 inline size_t simdjson_result<dom::object>::size() const noexcept(false) {
    -
    54  if (error()) { throw simdjson_error(error()); }
    -
    55  return first.size();
    -
    56 }
    -
    57 
    -
    58 #endif // SIMDJSON_EXCEPTIONS
    -
    59 
    -
    60 namespace dom {
    -
    61 
    -
    62 //
    -
    63 // object inline implementation
    -
    64 //
    -
    65 simdjson_inline object::object() noexcept : tape{} {}
    -
    66 simdjson_inline object::object(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
    -
    67 inline object::iterator object::begin() const noexcept {
    -
    68  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    69  return internal::tape_ref(tape.doc, tape.json_index + 1);
    -
    70 }
    -
    71 inline object::iterator object::end() const noexcept {
    -
    72  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    73  return internal::tape_ref(tape.doc, tape.after_element() - 1);
    -
    74 }
    -
    75 inline size_t object::size() const noexcept {
    -
    76  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    77  return tape.scope_count();
    -
    78 }
    -
    79 
    -
    80 inline simdjson_result<element> object::operator[](std::string_view key) const noexcept {
    +
    4 #include "simdjson/dom/object.h"
    +
    5 #include "simdjson/dom/document.h"
    +
    6 
    +
    7 namespace simdjson {
    +
    8 
    +
    9 //
    +
    10 // simdjson_result<dom::object> inline implementation
    +
    11 //
    +
    12 simdjson_inline simdjson_result<dom::object>::simdjson_result() noexcept
    +
    13  : internal::simdjson_result_base<dom::object>() {}
    +
    14 simdjson_inline simdjson_result<dom::object>::simdjson_result(dom::object value) noexcept
    +
    15  : internal::simdjson_result_base<dom::object>(std::forward<dom::object>(value)) {}
    +
    16 simdjson_inline simdjson_result<dom::object>::simdjson_result(error_code error) noexcept
    +
    17  : internal::simdjson_result_base<dom::object>(error) {}
    +
    18 
    +
    19 inline simdjson_result<dom::element> simdjson_result<dom::object>::operator[](std::string_view key) const noexcept {
    +
    20  if (error()) { return error(); }
    +
    21  return first[key];
    +
    22 }
    +
    23 inline simdjson_result<dom::element> simdjson_result<dom::object>::operator[](const char *key) const noexcept {
    +
    24  if (error()) { return error(); }
    +
    25  return first[key];
    +
    26 }
    +
    27 inline simdjson_result<dom::element> simdjson_result<dom::object>::at_pointer(std::string_view json_pointer) const noexcept {
    +
    28  if (error()) { return error(); }
    +
    29  return first.at_pointer(json_pointer);
    +
    30 }
    +
    31 inline simdjson_result<dom::element> simdjson_result<dom::object>::at_key(std::string_view key) const noexcept {
    +
    32  if (error()) { return error(); }
    +
    33  return first.at_key(key);
    +
    34 }
    +
    35 inline simdjson_result<dom::element> simdjson_result<dom::object>::at_key_case_insensitive(std::string_view key) const noexcept {
    +
    36  if (error()) { return error(); }
    +
    37  return first.at_key_case_insensitive(key);
    +
    38 }
    +
    39 
    +
    40 #if SIMDJSON_EXCEPTIONS
    +
    41 
    +
    42 inline dom::object::iterator simdjson_result<dom::object>::begin() const noexcept(false) {
    +
    43  if (error()) { throw simdjson_error(error()); }
    +
    44  return first.begin();
    +
    45 }
    +
    46 inline dom::object::iterator simdjson_result<dom::object>::end() const noexcept(false) {
    +
    47  if (error()) { throw simdjson_error(error()); }
    +
    48  return first.end();
    +
    49 }
    +
    50 inline size_t simdjson_result<dom::object>::size() const noexcept(false) {
    +
    51  if (error()) { throw simdjson_error(error()); }
    +
    52  return first.size();
    +
    53 }
    +
    54 
    +
    55 #endif // SIMDJSON_EXCEPTIONS
    +
    56 
    +
    57 namespace dom {
    +
    58 
    +
    59 //
    +
    60 // object inline implementation
    +
    61 //
    +
    62 simdjson_inline object::object() noexcept : tape{} {}
    +
    63 simdjson_inline object::object(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
    +
    64 inline object::iterator object::begin() const noexcept {
    +
    65  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    66  return internal::tape_ref(tape.doc, tape.json_index + 1);
    +
    67 }
    +
    68 inline object::iterator object::end() const noexcept {
    +
    69  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    70  return internal::tape_ref(tape.doc, tape.after_element() - 1);
    +
    71 }
    +
    72 inline size_t object::size() const noexcept {
    +
    73  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    74  return tape.scope_count();
    +
    75 }
    +
    76 
    +
    77 inline simdjson_result<element> object::operator[](std::string_view key) const noexcept {
    +
    78  return at_key(key);
    +
    79 }
    +
    80 inline simdjson_result<element> object::operator[](const char *key) const noexcept {
    81  return at_key(key);
    82 }
    -
    83 inline simdjson_result<element> object::operator[](const char *key) const noexcept {
    -
    84  return at_key(key);
    -
    85 }
    -
    86 inline simdjson_result<element> object::at_pointer(std::string_view json_pointer) const noexcept {
    -
    87  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    88  if(json_pointer.empty()) { // an empty string means that we return the current node
    -
    89  return element(this->tape); // copy the current node
    -
    90  } else if(json_pointer[0] != '/') { // otherwise there is an error
    -
    91  return INVALID_JSON_POINTER;
    -
    92  }
    -
    93  json_pointer = json_pointer.substr(1);
    -
    94  size_t slash = json_pointer.find('/');
    -
    95  std::string_view key = json_pointer.substr(0, slash);
    -
    96  // Grab the child with the given key
    - -
    98 
    -
    99  // If there is an escape character in the key, unescape it and then get the child.
    -
    100  size_t escape = key.find('~');
    -
    101  if (escape != std::string_view::npos) {
    -
    102  // Unescape the key
    -
    103  std::string unescaped(key);
    -
    104  do {
    -
    105  switch (unescaped[escape+1]) {
    -
    106  case '0':
    -
    107  unescaped.replace(escape, 2, "~");
    +
    83 inline simdjson_result<element> object::at_pointer(std::string_view json_pointer) const noexcept {
    +
    84  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    85  if(json_pointer.empty()) { // an empty string means that we return the current node
    +
    86  return element(this->tape); // copy the current node
    +
    87  } else if(json_pointer[0] != '/') { // otherwise there is an error
    +
    88  return INVALID_JSON_POINTER;
    +
    89  }
    +
    90  json_pointer = json_pointer.substr(1);
    +
    91  size_t slash = json_pointer.find('/');
    +
    92  std::string_view key = json_pointer.substr(0, slash);
    +
    93  // Grab the child with the given key
    + +
    95 
    +
    96  // If there is an escape character in the key, unescape it and then get the child.
    +
    97  size_t escape = key.find('~');
    +
    98  if (escape != std::string_view::npos) {
    +
    99  // Unescape the key
    +
    100  std::string unescaped(key);
    +
    101  do {
    +
    102  switch (unescaped[escape+1]) {
    +
    103  case '0':
    +
    104  unescaped.replace(escape, 2, "~");
    +
    105  break;
    +
    106  case '1':
    +
    107  unescaped.replace(escape, 2, "/");
    108  break;
    -
    109  case '1':
    -
    110  unescaped.replace(escape, 2, "/");
    -
    111  break;
    -
    112  default:
    -
    113  return INVALID_JSON_POINTER; // "Unexpected ~ escape character in JSON pointer");
    -
    114  }
    -
    115  escape = unescaped.find('~', escape+1);
    -
    116  } while (escape != std::string::npos);
    -
    117  child = at_key(unescaped);
    -
    118  } else {
    -
    119  child = at_key(key);
    +
    109  default:
    +
    110  return INVALID_JSON_POINTER; // "Unexpected ~ escape character in JSON pointer");
    +
    111  }
    +
    112  escape = unescaped.find('~', escape+1);
    +
    113  } while (escape != std::string::npos);
    +
    114  child = at_key(unescaped);
    +
    115  } else {
    +
    116  child = at_key(key);
    +
    117  }
    +
    118  if(child.error()) {
    +
    119  return child; // we do not continue if there was an error
    120  }
    -
    121  if(child.error()) {
    -
    122  return child; // we do not continue if there was an error
    -
    123  }
    -
    124  // If there is a /, we have to recurse and look up more of the path
    -
    125  if (slash != std::string_view::npos) {
    -
    126  child = child.at_pointer(json_pointer.substr(slash));
    -
    127  }
    -
    128  return child;
    -
    129 }
    -
    130 
    -
    131 inline simdjson_result<element> object::at_key(std::string_view key) const noexcept {
    -
    132  iterator end_field = end();
    -
    133  for (iterator field = begin(); field != end_field; ++field) {
    -
    134  if (field.key_equals(key)) {
    -
    135  return field.value();
    -
    136  }
    -
    137  }
    -
    138  return NO_SUCH_FIELD;
    -
    139 }
    -
    140 // In case you wonder why we need this, please see
    -
    141 // https://github.com/simdjson/simdjson/issues/323
    -
    142 // People do seek keys in a case-insensitive manner.
    -
    143 inline simdjson_result<element> object::at_key_case_insensitive(std::string_view key) const noexcept {
    -
    144  iterator end_field = end();
    -
    145  for (iterator field = begin(); field != end_field; ++field) {
    -
    146  if (field.key_equals_case_insensitive(key)) {
    -
    147  return field.value();
    -
    148  }
    -
    149  }
    -
    150  return NO_SUCH_FIELD;
    -
    151 }
    -
    152 
    -
    153 //
    -
    154 // object::iterator inline implementation
    -
    155 //
    -
    156 simdjson_inline object::iterator::iterator(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
    -
    157 inline const key_value_pair object::iterator::operator*() const noexcept {
    -
    158  return key_value_pair(key(), value());
    +
    121  // If there is a /, we have to recurse and look up more of the path
    +
    122  if (slash != std::string_view::npos) {
    +
    123  child = child.at_pointer(json_pointer.substr(slash));
    +
    124  }
    +
    125  return child;
    +
    126 }
    +
    127 
    +
    128 inline simdjson_result<element> object::at_key(std::string_view key) const noexcept {
    +
    129  iterator end_field = end();
    +
    130  for (iterator field = begin(); field != end_field; ++field) {
    +
    131  if (field.key_equals(key)) {
    +
    132  return field.value();
    +
    133  }
    +
    134  }
    +
    135  return NO_SUCH_FIELD;
    +
    136 }
    +
    137 // In case you wonder why we need this, please see
    +
    138 // https://github.com/simdjson/simdjson/issues/323
    +
    139 // People do seek keys in a case-insensitive manner.
    +
    140 inline simdjson_result<element> object::at_key_case_insensitive(std::string_view key) const noexcept {
    +
    141  iterator end_field = end();
    +
    142  for (iterator field = begin(); field != end_field; ++field) {
    +
    143  if (field.key_equals_case_insensitive(key)) {
    +
    144  return field.value();
    +
    145  }
    +
    146  }
    +
    147  return NO_SUCH_FIELD;
    +
    148 }
    +
    149 
    +
    150 //
    +
    151 // object::iterator inline implementation
    +
    152 //
    +
    153 simdjson_inline object::iterator::iterator(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
    +
    154 inline const key_value_pair object::iterator::operator*() const noexcept {
    +
    155  return key_value_pair(key(), value());
    +
    156 }
    +
    157 inline bool object::iterator::operator!=(const object::iterator& other) const noexcept {
    +
    158  return tape.json_index != other.tape.json_index;
    159 }
    -
    160 inline bool object::iterator::operator!=(const object::iterator& other) const noexcept {
    -
    161  return tape.json_index != other.tape.json_index;
    +
    160 inline bool object::iterator::operator==(const object::iterator& other) const noexcept {
    +
    161  return tape.json_index == other.tape.json_index;
    162 }
    -
    163 inline bool object::iterator::operator==(const object::iterator& other) const noexcept {
    -
    164  return tape.json_index == other.tape.json_index;
    +
    163 inline bool object::iterator::operator<(const object::iterator& other) const noexcept {
    +
    164  return tape.json_index < other.tape.json_index;
    165 }
    -
    166 inline bool object::iterator::operator<(const object::iterator& other) const noexcept {
    -
    167  return tape.json_index < other.tape.json_index;
    +
    166 inline bool object::iterator::operator<=(const object::iterator& other) const noexcept {
    +
    167  return tape.json_index <= other.tape.json_index;
    168 }
    -
    169 inline bool object::iterator::operator<=(const object::iterator& other) const noexcept {
    -
    170  return tape.json_index <= other.tape.json_index;
    +
    169 inline bool object::iterator::operator>=(const object::iterator& other) const noexcept {
    +
    170  return tape.json_index >= other.tape.json_index;
    171 }
    -
    172 inline bool object::iterator::operator>=(const object::iterator& other) const noexcept {
    -
    173  return tape.json_index >= other.tape.json_index;
    +
    172 inline bool object::iterator::operator>(const object::iterator& other) const noexcept {
    +
    173  return tape.json_index > other.tape.json_index;
    174 }
    -
    175 inline bool object::iterator::operator>(const object::iterator& other) const noexcept {
    -
    176  return tape.json_index > other.tape.json_index;
    -
    177 }
    - -
    179  tape.json_index++;
    -
    180  tape.json_index = tape.after_element();
    -
    181  return *this;
    -
    182 }
    - -
    184  object::iterator out = *this;
    -
    185  ++*this;
    -
    186  return out;
    + +
    176  tape.json_index++;
    +
    177  tape.json_index = tape.after_element();
    +
    178  return *this;
    +
    179 }
    + +
    181  object::iterator out = *this;
    +
    182  ++*this;
    +
    183  return out;
    +
    184 }
    +
    185 inline std::string_view object::iterator::key() const noexcept {
    +
    186  return tape.get_string_view();
    187 }
    -
    188 inline std::string_view object::iterator::key() const noexcept {
    -
    189  return tape.get_string_view();
    +
    188 inline uint32_t object::iterator::key_length() const noexcept {
    +
    189  return tape.get_string_length();
    190 }
    -
    191 inline uint32_t object::iterator::key_length() const noexcept {
    -
    192  return tape.get_string_length();
    +
    191 inline const char* object::iterator::key_c_str() const noexcept {
    +
    192  return reinterpret_cast<const char *>(&tape.doc->string_buf[size_t(tape.tape_value()) + sizeof(uint32_t)]);
    193 }
    -
    194 inline const char* object::iterator::key_c_str() const noexcept {
    -
    195  return reinterpret_cast<const char *>(&tape.doc->string_buf[size_t(tape.tape_value()) + sizeof(uint32_t)]);
    +
    194 inline element object::iterator::value() const noexcept {
    +
    195  return element(internal::tape_ref(tape.doc, tape.json_index + 1));
    196 }
    -
    197 inline element object::iterator::value() const noexcept {
    -
    198  return element(internal::tape_ref(tape.doc, tape.json_index + 1));
    -
    199 }
    -
    200 
    -
    214 inline bool object::iterator::key_equals(std::string_view o) const noexcept {
    -
    215  // We use the fact that the key length can be computed quickly
    -
    216  // without access to the string buffer.
    -
    217  const uint32_t len = key_length();
    -
    218  if(o.size() == len) {
    -
    219  // We avoid construction of a temporary string_view instance.
    -
    220  return (memcmp(o.data(), key_c_str(), len) == 0);
    -
    221  }
    -
    222  return false;
    -
    223 }
    -
    224 
    -
    225 inline bool object::iterator::key_equals_case_insensitive(std::string_view o) const noexcept {
    -
    226  // We use the fact that the key length can be computed quickly
    -
    227  // without access to the string buffer.
    -
    228  const uint32_t len = key_length();
    -
    229  if(o.size() == len) {
    -
    230  // See For case-insensitive string comparisons, avoid char-by-char functions
    -
    231  // https://lemire.me/blog/2020/04/30/for-case-insensitive-string-comparisons-avoid-char-by-char-functions/
    -
    232  // Note that it might be worth rolling our own strncasecmp function, with vectorization.
    -
    233  return (simdjson_strncasecmp(o.data(), key_c_str(), len) == 0);
    -
    234  }
    -
    235  return false;
    -
    236 }
    -
    237 //
    -
    238 // key_value_pair inline implementation
    -
    239 //
    -
    240 inline key_value_pair::key_value_pair(std::string_view _key, element _value) noexcept :
    -
    241  key(_key), value(_value) {}
    -
    242 
    -
    243 } // namespace dom
    -
    244 
    -
    245 } // namespace simdjson
    -
    246 
    -
    247 #if defined(__cpp_lib_ranges)
    -
    248 static_assert(std::ranges::view<simdjson::dom::object>);
    -
    249 static_assert(std::ranges::sized_range<simdjson::dom::object>);
    -
    250 #if SIMDJSON_EXCEPTIONS
    -
    251 static_assert(std::ranges::view<simdjson::simdjson_result<simdjson::dom::object>>);
    -
    252 static_assert(std::ranges::sized_range<simdjson::simdjson_result<simdjson::dom::object>>);
    -
    253 #endif // SIMDJSON_EXCEPTIONS
    -
    254 #endif // defined(__cpp_lib_ranges)
    -
    255 
    -
    256 #endif // SIMDJSON_INLINE_OBJECT_H
    -
    A JSON element.
    Definition: element.h:40
    -
    Key/value pair in an object.
    Definition: object.h:222
    - -
    bool operator!=(const iterator &other) const noexcept
    Check if these values come from the same place in the JSON.
    Definition: object-inl.h:160
    -
    element value() const noexcept
    Get the value of this key/value pair.
    Definition: object-inl.h:197
    -
    bool key_equals(std::string_view o) const noexcept
    Returns true if the key in this key/value pair is equal to the provided string_view.
    Definition: object-inl.h:214
    -
    const char * key_c_str() const noexcept
    Get the key of this key/value pair.
    Definition: object-inl.h:194
    -
    uint32_t key_length() const noexcept
    Get the length (in bytes) of the key in this key/value pair.
    Definition: object-inl.h:191
    -
    const value_type operator*() const noexcept
    Get the actual key/value pair.
    Definition: object-inl.h:157
    -
    bool key_equals_case_insensitive(std::string_view o) const noexcept
    Returns true if the key in this key/value pair is equal to the provided string_view in a case-insensi...
    Definition: object-inl.h:225
    -
    std::string_view key() const noexcept
    Get the key of this key/value pair.
    Definition: object-inl.h:188
    -
    iterator & operator++() noexcept
    Get the next key/value pair.
    Definition: object-inl.h:178
    -
    simdjson_result< element > at_key(std::string_view key) const noexcept
    Get the value associated with the given key.
    Definition: object-inl.h:131
    -
    iterator end() const noexcept
    One past the last key/value pair.
    Definition: object-inl.h:71
    -
    size_t size() const noexcept
    Get the size of the object (number of keys).
    Definition: object-inl.h:75
    -
    simdjson_result< element > at_key_case_insensitive(std::string_view key) const noexcept
    Get the value associated with the given key in a case-insensitive manner.
    Definition: object-inl.h:143
    -
    simdjson_result< element > operator[](std::string_view key) const noexcept
    Get the value associated with the given key.
    Definition: object-inl.h:80
    -
    simdjson_result< element > at_pointer(std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: object-inl.h:86
    -
    simdjson_inline object() noexcept
    Create a new, invalid object.
    Definition: object-inl.h:65
    -
    iterator begin() const noexcept
    Return the first key/value pair.
    Definition: object-inl.h:67
    -
    We want to support argument-dependent lookup (ADL).
    +
    197 
    +
    211 inline bool object::iterator::key_equals(std::string_view o) const noexcept {
    +
    212  // We use the fact that the key length can be computed quickly
    +
    213  // without access to the string buffer.
    +
    214  const uint32_t len = key_length();
    +
    215  if(o.size() == len) {
    +
    216  // We avoid construction of a temporary string_view instance.
    +
    217  return (memcmp(o.data(), key_c_str(), len) == 0);
    +
    218  }
    +
    219  return false;
    +
    220 }
    +
    221 
    +
    222 inline bool object::iterator::key_equals_case_insensitive(std::string_view o) const noexcept {
    +
    223  // We use the fact that the key length can be computed quickly
    +
    224  // without access to the string buffer.
    +
    225  const uint32_t len = key_length();
    +
    226  if(o.size() == len) {
    +
    227  // See For case-insensitive string comparisons, avoid char-by-char functions
    +
    228  // https://lemire.me/blog/2020/04/30/for-case-insensitive-string-comparisons-avoid-char-by-char-functions/
    +
    229  // Note that it might be worth rolling our own strncasecmp function, with vectorization.
    +
    230  return (simdjson_strncasecmp(o.data(), key_c_str(), len) == 0);
    +
    231  }
    +
    232  return false;
    +
    233 }
    +
    234 //
    +
    235 // key_value_pair inline implementation
    +
    236 //
    +
    237 inline key_value_pair::key_value_pair(std::string_view _key, element _value) noexcept :
    +
    238  key(_key), value(_value) {}
    +
    239 
    +
    240 } // namespace dom
    +
    241 
    +
    242 } // namespace simdjson
    +
    243 
    +
    244 #if defined(__cpp_lib_ranges)
    +
    245 static_assert(std::ranges::view<simdjson::dom::object>);
    +
    246 static_assert(std::ranges::sized_range<simdjson::dom::object>);
    +
    247 #if SIMDJSON_EXCEPTIONS
    +
    248 static_assert(std::ranges::view<simdjson::simdjson_result<simdjson::dom::object>>);
    +
    249 static_assert(std::ranges::sized_range<simdjson::simdjson_result<simdjson::dom::object>>);
    +
    250 #endif // SIMDJSON_EXCEPTIONS
    +
    251 #endif // defined(__cpp_lib_ranges)
    +
    252 
    +
    253 #endif // SIMDJSON_INLINE_OBJECT_H
    +
    A JSON element.
    Definition: element.h:31
    +
    Key/value pair in an object.
    Definition: object.h:214
    + +
    bool operator!=(const iterator &other) const noexcept
    Check if these values come from the same place in the JSON.
    Definition: object-inl.h:157
    +
    element value() const noexcept
    Get the value of this key/value pair.
    Definition: object-inl.h:194
    +
    bool key_equals(std::string_view o) const noexcept
    Returns true if the key in this key/value pair is equal to the provided string_view.
    Definition: object-inl.h:211
    +
    const char * key_c_str() const noexcept
    Get the key of this key/value pair.
    Definition: object-inl.h:191
    +
    uint32_t key_length() const noexcept
    Get the length (in bytes) of the key in this key/value pair.
    Definition: object-inl.h:188
    +
    const value_type operator*() const noexcept
    Get the actual key/value pair.
    Definition: object-inl.h:154
    +
    bool key_equals_case_insensitive(std::string_view o) const noexcept
    Returns true if the key in this key/value pair is equal to the provided string_view in a case-insensi...
    Definition: object-inl.h:222
    +
    std::string_view key() const noexcept
    Get the key of this key/value pair.
    Definition: object-inl.h:185
    +
    iterator & operator++() noexcept
    Get the next key/value pair.
    Definition: object-inl.h:175
    +
    simdjson_result< element > at_key(std::string_view key) const noexcept
    Get the value associated with the given key.
    Definition: object-inl.h:128
    +
    iterator end() const noexcept
    One past the last key/value pair.
    Definition: object-inl.h:68
    +
    size_t size() const noexcept
    Get the size of the object (number of keys).
    Definition: object-inl.h:72
    +
    simdjson_result< element > at_key_case_insensitive(std::string_view key) const noexcept
    Get the value associated with the given key in a case-insensitive manner.
    Definition: object-inl.h:140
    +
    simdjson_result< element > operator[](std::string_view key) const noexcept
    Get the value associated with the given key.
    Definition: object-inl.h:77
    +
    simdjson_result< element > at_pointer(std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: object-inl.h:83
    +
    simdjson_inline object() noexcept
    Create a new, invalid object.
    Definition: object-inl.h:62
    +
    iterator begin() const noexcept
    Return the first key/value pair.
    Definition: object-inl.h:64
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ NO_SUCH_FIELD
    JSON field not found in object.
    Definition: error.h:37
    @ INVALID_JSON_POINTER
    Invalid JSON pointer reference.
    Definition: error.h:39
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    diff --git a/dom_2object_8h_source.html b/dom_2object_8h_source.html index e9d53fff5..85c8d949b 100644 --- a/dom_2object_8h_source.html +++ b/dom_2object_8h_source.html @@ -94,157 +94,149 @@ $(document).ready(function(){initNavTree('dom_2object_8h_source.html',''); initR
    1 #ifndef SIMDJSON_DOM_OBJECT_H
    2 #define SIMDJSON_DOM_OBJECT_H
    3 
    -
    4 #include "simdjson/common_defs.h"
    -
    5 #include "simdjson/error.h"
    +
    4 #include "simdjson/dom/base.h"
    +
    5 #include "simdjson/dom/element.h"
    6 #include "simdjson/internal/tape_ref.h"
    7 
    8 namespace simdjson {
    -
    9 namespace internal {
    -
    10 template<typename T>
    -
    11 class string_builder;
    -
    12 }
    -
    13 namespace dom {
    -
    14 
    -
    15 class document;
    -
    16 class element;
    -
    17 class key_value_pair;
    +
    9 namespace dom {
    +
    10 
    +
    14 class object {
    +
    15 public:
    +
    17  simdjson_inline object() noexcept;
    18 
    -
    22 class object {
    -
    23 public:
    -
    25  simdjson_inline object() noexcept;
    -
    26 
    -
    27  class iterator {
    -
    28  public:
    -
    29  using value_type = key_value_pair;
    -
    30  using difference_type = std::ptrdiff_t;
    -
    31 
    -
    35  inline const value_type operator*() const noexcept;
    -
    42  inline iterator& operator++() noexcept;
    -
    49  inline iterator operator++(int) noexcept;
    -
    55  inline bool operator!=(const iterator& other) const noexcept;
    -
    56  inline bool operator==(const iterator& other) const noexcept;
    -
    57 
    -
    58  inline bool operator<(const iterator& other) const noexcept;
    -
    59  inline bool operator<=(const iterator& other) const noexcept;
    -
    60  inline bool operator>=(const iterator& other) const noexcept;
    -
    61  inline bool operator>(const iterator& other) const noexcept;
    -
    65  inline std::string_view key() const noexcept;
    -
    70  inline uint32_t key_length() const noexcept;
    -
    75  inline bool key_equals(std::string_view o) const noexcept;
    -
    81  inline bool key_equals_case_insensitive(std::string_view o) const noexcept;
    -
    85  inline const char *key_c_str() const noexcept;
    -
    89  inline element value() const noexcept;
    +
    19  class iterator {
    +
    20  public:
    +
    21  using value_type = key_value_pair;
    +
    22  using difference_type = std::ptrdiff_t;
    +
    23 
    +
    27  inline const value_type operator*() const noexcept;
    +
    34  inline iterator& operator++() noexcept;
    +
    41  inline iterator operator++(int) noexcept;
    +
    47  inline bool operator!=(const iterator& other) const noexcept;
    +
    48  inline bool operator==(const iterator& other) const noexcept;
    +
    49 
    +
    50  inline bool operator<(const iterator& other) const noexcept;
    +
    51  inline bool operator<=(const iterator& other) const noexcept;
    +
    52  inline bool operator>=(const iterator& other) const noexcept;
    +
    53  inline bool operator>(const iterator& other) const noexcept;
    +
    57  inline std::string_view key() const noexcept;
    +
    62  inline uint32_t key_length() const noexcept;
    +
    67  inline bool key_equals(std::string_view o) const noexcept;
    +
    73  inline bool key_equals_case_insensitive(std::string_view o) const noexcept;
    +
    77  inline const char *key_c_str() const noexcept;
    +
    81  inline element value() const noexcept;
    +
    82 
    +
    83  iterator() noexcept = default;
    +
    84  iterator(const iterator&) noexcept = default;
    +
    85  iterator& operator=(const iterator&) noexcept = default;
    +
    86  private:
    +
    87  simdjson_inline iterator(const internal::tape_ref &tape) noexcept;
    +
    88 
    +
    89  internal::tape_ref tape;
    90 
    -
    91  iterator() noexcept = default;
    -
    92  iterator(const iterator&) noexcept = default;
    -
    93  iterator& operator=(const iterator&) noexcept = default;
    -
    94  private:
    -
    95  simdjson_inline iterator(const internal::tape_ref &tape) noexcept;
    -
    96 
    -
    97  internal::tape_ref tape;
    -
    98 
    -
    99  friend class object;
    -
    100  };
    -
    101 
    -
    107  inline iterator begin() const noexcept;
    -
    113  inline iterator end() const noexcept;
    -
    119  inline size_t size() const noexcept;
    -
    135  inline simdjson_result<element> operator[](std::string_view key) const noexcept;
    -
    136 
    -
    152  inline simdjson_result<element> operator[](const char *key) const noexcept;
    -
    153 
    -
    177  inline simdjson_result<element> at_pointer(std::string_view json_pointer) const noexcept;
    -
    178 
    -
    193  inline simdjson_result<element> at_key(std::string_view key) const noexcept;
    -
    194 
    -
    206  inline simdjson_result<element> at_key_case_insensitive(std::string_view key) const noexcept;
    -
    207 
    -
    208 private:
    -
    209  simdjson_inline object(const internal::tape_ref &tape) noexcept;
    +
    91  friend class object;
    +
    92  };
    +
    93 
    +
    99  inline iterator begin() const noexcept;
    +
    105  inline iterator end() const noexcept;
    +
    111  inline size_t size() const noexcept;
    +
    127  inline simdjson_result<element> operator[](std::string_view key) const noexcept;
    +
    128 
    +
    144  inline simdjson_result<element> operator[](const char *key) const noexcept;
    +
    145 
    +
    169  inline simdjson_result<element> at_pointer(std::string_view json_pointer) const noexcept;
    +
    170 
    +
    185  inline simdjson_result<element> at_key(std::string_view key) const noexcept;
    +
    186 
    +
    198  inline simdjson_result<element> at_key_case_insensitive(std::string_view key) const noexcept;
    +
    199 
    +
    200 private:
    +
    201  simdjson_inline object(const internal::tape_ref &tape) noexcept;
    +
    202 
    +
    203  internal::tape_ref tape;
    +
    204 
    +
    205  friend class element;
    +
    206  friend struct simdjson_result<element>;
    +
    207  template<typename T>
    +
    208  friend class simdjson::internal::string_builder;
    +
    209 };
    210 
    -
    211  internal::tape_ref tape;
    -
    212 
    -
    213  friend class element;
    -
    214  friend struct simdjson_result<element>;
    -
    215  template<typename T>
    -
    216  friend class simdjson::internal::string_builder;
    -
    217 };
    -
    218 
    - -
    223 public:
    -
    225  std::string_view key;
    - -
    228 
    -
    229 private:
    -
    230  simdjson_inline key_value_pair(std::string_view _key, element _value) noexcept;
    -
    231  friend class object;
    -
    232 };
    -
    233 
    -
    234 } // namespace dom
    + +
    215 public:
    +
    217  std::string_view key;
    + +
    220 
    +
    221 private:
    +
    222  simdjson_inline key_value_pair(std::string_view _key, element _value) noexcept;
    +
    223  friend class object;
    +
    224 };
    +
    225 
    +
    226 } // namespace dom
    +
    227 
    +
    229 template<>
    +
    230 struct simdjson_result<dom::object> : public internal::simdjson_result_base<dom::object> {
    +
    231 public:
    +
    232  simdjson_inline simdjson_result() noexcept;
    +
    233  simdjson_inline simdjson_result(dom::object value) noexcept;
    +
    234  simdjson_inline simdjson_result(error_code error) noexcept;
    235 
    -
    237 template<>
    -
    238 struct simdjson_result<dom::object> : public internal::simdjson_result_base<dom::object> {
    -
    239 public:
    -
    240  simdjson_inline simdjson_result() noexcept;
    -
    241  simdjson_inline simdjson_result(dom::object value) noexcept;
    -
    242  simdjson_inline simdjson_result(error_code error) noexcept;
    -
    243 
    -
    244  inline simdjson_result<dom::element> operator[](std::string_view key) const noexcept;
    -
    245  inline simdjson_result<dom::element> operator[](const char *key) const noexcept;
    -
    246  inline simdjson_result<dom::element> at_pointer(std::string_view json_pointer) const noexcept;
    -
    247  inline simdjson_result<dom::element> at_key(std::string_view key) const noexcept;
    -
    248  inline simdjson_result<dom::element> at_key_case_insensitive(std::string_view key) const noexcept;
    -
    249 
    -
    250 #if SIMDJSON_EXCEPTIONS
    -
    251  inline dom::object::iterator begin() const noexcept(false);
    -
    252  inline dom::object::iterator end() const noexcept(false);
    -
    253  inline size_t size() const noexcept(false);
    -
    254 #endif // SIMDJSON_EXCEPTIONS
    -
    255 };
    -
    256 
    -
    257 } // namespace simdjson
    -
    258 
    -
    259 #if defined(__cpp_lib_ranges)
    -
    260 #include <ranges>
    -
    261 
    -
    262 namespace std {
    -
    263 namespace ranges {
    -
    264 template<>
    -
    265 inline constexpr bool enable_view<simdjson::dom::object> = true;
    -
    266 #if SIMDJSON_EXCEPTIONS
    -
    267 template<>
    -
    268 inline constexpr bool enable_view<simdjson::simdjson_result<simdjson::dom::object>> = true;
    -
    269 #endif // SIMDJSON_EXCEPTIONS
    -
    270 } // namespace ranges
    -
    271 } // namespace std
    -
    272 #endif // defined(__cpp_lib_ranges)
    -
    273 
    -
    274 #endif // SIMDJSON_DOM_OBJECT_H
    -
    A JSON element.
    Definition: element.h:40
    -
    Key/value pair in an object.
    Definition: object.h:222
    -
    std::string_view key
    key in the key-value pair
    Definition: object.h:225
    -
    element value
    value in the key-value pair
    Definition: object.h:227
    - -
    bool operator!=(const iterator &other) const noexcept
    Check if these values come from the same place in the JSON.
    Definition: object-inl.h:160
    -
    element value() const noexcept
    Get the value of this key/value pair.
    Definition: object-inl.h:197
    -
    bool key_equals(std::string_view o) const noexcept
    Returns true if the key in this key/value pair is equal to the provided string_view.
    Definition: object-inl.h:214
    -
    const char * key_c_str() const noexcept
    Get the key of this key/value pair.
    Definition: object-inl.h:194
    -
    uint32_t key_length() const noexcept
    Get the length (in bytes) of the key in this key/value pair.
    Definition: object-inl.h:191
    -
    const value_type operator*() const noexcept
    Get the actual key/value pair.
    Definition: object-inl.h:157
    -
    bool key_equals_case_insensitive(std::string_view o) const noexcept
    Returns true if the key in this key/value pair is equal to the provided string_view in a case-insensi...
    Definition: object-inl.h:225
    -
    std::string_view key() const noexcept
    Get the key of this key/value pair.
    Definition: object-inl.h:188
    -
    iterator & operator++() noexcept
    Get the next key/value pair.
    Definition: object-inl.h:178
    -
    JSON object.
    Definition: object.h:22
    -
    simdjson_result< element > at_key(std::string_view key) const noexcept
    Get the value associated with the given key.
    Definition: object-inl.h:131
    -
    iterator end() const noexcept
    One past the last key/value pair.
    Definition: object-inl.h:71
    -
    size_t size() const noexcept
    Get the size of the object (number of keys).
    Definition: object-inl.h:75
    -
    simdjson_result< element > at_key_case_insensitive(std::string_view key) const noexcept
    Get the value associated with the given key in a case-insensitive manner.
    Definition: object-inl.h:143
    -
    simdjson_result< element > at_pointer(std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: object-inl.h:86
    -
    simdjson_inline object() noexcept
    Create a new, invalid object.
    Definition: object-inl.h:65
    -
    iterator begin() const noexcept
    Return the first key/value pair.
    Definition: object-inl.h:67
    -
    We want to support argument-dependent lookup (ADL).
    +
    236  inline simdjson_result<dom::element> operator[](std::string_view key) const noexcept;
    +
    237  inline simdjson_result<dom::element> operator[](const char *key) const noexcept;
    +
    238  inline simdjson_result<dom::element> at_pointer(std::string_view json_pointer) const noexcept;
    +
    239  inline simdjson_result<dom::element> at_key(std::string_view key) const noexcept;
    +
    240  inline simdjson_result<dom::element> at_key_case_insensitive(std::string_view key) const noexcept;
    +
    241 
    +
    242 #if SIMDJSON_EXCEPTIONS
    +
    243  inline dom::object::iterator begin() const noexcept(false);
    +
    244  inline dom::object::iterator end() const noexcept(false);
    +
    245  inline size_t size() const noexcept(false);
    +
    246 #endif // SIMDJSON_EXCEPTIONS
    +
    247 };
    +
    248 
    +
    249 } // namespace simdjson
    +
    250 
    +
    251 #if defined(__cpp_lib_ranges)
    +
    252 #include <ranges>
    +
    253 
    +
    254 namespace std {
    +
    255 namespace ranges {
    +
    256 template<>
    +
    257 inline constexpr bool enable_view<simdjson::dom::object> = true;
    +
    258 #if SIMDJSON_EXCEPTIONS
    +
    259 template<>
    +
    260 inline constexpr bool enable_view<simdjson::simdjson_result<simdjson::dom::object>> = true;
    +
    261 #endif // SIMDJSON_EXCEPTIONS
    +
    262 } // namespace ranges
    +
    263 } // namespace std
    +
    264 #endif // defined(__cpp_lib_ranges)
    +
    265 
    +
    266 #endif // SIMDJSON_DOM_OBJECT_H
    +
    A JSON element.
    Definition: element.h:31
    +
    Key/value pair in an object.
    Definition: object.h:214
    +
    std::string_view key
    key in the key-value pair
    Definition: object.h:217
    +
    element value
    value in the key-value pair
    Definition: object.h:219
    + +
    bool operator!=(const iterator &other) const noexcept
    Check if these values come from the same place in the JSON.
    Definition: object-inl.h:157
    +
    element value() const noexcept
    Get the value of this key/value pair.
    Definition: object-inl.h:194
    +
    bool key_equals(std::string_view o) const noexcept
    Returns true if the key in this key/value pair is equal to the provided string_view.
    Definition: object-inl.h:211
    +
    const char * key_c_str() const noexcept
    Get the key of this key/value pair.
    Definition: object-inl.h:191
    +
    uint32_t key_length() const noexcept
    Get the length (in bytes) of the key in this key/value pair.
    Definition: object-inl.h:188
    +
    const value_type operator*() const noexcept
    Get the actual key/value pair.
    Definition: object-inl.h:154
    +
    bool key_equals_case_insensitive(std::string_view o) const noexcept
    Returns true if the key in this key/value pair is equal to the provided string_view in a case-insensi...
    Definition: object-inl.h:222
    +
    std::string_view key() const noexcept
    Get the key of this key/value pair.
    Definition: object-inl.h:185
    +
    iterator & operator++() noexcept
    Get the next key/value pair.
    Definition: object-inl.h:175
    +
    JSON object.
    Definition: object.h:14
    +
    simdjson_result< element > at_key(std::string_view key) const noexcept
    Get the value associated with the given key.
    Definition: object-inl.h:128
    +
    iterator end() const noexcept
    One past the last key/value pair.
    Definition: object-inl.h:68
    +
    size_t size() const noexcept
    Get the size of the object (number of keys).
    Definition: object-inl.h:72
    +
    simdjson_result< element > at_key_case_insensitive(std::string_view key) const noexcept
    Get the value associated with the given key in a case-insensitive manner.
    Definition: object-inl.h:140
    +
    simdjson_result< element > at_pointer(std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: object-inl.h:83
    +
    simdjson_inline object() noexcept
    Create a new, invalid object.
    Definition: object-inl.h:62
    +
    iterator begin() const noexcept
    Return the first key/value pair.
    Definition: object-inl.h:64
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    -
    The result of a JSON navigation that may fail.
    Definition: element.h:482
    +
    The result of a JSON navigation that may fail.
    Definition: element.h:473
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    diff --git a/dom_2parser-inl_8h_source.html b/dom_2parser-inl_8h_source.html index b9d11fd52..eabf26c6d 100644 --- a/dom_2parser-inl_8h_source.html +++ b/dom_2parser-inl_8h_source.html @@ -95,266 +95,268 @@ $(document).ready(function(){initNavTree('dom_2parser-inl_8h_source.html',''); i
    2 #define SIMDJSON_INLINE_PARSER_H
    3 
    4 #include "simdjson/dom/document_stream.h"
    -
    5 #include "simdjson/dom/parser.h"
    -
    6 #include "simdjson/implementation.h"
    -
    7 #include "simdjson/internal/jsonformatutils.h"
    -
    8 #include "simdjson/portability.h"
    -
    9 #include <cstdio>
    -
    10 #include <climits>
    +
    5 #include "simdjson/implementation.h"
    +
    6 #include "simdjson/internal/dom_parser_implementation.h"
    +
    7 
    +
    8 #include "simdjson/error-inl.h"
    +
    9 #include "simdjson/padded_string-inl.h"
    +
    10 #include "simdjson/dom/element-inl.h"
    11 
    -
    12 namespace simdjson {
    -
    13 namespace dom {
    -
    14 
    -
    15 //
    -
    16 // parser inline implementation
    +
    12 #include <climits>
    +
    13 
    +
    14 namespace simdjson {
    +
    15 namespace dom {
    +
    16 
    17 //
    -
    18 simdjson_inline parser::parser(size_t max_capacity) noexcept
    -
    19  : _max_capacity{max_capacity},
    -
    20  loaded_bytes(nullptr) {
    -
    21 }
    -
    22 simdjson_inline parser::parser(parser &&other) noexcept = default;
    -
    23 simdjson_inline parser &parser::operator=(parser &&other) noexcept = default;
    -
    24 
    -
    25 inline bool parser::is_valid() const noexcept { return valid; }
    -
    26 inline int parser::get_error_code() const noexcept { return error; }
    -
    27 inline std::string parser::get_error_message() const noexcept { return error_message(error); }
    -
    28 
    -
    29 inline bool parser::dump_raw_tape(std::ostream &os) const noexcept {
    -
    30  return valid ? doc.dump_raw_tape(os) : false;
    -
    31 }
    -
    32 
    -
    33 inline simdjson_result<size_t> parser::read_file(const std::string &path) noexcept {
    -
    34  // Open the file
    -
    35  SIMDJSON_PUSH_DISABLE_WARNINGS
    -
    36  SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe
    -
    37  std::FILE *fp = std::fopen(path.c_str(), "rb");
    -
    38  SIMDJSON_POP_DISABLE_WARNINGS
    -
    39 
    -
    40  if (fp == nullptr) {
    -
    41  return IO_ERROR;
    -
    42  }
    -
    43 
    -
    44  // Get the file size
    -
    45  int ret;
    -
    46 #if SIMDJSON_VISUAL_STUDIO && !SIMDJSON_IS_32BITS
    -
    47  ret = _fseeki64(fp, 0, SEEK_END);
    -
    48 #else
    -
    49  ret = std::fseek(fp, 0, SEEK_END);
    -
    50 #endif // _WIN64
    -
    51  if(ret < 0) {
    -
    52  std::fclose(fp);
    -
    53  return IO_ERROR;
    -
    54  }
    -
    55 #if SIMDJSON_VISUAL_STUDIO && !SIMDJSON_IS_32BITS
    -
    56  __int64 len = _ftelli64(fp);
    -
    57  if(len == -1L) {
    -
    58  std::fclose(fp);
    -
    59  return IO_ERROR;
    -
    60  }
    -
    61 #else
    -
    62  long len = std::ftell(fp);
    -
    63  if((len < 0) || (len == LONG_MAX)) {
    -
    64  std::fclose(fp);
    -
    65  return IO_ERROR;
    -
    66  }
    -
    67 #endif
    -
    68 
    -
    69  // Make sure we have enough capacity to load the file
    -
    70  if (_loaded_bytes_capacity < size_t(len)) {
    -
    71  loaded_bytes.reset( internal::allocate_padded_buffer(len) );
    -
    72  if (!loaded_bytes) {
    -
    73  std::fclose(fp);
    -
    74  return MEMALLOC;
    -
    75  }
    -
    76  _loaded_bytes_capacity = len;
    -
    77  }
    -
    78 
    -
    79  // Read the string
    -
    80  std::rewind(fp);
    -
    81  size_t bytes_read = std::fread(loaded_bytes.get(), 1, len, fp);
    -
    82  if (std::fclose(fp) != 0 || bytes_read != size_t(len)) {
    -
    83  return IO_ERROR;
    -
    84  }
    -
    85 
    -
    86  return bytes_read;
    -
    87 }
    -
    88 
    -
    89 inline simdjson_result<element> parser::load(const std::string &path) & noexcept {
    -
    90  size_t len;
    -
    91  auto _error = read_file(path).get(len);
    -
    92  if (_error) { return _error; }
    -
    93  return parse(loaded_bytes.get(), len, false);
    -
    94 }
    -
    95 
    -
    96 inline simdjson_result<document_stream> parser::load_many(const std::string &path, size_t batch_size) noexcept {
    -
    97  size_t len;
    -
    98  auto _error = read_file(path).get(len);
    -
    99  if (_error) { return _error; }
    -
    100  if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; }
    -
    101  return document_stream(*this, reinterpret_cast<const uint8_t*>(loaded_bytes.get()), len, batch_size);
    -
    102 }
    -
    103 
    -
    104 inline simdjson_result<element> parser::parse_into_document(document& provided_doc, const uint8_t *buf, size_t len, bool realloc_if_needed) & noexcept {
    -
    105  // Important: we need to ensure that document has enough capacity.
    -
    106  // Important: It is possible that provided_doc is actually the internal 'doc' within the parser!!!
    -
    107  error_code _error = ensure_capacity(provided_doc, len);
    -
    108  if (_error) { return _error; }
    -
    109  if (realloc_if_needed) {
    -
    110  // Make sure we have enough capacity to copy len bytes
    -
    111  if (!loaded_bytes || _loaded_bytes_capacity < len) {
    -
    112  loaded_bytes.reset( internal::allocate_padded_buffer(len) );
    -
    113  if (!loaded_bytes) {
    -
    114  return MEMALLOC;
    -
    115  }
    -
    116  _loaded_bytes_capacity = len;
    -
    117  }
    -
    118  std::memcpy(static_cast<void *>(loaded_bytes.get()), buf, len);
    -
    119  }
    -
    120  _error = implementation->parse(realloc_if_needed ? reinterpret_cast<const uint8_t*>(loaded_bytes.get()): buf, len, provided_doc);
    -
    121 
    -
    122  if (_error) { return _error; }
    +
    18 // parser inline implementation
    +
    19 //
    +
    20 simdjson_inline parser::parser(size_t max_capacity) noexcept
    +
    21  : _max_capacity{max_capacity},
    +
    22  loaded_bytes(nullptr) {
    +
    23 }
    +
    24 simdjson_inline parser::parser(parser &&other) noexcept = default;
    +
    25 simdjson_inline parser &parser::operator=(parser &&other) noexcept = default;
    +
    26 
    +
    27 inline bool parser::is_valid() const noexcept { return valid; }
    +
    28 inline int parser::get_error_code() const noexcept { return error; }
    +
    29 inline std::string parser::get_error_message() const noexcept { return error_message(error); }
    +
    30 
    +
    31 inline bool parser::dump_raw_tape(std::ostream &os) const noexcept {
    +
    32  return valid ? doc.dump_raw_tape(os) : false;
    +
    33 }
    +
    34 
    +
    35 inline simdjson_result<size_t> parser::read_file(const std::string &path) noexcept {
    +
    36  // Open the file
    +
    37  SIMDJSON_PUSH_DISABLE_WARNINGS
    +
    38  SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe
    +
    39  std::FILE *fp = std::fopen(path.c_str(), "rb");
    +
    40  SIMDJSON_POP_DISABLE_WARNINGS
    +
    41 
    +
    42  if (fp == nullptr) {
    +
    43  return IO_ERROR;
    +
    44  }
    +
    45 
    +
    46  // Get the file size
    +
    47  int ret;
    +
    48 #if SIMDJSON_VISUAL_STUDIO && !SIMDJSON_IS_32BITS
    +
    49  ret = _fseeki64(fp, 0, SEEK_END);
    +
    50 #else
    +
    51  ret = std::fseek(fp, 0, SEEK_END);
    +
    52 #endif // _WIN64
    +
    53  if(ret < 0) {
    +
    54  std::fclose(fp);
    +
    55  return IO_ERROR;
    +
    56  }
    +
    57 #if SIMDJSON_VISUAL_STUDIO && !SIMDJSON_IS_32BITS
    +
    58  __int64 len = _ftelli64(fp);
    +
    59  if(len == -1L) {
    +
    60  std::fclose(fp);
    +
    61  return IO_ERROR;
    +
    62  }
    +
    63 #else
    +
    64  long len = std::ftell(fp);
    +
    65  if((len < 0) || (len == LONG_MAX)) {
    +
    66  std::fclose(fp);
    +
    67  return IO_ERROR;
    +
    68  }
    +
    69 #endif
    +
    70 
    +
    71  // Make sure we have enough capacity to load the file
    +
    72  if (_loaded_bytes_capacity < size_t(len)) {
    +
    73  loaded_bytes.reset( internal::allocate_padded_buffer(len) );
    +
    74  if (!loaded_bytes) {
    +
    75  std::fclose(fp);
    +
    76  return MEMALLOC;
    +
    77  }
    +
    78  _loaded_bytes_capacity = len;
    +
    79  }
    +
    80 
    +
    81  // Read the string
    +
    82  std::rewind(fp);
    +
    83  size_t bytes_read = std::fread(loaded_bytes.get(), 1, len, fp);
    +
    84  if (std::fclose(fp) != 0 || bytes_read != size_t(len)) {
    +
    85  return IO_ERROR;
    +
    86  }
    +
    87 
    +
    88  return bytes_read;
    +
    89 }
    +
    90 
    +
    91 inline simdjson_result<element> parser::load(const std::string &path) & noexcept {
    +
    92  size_t len;
    +
    93  auto _error = read_file(path).get(len);
    +
    94  if (_error) { return _error; }
    +
    95  return parse(loaded_bytes.get(), len, false);
    +
    96 }
    +
    97 
    +
    98 inline simdjson_result<document_stream> parser::load_many(const std::string &path, size_t batch_size) noexcept {
    +
    99  size_t len;
    +
    100  auto _error = read_file(path).get(len);
    +
    101  if (_error) { return _error; }
    +
    102  if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; }
    +
    103  return document_stream(*this, reinterpret_cast<const uint8_t*>(loaded_bytes.get()), len, batch_size);
    +
    104 }
    +
    105 
    +
    106 inline simdjson_result<element> parser::parse_into_document(document& provided_doc, const uint8_t *buf, size_t len, bool realloc_if_needed) & noexcept {
    +
    107  // Important: we need to ensure that document has enough capacity.
    +
    108  // Important: It is possible that provided_doc is actually the internal 'doc' within the parser!!!
    +
    109  error_code _error = ensure_capacity(provided_doc, len);
    +
    110  if (_error) { return _error; }
    +
    111  if (realloc_if_needed) {
    +
    112  // Make sure we have enough capacity to copy len bytes
    +
    113  if (!loaded_bytes || _loaded_bytes_capacity < len) {
    +
    114  loaded_bytes.reset( internal::allocate_padded_buffer(len) );
    +
    115  if (!loaded_bytes) {
    +
    116  return MEMALLOC;
    +
    117  }
    +
    118  _loaded_bytes_capacity = len;
    +
    119  }
    +
    120  std::memcpy(static_cast<void *>(loaded_bytes.get()), buf, len);
    +
    121  }
    +
    122  _error = implementation->parse(realloc_if_needed ? reinterpret_cast<const uint8_t*>(loaded_bytes.get()): buf, len, provided_doc);
    123 
    -
    124  return provided_doc.root();
    -
    125 }
    -
    126 
    -
    127 simdjson_inline simdjson_result<element> parser::parse_into_document(document& provided_doc, const char *buf, size_t len, bool realloc_if_needed) & noexcept {
    -
    128  return parse_into_document(provided_doc, reinterpret_cast<const uint8_t *>(buf), len, realloc_if_needed);
    -
    129 }
    -
    130 simdjson_inline simdjson_result<element> parser::parse_into_document(document& provided_doc, const std::string &s) & noexcept {
    -
    131  return parse_into_document(provided_doc, s.data(), s.length(), s.capacity() - s.length() < SIMDJSON_PADDING);
    -
    132 }
    -
    133 simdjson_inline simdjson_result<element> parser::parse_into_document(document& provided_doc, const padded_string &s) & noexcept {
    -
    134  return parse_into_document(provided_doc, s.data(), s.length(), false);
    -
    135 }
    -
    136 
    -
    137 
    -
    138 inline simdjson_result<element> parser::parse(const uint8_t *buf, size_t len, bool realloc_if_needed) & noexcept {
    -
    139  return parse_into_document(doc, buf, len, realloc_if_needed);
    -
    140 }
    -
    141 
    -
    142 simdjson_inline simdjson_result<element> parser::parse(const char *buf, size_t len, bool realloc_if_needed) & noexcept {
    -
    143  return parse(reinterpret_cast<const uint8_t *>(buf), len, realloc_if_needed);
    -
    144 }
    -
    145 simdjson_inline simdjson_result<element> parser::parse(const std::string &s) & noexcept {
    -
    146  return parse(s.data(), s.length(), s.capacity() - s.length() < SIMDJSON_PADDING);
    -
    147 }
    -
    148 simdjson_inline simdjson_result<element> parser::parse(const padded_string &s) & noexcept {
    -
    149  return parse(s.data(), s.length(), false);
    -
    150 }
    -
    151 simdjson_inline simdjson_result<element> parser::parse(const padded_string_view &v) & noexcept {
    -
    152  return parse(v.data(), v.length(), false);
    -
    153 }
    -
    154 
    -
    155 inline simdjson_result<document_stream> parser::parse_many(const uint8_t *buf, size_t len, size_t batch_size) noexcept {
    -
    156  if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; }
    -
    157  return document_stream(*this, buf, len, batch_size);
    -
    158 }
    -
    159 inline simdjson_result<document_stream> parser::parse_many(const char *buf, size_t len, size_t batch_size) noexcept {
    -
    160  return parse_many(reinterpret_cast<const uint8_t *>(buf), len, batch_size);
    -
    161 }
    -
    162 inline simdjson_result<document_stream> parser::parse_many(const std::string &s, size_t batch_size) noexcept {
    -
    163  return parse_many(s.data(), s.length(), batch_size);
    -
    164 }
    -
    165 inline simdjson_result<document_stream> parser::parse_many(const padded_string &s, size_t batch_size) noexcept {
    -
    166  return parse_many(s.data(), s.length(), batch_size);
    -
    167 }
    -
    168 
    -
    169 simdjson_inline size_t parser::capacity() const noexcept {
    -
    170  return implementation ? implementation->capacity() : 0;
    -
    171 }
    -
    172 simdjson_inline size_t parser::max_capacity() const noexcept {
    -
    173  return _max_capacity;
    -
    174 }
    -
    175 simdjson_inline size_t parser::max_depth() const noexcept {
    -
    176  return implementation ? implementation->max_depth() : DEFAULT_MAX_DEPTH;
    -
    177 }
    -
    178 
    -
    179 simdjson_warn_unused
    -
    180 inline error_code parser::allocate(size_t capacity, size_t max_depth) noexcept {
    -
    181  //
    -
    182  // Reallocate implementation if needed
    +
    124  if (_error) { return _error; }
    +
    125 
    +
    126  return provided_doc.root();
    +
    127 }
    +
    128 
    +
    129 simdjson_inline simdjson_result<element> parser::parse_into_document(document& provided_doc, const char *buf, size_t len, bool realloc_if_needed) & noexcept {
    +
    130  return parse_into_document(provided_doc, reinterpret_cast<const uint8_t *>(buf), len, realloc_if_needed);
    +
    131 }
    +
    132 simdjson_inline simdjson_result<element> parser::parse_into_document(document& provided_doc, const std::string &s) & noexcept {
    +
    133  return parse_into_document(provided_doc, s.data(), s.length(), s.capacity() - s.length() < SIMDJSON_PADDING);
    +
    134 }
    +
    135 simdjson_inline simdjson_result<element> parser::parse_into_document(document& provided_doc, const padded_string &s) & noexcept {
    +
    136  return parse_into_document(provided_doc, s.data(), s.length(), false);
    +
    137 }
    +
    138 
    +
    139 
    +
    140 inline simdjson_result<element> parser::parse(const uint8_t *buf, size_t len, bool realloc_if_needed) & noexcept {
    +
    141  return parse_into_document(doc, buf, len, realloc_if_needed);
    +
    142 }
    +
    143 
    +
    144 simdjson_inline simdjson_result<element> parser::parse(const char *buf, size_t len, bool realloc_if_needed) & noexcept {
    +
    145  return parse(reinterpret_cast<const uint8_t *>(buf), len, realloc_if_needed);
    +
    146 }
    +
    147 simdjson_inline simdjson_result<element> parser::parse(const std::string &s) & noexcept {
    +
    148  return parse(s.data(), s.length(), s.capacity() - s.length() < SIMDJSON_PADDING);
    +
    149 }
    +
    150 simdjson_inline simdjson_result<element> parser::parse(const padded_string &s) & noexcept {
    +
    151  return parse(s.data(), s.length(), false);
    +
    152 }
    +
    153 simdjson_inline simdjson_result<element> parser::parse(const padded_string_view &v) & noexcept {
    +
    154  return parse(v.data(), v.length(), false);
    +
    155 }
    +
    156 
    +
    157 inline simdjson_result<document_stream> parser::parse_many(const uint8_t *buf, size_t len, size_t batch_size) noexcept {
    +
    158  if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; }
    +
    159  return document_stream(*this, buf, len, batch_size);
    +
    160 }
    +
    161 inline simdjson_result<document_stream> parser::parse_many(const char *buf, size_t len, size_t batch_size) noexcept {
    +
    162  return parse_many(reinterpret_cast<const uint8_t *>(buf), len, batch_size);
    +
    163 }
    +
    164 inline simdjson_result<document_stream> parser::parse_many(const std::string &s, size_t batch_size) noexcept {
    +
    165  return parse_many(s.data(), s.length(), batch_size);
    +
    166 }
    +
    167 inline simdjson_result<document_stream> parser::parse_many(const padded_string &s, size_t batch_size) noexcept {
    +
    168  return parse_many(s.data(), s.length(), batch_size);
    +
    169 }
    +
    170 
    +
    171 simdjson_inline size_t parser::capacity() const noexcept {
    +
    172  return implementation ? implementation->capacity() : 0;
    +
    173 }
    +
    174 simdjson_inline size_t parser::max_capacity() const noexcept {
    +
    175  return _max_capacity;
    +
    176 }
    +
    177 simdjson_inline size_t parser::max_depth() const noexcept {
    +
    178  return implementation ? implementation->max_depth() : DEFAULT_MAX_DEPTH;
    +
    179 }
    +
    180 
    +
    181 simdjson_warn_unused
    +
    182 inline error_code parser::allocate(size_t capacity, size_t max_depth) noexcept {
    183  //
    -
    184  error_code err;
    -
    185  if (implementation) {
    -
    186  err = implementation->allocate(capacity, max_depth);
    -
    187  } else {
    -
    188  err = simdjson::get_active_implementation()->create_dom_parser_implementation(capacity, max_depth, implementation);
    -
    189  }
    -
    190  if (err) { return err; }
    -
    191  return SUCCESS;
    -
    192 }
    -
    193 
    -
    194 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    -
    195 simdjson_warn_unused
    -
    196 inline bool parser::allocate_capacity(size_t capacity, size_t max_depth) noexcept {
    -
    197  return !allocate(capacity, max_depth);
    -
    198 }
    -
    199 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    -
    200 
    -
    201 inline error_code parser::ensure_capacity(size_t desired_capacity) noexcept {
    -
    202  return ensure_capacity(doc, desired_capacity);
    -
    203 }
    -
    204 
    -
    205 
    -
    206 inline error_code parser::ensure_capacity(document& target_document, size_t desired_capacity) noexcept {
    -
    207  // 1. It is wasteful to allocate a document and a parser for documents spanning less than MINIMAL_DOCUMENT_CAPACITY bytes.
    -
    208  // 2. If we allow desired_capacity = 0 then it is possible to exit this function with implementation == nullptr.
    -
    209  if(desired_capacity < MINIMAL_DOCUMENT_CAPACITY) { desired_capacity = MINIMAL_DOCUMENT_CAPACITY; }
    -
    210  // If we don't have enough capacity, (try to) automatically bump it.
    -
    211  // If the document needs allocation, do it too.
    -
    212  // Both in one if statement to minimize unlikely branching.
    -
    213  //
    -
    214  // Note: we must make sure that this function is called if capacity() == 0. We do so because we
    -
    215  // ensure that desired_capacity > 0.
    -
    216  if (simdjson_unlikely(capacity() < desired_capacity || target_document.capacity() < desired_capacity)) {
    -
    217  if (desired_capacity > max_capacity()) {
    -
    218  return error = CAPACITY;
    -
    219  }
    -
    220  error_code err1 = target_document.capacity() < desired_capacity ? target_document.allocate(desired_capacity) : SUCCESS;
    -
    221  error_code err2 = capacity() < desired_capacity ? allocate(desired_capacity, max_depth()) : SUCCESS;
    -
    222  if(err1 != SUCCESS) { return error = err1; }
    -
    223  if(err2 != SUCCESS) { return error = err2; }
    -
    224  }
    -
    225  return SUCCESS;
    -
    226 }
    -
    227 
    -
    228 simdjson_inline void parser::set_max_capacity(size_t max_capacity) noexcept {
    -
    229  if(max_capacity > MINIMAL_DOCUMENT_CAPACITY) {
    -
    230  _max_capacity = max_capacity;
    -
    231  } else {
    -
    232  _max_capacity = MINIMAL_DOCUMENT_CAPACITY;
    -
    233  }
    -
    234 }
    -
    235 
    -
    236 } // namespace dom
    -
    237 } // namespace simdjson
    -
    238 
    -
    239 #endif // SIMDJSON_INLINE_PARSER_H
    -
    A forward-only stream of documents.
    -
    A parsed JSON document.
    Definition: document.h:18
    -
    simdjson_inline parser(size_t max_capacity=SIMDJSON_MAXSIZE_BYTES) noexcept
    Create a JSON parser.
    Definition: parser-inl.h:18
    -
    simdjson_result< element > parse(const uint8_t *buf, size_t len, bool realloc_if_needed=true) &noexcept
    Parse a JSON document and return a temporary reference to it.
    Definition: parser-inl.h:138
    -
    simdjson_result< element > parse_into_document(document &doc, const uint8_t *buf, size_t len, bool realloc_if_needed=true) &noexcept
    Parse a JSON document into a provide document instance and return a temporary reference to it.
    Definition: parser-inl.h:104
    -
    simdjson_inline size_t max_depth() const noexcept
    The maximum level of nested object and arrays supported by this parser.
    Definition: parser-inl.h:175
    -
    simdjson_result< document_stream > load_many(const std::string &path, size_t batch_size=dom::DEFAULT_BATCH_SIZE) noexcept
    Load a file containing many JSON documents.
    Definition: parser-inl.h:96
    -
    simdjson_inline void set_max_capacity(size_t max_capacity) noexcept
    Set max_capacity.
    Definition: parser-inl.h:228
    -
    simdjson_inline size_t max_capacity() const noexcept
    The largest document this parser can automatically support.
    Definition: parser-inl.h:172
    -
    simdjson_result< element > load(const std::string &path) &noexcept
    Load a JSON document from a file and return a reference to it.
    Definition: parser-inl.h:89
    -
    simdjson_inline size_t capacity() const noexcept
    The largest document this parser can support without reallocating.
    Definition: parser-inl.h:169
    +
    184  // Reallocate implementation if needed
    +
    185  //
    +
    186  error_code err;
    +
    187  if (implementation) {
    +
    188  err = implementation->allocate(capacity, max_depth);
    +
    189  } else {
    +
    190  err = simdjson::get_active_implementation()->create_dom_parser_implementation(capacity, max_depth, implementation);
    +
    191  }
    +
    192  if (err) { return err; }
    +
    193  return SUCCESS;
    +
    194 }
    +
    195 
    +
    196 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    +
    197 simdjson_warn_unused
    +
    198 inline bool parser::allocate_capacity(size_t capacity, size_t max_depth) noexcept {
    +
    199  return !allocate(capacity, max_depth);
    +
    200 }
    +
    201 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    +
    202 
    +
    203 inline error_code parser::ensure_capacity(size_t desired_capacity) noexcept {
    +
    204  return ensure_capacity(doc, desired_capacity);
    +
    205 }
    +
    206 
    +
    207 
    +
    208 inline error_code parser::ensure_capacity(document& target_document, size_t desired_capacity) noexcept {
    +
    209  // 1. It is wasteful to allocate a document and a parser for documents spanning less than MINIMAL_DOCUMENT_CAPACITY bytes.
    +
    210  // 2. If we allow desired_capacity = 0 then it is possible to exit this function with implementation == nullptr.
    +
    211  if(desired_capacity < MINIMAL_DOCUMENT_CAPACITY) { desired_capacity = MINIMAL_DOCUMENT_CAPACITY; }
    +
    212  // If we don't have enough capacity, (try to) automatically bump it.
    +
    213  // If the document needs allocation, do it too.
    +
    214  // Both in one if statement to minimize unlikely branching.
    +
    215  //
    +
    216  // Note: we must make sure that this function is called if capacity() == 0. We do so because we
    +
    217  // ensure that desired_capacity > 0.
    +
    218  if (simdjson_unlikely(capacity() < desired_capacity || target_document.capacity() < desired_capacity)) {
    +
    219  if (desired_capacity > max_capacity()) {
    +
    220  return error = CAPACITY;
    +
    221  }
    +
    222  error_code err1 = target_document.capacity() < desired_capacity ? target_document.allocate(desired_capacity) : SUCCESS;
    +
    223  error_code err2 = capacity() < desired_capacity ? allocate(desired_capacity, max_depth()) : SUCCESS;
    +
    224  if(err1 != SUCCESS) { return error = err1; }
    +
    225  if(err2 != SUCCESS) { return error = err2; }
    +
    226  }
    +
    227  return SUCCESS;
    +
    228 }
    +
    229 
    +
    230 simdjson_inline void parser::set_max_capacity(size_t max_capacity) noexcept {
    +
    231  if(max_capacity > MINIMAL_DOCUMENT_CAPACITY) {
    +
    232  _max_capacity = max_capacity;
    +
    233  } else {
    +
    234  _max_capacity = MINIMAL_DOCUMENT_CAPACITY;
    +
    235  }
    +
    236 }
    +
    237 
    +
    238 } // namespace dom
    +
    239 } // namespace simdjson
    +
    240 
    +
    241 #endif // SIMDJSON_INLINE_PARSER_H
    +
    A forward-only stream of documents.
    +
    A parsed JSON document.
    Definition: document.h:16
    +
    simdjson_inline parser(size_t max_capacity=SIMDJSON_MAXSIZE_BYTES) noexcept
    Create a JSON parser.
    Definition: parser-inl.h:20
    +
    simdjson_result< element > parse(const uint8_t *buf, size_t len, bool realloc_if_needed=true) &noexcept
    Parse a JSON document and return a temporary reference to it.
    Definition: parser-inl.h:140
    +
    simdjson_result< element > parse_into_document(document &doc, const uint8_t *buf, size_t len, bool realloc_if_needed=true) &noexcept
    Parse a JSON document into a provide document instance and return a temporary reference to it.
    Definition: parser-inl.h:106
    +
    simdjson_inline size_t max_depth() const noexcept
    The maximum level of nested object and arrays supported by this parser.
    Definition: parser-inl.h:177
    +
    simdjson_result< document_stream > load_many(const std::string &path, size_t batch_size=dom::DEFAULT_BATCH_SIZE) noexcept
    Load a file containing many JSON documents.
    Definition: parser-inl.h:98
    +
    simdjson_inline void set_max_capacity(size_t max_capacity) noexcept
    Set max_capacity.
    Definition: parser-inl.h:230
    +
    simdjson_inline size_t max_capacity() const noexcept
    The largest document this parser can automatically support.
    Definition: parser-inl.h:174
    +
    simdjson_result< element > load(const std::string &path) &noexcept
    Load a JSON document from a file and return a reference to it.
    Definition: parser-inl.h:91
    +
    simdjson_inline size_t capacity() const noexcept
    The largest document this parser can support without reallocating.
    Definition: parser-inl.h:171
    simdjson_inline parser & operator=(parser &&other) noexcept
    Take another parser's buffers and state.
    -
    simdjson_warn_unused error_code allocate(size_t capacity, size_t max_depth=DEFAULT_MAX_DEPTH) noexcept
    Ensure this parser has enough memory to process JSON documents up to capacity bytes in length and max...
    Definition: parser-inl.h:180
    -
    simdjson_result< document_stream > parse_many(const uint8_t *buf, size_t len, size_t batch_size=dom::DEFAULT_BATCH_SIZE) noexcept
    Parse a buffer containing many JSON documents.
    Definition: parser-inl.h:155
    -
    An implementation of simdjson for a particular CPU architecture.
    -
    We want to support argument-dependent lookup (ADL).
    -
    const char * error_message(error_code error) noexcept
    Get the error message for the given error code.
    Definition: error-inl.h:21
    -
    constexpr size_t DEFAULT_MAX_DEPTH
    By default, simdjson supports this many nested objects and arrays.
    Definition: common_defs.h:52
    +
    simdjson_warn_unused error_code allocate(size_t capacity, size_t max_depth=DEFAULT_MAX_DEPTH) noexcept
    Ensure this parser has enough memory to process JSON documents up to capacity bytes in length and max...
    Definition: parser-inl.h:182
    +
    simdjson_result< document_stream > parse_many(const uint8_t *buf, size_t len, size_t batch_size=dom::DEFAULT_BATCH_SIZE) noexcept
    Parse a buffer containing many JSON documents.
    Definition: parser-inl.h:157
    +
    An implementation of simdjson for a particular CPU architecture.
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    const char * error_message(error_code error) noexcept
    Get the error message for the given error code.
    Definition: error-inl.h:20
    +
    constexpr size_t DEFAULT_MAX_DEPTH
    By default, simdjson supports this many nested objects and arrays.
    Definition: base.h:37
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ CAPACITY
    This parser can't support a document that big.
    Definition: error.h:19
    @ MEMALLOC
    Error allocating memory, most likely out of memory.
    Definition: error.h:20
    @ SUCCESS
    No error.
    Definition: error.h:18
    @ IO_ERROR
    Error reading a file.
    Definition: error.h:38
    SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr< const implementation > & get_active_implementation()
    The active implementation.
    -
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: common_defs.h:45
    +
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: base.h:30
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    diff --git a/dom_2parser_8h_source.html b/dom_2parser_8h_source.html index e66c1f2d2..4d6bafa14 100644 --- a/dom_2parser_8h_source.html +++ b/dom_2parser_8h_source.html @@ -94,178 +94,162 @@ $(document).ready(function(){initNavTree('dom_2parser_8h_source.html',''); initR
    1 #ifndef SIMDJSON_DOM_PARSER_H
    2 #define SIMDJSON_DOM_PARSER_H
    3 
    -
    4 #include "simdjson/common_defs.h"
    +
    4 #include "simdjson/dom/base.h"
    5 #include "simdjson/dom/document.h"
    -
    6 #include "simdjson/error.h"
    -
    7 #include "simdjson/internal/dom_parser_implementation.h"
    -
    8 #include "simdjson/internal/tape_ref.h"
    -
    9 #include "simdjson/padded_string.h"
    -
    10 #include "simdjson/portability.h"
    -
    11 #include <memory>
    -
    12 #include <ostream>
    -
    13 #include <string>
    -
    14 
    -
    15 namespace simdjson {
    -
    16 
    -
    17 namespace dom {
    -
    18 
    -
    19 class document_stream;
    -
    20 class element;
    -
    21 
    -
    23 static constexpr size_t DEFAULT_BATCH_SIZE = 1000000;
    -
    32 static constexpr size_t MINIMAL_BATCH_SIZE = 32;
    -
    33 
    -
    37 static constexpr size_t MINIMAL_DOCUMENT_CAPACITY = 32;
    -
    38 
    -
    58 class parser {
    -
    59 public:
    -
    71  simdjson_inline explicit parser(size_t max_capacity = SIMDJSON_MAXSIZE_BYTES) noexcept;
    -
    77  simdjson_inline parser(parser &&other) noexcept;
    -
    78  parser(const parser &) = delete;
    -
    84  simdjson_inline parser &operator=(parser &&other) noexcept;
    -
    85  parser &operator=(const parser &) = delete;
    -
    86 
    -
    88  ~parser()=default;
    -
    89 
    -
    124  inline simdjson_result<element> load(const std::string &path) & noexcept;
    -
    125  inline simdjson_result<element> load(const std::string &path) && = delete ;
    -
    193  inline simdjson_result<element> parse(const uint8_t *buf, size_t len, bool realloc_if_needed = true) & noexcept;
    -
    194  inline simdjson_result<element> parse(const uint8_t *buf, size_t len, bool realloc_if_needed = true) && =delete;
    -
    196  simdjson_inline simdjson_result<element> parse(const char *buf, size_t len, bool realloc_if_needed = true) & noexcept;
    -
    197  simdjson_inline simdjson_result<element> parse(const char *buf, size_t len, bool realloc_if_needed = true) && =delete;
    -
    199  simdjson_inline simdjson_result<element> parse(const std::string &s) & noexcept;
    -
    200  simdjson_inline simdjson_result<element> parse(const std::string &s) && =delete;
    -
    202  simdjson_inline simdjson_result<element> parse(const padded_string &s) & noexcept;
    -
    203  simdjson_inline simdjson_result<element> parse(const padded_string &s) && =delete;
    -
    205  simdjson_inline simdjson_result<element> parse(const padded_string_view &v) & noexcept;
    -
    206  simdjson_inline simdjson_result<element> parse(const padded_string_view &v) && =delete;
    -
    207 
    -
    209  simdjson_inline simdjson_result<element> parse(const char *buf) noexcept = delete;
    -
    210 
    -
    255  inline simdjson_result<element> parse_into_document(document& doc, const uint8_t *buf, size_t len, bool realloc_if_needed = true) & noexcept;
    -
    256  inline simdjson_result<element> parse_into_document(document& doc, const uint8_t *buf, size_t len, bool realloc_if_needed = true) && =delete;
    -
    258  simdjson_inline simdjson_result<element> parse_into_document(document& doc, const char *buf, size_t len, bool realloc_if_needed = true) & noexcept;
    -
    259  simdjson_inline simdjson_result<element> parse_into_document(document& doc, const char *buf, size_t len, bool realloc_if_needed = true) && =delete;
    -
    261  simdjson_inline simdjson_result<element> parse_into_document(document& doc, const std::string &s) & noexcept;
    -
    262  simdjson_inline simdjson_result<element> parse_into_document(document& doc, const std::string &s) && =delete;
    -
    264  simdjson_inline simdjson_result<element> parse_into_document(document& doc, const padded_string &s) & noexcept;
    -
    265  simdjson_inline simdjson_result<element> parse_into_document(document& doc, const padded_string &s) && =delete;
    -
    266 
    -
    268  simdjson_inline simdjson_result<element> parse_into_document(document& doc, const char *buf) noexcept = delete;
    -
    269 
    -
    343  inline simdjson_result<document_stream> load_many(const std::string &path, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept;
    -
    344 
    -
    439  inline simdjson_result<document_stream> parse_many(const uint8_t *buf, size_t len, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept;
    -
    441  inline simdjson_result<document_stream> parse_many(const char *buf, size_t len, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept;
    -
    443  inline simdjson_result<document_stream> parse_many(const std::string &s, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept;
    -
    444  inline simdjson_result<document_stream> parse_many(const std::string &&s, size_t batch_size) = delete;// unsafe
    -
    446  inline simdjson_result<document_stream> parse_many(const padded_string &s, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept;
    -
    447  inline simdjson_result<document_stream> parse_many(const padded_string &&s, size_t batch_size) = delete;// unsafe
    -
    448 
    -
    450  simdjson_result<document_stream> parse_many(const char *buf, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept = delete;
    -
    451 
    -
    460  simdjson_warn_unused inline error_code allocate(size_t capacity, size_t max_depth = DEFAULT_MAX_DEPTH) noexcept;
    -
    461 
    -
    462 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    -
    474  [[deprecated("Use allocate() instead.")]]
    -
    475  simdjson_warn_unused inline bool allocate_capacity(size_t capacity, size_t max_depth = DEFAULT_MAX_DEPTH) noexcept;
    -
    476 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    -
    482  simdjson_inline size_t capacity() const noexcept;
    -
    483 
    -
    491  simdjson_inline size_t max_capacity() const noexcept;
    -
    492 
    -
    498  simdjson_inline size_t max_depth() const noexcept;
    -
    499 
    -
    514  simdjson_inline void set_max_capacity(size_t max_capacity) noexcept;
    +
    6 
    +
    7 namespace simdjson {
    +
    8 
    +
    9 namespace dom {
    +
    10 
    +
    30 class parser {
    +
    31 public:
    +
    43  simdjson_inline explicit parser(size_t max_capacity = SIMDJSON_MAXSIZE_BYTES) noexcept;
    +
    49  simdjson_inline parser(parser &&other) noexcept;
    +
    50  parser(const parser &) = delete;
    +
    56  simdjson_inline parser &operator=(parser &&other) noexcept;
    +
    57  parser &operator=(const parser &) = delete;
    +
    58 
    +
    60  ~parser()=default;
    +
    61 
    +
    96  inline simdjson_result<element> load(const std::string &path) & noexcept;
    +
    97  inline simdjson_result<element> load(const std::string &path) && = delete ;
    +
    165  inline simdjson_result<element> parse(const uint8_t *buf, size_t len, bool realloc_if_needed = true) & noexcept;
    +
    166  inline simdjson_result<element> parse(const uint8_t *buf, size_t len, bool realloc_if_needed = true) && =delete;
    +
    168  simdjson_inline simdjson_result<element> parse(const char *buf, size_t len, bool realloc_if_needed = true) & noexcept;
    +
    169  simdjson_inline simdjson_result<element> parse(const char *buf, size_t len, bool realloc_if_needed = true) && =delete;
    +
    171  simdjson_inline simdjson_result<element> parse(const std::string &s) & noexcept;
    +
    172  simdjson_inline simdjson_result<element> parse(const std::string &s) && =delete;
    +
    174  simdjson_inline simdjson_result<element> parse(const padded_string &s) & noexcept;
    +
    175  simdjson_inline simdjson_result<element> parse(const padded_string &s) && =delete;
    +
    177  simdjson_inline simdjson_result<element> parse(const padded_string_view &v) & noexcept;
    +
    178  simdjson_inline simdjson_result<element> parse(const padded_string_view &v) && =delete;
    +
    179 
    +
    181  simdjson_inline simdjson_result<element> parse(const char *buf) noexcept = delete;
    +
    182 
    +
    227  inline simdjson_result<element> parse_into_document(document& doc, const uint8_t *buf, size_t len, bool realloc_if_needed = true) & noexcept;
    +
    228  inline simdjson_result<element> parse_into_document(document& doc, const uint8_t *buf, size_t len, bool realloc_if_needed = true) && =delete;
    +
    230  simdjson_inline simdjson_result<element> parse_into_document(document& doc, const char *buf, size_t len, bool realloc_if_needed = true) & noexcept;
    +
    231  simdjson_inline simdjson_result<element> parse_into_document(document& doc, const char *buf, size_t len, bool realloc_if_needed = true) && =delete;
    +
    233  simdjson_inline simdjson_result<element> parse_into_document(document& doc, const std::string &s) & noexcept;
    +
    234  simdjson_inline simdjson_result<element> parse_into_document(document& doc, const std::string &s) && =delete;
    +
    236  simdjson_inline simdjson_result<element> parse_into_document(document& doc, const padded_string &s) & noexcept;
    +
    237  simdjson_inline simdjson_result<element> parse_into_document(document& doc, const padded_string &s) && =delete;
    +
    238 
    +
    240  simdjson_inline simdjson_result<element> parse_into_document(document& doc, const char *buf) noexcept = delete;
    +
    241 
    +
    315  inline simdjson_result<document_stream> load_many(const std::string &path, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept;
    +
    316 
    +
    411  inline simdjson_result<document_stream> parse_many(const uint8_t *buf, size_t len, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept;
    +
    413  inline simdjson_result<document_stream> parse_many(const char *buf, size_t len, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept;
    +
    415  inline simdjson_result<document_stream> parse_many(const std::string &s, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept;
    +
    416  inline simdjson_result<document_stream> parse_many(const std::string &&s, size_t batch_size) = delete;// unsafe
    +
    418  inline simdjson_result<document_stream> parse_many(const padded_string &s, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept;
    +
    419  inline simdjson_result<document_stream> parse_many(const padded_string &&s, size_t batch_size) = delete;// unsafe
    +
    420 
    +
    422  simdjson_result<document_stream> parse_many(const char *buf, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept = delete;
    +
    423 
    +
    432  simdjson_warn_unused inline error_code allocate(size_t capacity, size_t max_depth = DEFAULT_MAX_DEPTH) noexcept;
    +
    433 
    +
    434 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    +
    446  [[deprecated("Use allocate() instead.")]]
    +
    447  simdjson_warn_unused inline bool allocate_capacity(size_t capacity, size_t max_depth = DEFAULT_MAX_DEPTH) noexcept;
    +
    448 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    +
    454  simdjson_inline size_t capacity() const noexcept;
    +
    455 
    +
    463  simdjson_inline size_t max_capacity() const noexcept;
    +
    464 
    +
    470  simdjson_inline size_t max_depth() const noexcept;
    +
    471 
    +
    486  simdjson_inline void set_max_capacity(size_t max_capacity) noexcept;
    +
    487 
    +
    488 #ifdef SIMDJSON_THREADS_ENABLED
    +
    494  bool threaded{true};
    +
    495 #endif
    +
    497  class Iterator;
    +
    499  using InvalidJSON [[deprecated("Use simdjson_error instead")]] = simdjson_error;
    +
    500 
    +
    502  std::unique_ptr<internal::dom_parser_implementation> implementation{};
    +
    503 
    +
    505  bool valid{false};
    +
    507  error_code error{UNINITIALIZED};
    +
    508 
    +
    510  document doc{};
    +
    511 
    +
    513  [[deprecated("Use the result of parser.parse() instead")]]
    +
    514  inline bool is_valid() const noexcept;
    515 
    -
    516 #ifdef SIMDJSON_THREADS_ENABLED
    -
    522  bool threaded{true};
    -
    523 #endif
    -
    525  class Iterator;
    -
    527  using InvalidJSON [[deprecated("Use simdjson_error instead")]] = simdjson_error;
    -
    528 
    -
    530  std::unique_ptr<internal::dom_parser_implementation> implementation{};
    -
    531 
    -
    533  bool valid{false};
    -
    535  error_code error{UNINITIALIZED};
    -
    536 
    -
    538  document doc{};
    -
    539 
    -
    541  [[deprecated("Use the result of parser.parse() instead")]]
    -
    542  inline bool is_valid() const noexcept;
    -
    543 
    -
    548  [[deprecated("Use the result of parser.parse() instead")]]
    -
    549  inline int get_error_code() const noexcept;
    +
    520  [[deprecated("Use the result of parser.parse() instead")]]
    +
    521  inline int get_error_code() const noexcept;
    +
    522 
    +
    524  [[deprecated("Use error_message() on the result of parser.parse() instead, or cout << error")]]
    +
    525  inline std::string get_error_message() const noexcept;
    +
    526 
    +
    528  [[deprecated("Use cout << on the result of parser.parse() instead")]]
    +
    529  inline bool print_json(std::ostream &os) const noexcept;
    +
    530 
    +
    532  inline bool dump_raw_tape(std::ostream &os) const noexcept;
    +
    533 
    +
    534 
    +
    535 private:
    +
    541  size_t _max_capacity;
    +
    542 
    +
    546  std::unique_ptr<char[]> loaded_bytes;
    +
    547 
    +
    549  size_t _loaded_bytes_capacity{0};
    550 
    -
    552  [[deprecated("Use error_message() on the result of parser.parse() instead, or cout << error")]]
    -
    553  inline std::string get_error_message() const noexcept;
    -
    554 
    -
    556  [[deprecated("Use cout << on the result of parser.parse() instead")]]
    -
    557  inline bool print_json(std::ostream &os) const noexcept;
    -
    558 
    -
    560  inline bool dump_raw_tape(std::ostream &os) const noexcept;
    -
    561 
    -
    562 
    -
    563 private:
    -
    569  size_t _max_capacity;
    -
    570 
    -
    574  std::unique_ptr<char[]> loaded_bytes;
    -
    575 
    -
    577  size_t _loaded_bytes_capacity{0};
    -
    578 
    -
    579  // all nodes are stored on the doc.tape using a 64-bit word.
    -
    580  //
    -
    581  // strings, double and ints are stored as
    -
    582  // a 64-bit word with a pointer to the actual value
    -
    583  //
    -
    584  //
    -
    585  //
    -
    586  // for objects or arrays, store [ or { at the beginning and } and ] at the
    -
    587  // end. For the openings ([ or {), we annotate them with a reference to the
    -
    588  // location on the doc.tape of the end, and for then closings (} and ]), we
    -
    589  // annotate them with a reference to the location of the opening
    -
    590  //
    -
    591  //
    -
    592 
    -
    598  inline error_code ensure_capacity(size_t desired_capacity) noexcept;
    -
    604  inline error_code ensure_capacity(document& doc, size_t desired_capacity) noexcept;
    -
    605 
    -
    607  inline simdjson_result<size_t> read_file(const std::string &path) noexcept;
    -
    608 
    -
    609  friend class parser::Iterator;
    -
    610  friend class document_stream;
    -
    611 
    -
    612 
    -
    613 }; // class parser
    -
    614 
    -
    615 } // namespace dom
    -
    616 } // namespace simdjson
    -
    617 
    -
    618 #endif // SIMDJSON_DOM_PARSER_H
    -
    A parsed JSON document.
    Definition: document.h:18
    -
    A persistent document parser.
    Definition: parser.h:58
    -
    simdjson_inline parser(size_t max_capacity=SIMDJSON_MAXSIZE_BYTES) noexcept
    Create a JSON parser.
    Definition: parser-inl.h:18
    -
    simdjson_result< element > parse(const uint8_t *buf, size_t len, bool realloc_if_needed=true) &noexcept
    Parse a JSON document and return a temporary reference to it.
    Definition: parser-inl.h:138
    -
    simdjson_result< element > parse_into_document(document &doc, const uint8_t *buf, size_t len, bool realloc_if_needed=true) &noexcept
    Parse a JSON document into a provide document instance and return a temporary reference to it.
    Definition: parser-inl.h:104
    -
    simdjson_inline size_t max_depth() const noexcept
    The maximum level of nested object and arrays supported by this parser.
    Definition: parser-inl.h:175
    +
    551  // all nodes are stored on the doc.tape using a 64-bit word.
    +
    552  //
    +
    553  // strings, double and ints are stored as
    +
    554  // a 64-bit word with a pointer to the actual value
    +
    555  //
    +
    556  //
    +
    557  //
    +
    558  // for objects or arrays, store [ or { at the beginning and } and ] at the
    +
    559  // end. For the openings ([ or {), we annotate them with a reference to the
    +
    560  // location on the doc.tape of the end, and for then closings (} and ]), we
    +
    561  // annotate them with a reference to the location of the opening
    +
    562  //
    +
    563  //
    +
    564 
    +
    570  inline error_code ensure_capacity(size_t desired_capacity) noexcept;
    +
    576  inline error_code ensure_capacity(document& doc, size_t desired_capacity) noexcept;
    +
    577 
    +
    579  inline simdjson_result<size_t> read_file(const std::string &path) noexcept;
    +
    580 
    +
    581  friend class parser::Iterator;
    +
    582  friend class document_stream;
    +
    583 
    +
    584 
    +
    585 }; // class parser
    +
    586 
    +
    587 } // namespace dom
    +
    588 } // namespace simdjson
    +
    589 
    +
    590 #endif // SIMDJSON_DOM_PARSER_H
    +
    A parsed JSON document.
    Definition: document.h:16
    +
    A persistent document parser.
    Definition: parser.h:30
    +
    simdjson_inline parser(size_t max_capacity=SIMDJSON_MAXSIZE_BYTES) noexcept
    Create a JSON parser.
    Definition: parser-inl.h:20
    +
    simdjson_result< element > parse(const uint8_t *buf, size_t len, bool realloc_if_needed=true) &noexcept
    Parse a JSON document and return a temporary reference to it.
    Definition: parser-inl.h:140
    +
    simdjson_result< element > parse_into_document(document &doc, const uint8_t *buf, size_t len, bool realloc_if_needed=true) &noexcept
    Parse a JSON document into a provide document instance and return a temporary reference to it.
    Definition: parser-inl.h:106
    +
    simdjson_inline size_t max_depth() const noexcept
    The maximum level of nested object and arrays supported by this parser.
    Definition: parser-inl.h:177
    simdjson_inline parser(parser &&other) noexcept
    Take another parser's buffers and state.
    -
    simdjson_result< document_stream > load_many(const std::string &path, size_t batch_size=dom::DEFAULT_BATCH_SIZE) noexcept
    Load a file containing many JSON documents.
    Definition: parser-inl.h:96
    -
    simdjson_inline void set_max_capacity(size_t max_capacity) noexcept
    Set max_capacity.
    Definition: parser-inl.h:228
    -
    simdjson_inline size_t max_capacity() const noexcept
    The largest document this parser can automatically support.
    Definition: parser-inl.h:172
    -
    simdjson_result< element > load(const std::string &path) &noexcept
    Load a JSON document from a file and return a reference to it.
    Definition: parser-inl.h:89
    +
    simdjson_result< document_stream > load_many(const std::string &path, size_t batch_size=dom::DEFAULT_BATCH_SIZE) noexcept
    Load a file containing many JSON documents.
    Definition: parser-inl.h:98
    +
    simdjson_inline void set_max_capacity(size_t max_capacity) noexcept
    Set max_capacity.
    Definition: parser-inl.h:230
    +
    simdjson_inline size_t max_capacity() const noexcept
    The largest document this parser can automatically support.
    Definition: parser-inl.h:174
    +
    simdjson_result< element > load(const std::string &path) &noexcept
    Load a JSON document from a file and return a reference to it.
    Definition: parser-inl.h:91
    ~parser()=default
    Deallocate the JSON parser.
    -
    simdjson_inline size_t capacity() const noexcept
    The largest document this parser can support without reallocating.
    Definition: parser-inl.h:169
    +
    simdjson_inline size_t capacity() const noexcept
    The largest document this parser can support without reallocating.
    Definition: parser-inl.h:171
    simdjson_inline parser & operator=(parser &&other) noexcept
    Take another parser's buffers and state.
    -
    simdjson_warn_unused error_code allocate(size_t capacity, size_t max_depth=DEFAULT_MAX_DEPTH) noexcept
    Ensure this parser has enough memory to process JSON documents up to capacity bytes in length and max...
    Definition: parser-inl.h:180
    -
    simdjson_result< document_stream > parse_many(const uint8_t *buf, size_t len, size_t batch_size=dom::DEFAULT_BATCH_SIZE) noexcept
    Parse a buffer containing many JSON documents.
    Definition: parser-inl.h:155
    -
    An implementation of simdjson for a particular CPU architecture.
    +
    simdjson_warn_unused error_code allocate(size_t capacity, size_t max_depth=DEFAULT_MAX_DEPTH) noexcept
    Ensure this parser has enough memory to process JSON documents up to capacity bytes in length and max...
    Definition: parser-inl.h:182
    +
    simdjson_result< document_stream > parse_many(const uint8_t *buf, size_t len, size_t batch_size=dom::DEFAULT_BATCH_SIZE) noexcept
    Parse a buffer containing many JSON documents.
    Definition: parser-inl.h:157
    +
    An implementation of simdjson for a particular CPU architecture.
    User-provided string that promises it has extra padded bytes at the end for use with parser::parse().
    -
    We want to support argument-dependent lookup (ADL).
    -
    const char * error_message(error_code error) noexcept
    Get the error message for the given error code.
    Definition: error-inl.h:21
    -
    constexpr size_t DEFAULT_MAX_DEPTH
    By default, simdjson supports this many nested objects and arrays.
    Definition: common_defs.h:52
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    constexpr SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS size_t SIMDJSON_MAXSIZE_BYTES
    The maximum document size supported by simdjson.
    Definition: base.h:20
    +
    const char * error_message(error_code error) noexcept
    Get the error message for the given error code.
    Definition: error-inl.h:20
    +
    constexpr size_t DEFAULT_MAX_DEPTH
    By default, simdjson supports this many nested objects and arrays.
    Definition: base.h:37
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ UNINITIALIZED
    unknown error, or uninitialized document
    Definition: error.h:29
    -
    constexpr size_t SIMDJSON_MAXSIZE_BYTES
    The maximum document size supported by simdjson.
    Definition: common_defs.h:35
    String with extra allocation for ease of use with parser::parse()
    Definition: padded_string.h:21
    Exception thrown when an exception-supporting simdjson method is called.
    Definition: error.h:72
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    diff --git a/dom_2serialization-inl_8h_source.html b/dom_2serialization-inl_8h_source.html index 5a805a4d1..0c73e8a9a 100644 --- a/dom_2serialization-inl_8h_source.html +++ b/dom_2serialization-inl_8h_source.html @@ -96,482 +96,481 @@ $(document).ready(function(){initNavTree('dom_2serialization-inl_8h_source.html'
    3 #define SIMDJSON_SERIALIZATION_INL_H
    4 
    5 #include "simdjson/dom/serialization.h"
    -
    6 
    -
    7 #include <cinttypes>
    -
    8 #include <type_traits>
    -
    9 
    -
    10 namespace simdjson {
    -
    11 namespace dom {
    -
    12 inline bool parser::print_json(std::ostream &os) const noexcept {
    -
    13  if (!valid) { return false; }
    -
    14  simdjson::internal::string_builder<> sb;
    -
    15  sb.append(doc.root());
    -
    16  std::string_view answer = sb.str();
    -
    17  os << answer;
    -
    18  return true;
    +
    6 #include "simdjson/dom/parser.h"
    +
    7 #include "simdjson/internal/tape_type.h"
    +
    8 
    +
    9 namespace simdjson {
    +
    10 namespace dom {
    +
    11 inline bool parser::print_json(std::ostream &os) const noexcept {
    +
    12  if (!valid) { return false; }
    +
    13  simdjson::internal::string_builder<> sb;
    +
    14  sb.append(doc.root());
    +
    15  std::string_view answer = sb.str();
    +
    16  os << answer;
    +
    17  return true;
    +
    18 }
    19 }
    -
    20 }
    -
    21 /***
    -
    22  * Number utility functions
    -
    23  **/
    +
    20 /***
    +
    21  * Number utility functions
    +
    22  **/
    +
    23 
    24 
    -
    25 
    -
    26 namespace {
    -
    31 struct escape_sequence {
    -
    32  uint8_t length;
    -
    33  const char string[7]; // technically, we only ever need 6 characters, we pad to 8
    -
    34 };
    -
    44 char *fast_itoa(char *output, int64_t value) noexcept {
    -
    45  // This is a standard implementation of itoa.
    -
    46  char buffer[20];
    -
    47  uint64_t value_positive;
    -
    48  // In general, negating a signed integer is unsafe.
    -
    49  if(value < 0) {
    -
    50  *output++ = '-';
    -
    51  // Doing value_positive = -value; while avoiding
    -
    52  // undefined behavior warnings.
    -
    53  // It assumes two complement's which is universal at this
    -
    54  // point in time.
    -
    55  std::memcpy(&value_positive, &value, sizeof(value));
    -
    56  value_positive = (~value_positive) + 1; // this is a negation
    -
    57  } else {
    -
    58  value_positive = value;
    -
    59  }
    -
    60  // We work solely with value_positive. It *might* be easier
    -
    61  // for an optimizing compiler to deal with an unsigned variable
    -
    62  // as far as performance goes.
    -
    63  const char *const end_buffer = buffer + 20;
    -
    64  char *write_pointer = buffer + 19;
    -
    65  // A faster approach is possible if we expect large integers:
    -
    66  // unroll the loop (work in 100s, 1000s) and use some kind of
    -
    67  // memoization.
    -
    68  while(value_positive >= 10) {
    -
    69  *write_pointer-- = char('0' + (value_positive % 10));
    -
    70  value_positive /= 10;
    -
    71  }
    -
    72  *write_pointer = char('0' + value_positive);
    -
    73  size_t len = end_buffer - write_pointer;
    -
    74  std::memcpy(output, write_pointer, len);
    -
    75  return output + len;
    -
    76 }
    -
    86 char *fast_itoa(char *output, uint64_t value) noexcept {
    -
    87  // This is a standard implementation of itoa.
    -
    88  char buffer[20];
    -
    89  const char *const end_buffer = buffer + 20;
    -
    90  char *write_pointer = buffer + 19;
    -
    91  // A faster approach is possible if we expect large integers:
    -
    92  // unroll the loop (work in 100s, 1000s) and use some kind of
    -
    93  // memoization.
    -
    94  while(value >= 10) {
    -
    95  *write_pointer-- = char('0' + (value % 10));
    -
    96  value /= 10;
    -
    97  };
    -
    98  *write_pointer = char('0' + value);
    -
    99  size_t len = end_buffer - write_pointer;
    -
    100  std::memcpy(output, write_pointer, len);
    -
    101  return output + len;
    -
    102 }
    +
    25 namespace {
    +
    30 struct escape_sequence {
    +
    31  uint8_t length;
    +
    32  const char string[7]; // technically, we only ever need 6 characters, we pad to 8
    +
    33 };
    +
    43 static char *fast_itoa(char *output, int64_t value) noexcept {
    +
    44  // This is a standard implementation of itoa.
    +
    45  char buffer[20];
    +
    46  uint64_t value_positive;
    +
    47  // In general, negating a signed integer is unsafe.
    +
    48  if(value < 0) {
    +
    49  *output++ = '-';
    +
    50  // Doing value_positive = -value; while avoiding
    +
    51  // undefined behavior warnings.
    +
    52  // It assumes two complement's which is universal at this
    +
    53  // point in time.
    +
    54  std::memcpy(&value_positive, &value, sizeof(value));
    +
    55  value_positive = (~value_positive) + 1; // this is a negation
    +
    56  } else {
    +
    57  value_positive = value;
    +
    58  }
    +
    59  // We work solely with value_positive. It *might* be easier
    +
    60  // for an optimizing compiler to deal with an unsigned variable
    +
    61  // as far as performance goes.
    +
    62  const char *const end_buffer = buffer + 20;
    +
    63  char *write_pointer = buffer + 19;
    +
    64  // A faster approach is possible if we expect large integers:
    +
    65  // unroll the loop (work in 100s, 1000s) and use some kind of
    +
    66  // memoization.
    +
    67  while(value_positive >= 10) {
    +
    68  *write_pointer-- = char('0' + (value_positive % 10));
    +
    69  value_positive /= 10;
    +
    70  }
    +
    71  *write_pointer = char('0' + value_positive);
    +
    72  size_t len = end_buffer - write_pointer;
    +
    73  std::memcpy(output, write_pointer, len);
    +
    74  return output + len;
    +
    75 }
    +
    85 static char *fast_itoa(char *output, uint64_t value) noexcept {
    +
    86  // This is a standard implementation of itoa.
    +
    87  char buffer[20];
    +
    88  const char *const end_buffer = buffer + 20;
    +
    89  char *write_pointer = buffer + 19;
    +
    90  // A faster approach is possible if we expect large integers:
    +
    91  // unroll the loop (work in 100s, 1000s) and use some kind of
    +
    92  // memoization.
    +
    93  while(value >= 10) {
    +
    94  *write_pointer-- = char('0' + (value % 10));
    +
    95  value /= 10;
    +
    96  };
    +
    97  *write_pointer = char('0' + value);
    +
    98  size_t len = end_buffer - write_pointer;
    +
    99  std::memcpy(output, write_pointer, len);
    +
    100  return output + len;
    +
    101 }
    +
    102 
    103 
    -
    104 
    -
    105 } // anonymous namespace
    -
    106 namespace internal {
    -
    107 
    -
    108 /***
    -
    109  * Minifier/formatter code.
    -
    110  **/
    -
    111 
    -
    112 template<class formatter>
    -
    113 simdjson_inline void base_formatter<formatter>::number(uint64_t x) {
    -
    114  char number_buffer[24];
    -
    115  char *newp = fast_itoa(number_buffer, x);
    -
    116  buffer.insert(buffer.end(), number_buffer, newp);
    -
    117 }
    -
    118 
    -
    119 template<class formatter>
    -
    120 simdjson_inline void base_formatter<formatter>::number(int64_t x) {
    -
    121  char number_buffer[24];
    -
    122  char *newp = fast_itoa(number_buffer, x);
    -
    123  buffer.insert(buffer.end(), number_buffer, newp);
    -
    124 }
    -
    125 
    -
    126 template<class formatter>
    -
    127 simdjson_inline void base_formatter<formatter>::number(double x) {
    -
    128  char number_buffer[24];
    -
    129  // Currently, passing the nullptr to the second argument is
    -
    130  // safe because our implementation does not check the second
    -
    131  // argument.
    -
    132  char *newp = internal::to_chars(number_buffer, nullptr, x);
    -
    133  buffer.insert(buffer.end(), number_buffer, newp);
    -
    134 }
    -
    135 
    -
    136 template<class formatter>
    -
    137 simdjson_inline void base_formatter<formatter>::start_array() { one_char('['); }
    +
    104 } // anonymous namespace
    +
    105 namespace internal {
    +
    106 
    +
    107 /***
    +
    108  * Minifier/formatter code.
    +
    109  **/
    +
    110 
    +
    111 template<class formatter>
    +
    112 simdjson_inline void base_formatter<formatter>::number(uint64_t x) {
    +
    113  char number_buffer[24];
    +
    114  char *newp = fast_itoa(number_buffer, x);
    +
    115  buffer.insert(buffer.end(), number_buffer, newp);
    +
    116 }
    +
    117 
    +
    118 template<class formatter>
    +
    119 simdjson_inline void base_formatter<formatter>::number(int64_t x) {
    +
    120  char number_buffer[24];
    +
    121  char *newp = fast_itoa(number_buffer, x);
    +
    122  buffer.insert(buffer.end(), number_buffer, newp);
    +
    123 }
    +
    124 
    +
    125 template<class formatter>
    +
    126 simdjson_inline void base_formatter<formatter>::number(double x) {
    +
    127  char number_buffer[24];
    +
    128  // Currently, passing the nullptr to the second argument is
    +
    129  // safe because our implementation does not check the second
    +
    130  // argument.
    +
    131  char *newp = internal::to_chars(number_buffer, nullptr, x);
    +
    132  buffer.insert(buffer.end(), number_buffer, newp);
    +
    133 }
    +
    134 
    +
    135 template<class formatter>
    +
    136 simdjson_inline void base_formatter<formatter>::start_array() { one_char('['); }
    +
    137 
    138 
    -
    139 
    -
    140 template<class formatter>
    -
    141 simdjson_inline void base_formatter<formatter>::end_array() { one_char(']'); }
    -
    142 
    -
    143 template<class formatter>
    -
    144 simdjson_inline void base_formatter<formatter>::start_object() { one_char('{'); }
    -
    145 
    -
    146 template<class formatter>
    -
    147 simdjson_inline void base_formatter<formatter>::end_object() { one_char('}'); }
    -
    148 
    -
    149 template<class formatter>
    -
    150 simdjson_inline void base_formatter<formatter>::comma() { one_char(','); }
    -
    151 
    -
    152 template<class formatter>
    -
    153 simdjson_inline void base_formatter<formatter>::true_atom() {
    -
    154  const char * s = "true";
    -
    155  buffer.insert(buffer.end(), s, s + 4);
    -
    156 }
    -
    157 
    -
    158 template<class formatter>
    -
    159 simdjson_inline void base_formatter<formatter>::false_atom() {
    -
    160  const char * s = "false";
    -
    161  buffer.insert(buffer.end(), s, s + 5);
    -
    162 }
    -
    163 
    -
    164 template<class formatter>
    -
    165 simdjson_inline void base_formatter<formatter>::null_atom() {
    -
    166  const char * s = "null";
    -
    167  buffer.insert(buffer.end(), s, s + 4);
    -
    168 }
    -
    169 
    -
    170 template<class formatter>
    -
    171 simdjson_inline void base_formatter<formatter>::one_char(char c) { buffer.push_back(c); }
    -
    172 
    -
    173 template<class formatter>
    -
    174 simdjson_inline void base_formatter<formatter>::key(std::string_view unescaped) {
    -
    175  string(unescaped);
    -
    176  one_char(':');
    -
    177 }
    -
    178 
    -
    179 template<class formatter>
    -
    180 simdjson_inline void base_formatter<formatter>::string(std::string_view unescaped) {
    -
    181  one_char('\"');
    -
    182  size_t i = 0;
    -
    183  // Fast path for the case where we have no control character, no ", and no backslash.
    -
    184  // This should include most keys.
    -
    185  //
    -
    186  // We would like to use 'bool' but some compilers take offense to bitwise operation
    -
    187  // with bool types.
    -
    188  constexpr static char needs_escaping[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    -
    189  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
    -
    190  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    -
    191  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
    +
    139 template<class formatter>
    +
    140 simdjson_inline void base_formatter<formatter>::end_array() { one_char(']'); }
    +
    141 
    +
    142 template<class formatter>
    +
    143 simdjson_inline void base_formatter<formatter>::start_object() { one_char('{'); }
    +
    144 
    +
    145 template<class formatter>
    +
    146 simdjson_inline void base_formatter<formatter>::end_object() { one_char('}'); }
    +
    147 
    +
    148 template<class formatter>
    +
    149 simdjson_inline void base_formatter<formatter>::comma() { one_char(','); }
    +
    150 
    +
    151 template<class formatter>
    +
    152 simdjson_inline void base_formatter<formatter>::true_atom() {
    +
    153  const char * s = "true";
    +
    154  buffer.insert(buffer.end(), s, s + 4);
    +
    155 }
    +
    156 
    +
    157 template<class formatter>
    +
    158 simdjson_inline void base_formatter<formatter>::false_atom() {
    +
    159  const char * s = "false";
    +
    160  buffer.insert(buffer.end(), s, s + 5);
    +
    161 }
    +
    162 
    +
    163 template<class formatter>
    +
    164 simdjson_inline void base_formatter<formatter>::null_atom() {
    +
    165  const char * s = "null";
    +
    166  buffer.insert(buffer.end(), s, s + 4);
    +
    167 }
    +
    168 
    +
    169 template<class formatter>
    +
    170 simdjson_inline void base_formatter<formatter>::one_char(char c) { buffer.push_back(c); }
    +
    171 
    +
    172 template<class formatter>
    +
    173 simdjson_inline void base_formatter<formatter>::key(std::string_view unescaped) {
    +
    174  string(unescaped);
    +
    175  one_char(':');
    +
    176 }
    +
    177 
    +
    178 template<class formatter>
    +
    179 simdjson_inline void base_formatter<formatter>::string(std::string_view unescaped) {
    +
    180  one_char('\"');
    +
    181  size_t i = 0;
    +
    182  // Fast path for the case where we have no control character, no ", and no backslash.
    +
    183  // This should include most keys.
    +
    184  //
    +
    185  // We would like to use 'bool' but some compilers take offense to bitwise operation
    +
    186  // with bool types.
    +
    187  constexpr static char needs_escaping[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
    +
    188  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
    +
    189  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    +
    190  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
    +
    191  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    192  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    193  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    194  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    195  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    -
    196  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    -
    197  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
    -
    198  for(;i + 8 <= unescaped.length(); i += 8) {
    -
    199  // Poor's man vectorization. This could get much faster if we used SIMD.
    -
    200  //
    -
    201  // It is not the case that replacing '|' with '||' would be neutral performance-wise.
    -
    202  if(needs_escaping[uint8_t(unescaped[i])] | needs_escaping[uint8_t(unescaped[i+1])]
    -
    203  | needs_escaping[uint8_t(unescaped[i+2])] | needs_escaping[uint8_t(unescaped[i+3])]
    -
    204  | needs_escaping[uint8_t(unescaped[i+4])] | needs_escaping[uint8_t(unescaped[i+5])]
    -
    205  | needs_escaping[uint8_t(unescaped[i+6])] | needs_escaping[uint8_t(unescaped[i+7])]
    -
    206  ) { break; }
    -
    207  }
    -
    208  for(;i < unescaped.length(); i++) {
    -
    209  if(needs_escaping[uint8_t(unescaped[i])]) { break; }
    -
    210  }
    -
    211  // The following is also possible and omits a 256-byte table, but it is slower:
    -
    212  // for (; (i < unescaped.length()) && (uint8_t(unescaped[i]) > 0x1F)
    -
    213  // && (unescaped[i] != '\"') && (unescaped[i] != '\\'); i++) {}
    -
    214 
    -
    215  // At least for long strings, the following should be fast. We could
    -
    216  // do better by integrating the checks and the insertion.
    -
    217  buffer.insert(buffer.end(), unescaped.data(), unescaped.data() + i);
    -
    218  // We caught a control character if we enter this loop (slow).
    -
    219  // Note that we are do not restart from the beginning, but rather we continue
    -
    220  // from the point where we encountered something that requires escaping.
    -
    221  for (; i < unescaped.length(); i++) {
    -
    222  switch (unescaped[i]) {
    -
    223  case '\"':
    -
    224  {
    -
    225  const char * s = "\\\"";
    -
    226  buffer.insert(buffer.end(), s, s + 2);
    -
    227  }
    -
    228  break;
    -
    229  case '\\':
    -
    230  {
    -
    231  const char * s = "\\\\";
    -
    232  buffer.insert(buffer.end(), s, s + 2);
    -
    233  }
    -
    234  break;
    -
    235  default:
    -
    236  if (uint8_t(unescaped[i]) <= 0x1F) {
    -
    237  // If packed, this uses 8 * 32 bytes.
    -
    238  // Note that we expect most compilers to embed this code in the data
    -
    239  // section.
    -
    240  constexpr static escape_sequence escaped[32] = {
    -
    241  {6, "\\u0000"}, {6, "\\u0001"}, {6, "\\u0002"}, {6, "\\u0003"},
    -
    242  {6, "\\u0004"}, {6, "\\u0005"}, {6, "\\u0006"}, {6, "\\u0007"},
    -
    243  {2, "\\b"}, {2, "\\t"}, {2, "\\n"}, {6, "\\u000b"},
    -
    244  {2, "\\f"}, {2, "\\r"}, {6, "\\u000e"}, {6, "\\u000f"},
    -
    245  {6, "\\u0010"}, {6, "\\u0011"}, {6, "\\u0012"}, {6, "\\u0013"},
    -
    246  {6, "\\u0014"}, {6, "\\u0015"}, {6, "\\u0016"}, {6, "\\u0017"},
    -
    247  {6, "\\u0018"}, {6, "\\u0019"}, {6, "\\u001a"}, {6, "\\u001b"},
    -
    248  {6, "\\u001c"}, {6, "\\u001d"}, {6, "\\u001e"}, {6, "\\u001f"}};
    -
    249  auto u = escaped[uint8_t(unescaped[i])];
    -
    250  buffer.insert(buffer.end(), u.string, u.string + u.length);
    -
    251  } else {
    -
    252  one_char(unescaped[i]);
    -
    253  }
    -
    254  } // switch
    -
    255  } // for
    -
    256  one_char('\"');
    -
    257 }
    +
    196  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
    +
    197  for(;i + 8 <= unescaped.length(); i += 8) {
    +
    198  // Poor's man vectorization. This could get much faster if we used SIMD.
    +
    199  //
    +
    200  // It is not the case that replacing '|' with '||' would be neutral performance-wise.
    +
    201  if(needs_escaping[uint8_t(unescaped[i])] | needs_escaping[uint8_t(unescaped[i+1])]
    +
    202  | needs_escaping[uint8_t(unescaped[i+2])] | needs_escaping[uint8_t(unescaped[i+3])]
    +
    203  | needs_escaping[uint8_t(unescaped[i+4])] | needs_escaping[uint8_t(unescaped[i+5])]
    +
    204  | needs_escaping[uint8_t(unescaped[i+6])] | needs_escaping[uint8_t(unescaped[i+7])]
    +
    205  ) { break; }
    +
    206  }
    +
    207  for(;i < unescaped.length(); i++) {
    +
    208  if(needs_escaping[uint8_t(unescaped[i])]) { break; }
    +
    209  }
    +
    210  // The following is also possible and omits a 256-byte table, but it is slower:
    +
    211  // for (; (i < unescaped.length()) && (uint8_t(unescaped[i]) > 0x1F)
    +
    212  // && (unescaped[i] != '\"') && (unescaped[i] != '\\'); i++) {}
    +
    213 
    +
    214  // At least for long strings, the following should be fast. We could
    +
    215  // do better by integrating the checks and the insertion.
    +
    216  buffer.insert(buffer.end(), unescaped.data(), unescaped.data() + i);
    +
    217  // We caught a control character if we enter this loop (slow).
    +
    218  // Note that we are do not restart from the beginning, but rather we continue
    +
    219  // from the point where we encountered something that requires escaping.
    +
    220  for (; i < unescaped.length(); i++) {
    +
    221  switch (unescaped[i]) {
    +
    222  case '\"':
    +
    223  {
    +
    224  const char * s = "\\\"";
    +
    225  buffer.insert(buffer.end(), s, s + 2);
    +
    226  }
    +
    227  break;
    +
    228  case '\\':
    +
    229  {
    +
    230  const char * s = "\\\\";
    +
    231  buffer.insert(buffer.end(), s, s + 2);
    +
    232  }
    +
    233  break;
    +
    234  default:
    +
    235  if (uint8_t(unescaped[i]) <= 0x1F) {
    +
    236  // If packed, this uses 8 * 32 bytes.
    +
    237  // Note that we expect most compilers to embed this code in the data
    +
    238  // section.
    +
    239  constexpr static escape_sequence escaped[32] = {
    +
    240  {6, "\\u0000"}, {6, "\\u0001"}, {6, "\\u0002"}, {6, "\\u0003"},
    +
    241  {6, "\\u0004"}, {6, "\\u0005"}, {6, "\\u0006"}, {6, "\\u0007"},
    +
    242  {2, "\\b"}, {2, "\\t"}, {2, "\\n"}, {6, "\\u000b"},
    +
    243  {2, "\\f"}, {2, "\\r"}, {6, "\\u000e"}, {6, "\\u000f"},
    +
    244  {6, "\\u0010"}, {6, "\\u0011"}, {6, "\\u0012"}, {6, "\\u0013"},
    +
    245  {6, "\\u0014"}, {6, "\\u0015"}, {6, "\\u0016"}, {6, "\\u0017"},
    +
    246  {6, "\\u0018"}, {6, "\\u0019"}, {6, "\\u001a"}, {6, "\\u001b"},
    +
    247  {6, "\\u001c"}, {6, "\\u001d"}, {6, "\\u001e"}, {6, "\\u001f"}};
    +
    248  auto u = escaped[uint8_t(unescaped[i])];
    +
    249  buffer.insert(buffer.end(), u.string, u.string + u.length);
    +
    250  } else {
    +
    251  one_char(unescaped[i]);
    +
    252  }
    +
    253  } // switch
    +
    254  } // for
    +
    255  one_char('\"');
    +
    256 }
    +
    257 
    258 
    -
    259 
    -
    260 template<class formatter>
    -
    261 inline void base_formatter<formatter>::clear() {
    -
    262  buffer.clear();
    -
    263 }
    -
    264 
    -
    265 template<class formatter>
    -
    266 simdjson_inline std::string_view base_formatter<formatter>::str() const {
    -
    267  return std::string_view(buffer.data(), buffer.size());
    -
    268 }
    -
    269 
    -
    270 simdjson_inline void mini_formatter::print_newline() {
    -
    271  return;
    -
    272 }
    -
    273 
    -
    274 simdjson_inline void mini_formatter::print_indents(size_t depth) {
    -
    275  (void)depth;
    -
    276  return;
    -
    277 }
    -
    278 
    -
    279 simdjson_inline void mini_formatter::print_space() {
    -
    280  return;
    -
    281 }
    -
    282 
    -
    283 simdjson_inline void pretty_formatter::print_newline() {
    -
    284  one_char('\n');
    -
    285 }
    -
    286 
    -
    287 simdjson_inline void pretty_formatter::print_indents(size_t depth) {
    -
    288  if(this->indent_step <= 0) {
    -
    289  return;
    -
    290  }
    -
    291  for(size_t i = 0; i < this->indent_step * depth; i++) {
    -
    292  one_char(' ');
    -
    293  }
    -
    294 }
    -
    295 
    -
    296 simdjson_inline void pretty_formatter::print_space() {
    -
    297  one_char(' ');
    -
    298 }
    -
    299 
    -
    300 /***
    -
    301  * String building code.
    -
    302  **/
    -
    303 
    -
    304 template <class serializer>
    -
    305 inline void string_builder<serializer>::append(simdjson::dom::element value) {
    -
    306  // using tape_type = simdjson::internal::tape_type;
    -
    307  size_t depth = 0;
    -
    308  constexpr size_t MAX_DEPTH = 16;
    -
    309  bool is_object[MAX_DEPTH];
    -
    310  is_object[0] = false;
    -
    311  bool after_value = false;
    -
    312 
    -
    313  internal::tape_ref iter(value.tape);
    -
    314  do {
    -
    315  // print commas after each value
    -
    316  if (after_value) {
    -
    317  format.comma();
    -
    318  format.print_newline();
    -
    319  }
    -
    320 
    -
    321  format.print_indents(depth);
    -
    322 
    -
    323  // If we are in an object, print the next key and :, and skip to the next
    -
    324  // value.
    -
    325  if (is_object[depth]) {
    -
    326  format.key(iter.get_string_view());
    -
    327  format.print_space();
    -
    328  iter.json_index++;
    -
    329  }
    -
    330  switch (iter.tape_ref_type()) {
    -
    331 
    -
    332  // Arrays
    -
    333  case tape_type::START_ARRAY: {
    -
    334  // If we're too deep, we need to recurse to go deeper.
    -
    335  depth++;
    -
    336  if (simdjson_unlikely(depth >= MAX_DEPTH)) {
    -
    337  append(simdjson::dom::array(iter));
    -
    338  iter.json_index = iter.matching_brace_index() - 1; // Jump to the ]
    -
    339  depth--;
    -
    340  break;
    -
    341  }
    -
    342 
    -
    343  // Output start [
    -
    344  format.start_array();
    -
    345  iter.json_index++;
    -
    346 
    -
    347  // Handle empty [] (we don't want to come back around and print commas)
    -
    348  if (iter.tape_ref_type() == tape_type::END_ARRAY) {
    -
    349  format.end_array();
    -
    350  depth--;
    -
    351  break;
    -
    352  }
    -
    353 
    -
    354  is_object[depth] = false;
    -
    355  after_value = false;
    -
    356  format.print_newline();
    -
    357  continue;
    -
    358  }
    -
    359 
    -
    360  // Objects
    -
    361  case tape_type::START_OBJECT: {
    -
    362  // If we're too deep, we need to recurse to go deeper.
    -
    363  depth++;
    -
    364  if (simdjson_unlikely(depth >= MAX_DEPTH)) {
    -
    365  append(simdjson::dom::object(iter));
    -
    366  iter.json_index = iter.matching_brace_index() - 1; // Jump to the }
    -
    367  depth--;
    -
    368  break;
    -
    369  }
    -
    370 
    -
    371  // Output start {
    -
    372  format.start_object();
    -
    373  iter.json_index++;
    -
    374 
    -
    375  // Handle empty {} (we don't want to come back around and print commas)
    -
    376  if (iter.tape_ref_type() == tape_type::END_OBJECT) {
    -
    377  format.end_object();
    -
    378  depth--;
    -
    379  break;
    -
    380  }
    -
    381 
    -
    382  is_object[depth] = true;
    -
    383  after_value = false;
    -
    384  format.print_newline();
    -
    385  continue;
    -
    386  }
    -
    387 
    -
    388  // Scalars
    -
    389  case tape_type::STRING:
    -
    390  format.string(iter.get_string_view());
    -
    391  break;
    -
    392  case tape_type::INT64:
    -
    393  format.number(iter.next_tape_value<int64_t>());
    -
    394  iter.json_index++; // numbers take up 2 spots, so we need to increment
    -
    395  // extra
    -
    396  break;
    -
    397  case tape_type::UINT64:
    -
    398  format.number(iter.next_tape_value<uint64_t>());
    -
    399  iter.json_index++; // numbers take up 2 spots, so we need to increment
    -
    400  // extra
    -
    401  break;
    -
    402  case tape_type::DOUBLE:
    -
    403  format.number(iter.next_tape_value<double>());
    -
    404  iter.json_index++; // numbers take up 2 spots, so we need to increment
    -
    405  // extra
    -
    406  break;
    -
    407  case tape_type::TRUE_VALUE:
    -
    408  format.true_atom();
    -
    409  break;
    -
    410  case tape_type::FALSE_VALUE:
    -
    411  format.false_atom();
    -
    412  break;
    -
    413  case tape_type::NULL_VALUE:
    -
    414  format.null_atom();
    -
    415  break;
    -
    416 
    -
    417  // These are impossible
    -
    418  case tape_type::END_ARRAY:
    -
    419  case tape_type::END_OBJECT:
    -
    420  case tape_type::ROOT:
    -
    421  SIMDJSON_UNREACHABLE();
    -
    422  }
    -
    423  iter.json_index++;
    -
    424  after_value = true;
    -
    425 
    -
    426  // Handle multiple ends in a row
    -
    427  while (depth != 0 && (iter.tape_ref_type() == tape_type::END_ARRAY ||
    -
    428  iter.tape_ref_type() == tape_type::END_OBJECT)) {
    -
    429  format.print_newline();
    -
    430  depth--;
    -
    431  format.print_indents(depth);
    -
    432  if (iter.tape_ref_type() == tape_type::END_ARRAY) {
    -
    433  format.end_array();
    -
    434  } else {
    -
    435  format.end_object();
    -
    436  }
    -
    437  iter.json_index++;
    -
    438  }
    -
    439 
    -
    440  // Stop when we're at depth 0
    -
    441  } while (depth != 0);
    -
    442 
    -
    443  format.print_newline();
    -
    444 }
    -
    445 
    -
    446 template <class serializer>
    -
    447 inline void string_builder<serializer>::append(simdjson::dom::object value) {
    -
    448  format.start_object();
    -
    449  auto pair = value.begin();
    -
    450  auto end = value.end();
    -
    451  if (pair != end) {
    -
    452  append(*pair);
    -
    453  for (++pair; pair != end; ++pair) {
    -
    454  format.comma();
    -
    455  append(*pair);
    -
    456  }
    -
    457  }
    -
    458  format.end_object();
    -
    459 }
    -
    460 
    -
    461 template <class serializer>
    -
    462 inline void string_builder<serializer>::append(simdjson::dom::array value) {
    -
    463  format.start_array();
    -
    464  auto iter = value.begin();
    -
    465  auto end = value.end();
    -
    466  if (iter != end) {
    -
    467  append(*iter);
    -
    468  for (++iter; iter != end; ++iter) {
    -
    469  format.comma();
    -
    470  append(*iter);
    -
    471  }
    -
    472  }
    -
    473  format.end_array();
    -
    474 }
    -
    475 
    -
    476 template <class serializer>
    -
    477 simdjson_inline void string_builder<serializer>::append(simdjson::dom::key_value_pair kv) {
    -
    478  format.key(kv.key);
    -
    479  append(kv.value);
    -
    480 }
    -
    481 
    -
    482 template <class serializer>
    -
    483 simdjson_inline void string_builder<serializer>::clear() {
    -
    484  format.clear();
    -
    485 }
    -
    486 
    -
    487 template <class serializer>
    -
    488 simdjson_inline std::string_view string_builder<serializer>::str() const {
    -
    489  return format.str();
    -
    490 }
    +
    259 template<class formatter>
    +
    260 inline void base_formatter<formatter>::clear() {
    +
    261  buffer.clear();
    +
    262 }
    +
    263 
    +
    264 template<class formatter>
    +
    265 simdjson_inline std::string_view base_formatter<formatter>::str() const {
    +
    266  return std::string_view(buffer.data(), buffer.size());
    +
    267 }
    +
    268 
    +
    269 simdjson_inline void mini_formatter::print_newline() {
    +
    270  return;
    +
    271 }
    +
    272 
    +
    273 simdjson_inline void mini_formatter::print_indents(size_t depth) {
    +
    274  (void)depth;
    +
    275  return;
    +
    276 }
    +
    277 
    +
    278 simdjson_inline void mini_formatter::print_space() {
    +
    279  return;
    +
    280 }
    +
    281 
    +
    282 simdjson_inline void pretty_formatter::print_newline() {
    +
    283  one_char('\n');
    +
    284 }
    +
    285 
    +
    286 simdjson_inline void pretty_formatter::print_indents(size_t depth) {
    +
    287  if(this->indent_step <= 0) {
    +
    288  return;
    +
    289  }
    +
    290  for(size_t i = 0; i < this->indent_step * depth; i++) {
    +
    291  one_char(' ');
    +
    292  }
    +
    293 }
    +
    294 
    +
    295 simdjson_inline void pretty_formatter::print_space() {
    +
    296  one_char(' ');
    +
    297 }
    +
    298 
    +
    299 /***
    +
    300  * String building code.
    +
    301  **/
    +
    302 
    +
    303 template <class serializer>
    +
    304 inline void string_builder<serializer>::append(simdjson::dom::element value) {
    +
    305  // using tape_type = simdjson::internal::tape_type;
    +
    306  size_t depth = 0;
    +
    307  constexpr size_t MAX_DEPTH = 16;
    +
    308  bool is_object[MAX_DEPTH];
    +
    309  is_object[0] = false;
    +
    310  bool after_value = false;
    +
    311 
    +
    312  internal::tape_ref iter(value.tape);
    +
    313  do {
    +
    314  // print commas after each value
    +
    315  if (after_value) {
    +
    316  format.comma();
    +
    317  format.print_newline();
    +
    318  }
    +
    319 
    +
    320  format.print_indents(depth);
    +
    321 
    +
    322  // If we are in an object, print the next key and :, and skip to the next
    +
    323  // value.
    +
    324  if (is_object[depth]) {
    +
    325  format.key(iter.get_string_view());
    +
    326  format.print_space();
    +
    327  iter.json_index++;
    +
    328  }
    +
    329  switch (iter.tape_ref_type()) {
    +
    330 
    +
    331  // Arrays
    +
    332  case tape_type::START_ARRAY: {
    +
    333  // If we're too deep, we need to recurse to go deeper.
    +
    334  depth++;
    +
    335  if (simdjson_unlikely(depth >= MAX_DEPTH)) {
    +
    336  append(simdjson::dom::array(iter));
    +
    337  iter.json_index = iter.matching_brace_index() - 1; // Jump to the ]
    +
    338  depth--;
    +
    339  break;
    +
    340  }
    +
    341 
    +
    342  // Output start [
    +
    343  format.start_array();
    +
    344  iter.json_index++;
    +
    345 
    +
    346  // Handle empty [] (we don't want to come back around and print commas)
    +
    347  if (iter.tape_ref_type() == tape_type::END_ARRAY) {
    +
    348  format.end_array();
    +
    349  depth--;
    +
    350  break;
    +
    351  }
    +
    352 
    +
    353  is_object[depth] = false;
    +
    354  after_value = false;
    +
    355  format.print_newline();
    +
    356  continue;
    +
    357  }
    +
    358 
    +
    359  // Objects
    +
    360  case tape_type::START_OBJECT: {
    +
    361  // If we're too deep, we need to recurse to go deeper.
    +
    362  depth++;
    +
    363  if (simdjson_unlikely(depth >= MAX_DEPTH)) {
    +
    364  append(simdjson::dom::object(iter));
    +
    365  iter.json_index = iter.matching_brace_index() - 1; // Jump to the }
    +
    366  depth--;
    +
    367  break;
    +
    368  }
    +
    369 
    +
    370  // Output start {
    +
    371  format.start_object();
    +
    372  iter.json_index++;
    +
    373 
    +
    374  // Handle empty {} (we don't want to come back around and print commas)
    +
    375  if (iter.tape_ref_type() == tape_type::END_OBJECT) {
    +
    376  format.end_object();
    +
    377  depth--;
    +
    378  break;
    +
    379  }
    +
    380 
    +
    381  is_object[depth] = true;
    +
    382  after_value = false;
    +
    383  format.print_newline();
    +
    384  continue;
    +
    385  }
    +
    386 
    +
    387  // Scalars
    +
    388  case tape_type::STRING:
    +
    389  format.string(iter.get_string_view());
    +
    390  break;
    +
    391  case tape_type::INT64:
    +
    392  format.number(iter.next_tape_value<int64_t>());
    +
    393  iter.json_index++; // numbers take up 2 spots, so we need to increment
    +
    394  // extra
    +
    395  break;
    +
    396  case tape_type::UINT64:
    +
    397  format.number(iter.next_tape_value<uint64_t>());
    +
    398  iter.json_index++; // numbers take up 2 spots, so we need to increment
    +
    399  // extra
    +
    400  break;
    +
    401  case tape_type::DOUBLE:
    +
    402  format.number(iter.next_tape_value<double>());
    +
    403  iter.json_index++; // numbers take up 2 spots, so we need to increment
    +
    404  // extra
    +
    405  break;
    +
    406  case tape_type::TRUE_VALUE:
    +
    407  format.true_atom();
    +
    408  break;
    +
    409  case tape_type::FALSE_VALUE:
    +
    410  format.false_atom();
    +
    411  break;
    +
    412  case tape_type::NULL_VALUE:
    +
    413  format.null_atom();
    +
    414  break;
    +
    415 
    +
    416  // These are impossible
    +
    417  case tape_type::END_ARRAY:
    +
    418  case tape_type::END_OBJECT:
    +
    419  case tape_type::ROOT:
    +
    420  SIMDJSON_UNREACHABLE();
    +
    421  }
    +
    422  iter.json_index++;
    +
    423  after_value = true;
    +
    424 
    +
    425  // Handle multiple ends in a row
    +
    426  while (depth != 0 && (iter.tape_ref_type() == tape_type::END_ARRAY ||
    +
    427  iter.tape_ref_type() == tape_type::END_OBJECT)) {
    +
    428  format.print_newline();
    +
    429  depth--;
    +
    430  format.print_indents(depth);
    +
    431  if (iter.tape_ref_type() == tape_type::END_ARRAY) {
    +
    432  format.end_array();
    +
    433  } else {
    +
    434  format.end_object();
    +
    435  }
    +
    436  iter.json_index++;
    +
    437  }
    +
    438 
    +
    439  // Stop when we're at depth 0
    +
    440  } while (depth != 0);
    +
    441 
    +
    442  format.print_newline();
    +
    443 }
    +
    444 
    +
    445 template <class serializer>
    +
    446 inline void string_builder<serializer>::append(simdjson::dom::object value) {
    +
    447  format.start_object();
    +
    448  auto pair = value.begin();
    +
    449  auto end = value.end();
    +
    450  if (pair != end) {
    +
    451  append(*pair);
    +
    452  for (++pair; pair != end; ++pair) {
    +
    453  format.comma();
    +
    454  append(*pair);
    +
    455  }
    +
    456  }
    +
    457  format.end_object();
    +
    458 }
    +
    459 
    +
    460 template <class serializer>
    +
    461 inline void string_builder<serializer>::append(simdjson::dom::array value) {
    +
    462  format.start_array();
    +
    463  auto iter = value.begin();
    +
    464  auto end = value.end();
    +
    465  if (iter != end) {
    +
    466  append(*iter);
    +
    467  for (++iter; iter != end; ++iter) {
    +
    468  format.comma();
    +
    469  append(*iter);
    +
    470  }
    +
    471  }
    +
    472  format.end_array();
    +
    473 }
    +
    474 
    +
    475 template <class serializer>
    +
    476 simdjson_inline void string_builder<serializer>::append(simdjson::dom::key_value_pair kv) {
    +
    477  format.key(kv.key);
    +
    478  append(kv.value);
    +
    479 }
    +
    480 
    +
    481 template <class serializer>
    +
    482 simdjson_inline void string_builder<serializer>::clear() {
    +
    483  format.clear();
    +
    484 }
    +
    485 
    +
    486 template <class serializer>
    +
    487 simdjson_inline std::string_view string_builder<serializer>::str() const {
    +
    488  return format.str();
    +
    489 }
    +
    490 
    491 
    -
    492 
    -
    493 } // namespace internal
    -
    494 } // namespace simdjson
    -
    495 
    -
    496 #endif
    -
    JSON array.
    Definition: array.h:22
    -
    A JSON element.
    Definition: element.h:40
    -
    Key/value pair in an object.
    Definition: object.h:222
    -
    std::string_view key
    key in the key-value pair
    Definition: object.h:225
    -
    element value
    value in the key-value pair
    Definition: object.h:227
    -
    JSON object.
    Definition: object.h:22
    -
    We want to support argument-dependent lookup (ADL).
    +
    492 } // namespace internal
    +
    493 } // namespace simdjson
    +
    494 
    +
    495 #endif
    +
    JSON array.
    Definition: array.h:13
    +
    A JSON element.
    Definition: element.h:31
    +
    Key/value pair in an object.
    Definition: object.h:214
    +
    std::string_view key
    key in the key-value pair
    Definition: object.h:217
    +
    element value
    value in the key-value pair
    Definition: object.h:219
    +
    JSON object.
    Definition: object.h:14
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/dom_2serialization_8h_source.html b/dom_2serialization_8h_source.html index 5c6cf4501..5f659cb49 100644 --- a/dom_2serialization_8h_source.html +++ b/dom_2serialization_8h_source.html @@ -94,196 +94,192 @@ $(document).ready(function(){initNavTree('dom_2serialization_8h_source.html','')
    1 #ifndef SIMDJSON_SERIALIZATION_H
    2 #define SIMDJSON_SERIALIZATION_H
    3 
    -
    4 #include "simdjson/common_defs.h"
    -
    5 #include "simdjson/dom/document.h"
    -
    6 #include "simdjson/error.h"
    -
    7 #include "simdjson/internal/dom_parser_implementation.h"
    -
    8 #include "simdjson/internal/tape_ref.h"
    -
    9 #include "simdjson/padded_string.h"
    -
    10 #include "simdjson/portability.h"
    -
    11 #include <vector>
    -
    12 
    -
    13 namespace simdjson {
    -
    14 
    -
    20 namespace internal {
    -
    21 
    -
    22 template<class formatter>
    -
    23 class base_formatter {
    -
    24 public:
    -
    26  simdjson_inline void comma();
    -
    28  simdjson_inline void start_array();
    -
    30  simdjson_inline void end_array();
    -
    32  simdjson_inline void start_object();
    -
    34  simdjson_inline void end_object();
    -
    36  simdjson_inline void true_atom();
    -
    38  simdjson_inline void false_atom();
    -
    40  simdjson_inline void null_atom();
    -
    42  simdjson_inline void number(int64_t x);
    -
    44  simdjson_inline void number(uint64_t x);
    -
    46  simdjson_inline void number(double x);
    -
    48  simdjson_inline void key(std::string_view unescaped);
    -
    50  simdjson_inline void string(std::string_view unescaped);
    -
    52  simdjson_inline void clear();
    -
    57  simdjson_inline std::string_view str() const;
    +
    4 #include "simdjson/dom/base.h"
    +
    5 #include "simdjson/dom/element.h"
    +
    6 #include "simdjson/dom/object.h"
    +
    7 
    +
    8 #include <vector>
    +
    9 
    +
    10 namespace simdjson {
    +
    11 
    +
    17 namespace internal {
    +
    18 
    +
    19 template<class formatter>
    +
    20 class base_formatter {
    +
    21 public:
    +
    23  simdjson_inline void comma();
    +
    25  simdjson_inline void start_array();
    +
    27  simdjson_inline void end_array();
    +
    29  simdjson_inline void start_object();
    +
    31  simdjson_inline void end_object();
    +
    33  simdjson_inline void true_atom();
    +
    35  simdjson_inline void false_atom();
    +
    37  simdjson_inline void null_atom();
    +
    39  simdjson_inline void number(int64_t x);
    +
    41  simdjson_inline void number(uint64_t x);
    +
    43  simdjson_inline void number(double x);
    +
    45  simdjson_inline void key(std::string_view unescaped);
    +
    47  simdjson_inline void string(std::string_view unescaped);
    +
    49  simdjson_inline void clear();
    +
    54  simdjson_inline std::string_view str() const;
    +
    55 
    +
    57  simdjson_inline void one_char(char c);
    58 
    -
    60  simdjson_inline void one_char(char c);
    -
    61 
    -
    62  simdjson_inline void call_print_newline() {
    -
    63  this->print_newline();
    -
    64  }
    -
    65 
    -
    66  simdjson_inline void call_print_indents(size_t depth) {
    -
    67  this->print_indents(depth);
    -
    68  }
    -
    69 
    -
    70  simdjson_inline void call_print_space() {
    -
    71  this->print_space();
    -
    72  }
    -
    73 
    -
    74 protected:
    -
    75  // implementation details (subject to change)
    -
    77  std::vector<char> buffer{}; // not ideal!
    -
    78 };
    -
    79 
    -
    80 
    -
    86 class mini_formatter : public base_formatter<mini_formatter> {
    -
    87 public:
    -
    88  simdjson_inline void print_newline();
    -
    89 
    -
    90  simdjson_inline void print_indents(size_t depth);
    +
    59  simdjson_inline void call_print_newline() {
    +
    60  this->print_newline();
    +
    61  }
    +
    62 
    +
    63  simdjson_inline void call_print_indents(size_t depth) {
    +
    64  this->print_indents(depth);
    +
    65  }
    +
    66 
    +
    67  simdjson_inline void call_print_space() {
    +
    68  this->print_space();
    +
    69  }
    +
    70 
    +
    71 protected:
    +
    72  // implementation details (subject to change)
    +
    74  std::vector<char> buffer{}; // not ideal!
    +
    75 };
    +
    76 
    +
    77 
    +
    83 class mini_formatter : public base_formatter<mini_formatter> {
    +
    84 public:
    +
    85  simdjson_inline void print_newline();
    +
    86 
    +
    87  simdjson_inline void print_indents(size_t depth);
    +
    88 
    +
    89  simdjson_inline void print_space();
    +
    90 };
    91 
    -
    92  simdjson_inline void print_space();
    -
    93 };
    -
    94 
    -
    95 class pretty_formatter : public base_formatter<pretty_formatter> {
    -
    96 public:
    -
    97  simdjson_inline void print_newline();
    -
    98 
    -
    99  simdjson_inline void print_indents(size_t depth);
    -
    100 
    -
    101  simdjson_inline void print_space();
    -
    102 
    -
    103 protected:
    -
    104  int indent_step = 4;
    -
    105 };
    -
    106 
    -
    114 template <class formatter = mini_formatter>
    -
    115 class string_builder {
    -
    116 public:
    -
    118  string_builder() = default;
    -
    120  inline void append(simdjson::dom::element value);
    -
    122  inline void append(simdjson::dom::array value);
    -
    124  inline void append(simdjson::dom::object value);
    -
    126  simdjson_inline void clear();
    -
    134  simdjson_inline std::string_view str() const;
    -
    136  simdjson_inline void append(simdjson::dom::key_value_pair value);
    -
    137 private:
    -
    138  formatter format{};
    -
    139 };
    -
    140 
    -
    141 } // internal
    -
    142 
    -
    143 namespace dom {
    -
    144 
    -
    152 inline std::ostream& operator<<(std::ostream& out, simdjson::dom::element value) {
    -
    153  simdjson::internal::string_builder<> sb;
    -
    154  sb.append(value);
    -
    155  return (out << sb.str());
    -
    156 }
    -
    157 #if SIMDJSON_EXCEPTIONS
    -
    158 inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result<simdjson::dom::element> x) {
    -
    159  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    -
    160  return (out << x.value());
    -
    161 }
    -
    162 #endif
    -
    170 inline std::ostream& operator<<(std::ostream& out, simdjson::dom::array value) {
    -
    171  simdjson::internal::string_builder<> sb;
    -
    172  sb.append(value);
    -
    173  return (out << sb.str());
    -
    174 }
    -
    175 #if SIMDJSON_EXCEPTIONS
    -
    176 inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result<simdjson::dom::array> x) {
    -
    177  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    -
    178  return (out << x.value());
    -
    179 }
    -
    180 #endif
    -
    188 inline std::ostream& operator<<(std::ostream& out, simdjson::dom::object value) {
    -
    189  simdjson::internal::string_builder<> sb;
    -
    190  sb.append(value);
    -
    191  return (out << sb.str());
    -
    192 }
    -
    193 #if SIMDJSON_EXCEPTIONS
    -
    194 inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result<simdjson::dom::object> x) {
    -
    195  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    -
    196  return (out << x.value());
    -
    197 }
    -
    198 #endif
    -
    199 } // namespace dom
    -
    200 
    -
    209 template <class T>
    -
    210 std::string to_string(T x) {
    -
    211  // in C++, to_string is standard: http://www.cplusplus.com/reference/string/to_string/
    -
    212  // Currently minify and to_string are identical but in the future, they may
    -
    213  // differ.
    -
    214  simdjson::internal::string_builder<> sb;
    -
    215  sb.append(x);
    -
    216  std::string_view answer = sb.str();
    -
    217  return std::string(answer.data(), answer.size());
    -
    218 }
    -
    219 #if SIMDJSON_EXCEPTIONS
    -
    220 template <class T>
    -
    221 std::string to_string(simdjson_result<T> x) {
    -
    222  if (x.error()) { throw simdjson_error(x.error()); }
    -
    223  return to_string(x.value());
    -
    224 }
    -
    225 #endif
    -
    226 
    -
    235 template <class T>
    -
    236 std::string minify(T x) {
    -
    237  return to_string(x);
    -
    238 }
    -
    239 
    -
    240 #if SIMDJSON_EXCEPTIONS
    -
    241 template <class T>
    -
    242 std::string minify(simdjson_result<T> x) {
    -
    243  if (x.error()) { throw simdjson_error(x.error()); }
    -
    244  return to_string(x.value());
    -
    245 }
    -
    246 #endif
    -
    247 
    -
    265 template <class T>
    -
    266 std::string prettify(T x) {
    -
    267  simdjson::internal::string_builder<simdjson::internal::pretty_formatter> sb;
    -
    268  sb.append(x);
    -
    269  std::string_view answer = sb.str();
    -
    270  return std::string(answer.data(), answer.size());
    -
    271 }
    -
    272 
    -
    273 #if SIMDJSON_EXCEPTIONS
    -
    274 template <class T>
    -
    275 std::string prettify(simdjson_result<T> x) {
    -
    276  if (x.error()) { throw simdjson_error(x.error()); }
    -
    277  return to_string(x.value());
    -
    278 }
    -
    279 #endif
    +
    92 class pretty_formatter : public base_formatter<pretty_formatter> {
    +
    93 public:
    +
    94  simdjson_inline void print_newline();
    +
    95 
    +
    96  simdjson_inline void print_indents(size_t depth);
    +
    97 
    +
    98  simdjson_inline void print_space();
    +
    99 
    +
    100 protected:
    +
    101  int indent_step = 4;
    +
    102 };
    +
    103 
    +
    111 template <class formatter = mini_formatter>
    +
    112 class string_builder {
    +
    113 public:
    +
    115  string_builder() = default;
    +
    117  inline void append(simdjson::dom::element value);
    +
    119  inline void append(simdjson::dom::array value);
    +
    121  inline void append(simdjson::dom::object value);
    +
    123  simdjson_inline void clear();
    +
    131  simdjson_inline std::string_view str() const;
    +
    133  simdjson_inline void append(simdjson::dom::key_value_pair value);
    +
    134 private:
    +
    135  formatter format{};
    +
    136 };
    +
    137 
    +
    138 } // internal
    +
    139 
    +
    140 namespace dom {
    +
    141 
    +
    149 inline std::ostream& operator<<(std::ostream& out, simdjson::dom::element value) {
    +
    150  simdjson::internal::string_builder<> sb;
    +
    151  sb.append(value);
    +
    152  return (out << sb.str());
    +
    153 }
    +
    154 #if SIMDJSON_EXCEPTIONS
    +
    155 inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result<simdjson::dom::element> x) {
    +
    156  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    +
    157  return (out << x.value());
    +
    158 }
    +
    159 #endif
    +
    167 inline std::ostream& operator<<(std::ostream& out, simdjson::dom::array value) {
    +
    168  simdjson::internal::string_builder<> sb;
    +
    169  sb.append(value);
    +
    170  return (out << sb.str());
    +
    171 }
    +
    172 #if SIMDJSON_EXCEPTIONS
    +
    173 inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result<simdjson::dom::array> x) {
    +
    174  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    +
    175  return (out << x.value());
    +
    176 }
    +
    177 #endif
    +
    185 inline std::ostream& operator<<(std::ostream& out, simdjson::dom::object value) {
    +
    186  simdjson::internal::string_builder<> sb;
    +
    187  sb.append(value);
    +
    188  return (out << sb.str());
    +
    189 }
    +
    190 #if SIMDJSON_EXCEPTIONS
    +
    191 inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result<simdjson::dom::object> x) {
    +
    192  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    +
    193  return (out << x.value());
    +
    194 }
    +
    195 #endif
    +
    196 } // namespace dom
    +
    197 
    +
    206 template <class T>
    +
    207 std::string to_string(T x) {
    +
    208  // in C++, to_string is standard: http://www.cplusplus.com/reference/string/to_string/
    +
    209  // Currently minify and to_string are identical but in the future, they may
    +
    210  // differ.
    +
    211  simdjson::internal::string_builder<> sb;
    +
    212  sb.append(x);
    +
    213  std::string_view answer = sb.str();
    +
    214  return std::string(answer.data(), answer.size());
    +
    215 }
    +
    216 #if SIMDJSON_EXCEPTIONS
    +
    217 template <class T>
    +
    218 std::string to_string(simdjson_result<T> x) {
    +
    219  if (x.error()) { throw simdjson_error(x.error()); }
    +
    220  return to_string(x.value());
    +
    221 }
    +
    222 #endif
    +
    223 
    +
    232 template <class T>
    +
    233 std::string minify(T x) {
    +
    234  return to_string(x);
    +
    235 }
    +
    236 
    +
    237 #if SIMDJSON_EXCEPTIONS
    +
    238 template <class T>
    +
    239 std::string minify(simdjson_result<T> x) {
    +
    240  if (x.error()) { throw simdjson_error(x.error()); }
    +
    241  return to_string(x.value());
    +
    242 }
    +
    243 #endif
    +
    244 
    +
    262 template <class T>
    +
    263 std::string prettify(T x) {
    +
    264  simdjson::internal::string_builder<simdjson::internal::pretty_formatter> sb;
    +
    265  sb.append(x);
    +
    266  std::string_view answer = sb.str();
    +
    267  return std::string(answer.data(), answer.size());
    +
    268 }
    +
    269 
    +
    270 #if SIMDJSON_EXCEPTIONS
    +
    271 template <class T>
    +
    272 std::string prettify(simdjson_result<T> x) {
    +
    273  if (x.error()) { throw simdjson_error(x.error()); }
    +
    274  return to_string(x.value());
    +
    275 }
    +
    276 #endif
    +
    277 
    +
    278 } // namespace simdjson
    +
    279 
    280 
    -
    281 } // namespace simdjson
    -
    282 
    -
    283 
    -
    284 #endif
    -
    JSON array.
    Definition: array.h:22
    -
    A JSON element.
    Definition: element.h:40
    -
    Key/value pair in an object.
    Definition: object.h:222
    -
    JSON object.
    Definition: object.h:22
    +
    281 #endif
    +
    JSON array.
    Definition: array.h:13
    +
    A JSON element.
    Definition: element.h:31
    +
    Key/value pair in an object.
    Definition: object.h:214
    +
    JSON object.
    Definition: object.h:14
    @ number
    A JSON number ( 1 or -2.3 or 4.5e6 ...)
    -
    We want to support argument-dependent lookup (ADL).
    -
    std::ostream & operator<<(std::ostream &out, error_code error) noexcept
    Write the error message to the output stream.
    Definition: error-inl.h:36
    -
    std::string to_string(T x)
    Converts JSON to a string.
    -
    std::string minify(T x)
    Minifies a JSON element or document, printing the smallest possible valid JSON.
    -
    std::string prettify(T x)
    Prettifies a JSON element or document, printing the valid JSON with indentation.
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    std::string to_string(T x)
    Converts JSON to a string.
    +
    std::string minify(T x)
    Minifies a JSON element or document, printing the smallest possible valid JSON.
    +
    std::string prettify(T x)
    Prettifies a JSON element or document, printing the valid JSON with indentation.
    Exception thrown when an exception-supporting simdjson method is called.
    Definition: error.h:72
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    simdjson_inline T & value() &noexcept(false)
    Get the result value.
    diff --git a/dom_8h_source.html b/dom_8h_source.html index 8c8cfa1a1..f967ce488 100644 --- a/dom_8h_source.html +++ b/dom_8h_source.html @@ -94,38 +94,32 @@ $(document).ready(function(){initNavTree('dom_8h_source.html',''); initResizable
    1 #ifndef SIMDJSON_DOM_H
    2 #define SIMDJSON_DOM_H
    3 
    -
    4 #include "simdjson/base.h"
    -
    5 
    -
    6 SIMDJSON_PUSH_DISABLE_WARNINGS
    -
    7 SIMDJSON_DISABLE_UNDESIRED_WARNINGS
    -
    8 
    -
    9 #include "simdjson/dom/array.h"
    -
    10 #include "simdjson/dom/document_stream.h"
    -
    11 #include "simdjson/dom/document.h"
    -
    12 #include "simdjson/dom/element.h"
    -
    13 #include "simdjson/dom/object.h"
    -
    14 #include "simdjson/dom/parser.h"
    -
    15 #include "simdjson/dom/serialization.h"
    -
    16 
    -
    17 // Deprecated API
    -
    18 #include "simdjson/dom/jsonparser.h"
    -
    19 #include "simdjson/dom/parsedjson.h"
    -
    20 #include "simdjson/dom/parsedjson_iterator.h"
    -
    21 
    -
    22 // Inline functions
    -
    23 #include "simdjson/dom/array-inl.h"
    -
    24 #include "simdjson/dom/document_stream-inl.h"
    -
    25 #include "simdjson/dom/document-inl.h"
    -
    26 #include "simdjson/dom/element-inl.h"
    -
    27 #include "simdjson/dom/object-inl.h"
    -
    28 #include "simdjson/dom/parsedjson_iterator-inl.h"
    -
    29 #include "simdjson/dom/parser-inl.h"
    -
    30 #include "simdjson/internal/tape_ref-inl.h"
    -
    31 #include "simdjson/dom/serialization-inl.h"
    -
    32 
    -
    33 SIMDJSON_POP_DISABLE_WARNINGS
    -
    34 
    -
    35 #endif // SIMDJSON_DOM_H
    +
    4 #include "simdjson/dom/base.h"
    +
    5 #include "simdjson/dom/array.h"
    +
    6 #include "simdjson/dom/document_stream.h"
    +
    7 #include "simdjson/dom/document.h"
    +
    8 #include "simdjson/dom/element.h"
    +
    9 #include "simdjson/dom/object.h"
    +
    10 #include "simdjson/dom/parser.h"
    +
    11 #include "simdjson/dom/serialization.h"
    +
    12 
    +
    13 // Deprecated API
    +
    14 #include "simdjson/dom/jsonparser.h"
    +
    15 #include "simdjson/dom/parsedjson.h"
    +
    16 #include "simdjson/dom/parsedjson_iterator.h"
    +
    17 
    +
    18 // Inline functions
    +
    19 #include "simdjson/dom/array-inl.h"
    +
    20 #include "simdjson/dom/document_stream-inl.h"
    +
    21 #include "simdjson/dom/document-inl.h"
    +
    22 #include "simdjson/dom/element-inl.h"
    +
    23 #include "simdjson/dom/object-inl.h"
    +
    24 #include "simdjson/dom/parsedjson_iterator-inl.h"
    +
    25 #include "simdjson/dom/parser-inl.h"
    +
    26 #include "simdjson/internal/tape_ref-inl.h"
    +
    27 #include "simdjson/dom/serialization-inl.h"
    +
    28 
    +
    29 #endif // SIMDJSON_DOM_H
    diff --git a/element-inl_8h_source.html b/element-inl_8h_source.html index 6305940bf..6074fc2a8 100644 --- a/element-inl_8h_source.html +++ b/element-inl_8h_source.html @@ -94,490 +94,499 @@ $(document).ready(function(){initNavTree('element-inl_8h_source.html',''); initR
    1 #ifndef SIMDJSON_INLINE_ELEMENT_H
    2 #define SIMDJSON_INLINE_ELEMENT_H
    3 
    -
    4 #include "simdjson/dom/array.h"
    -
    5 #include "simdjson/dom/element.h"
    +
    4 #include "simdjson/dom/element.h"
    +
    5 #include "simdjson/dom/document.h"
    6 #include "simdjson/dom/object.h"
    -
    7 #include <cstring>
    -
    8 #include <utility>
    -
    9 
    -
    10 namespace simdjson {
    -
    11 
    -
    12 //
    -
    13 // simdjson_result<dom::element> inline implementation
    -
    14 //
    -
    15 simdjson_inline simdjson_result<dom::element>::simdjson_result() noexcept
    -
    16  : internal::simdjson_result_base<dom::element>() {}
    -
    17 simdjson_inline simdjson_result<dom::element>::simdjson_result(dom::element &&value) noexcept
    -
    18  : internal::simdjson_result_base<dom::element>(std::forward<dom::element>(value)) {}
    -
    19 simdjson_inline simdjson_result<dom::element>::simdjson_result(error_code error) noexcept
    -
    20  : internal::simdjson_result_base<dom::element>(error) {}
    -
    21 inline simdjson_result<dom::element_type> simdjson_result<dom::element>::type() const noexcept {
    -
    22  if (error()) { return error(); }
    -
    23  return first.type();
    -
    24 }
    -
    25 
    -
    26 template<typename T>
    -
    27 simdjson_inline bool simdjson_result<dom::element>::is() const noexcept {
    -
    28  return !error() && first.is<T>();
    -
    29 }
    -
    30 template<typename T>
    -
    31 simdjson_inline simdjson_result<T> simdjson_result<dom::element>::get() const noexcept {
    -
    32  if (error()) { return error(); }
    -
    33  return first.get<T>();
    -
    34 }
    -
    35 template<typename T>
    -
    36 simdjson_warn_unused simdjson_inline error_code simdjson_result<dom::element>::get(T &value) const noexcept {
    -
    37  if (error()) { return error(); }
    -
    38  return first.get<T>(value);
    -
    39 }
    -
    40 
    -
    41 simdjson_inline simdjson_result<dom::array> simdjson_result<dom::element>::get_array() const noexcept {
    -
    42  if (error()) { return error(); }
    -
    43  return first.get_array();
    -
    44 }
    -
    45 simdjson_inline simdjson_result<dom::object> simdjson_result<dom::element>::get_object() const noexcept {
    -
    46  if (error()) { return error(); }
    -
    47  return first.get_object();
    -
    48 }
    -
    49 simdjson_inline simdjson_result<const char *> simdjson_result<dom::element>::get_c_str() const noexcept {
    -
    50  if (error()) { return error(); }
    -
    51  return first.get_c_str();
    -
    52 }
    -
    53 simdjson_inline simdjson_result<size_t> simdjson_result<dom::element>::get_string_length() const noexcept {
    -
    54  if (error()) { return error(); }
    -
    55  return first.get_string_length();
    -
    56 }
    -
    57 simdjson_inline simdjson_result<std::string_view> simdjson_result<dom::element>::get_string() const noexcept {
    -
    58  if (error()) { return error(); }
    -
    59  return first.get_string();
    -
    60 }
    -
    61 simdjson_inline simdjson_result<int64_t> simdjson_result<dom::element>::get_int64() const noexcept {
    -
    62  if (error()) { return error(); }
    -
    63  return first.get_int64();
    -
    64 }
    -
    65 simdjson_inline simdjson_result<uint64_t> simdjson_result<dom::element>::get_uint64() const noexcept {
    -
    66  if (error()) { return error(); }
    -
    67  return first.get_uint64();
    -
    68 }
    -
    69 simdjson_inline simdjson_result<double> simdjson_result<dom::element>::get_double() const noexcept {
    -
    70  if (error()) { return error(); }
    -
    71  return first.get_double();
    -
    72 }
    -
    73 simdjson_inline simdjson_result<bool> simdjson_result<dom::element>::get_bool() const noexcept {
    -
    74  if (error()) { return error(); }
    -
    75  return first.get_bool();
    -
    76 }
    -
    77 
    -
    78 simdjson_inline bool simdjson_result<dom::element>::is_array() const noexcept {
    -
    79  return !error() && first.is_array();
    -
    80 }
    -
    81 simdjson_inline bool simdjson_result<dom::element>::is_object() const noexcept {
    -
    82  return !error() && first.is_object();
    -
    83 }
    -
    84 simdjson_inline bool simdjson_result<dom::element>::is_string() const noexcept {
    -
    85  return !error() && first.is_string();
    -
    86 }
    -
    87 simdjson_inline bool simdjson_result<dom::element>::is_int64() const noexcept {
    -
    88  return !error() && first.is_int64();
    -
    89 }
    -
    90 simdjson_inline bool simdjson_result<dom::element>::is_uint64() const noexcept {
    -
    91  return !error() && first.is_uint64();
    -
    92 }
    -
    93 simdjson_inline bool simdjson_result<dom::element>::is_double() const noexcept {
    -
    94  return !error() && first.is_double();
    -
    95 }
    -
    96 simdjson_inline bool simdjson_result<dom::element>::is_number() const noexcept {
    -
    97  return !error() && first.is_number();
    -
    98 }
    -
    99 simdjson_inline bool simdjson_result<dom::element>::is_bool() const noexcept {
    -
    100  return !error() && first.is_bool();
    -
    101 }
    -
    102 
    -
    103 simdjson_inline bool simdjson_result<dom::element>::is_null() const noexcept {
    -
    104  return !error() && first.is_null();
    -
    105 }
    -
    106 
    -
    107 simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::operator[](std::string_view key) const noexcept {
    -
    108  if (error()) { return error(); }
    -
    109  return first[key];
    -
    110 }
    -
    111 simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::operator[](const char *key) const noexcept {
    -
    112  if (error()) { return error(); }
    -
    113  return first[key];
    -
    114 }
    -
    115 simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::at_pointer(const std::string_view json_pointer) const noexcept {
    -
    116  if (error()) { return error(); }
    -
    117  return first.at_pointer(json_pointer);
    -
    118 }
    -
    119 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    -
    120 [[deprecated("For standard compliance, use at_pointer instead, and prefix your pointers with a slash '/', see RFC6901 ")]]
    -
    121 simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::at(const std::string_view json_pointer) const noexcept {
    -
    122 SIMDJSON_PUSH_DISABLE_WARNINGS
    -
    123 SIMDJSON_DISABLE_DEPRECATED_WARNING
    -
    124  if (error()) { return error(); }
    -
    125  return first.at(json_pointer);
    -
    126 SIMDJSON_POP_DISABLE_WARNINGS
    -
    127 }
    -
    128 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    -
    129 simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::at(size_t index) const noexcept {
    -
    130  if (error()) { return error(); }
    -
    131  return first.at(index);
    -
    132 }
    -
    133 simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::at_key(std::string_view key) const noexcept {
    -
    134  if (error()) { return error(); }
    -
    135  return first.at_key(key);
    -
    136 }
    -
    137 simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::at_key_case_insensitive(std::string_view key) const noexcept {
    -
    138  if (error()) { return error(); }
    -
    139  return first.at_key_case_insensitive(key);
    -
    140 }
    -
    141 
    -
    142 #if SIMDJSON_EXCEPTIONS
    -
    143 
    -
    144 simdjson_inline simdjson_result<dom::element>::operator bool() const noexcept(false) {
    -
    145  return get<bool>();
    -
    146 }
    -
    147 simdjson_inline simdjson_result<dom::element>::operator const char *() const noexcept(false) {
    -
    148  return get<const char *>();
    -
    149 }
    -
    150 simdjson_inline simdjson_result<dom::element>::operator std::string_view() const noexcept(false) {
    -
    151  return get<std::string_view>();
    -
    152 }
    -
    153 simdjson_inline simdjson_result<dom::element>::operator uint64_t() const noexcept(false) {
    -
    154  return get<uint64_t>();
    -
    155 }
    -
    156 simdjson_inline simdjson_result<dom::element>::operator int64_t() const noexcept(false) {
    -
    157  return get<int64_t>();
    -
    158 }
    -
    159 simdjson_inline simdjson_result<dom::element>::operator double() const noexcept(false) {
    -
    160  return get<double>();
    -
    161 }
    -
    162 simdjson_inline simdjson_result<dom::element>::operator dom::array() const noexcept(false) {
    -
    163  return get<dom::array>();
    -
    164 }
    -
    165 simdjson_inline simdjson_result<dom::element>::operator dom::object() const noexcept(false) {
    -
    166  return get<dom::object>();
    -
    167 }
    -
    168 
    -
    169 simdjson_inline dom::array::iterator simdjson_result<dom::element>::begin() const noexcept(false) {
    -
    170  if (error()) { throw simdjson_error(error()); }
    -
    171  return first.begin();
    -
    172 }
    -
    173 simdjson_inline dom::array::iterator simdjson_result<dom::element>::end() const noexcept(false) {
    -
    174  if (error()) { throw simdjson_error(error()); }
    -
    175  return first.end();
    -
    176 }
    -
    177 
    -
    178 #endif // SIMDJSON_EXCEPTIONS
    -
    179 
    -
    180 namespace dom {
    -
    181 
    -
    182 //
    -
    183 // element inline implementation
    -
    184 //
    -
    185 simdjson_inline element::element() noexcept : tape{} {}
    -
    186 simdjson_inline element::element(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
    -
    187 
    -
    188 inline element_type element::type() const noexcept {
    -
    189  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    190  auto tape_type = tape.tape_ref_type();
    -
    191  return tape_type == internal::tape_type::FALSE_VALUE ? element_type::BOOL : static_cast<element_type>(tape_type);
    -
    192 }
    -
    193 
    -
    194 inline simdjson_result<bool> element::get_bool() const noexcept {
    -
    195  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    196  if(tape.is_true()) {
    -
    197  return true;
    -
    198  } else if(tape.is_false()) {
    -
    199  return false;
    -
    200  }
    -
    201  return INCORRECT_TYPE;
    -
    202 }
    - -
    204  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    205  switch (tape.tape_ref_type()) {
    -
    206  case internal::tape_type::STRING: {
    -
    207  return tape.get_c_str();
    -
    208  }
    -
    209  default:
    -
    210  return INCORRECT_TYPE;
    -
    211  }
    -
    212 }
    - -
    214  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    215  switch (tape.tape_ref_type()) {
    -
    216  case internal::tape_type::STRING: {
    -
    217  return tape.get_string_length();
    -
    218  }
    -
    219  default:
    -
    220  return INCORRECT_TYPE;
    -
    221  }
    -
    222 }
    - -
    224  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    225  switch (tape.tape_ref_type()) {
    -
    226  case internal::tape_type::STRING:
    -
    227  return tape.get_string_view();
    -
    228  default:
    -
    229  return INCORRECT_TYPE;
    -
    230  }
    -
    231 }
    - -
    233  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    234  if(simdjson_unlikely(!tape.is_uint64())) { // branch rarely taken
    -
    235  if(tape.is_int64()) {
    -
    236  int64_t result = tape.next_tape_value<int64_t>();
    -
    237  if (result < 0) {
    -
    238  return NUMBER_OUT_OF_RANGE;
    -
    239  }
    -
    240  return uint64_t(result);
    -
    241  }
    -
    242  return INCORRECT_TYPE;
    -
    243  }
    -
    244  return tape.next_tape_value<int64_t>();
    -
    245 }
    - -
    247  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    248  if(simdjson_unlikely(!tape.is_int64())) { // branch rarely taken
    -
    249  if(tape.is_uint64()) {
    -
    250  uint64_t result = tape.next_tape_value<uint64_t>();
    -
    251  // Wrapping max in parens to handle Windows issue: https://stackoverflow.com/questions/11544073/how-do-i-deal-with-the-max-macro-in-windows-h-colliding-with-max-in-std
    -
    252  if (result > uint64_t((std::numeric_limits<int64_t>::max)())) {
    -
    253  return NUMBER_OUT_OF_RANGE;
    -
    254  }
    -
    255  return static_cast<int64_t>(result);
    -
    256  }
    -
    257  return INCORRECT_TYPE;
    -
    258  }
    -
    259  return tape.next_tape_value<int64_t>();
    -
    260 }
    - -
    262  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    263  // Performance considerations:
    -
    264  // 1. Querying tape_ref_type() implies doing a shift, it is fast to just do a straight
    -
    265  // comparison.
    -
    266  // 2. Using a switch-case relies on the compiler guessing what kind of code generation
    -
    267  // we want... But the compiler cannot know that we expect the type to be "double"
    -
    268  // most of the time.
    -
    269  // We can expect get<double> to refer to a double type almost all the time.
    -
    270  // It is important to craft the code accordingly so that the compiler can use this
    -
    271  // information. (This could also be solved with profile-guided optimization.)
    -
    272  if(simdjson_unlikely(!tape.is_double())) { // branch rarely taken
    -
    273  if(tape.is_uint64()) {
    -
    274  return double(tape.next_tape_value<uint64_t>());
    -
    275  } else if(tape.is_int64()) {
    -
    276  return double(tape.next_tape_value<int64_t>());
    -
    277  }
    -
    278  return INCORRECT_TYPE;
    -
    279  }
    -
    280  // this is common:
    -
    281  return tape.next_tape_value<double>();
    -
    282 }
    - -
    284  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    285  switch (tape.tape_ref_type()) {
    -
    286  case internal::tape_type::START_ARRAY:
    -
    287  return array(tape);
    -
    288  default:
    -
    289  return INCORRECT_TYPE;
    -
    290  }
    -
    291 }
    - -
    293  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    294  switch (tape.tape_ref_type()) {
    -
    295  case internal::tape_type::START_OBJECT:
    -
    296  return object(tape);
    -
    297  default:
    -
    298  return INCORRECT_TYPE;
    -
    299  }
    -
    300 }
    -
    301 
    -
    302 template<typename T>
    -
    303 simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
    -
    304  return get<T>().get(value);
    -
    305 }
    -
    306 // An element-specific version prevents recursion with simdjson_result::get<element>(value)
    -
    307 template<>
    -
    308 simdjson_warn_unused simdjson_inline error_code element::get<element>(element &value) const noexcept {
    -
    309  value = element(tape);
    -
    310  return SUCCESS;
    -
    311 }
    -
    312 template<typename T>
    -
    313 inline void element::tie(T &value, error_code &error) && noexcept {
    -
    314  error = get<T>(value);
    -
    315 }
    -
    316 
    -
    317 template<typename T>
    -
    318 simdjson_inline bool element::is() const noexcept {
    -
    319  auto result = get<T>();
    -
    320  return !result.error();
    -
    321 }
    -
    322 
    -
    323 template<> inline simdjson_result<array> element::get<array>() const noexcept { return get_array(); }
    -
    324 template<> inline simdjson_result<object> element::get<object>() const noexcept { return get_object(); }
    -
    325 template<> inline simdjson_result<const char *> element::get<const char *>() const noexcept { return get_c_str(); }
    -
    326 template<> inline simdjson_result<std::string_view> element::get<std::string_view>() const noexcept { return get_string(); }
    -
    327 template<> inline simdjson_result<int64_t> element::get<int64_t>() const noexcept { return get_int64(); }
    -
    328 template<> inline simdjson_result<uint64_t> element::get<uint64_t>() const noexcept { return get_uint64(); }
    -
    329 template<> inline simdjson_result<double> element::get<double>() const noexcept { return get_double(); }
    -
    330 template<> inline simdjson_result<bool> element::get<bool>() const noexcept { return get_bool(); }
    -
    331 
    -
    332 inline bool element::is_array() const noexcept { return is<array>(); }
    -
    333 inline bool element::is_object() const noexcept { return is<object>(); }
    -
    334 inline bool element::is_string() const noexcept { return is<std::string_view>(); }
    -
    335 inline bool element::is_int64() const noexcept { return is<int64_t>(); }
    -
    336 inline bool element::is_uint64() const noexcept { return is<uint64_t>(); }
    -
    337 inline bool element::is_double() const noexcept { return is<double>(); }
    -
    338 inline bool element::is_bool() const noexcept { return is<bool>(); }
    -
    339 inline bool element::is_number() const noexcept { return is_int64() || is_uint64() || is_double(); }
    -
    340 
    -
    341 inline bool element::is_null() const noexcept {
    -
    342  return tape.is_null_on_tape();
    -
    343 }
    -
    344 
    -
    345 #if SIMDJSON_EXCEPTIONS
    -
    346 
    -
    347 inline element::operator bool() const noexcept(false) { return get<bool>(); }
    -
    348 inline element::operator const char*() const noexcept(false) { return get<const char *>(); }
    -
    349 inline element::operator std::string_view() const noexcept(false) { return get<std::string_view>(); }
    -
    350 inline element::operator uint64_t() const noexcept(false) { return get<uint64_t>(); }
    -
    351 inline element::operator int64_t() const noexcept(false) { return get<int64_t>(); }
    -
    352 inline element::operator double() const noexcept(false) { return get<double>(); }
    -
    353 inline element::operator array() const noexcept(false) { return get<array>(); }
    -
    354 inline element::operator object() const noexcept(false) { return get<object>(); }
    -
    355 
    -
    356 inline array::iterator element::begin() const noexcept(false) {
    -
    357  return get<array>().begin();
    -
    358 }
    -
    359 inline array::iterator element::end() const noexcept(false) {
    -
    360  return get<array>().end();
    -
    361 }
    -
    362 
    -
    363 #endif // SIMDJSON_EXCEPTIONS
    -
    364 
    -
    365 inline simdjson_result<element> element::operator[](std::string_view key) const noexcept {
    -
    366  return at_key(key);
    -
    367 }
    -
    368 inline simdjson_result<element> element::operator[](const char *key) const noexcept {
    -
    369  return at_key(key);
    -
    370 }
    -
    371 
    -
    372 inline simdjson_result<element> element::at_pointer(std::string_view json_pointer) const noexcept {
    -
    373  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    374  switch (tape.tape_ref_type()) {
    -
    375  case internal::tape_type::START_OBJECT:
    -
    376  return object(tape).at_pointer(json_pointer);
    -
    377  case internal::tape_type::START_ARRAY:
    -
    378  return array(tape).at_pointer(json_pointer);
    -
    379  default: {
    -
    380  if(!json_pointer.empty()) { // a non-empty string is invalid on an atom
    -
    381  return INVALID_JSON_POINTER;
    -
    382  }
    -
    383  // an empty string means that we return the current node
    -
    384  dom::element copy(*this);
    -
    385  return simdjson_result<element>(std::move(copy));
    -
    386  }
    -
    387  }
    -
    388 }
    -
    389 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    -
    390 [[deprecated("For standard compliance, use at_pointer instead, and prefix your pointers with a slash '/', see RFC6901 ")]]
    -
    391 inline simdjson_result<element> element::at(std::string_view json_pointer) const noexcept {
    -
    392  // version 0.4 of simdjson allowed non-compliant pointers
    -
    393  auto std_pointer = (json_pointer.empty() ? "" : "/") + std::string(json_pointer.begin(), json_pointer.end());
    -
    394  return at_pointer(std_pointer);
    -
    395 }
    -
    396 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    -
    397 
    -
    398 inline simdjson_result<element> element::at(size_t index) const noexcept {
    -
    399  return get<array>().at(index);
    -
    400 }
    -
    401 inline simdjson_result<element> element::at_key(std::string_view key) const noexcept {
    -
    402  return get<object>().at_key(key);
    -
    403 }
    -
    404 inline simdjson_result<element> element::at_key_case_insensitive(std::string_view key) const noexcept {
    -
    405  return get<object>().at_key_case_insensitive(key);
    -
    406 }
    -
    407 
    -
    408 inline bool element::dump_raw_tape(std::ostream &out) const noexcept {
    -
    409  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    -
    410  return tape.doc->dump_raw_tape(out);
    -
    411 }
    -
    412 
    +
    7 #include "simdjson/internal/tape_type.h"
    +
    8 
    +
    9 #include <ostream>
    +
    10 #include <limits>
    +
    11 namespace simdjson {
    +
    12 
    +
    13 //
    +
    14 // simdjson_result<dom::element> inline implementation
    +
    15 //
    +
    16 simdjson_inline simdjson_result<dom::element>::simdjson_result() noexcept
    +
    17  : internal::simdjson_result_base<dom::element>() {}
    +
    18 simdjson_inline simdjson_result<dom::element>::simdjson_result(dom::element &&value) noexcept
    +
    19  : internal::simdjson_result_base<dom::element>(std::forward<dom::element>(value)) {}
    +
    20 simdjson_inline simdjson_result<dom::element>::simdjson_result(error_code error) noexcept
    +
    21  : internal::simdjson_result_base<dom::element>(error) {}
    +
    22 inline simdjson_result<dom::element_type> simdjson_result<dom::element>::type() const noexcept {
    +
    23  if (error()) { return error(); }
    +
    24  return first.type();
    +
    25 }
    +
    26 
    +
    27 template<typename T>
    +
    28 simdjson_inline bool simdjson_result<dom::element>::is() const noexcept {
    +
    29  return !error() && first.is<T>();
    +
    30 }
    +
    31 template<typename T>
    +
    32 simdjson_inline simdjson_result<T> simdjson_result<dom::element>::get() const noexcept {
    +
    33  if (error()) { return error(); }
    +
    34  return first.get<T>();
    +
    35 }
    +
    36 template<typename T>
    +
    37 simdjson_warn_unused simdjson_inline error_code simdjson_result<dom::element>::get(T &value) const noexcept {
    +
    38  if (error()) { return error(); }
    +
    39  return first.get<T>(value);
    +
    40 }
    +
    41 
    +
    42 simdjson_inline simdjson_result<dom::array> simdjson_result<dom::element>::get_array() const noexcept {
    +
    43  if (error()) { return error(); }
    +
    44  return first.get_array();
    +
    45 }
    +
    46 simdjson_inline simdjson_result<dom::object> simdjson_result<dom::element>::get_object() const noexcept {
    +
    47  if (error()) { return error(); }
    +
    48  return first.get_object();
    +
    49 }
    +
    50 simdjson_inline simdjson_result<const char *> simdjson_result<dom::element>::get_c_str() const noexcept {
    +
    51  if (error()) { return error(); }
    +
    52  return first.get_c_str();
    +
    53 }
    +
    54 simdjson_inline simdjson_result<size_t> simdjson_result<dom::element>::get_string_length() const noexcept {
    +
    55  if (error()) { return error(); }
    +
    56  return first.get_string_length();
    +
    57 }
    +
    58 simdjson_inline simdjson_result<std::string_view> simdjson_result<dom::element>::get_string() const noexcept {
    +
    59  if (error()) { return error(); }
    +
    60  return first.get_string();
    +
    61 }
    +
    62 simdjson_inline simdjson_result<int64_t> simdjson_result<dom::element>::get_int64() const noexcept {
    +
    63  if (error()) { return error(); }
    +
    64  return first.get_int64();
    +
    65 }
    +
    66 simdjson_inline simdjson_result<uint64_t> simdjson_result<dom::element>::get_uint64() const noexcept {
    +
    67  if (error()) { return error(); }
    +
    68  return first.get_uint64();
    +
    69 }
    +
    70 simdjson_inline simdjson_result<double> simdjson_result<dom::element>::get_double() const noexcept {
    +
    71  if (error()) { return error(); }
    +
    72  return first.get_double();
    +
    73 }
    +
    74 simdjson_inline simdjson_result<bool> simdjson_result<dom::element>::get_bool() const noexcept {
    +
    75  if (error()) { return error(); }
    +
    76  return first.get_bool();
    +
    77 }
    +
    78 
    +
    79 simdjson_inline bool simdjson_result<dom::element>::is_array() const noexcept {
    +
    80  return !error() && first.is_array();
    +
    81 }
    +
    82 simdjson_inline bool simdjson_result<dom::element>::is_object() const noexcept {
    +
    83  return !error() && first.is_object();
    +
    84 }
    +
    85 simdjson_inline bool simdjson_result<dom::element>::is_string() const noexcept {
    +
    86  return !error() && first.is_string();
    +
    87 }
    +
    88 simdjson_inline bool simdjson_result<dom::element>::is_int64() const noexcept {
    +
    89  return !error() && first.is_int64();
    +
    90 }
    +
    91 simdjson_inline bool simdjson_result<dom::element>::is_uint64() const noexcept {
    +
    92  return !error() && first.is_uint64();
    +
    93 }
    +
    94 simdjson_inline bool simdjson_result<dom::element>::is_double() const noexcept {
    +
    95  return !error() && first.is_double();
    +
    96 }
    +
    97 simdjson_inline bool simdjson_result<dom::element>::is_number() const noexcept {
    +
    98  return !error() && first.is_number();
    +
    99 }
    +
    100 simdjson_inline bool simdjson_result<dom::element>::is_bool() const noexcept {
    +
    101  return !error() && first.is_bool();
    +
    102 }
    +
    103 
    +
    104 simdjson_inline bool simdjson_result<dom::element>::is_null() const noexcept {
    +
    105  return !error() && first.is_null();
    +
    106 }
    +
    107 
    +
    108 simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::operator[](std::string_view key) const noexcept {
    +
    109  if (error()) { return error(); }
    +
    110  return first[key];
    +
    111 }
    +
    112 simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::operator[](const char *key) const noexcept {
    +
    113  if (error()) { return error(); }
    +
    114  return first[key];
    +
    115 }
    +
    116 simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::at_pointer(const std::string_view json_pointer) const noexcept {
    +
    117  if (error()) { return error(); }
    +
    118  return first.at_pointer(json_pointer);
    +
    119 }
    +
    120 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    +
    121 [[deprecated("For standard compliance, use at_pointer instead, and prefix your pointers with a slash '/', see RFC6901 ")]]
    +
    122 simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::at(const std::string_view json_pointer) const noexcept {
    +
    123 SIMDJSON_PUSH_DISABLE_WARNINGS
    +
    124 SIMDJSON_DISABLE_DEPRECATED_WARNING
    +
    125  if (error()) { return error(); }
    +
    126  return first.at(json_pointer);
    +
    127 SIMDJSON_POP_DISABLE_WARNINGS
    +
    128 }
    +
    129 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    +
    130 simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::at(size_t index) const noexcept {
    +
    131  if (error()) { return error(); }
    +
    132  return first.at(index);
    +
    133 }
    +
    134 simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::at_key(std::string_view key) const noexcept {
    +
    135  if (error()) { return error(); }
    +
    136  return first.at_key(key);
    +
    137 }
    +
    138 simdjson_inline simdjson_result<dom::element> simdjson_result<dom::element>::at_key_case_insensitive(std::string_view key) const noexcept {
    +
    139  if (error()) { return error(); }
    +
    140  return first.at_key_case_insensitive(key);
    +
    141 }
    +
    142 
    +
    143 #if SIMDJSON_EXCEPTIONS
    +
    144 
    +
    145 simdjson_inline simdjson_result<dom::element>::operator bool() const noexcept(false) {
    +
    146  return get<bool>();
    +
    147 }
    +
    148 simdjson_inline simdjson_result<dom::element>::operator const char *() const noexcept(false) {
    +
    149  return get<const char *>();
    +
    150 }
    +
    151 simdjson_inline simdjson_result<dom::element>::operator std::string_view() const noexcept(false) {
    +
    152  return get<std::string_view>();
    +
    153 }
    +
    154 simdjson_inline simdjson_result<dom::element>::operator uint64_t() const noexcept(false) {
    +
    155  return get<uint64_t>();
    +
    156 }
    +
    157 simdjson_inline simdjson_result<dom::element>::operator int64_t() const noexcept(false) {
    +
    158  return get<int64_t>();
    +
    159 }
    +
    160 simdjson_inline simdjson_result<dom::element>::operator double() const noexcept(false) {
    +
    161  return get<double>();
    +
    162 }
    +
    163 simdjson_inline simdjson_result<dom::element>::operator dom::array() const noexcept(false) {
    +
    164  return get<dom::array>();
    +
    165 }
    +
    166 simdjson_inline simdjson_result<dom::element>::operator dom::object() const noexcept(false) {
    +
    167  return get<dom::object>();
    +
    168 }
    +
    169 
    +
    170 simdjson_inline dom::array::iterator simdjson_result<dom::element>::begin() const noexcept(false) {
    +
    171  if (error()) { throw simdjson_error(error()); }
    +
    172  return first.begin();
    +
    173 }
    +
    174 simdjson_inline dom::array::iterator simdjson_result<dom::element>::end() const noexcept(false) {
    +
    175  if (error()) { throw simdjson_error(error()); }
    +
    176  return first.end();
    +
    177 }
    +
    178 
    +
    179 #endif // SIMDJSON_EXCEPTIONS
    +
    180 
    +
    181 namespace dom {
    +
    182 
    +
    183 //
    +
    184 // element inline implementation
    +
    185 //
    +
    186 simdjson_inline element::element() noexcept : tape{} {}
    +
    187 simdjson_inline element::element(const internal::tape_ref &_tape) noexcept : tape{_tape} { }
    +
    188 
    +
    189 inline element_type element::type() const noexcept {
    +
    190  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    191  auto tape_type = tape.tape_ref_type();
    +
    192  return tape_type == internal::tape_type::FALSE_VALUE ? element_type::BOOL : static_cast<element_type>(tape_type);
    +
    193 }
    +
    194 
    +
    195 inline simdjson_result<bool> element::get_bool() const noexcept {
    +
    196  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    197  if(tape.is_true()) {
    +
    198  return true;
    +
    199  } else if(tape.is_false()) {
    +
    200  return false;
    +
    201  }
    +
    202  return INCORRECT_TYPE;
    +
    203 }
    + +
    205  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    206  switch (tape.tape_ref_type()) {
    +
    207  case internal::tape_type::STRING: {
    +
    208  return tape.get_c_str();
    +
    209  }
    +
    210  default:
    +
    211  return INCORRECT_TYPE;
    +
    212  }
    +
    213 }
    + +
    215  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    216  switch (tape.tape_ref_type()) {
    +
    217  case internal::tape_type::STRING: {
    +
    218  return tape.get_string_length();
    +
    219  }
    +
    220  default:
    +
    221  return INCORRECT_TYPE;
    +
    222  }
    +
    223 }
    + +
    225  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    226  switch (tape.tape_ref_type()) {
    +
    227  case internal::tape_type::STRING:
    +
    228  return tape.get_string_view();
    +
    229  default:
    +
    230  return INCORRECT_TYPE;
    +
    231  }
    +
    232 }
    + +
    234  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    235  if(simdjson_unlikely(!tape.is_uint64())) { // branch rarely taken
    +
    236  if(tape.is_int64()) {
    +
    237  int64_t result = tape.next_tape_value<int64_t>();
    +
    238  if (result < 0) {
    +
    239  return NUMBER_OUT_OF_RANGE;
    +
    240  }
    +
    241  return uint64_t(result);
    +
    242  }
    +
    243  return INCORRECT_TYPE;
    +
    244  }
    +
    245  return tape.next_tape_value<int64_t>();
    +
    246 }
    + +
    248  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    249  if(simdjson_unlikely(!tape.is_int64())) { // branch rarely taken
    +
    250  if(tape.is_uint64()) {
    +
    251  uint64_t result = tape.next_tape_value<uint64_t>();
    +
    252  // Wrapping max in parens to handle Windows issue: https://stackoverflow.com/questions/11544073/how-do-i-deal-with-the-max-macro-in-windows-h-colliding-with-max-in-std
    +
    253  if (result > uint64_t((std::numeric_limits<int64_t>::max)())) {
    +
    254  return NUMBER_OUT_OF_RANGE;
    +
    255  }
    +
    256  return static_cast<int64_t>(result);
    +
    257  }
    +
    258  return INCORRECT_TYPE;
    +
    259  }
    +
    260  return tape.next_tape_value<int64_t>();
    +
    261 }
    + +
    263  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    264  // Performance considerations:
    +
    265  // 1. Querying tape_ref_type() implies doing a shift, it is fast to just do a straight
    +
    266  // comparison.
    +
    267  // 2. Using a switch-case relies on the compiler guessing what kind of code generation
    +
    268  // we want... But the compiler cannot know that we expect the type to be "double"
    +
    269  // most of the time.
    +
    270  // We can expect get<double> to refer to a double type almost all the time.
    +
    271  // It is important to craft the code accordingly so that the compiler can use this
    +
    272  // information. (This could also be solved with profile-guided optimization.)
    +
    273  if(simdjson_unlikely(!tape.is_double())) { // branch rarely taken
    +
    274  if(tape.is_uint64()) {
    +
    275  return double(tape.next_tape_value<uint64_t>());
    +
    276  } else if(tape.is_int64()) {
    +
    277  return double(tape.next_tape_value<int64_t>());
    +
    278  }
    +
    279  return INCORRECT_TYPE;
    +
    280  }
    +
    281  // this is common:
    +
    282  return tape.next_tape_value<double>();
    +
    283 }
    + +
    285  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    286  switch (tape.tape_ref_type()) {
    +
    287  case internal::tape_type::START_ARRAY:
    +
    288  return array(tape);
    +
    289  default:
    +
    290  return INCORRECT_TYPE;
    +
    291  }
    +
    292 }
    + +
    294  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    295  switch (tape.tape_ref_type()) {
    +
    296  case internal::tape_type::START_OBJECT:
    +
    297  return object(tape);
    +
    298  default:
    +
    299  return INCORRECT_TYPE;
    +
    300  }
    +
    301 }
    +
    302 
    +
    303 template<typename T>
    +
    304 simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept {
    +
    305  return get<T>().get(value);
    +
    306 }
    +
    307 // An element-specific version prevents recursion with simdjson_result::get<element>(value)
    +
    308 template<>
    +
    309 simdjson_warn_unused simdjson_inline error_code element::get<element>(element &value) const noexcept {
    +
    310  value = element(tape);
    +
    311  return SUCCESS;
    +
    312 }
    +
    313 template<typename T>
    +
    314 inline void element::tie(T &value, error_code &error) && noexcept {
    +
    315  error = get<T>(value);
    +
    316 }
    +
    317 
    +
    318 template<typename T>
    +
    319 simdjson_inline bool element::is() const noexcept {
    +
    320  auto result = get<T>();
    +
    321  return !result.error();
    +
    322 }
    +
    323 
    +
    324 template<> inline simdjson_result<array> element::get<array>() const noexcept { return get_array(); }
    +
    325 template<> inline simdjson_result<object> element::get<object>() const noexcept { return get_object(); }
    +
    326 template<> inline simdjson_result<const char *> element::get<const char *>() const noexcept { return get_c_str(); }
    +
    327 template<> inline simdjson_result<std::string_view> element::get<std::string_view>() const noexcept { return get_string(); }
    +
    328 template<> inline simdjson_result<int64_t> element::get<int64_t>() const noexcept { return get_int64(); }
    +
    329 template<> inline simdjson_result<uint64_t> element::get<uint64_t>() const noexcept { return get_uint64(); }
    +
    330 template<> inline simdjson_result<double> element::get<double>() const noexcept { return get_double(); }
    +
    331 template<> inline simdjson_result<bool> element::get<bool>() const noexcept { return get_bool(); }
    +
    332 
    +
    333 inline bool element::is_array() const noexcept { return is<array>(); }
    +
    334 inline bool element::is_object() const noexcept { return is<object>(); }
    +
    335 inline bool element::is_string() const noexcept { return is<std::string_view>(); }
    +
    336 inline bool element::is_int64() const noexcept { return is<int64_t>(); }
    +
    337 inline bool element::is_uint64() const noexcept { return is<uint64_t>(); }
    +
    338 inline bool element::is_double() const noexcept { return is<double>(); }
    +
    339 inline bool element::is_bool() const noexcept { return is<bool>(); }
    +
    340 inline bool element::is_number() const noexcept { return is_int64() || is_uint64() || is_double(); }
    +
    341 
    +
    342 inline bool element::is_null() const noexcept {
    +
    343  return tape.is_null_on_tape();
    +
    344 }
    +
    345 
    +
    346 #if SIMDJSON_EXCEPTIONS
    +
    347 
    +
    348 inline element::operator bool() const noexcept(false) { return get<bool>(); }
    +
    349 inline element::operator const char*() const noexcept(false) { return get<const char *>(); }
    +
    350 inline element::operator std::string_view() const noexcept(false) { return get<std::string_view>(); }
    +
    351 inline element::operator uint64_t() const noexcept(false) { return get<uint64_t>(); }
    +
    352 inline element::operator int64_t() const noexcept(false) { return get<int64_t>(); }
    +
    353 inline element::operator double() const noexcept(false) { return get<double>(); }
    +
    354 inline element::operator array() const noexcept(false) { return get<array>(); }
    +
    355 inline element::operator object() const noexcept(false) { return get<object>(); }
    +
    356 
    +
    357 inline array::iterator element::begin() const noexcept(false) {
    +
    358  return get<array>().begin();
    +
    359 }
    +
    360 inline array::iterator element::end() const noexcept(false) {
    +
    361  return get<array>().end();
    +
    362 }
    +
    363 
    +
    364 #endif // SIMDJSON_EXCEPTIONS
    +
    365 
    +
    366 inline simdjson_result<element> element::operator[](std::string_view key) const noexcept {
    +
    367  return at_key(key);
    +
    368 }
    +
    369 inline simdjson_result<element> element::operator[](const char *key) const noexcept {
    +
    370  return at_key(key);
    +
    371 }
    +
    372 
    +
    373 inline simdjson_result<element> element::at_pointer(std::string_view json_pointer) const noexcept {
    +
    374  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    375  switch (tape.tape_ref_type()) {
    +
    376  case internal::tape_type::START_OBJECT:
    +
    377  return object(tape).at_pointer(json_pointer);
    +
    378  case internal::tape_type::START_ARRAY:
    +
    379  return array(tape).at_pointer(json_pointer);
    +
    380  default: {
    +
    381  if(!json_pointer.empty()) { // a non-empty string is invalid on an atom
    +
    382  return INVALID_JSON_POINTER;
    +
    383  }
    +
    384  // an empty string means that we return the current node
    +
    385  dom::element copy(*this);
    +
    386  return simdjson_result<element>(std::move(copy));
    +
    387  }
    +
    388  }
    +
    389 }
    +
    390 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    +
    391 [[deprecated("For standard compliance, use at_pointer instead, and prefix your pointers with a slash '/', see RFC6901 ")]]
    +
    392 inline simdjson_result<element> element::at(std::string_view json_pointer) const noexcept {
    +
    393  // version 0.4 of simdjson allowed non-compliant pointers
    +
    394  auto std_pointer = (json_pointer.empty() ? "" : "/") + std::string(json_pointer.begin(), json_pointer.end());
    +
    395  return at_pointer(std_pointer);
    +
    396 }
    +
    397 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    +
    398 
    +
    399 inline simdjson_result<element> element::at(size_t index) const noexcept {
    +
    400  return get<array>().at(index);
    +
    401 }
    +
    402 inline simdjson_result<element> element::at_key(std::string_view key) const noexcept {
    +
    403  return get<object>().at_key(key);
    +
    404 }
    +
    405 inline simdjson_result<element> element::at_key_case_insensitive(std::string_view key) const noexcept {
    +
    406  return get<object>().at_key_case_insensitive(key);
    +
    407 }
    +
    408 
    +
    409 inline bool element::dump_raw_tape(std::ostream &out) const noexcept {
    +
    410  SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914
    +
    411  return tape.doc->dump_raw_tape(out);
    +
    412 }
    413 
    -
    414 inline std::ostream& operator<<(std::ostream& out, element_type type) {
    -
    415  switch (type) {
    -
    416  case element_type::ARRAY:
    -
    417  return out << "array";
    -
    418  case element_type::OBJECT:
    -
    419  return out << "object";
    -
    420  case element_type::INT64:
    -
    421  return out << "int64_t";
    -
    422  case element_type::UINT64:
    -
    423  return out << "uint64_t";
    -
    424  case element_type::DOUBLE:
    -
    425  return out << "double";
    -
    426  case element_type::STRING:
    -
    427  return out << "string";
    -
    428  case element_type::BOOL:
    -
    429  return out << "bool";
    -
    430  case element_type::NULL_VALUE:
    -
    431  return out << "null";
    -
    432  default:
    -
    433  return out << "unexpected content!!!"; // abort() usage is forbidden in the library
    -
    434  }
    -
    435 }
    -
    436 
    -
    437 } // namespace dom
    -
    438 
    -
    439 } // namespace simdjson
    -
    440 
    -
    441 #endif // SIMDJSON_INLINE_ELEMENT_H
    - -
    JSON array.
    Definition: array.h:22
    -
    simdjson_result< element > at_pointer(std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: array-inl.h:71
    -
    A JSON element.
    Definition: element.h:40
    -
    bool is_object() const noexcept
    Whether this element is a json object.
    Definition: element-inl.h:333
    -
    bool is_double() const noexcept
    Whether this element is a json number that fits in a double.
    Definition: element-inl.h:337
    -
    simdjson_inline element_type type() const noexcept
    The type of this element.
    Definition: element-inl.h:188
    -
    bool is_number() const noexcept
    Whether this element is a json number.
    Definition: element-inl.h:339
    -
    simdjson_result< const char * > get_c_str() const noexcept
    Cast this element to a null-terminated C string.
    Definition: element-inl.h:203
    -
    simdjson_result< element > at_pointer(const std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: element-inl.h:372
    -
    simdjson_result< double > get_double() const noexcept
    Cast this element to a double floating-point.
    Definition: element-inl.h:261
    -
    simdjson_result< T > get() const noexcept
    Get the value as the provided type (T).
    Definition: element.h:220
    -
    simdjson_inline bool is() const noexcept
    Tell whether the value can be cast to provided type (T).
    Definition: element-inl.h:318
    -
    simdjson_result< element > at_key_case_insensitive(std::string_view key) const noexcept
    Get the value associated with the given key in a case-insensitive manner.
    Definition: element-inl.h:404
    +
    414 
    +
    415 inline std::ostream& operator<<(std::ostream& out, element_type type) {
    +
    416  switch (type) {
    +
    417  case element_type::ARRAY:
    +
    418  return out << "array";
    + +
    420  return out << "object";
    +
    421  case element_type::INT64:
    +
    422  return out << "int64_t";
    + +
    424  return out << "uint64_t";
    + +
    426  return out << "double";
    + +
    428  return out << "string";
    +
    429  case element_type::BOOL:
    +
    430  return out << "bool";
    + +
    432  return out << "null";
    +
    433  default:
    +
    434  return out << "unexpected content!!!"; // abort() usage is forbidden in the library
    +
    435  }
    +
    436 }
    +
    437 
    +
    438 } // namespace dom
    +
    439 
    +
    440 } // namespace simdjson
    +
    441 
    +
    442 #endif // SIMDJSON_INLINE_ELEMENT_H
    + +
    JSON array.
    Definition: array.h:13
    +
    simdjson_result< element > at_pointer(std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: array-inl.h:74
    +
    A JSON element.
    Definition: element.h:31
    +
    bool is_object() const noexcept
    Whether this element is a json object.
    Definition: element-inl.h:334
    +
    bool is_double() const noexcept
    Whether this element is a json number that fits in a double.
    Definition: element-inl.h:338
    +
    simdjson_inline element_type type() const noexcept
    The type of this element.
    Definition: element-inl.h:189
    +
    bool is_number() const noexcept
    Whether this element is a json number.
    Definition: element-inl.h:340
    +
    simdjson_result< const char * > get_c_str() const noexcept
    Cast this element to a null-terminated C string.
    Definition: element-inl.h:204
    +
    simdjson_result< element > at_pointer(const std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: element-inl.h:373
    +
    simdjson_result< double > get_double() const noexcept
    Cast this element to a double floating-point.
    Definition: element-inl.h:262
    +
    simdjson_result< T > get() const noexcept
    Get the value as the provided type (T).
    Definition: element.h:211
    +
    simdjson_inline bool is() const noexcept
    Tell whether the value can be cast to provided type (T).
    Definition: element-inl.h:319
    +
    simdjson_result< element > at_key_case_insensitive(std::string_view key) const noexcept
    Get the value associated with the given key in a case-insensitive manner.
    Definition: element-inl.h:405
    void tie(T &value, error_code &error) &&noexcept
    Get the value as the provided type (T), setting error if it's not the given type.
    -
    simdjson_result< bool > get_bool() const noexcept
    Cast this element to a bool.
    Definition: element-inl.h:194
    -
    bool is_string() const noexcept
    Whether this element is a json string.
    Definition: element-inl.h:334
    -
    simdjson_result< element > at_key(std::string_view key) const noexcept
    Get the value associated with the given key.
    Definition: element-inl.h:401
    -
    dom::array::iterator end() const noexcept(false)
    Iterate over each element in this array.
    Definition: element-inl.h:359
    -
    simdjson_result< array > get_array() const noexcept
    Cast this element to an array.
    Definition: element-inl.h:283
    -
    simdjson_result< size_t > get_string_length() const noexcept
    Gives the length in bytes of the string.
    Definition: element-inl.h:213
    -
    simdjson_inline element() noexcept
    Create a new, invalid element.
    Definition: element-inl.h:185
    -
    simdjson_result< uint64_t > get_uint64() const noexcept
    Cast this element to an unsigned integer.
    Definition: element-inl.h:232
    -
    dom::array::iterator begin() const noexcept(false)
    Iterate over each element in this array.
    Definition: element-inl.h:356
    -
    simdjson_result< element > at(const std::string_view json_pointer) const noexcept
    Version 0.4 of simdjson used an incorrect interpretation of the JSON Pointer standard and allowed the...
    Definition: element-inl.h:391
    -
    simdjson_result< int64_t > get_int64() const noexcept
    Cast this element to a signed integer.
    Definition: element-inl.h:246
    -
    simdjson_result< object > get_object() const noexcept
    Cast this element to an object.
    Definition: element-inl.h:292
    -
    bool is_uint64() const noexcept
    Whether this element is a json number that fits in an unsigned 64-bit integer.
    Definition: element-inl.h:336
    -
    simdjson_result< element > operator[](std::string_view key) const noexcept
    Get the value associated with the given key.
    Definition: element-inl.h:365
    -
    bool is_int64() const noexcept
    Whether this element is a json number that fits in a signed 64-bit integer.
    Definition: element-inl.h:335
    -
    bool is_null() const noexcept
    Whether this element is a json null.
    Definition: element-inl.h:341
    -
    simdjson_result< std::string_view > get_string() const noexcept
    Cast this element to a string.
    Definition: element-inl.h:223
    -
    bool is_array() const noexcept
    Whether this element is a json array.
    Definition: element-inl.h:332
    -
    bool is_bool() const noexcept
    Whether this element is a json true or false.
    Definition: element-inl.h:338
    -
    JSON object.
    Definition: object.h:22
    -
    simdjson_result< element > at_pointer(std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: object-inl.h:86
    -
    We want to support argument-dependent lookup (ADL).
    -
    std::ostream & operator<<(std::ostream &out, error_code error) noexcept
    Write the error message to the output stream.
    Definition: error-inl.h:36
    +
    simdjson_result< bool > get_bool() const noexcept
    Cast this element to a bool.
    Definition: element-inl.h:195
    +
    bool is_string() const noexcept
    Whether this element is a json string.
    Definition: element-inl.h:335
    +
    simdjson_result< element > at_key(std::string_view key) const noexcept
    Get the value associated with the given key.
    Definition: element-inl.h:402
    +
    dom::array::iterator end() const noexcept(false)
    Iterate over each element in this array.
    Definition: element-inl.h:360
    +
    simdjson_result< array > get_array() const noexcept
    Cast this element to an array.
    Definition: element-inl.h:284
    +
    simdjson_result< size_t > get_string_length() const noexcept
    Gives the length in bytes of the string.
    Definition: element-inl.h:214
    +
    simdjson_inline element() noexcept
    Create a new, invalid element.
    Definition: element-inl.h:186
    +
    simdjson_result< uint64_t > get_uint64() const noexcept
    Cast this element to an unsigned integer.
    Definition: element-inl.h:233
    +
    dom::array::iterator begin() const noexcept(false)
    Iterate over each element in this array.
    Definition: element-inl.h:357
    +
    simdjson_result< element > at(const std::string_view json_pointer) const noexcept
    Version 0.4 of simdjson used an incorrect interpretation of the JSON Pointer standard and allowed the...
    Definition: element-inl.h:392
    +
    simdjson_result< int64_t > get_int64() const noexcept
    Cast this element to a signed integer.
    Definition: element-inl.h:247
    +
    simdjson_result< object > get_object() const noexcept
    Cast this element to an object.
    Definition: element-inl.h:293
    +
    bool is_uint64() const noexcept
    Whether this element is a json number that fits in an unsigned 64-bit integer.
    Definition: element-inl.h:337
    +
    simdjson_result< element > operator[](std::string_view key) const noexcept
    Get the value associated with the given key.
    Definition: element-inl.h:366
    +
    bool is_int64() const noexcept
    Whether this element is a json number that fits in a signed 64-bit integer.
    Definition: element-inl.h:336
    +
    bool is_null() const noexcept
    Whether this element is a json null.
    Definition: element-inl.h:342
    +
    simdjson_result< std::string_view > get_string() const noexcept
    Cast this element to a string.
    Definition: element-inl.h:224
    +
    bool is_array() const noexcept
    Whether this element is a json array.
    Definition: element-inl.h:333
    +
    bool is_bool() const noexcept
    Whether this element is a json true or false.
    Definition: element-inl.h:339
    +
    JSON object.
    Definition: object.h:14
    +
    simdjson_result< element > at_pointer(std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: object-inl.h:83
    +
    element_type
    The actual concrete type of a JSON element This is the type it is most easily cast to with get<>.
    Definition: element.h:14
    + +
    @ STRING
    std::string_view
    +
    @ UINT64
    uint64_t: any integer that fits in uint64_t but not int64_t
    + + + + +
    @ DOUBLE
    double: Any number with a "." or "e" that fits in double.
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ INCORRECT_TYPE
    JSON element has a different type than user expected.
    Definition: error.h:34
    @ NUMBER_OUT_OF_RANGE
    JSON number does not fit in 64 bits.
    Definition: error.h:35
    @ SUCCESS
    No error.
    Definition: error.h:18
    @ INVALID_JSON_POINTER
    Invalid JSON pointer reference.
    Definition: error.h:39
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    -
    simdjson_warn_unused simdjson_inline error_code get(T &value) &&noexcept
    Move the value to the provided variable.
    Definition: error-inl.h:127
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    +
    simdjson_warn_unused simdjson_inline error_code get(T &value) &&noexcept
    Move the value to the provided variable.
    Definition: error-inl.h:126
    diff --git a/element_8h_source.html b/element_8h_source.html index 10426bbf0..5e29068d3 100644 --- a/element_8h_source.html +++ b/element_8h_source.html @@ -94,235 +94,232 @@ $(document).ready(function(){initNavTree('element_8h_source.html',''); initResiz
    1 #ifndef SIMDJSON_DOM_ELEMENT_H
    2 #define SIMDJSON_DOM_ELEMENT_H
    3 
    -
    4 #include "simdjson/common_defs.h"
    -
    5 #include "simdjson/error.h"
    -
    6 #include "simdjson/internal/tape_ref.h"
    -
    7 #include <ostream>
    -
    8 
    -
    9 namespace simdjson {
    -
    10 namespace internal {
    -
    11 template<typename T>
    -
    12 class string_builder;
    -
    13 }
    -
    14 namespace dom {
    -
    15 class array;
    -
    16 class document;
    -
    17 class object;
    -
    18 
    -
    23 enum class element_type {
    -
    24  ARRAY = '[',
    -
    25  OBJECT = '{',
    -
    26  INT64 = 'l',
    -
    27  UINT64 = 'u',
    -
    28  DOUBLE = 'd',
    -
    29  STRING = '"',
    -
    30  BOOL = 't',
    -
    31  NULL_VALUE = 'n'
    -
    32 };
    -
    33 
    -
    40 class element {
    -
    41 public:
    -
    43  simdjson_inline element() noexcept;
    -
    44 
    -
    46  simdjson_inline element_type type() const noexcept;
    -
    47 
    -
    54  inline simdjson_result<array> get_array() const noexcept;
    -
    61  inline simdjson_result<object> get_object() const noexcept;
    -
    78  inline simdjson_result<const char *> get_c_str() const noexcept;
    -
    88  inline simdjson_result<size_t> get_string_length() const noexcept;
    -
    98  inline simdjson_result<std::string_view> get_string() const noexcept;
    -
    106  inline simdjson_result<int64_t> get_int64() const noexcept;
    -
    114  inline simdjson_result<uint64_t> get_uint64() const noexcept;
    -
    121  inline simdjson_result<double> get_double() const noexcept;
    -
    128  inline simdjson_result<bool> get_bool() const noexcept;
    -
    129 
    -
    135  inline bool is_array() const noexcept;
    -
    141  inline bool is_object() const noexcept;
    -
    147  inline bool is_string() const noexcept;
    -
    153  inline bool is_int64() const noexcept;
    -
    159  inline bool is_uint64() const noexcept;
    -
    165  inline bool is_double() const noexcept;
    -
    166 
    -
    172  inline bool is_number() const noexcept;
    -
    173 
    -
    179  inline bool is_bool() const noexcept;
    -
    183  inline bool is_null() const noexcept;
    -
    184 
    -
    197  template<typename T>
    -
    198  simdjson_inline bool is() const noexcept;
    -
    199 
    -
    219  template<typename T>
    -
    220  inline simdjson_result<T> get() const noexcept {
    -
    221  // Unless the simdjson library provides an inline implementation, calling this method should
    -
    222  // immediately fail.
    -
    223  static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library.");
    -
    224  }
    -
    225 
    -
    242  template<typename T>
    -
    243  simdjson_warn_unused simdjson_inline error_code get(T &value) const noexcept;
    -
    244 
    -
    260  template<typename T>
    -
    261  inline void tie(T &value, error_code &error) && noexcept;
    +
    4 #include "simdjson/dom/base.h"
    +
    5 #include "simdjson/dom/array.h"
    +
    6 
    +
    7 namespace simdjson {
    +
    8 namespace dom {
    +
    9 
    +
    14 enum class element_type {
    +
    15  ARRAY = '[',
    +
    16  OBJECT = '{',
    +
    17  INT64 = 'l',
    +
    18  UINT64 = 'u',
    +
    19  DOUBLE = 'd',
    +
    20  STRING = '"',
    +
    21  BOOL = 't',
    +
    22  NULL_VALUE = 'n'
    +
    23 };
    +
    24 
    +
    31 class element {
    +
    32 public:
    +
    34  simdjson_inline element() noexcept;
    +
    35 
    +
    37  simdjson_inline element_type type() const noexcept;
    +
    38 
    +
    45  inline simdjson_result<array> get_array() const noexcept;
    +
    52  inline simdjson_result<object> get_object() const noexcept;
    +
    69  inline simdjson_result<const char *> get_c_str() const noexcept;
    +
    79  inline simdjson_result<size_t> get_string_length() const noexcept;
    +
    89  inline simdjson_result<std::string_view> get_string() const noexcept;
    +
    97  inline simdjson_result<int64_t> get_int64() const noexcept;
    +
    105  inline simdjson_result<uint64_t> get_uint64() const noexcept;
    +
    112  inline simdjson_result<double> get_double() const noexcept;
    +
    119  inline simdjson_result<bool> get_bool() const noexcept;
    +
    120 
    +
    126  inline bool is_array() const noexcept;
    +
    132  inline bool is_object() const noexcept;
    +
    138  inline bool is_string() const noexcept;
    +
    144  inline bool is_int64() const noexcept;
    +
    150  inline bool is_uint64() const noexcept;
    +
    156  inline bool is_double() const noexcept;
    +
    157 
    +
    163  inline bool is_number() const noexcept;
    +
    164 
    +
    170  inline bool is_bool() const noexcept;
    +
    174  inline bool is_null() const noexcept;
    +
    175 
    +
    188  template<typename T>
    +
    189  simdjson_inline bool is() const noexcept;
    +
    190 
    +
    210  template<typename T>
    +
    211  inline simdjson_result<T> get() const noexcept {
    +
    212  // Unless the simdjson library provides an inline implementation, calling this method should
    +
    213  // immediately fail.
    +
    214  static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library.");
    +
    215  }
    +
    216 
    +
    233  template<typename T>
    +
    234  simdjson_warn_unused simdjson_inline error_code get(T &value) const noexcept;
    +
    235 
    +
    251  template<typename T>
    +
    252  inline void tie(T &value, error_code &error) && noexcept;
    +
    253 
    +
    254 #if SIMDJSON_EXCEPTIONS
    +
    261  inline operator bool() const noexcept(false);
    262 
    -
    263 #if SIMDJSON_EXCEPTIONS
    -
    270  inline operator bool() const noexcept(false);
    -
    271 
    -
    283  inline explicit operator const char*() const noexcept(false);
    -
    284 
    -
    294  inline operator std::string_view() const noexcept(false);
    -
    295 
    -
    303  inline operator uint64_t() const noexcept(false);
    -
    311  inline operator int64_t() const noexcept(false);
    -
    319  inline operator double() const noexcept(false);
    -
    326  inline operator array() const noexcept(false);
    -
    333  inline operator object() const noexcept(false);
    -
    334 
    -
    341  inline dom::array::iterator begin() const noexcept(false);
    +
    274  inline explicit operator const char*() const noexcept(false);
    +
    275 
    +
    285  inline operator std::string_view() const noexcept(false);
    +
    286 
    +
    294  inline operator uint64_t() const noexcept(false);
    +
    302  inline operator int64_t() const noexcept(false);
    +
    310  inline operator double() const noexcept(false);
    +
    317  inline operator array() const noexcept(false);
    +
    324  inline operator object() const noexcept(false);
    +
    325 
    +
    332  inline dom::array::iterator begin() const noexcept(false);
    +
    333 
    +
    340  inline dom::array::iterator end() const noexcept(false);
    +
    341 #endif // SIMDJSON_EXCEPTIONS
    342 
    -
    349  inline dom::array::iterator end() const noexcept(false);
    -
    350 #endif // SIMDJSON_EXCEPTIONS
    -
    351 
    -
    365  inline simdjson_result<element> operator[](std::string_view key) const noexcept;
    -
    366 
    -
    380  inline simdjson_result<element> operator[](const char *key) const noexcept;
    -
    381 
    -
    404  inline simdjson_result<element> at_pointer(const std::string_view json_pointer) const noexcept;
    -
    405 
    -
    406 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    -
    427  [[deprecated("For standard compliance, use at_pointer instead, and prefix your pointers with a slash '/', see RFC6901 ")]]
    -
    428  inline simdjson_result<element> at(const std::string_view json_pointer) const noexcept;
    -
    429 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    -
    430 
    -
    437  inline simdjson_result<element> at(size_t index) const noexcept;
    -
    438 
    -
    451  inline simdjson_result<element> at_key(std::string_view key) const noexcept;
    -
    452 
    -
    461  inline simdjson_result<element> at_key_case_insensitive(std::string_view key) const noexcept;
    -
    462 
    -
    464  inline bool dump_raw_tape(std::ostream &out) const noexcept;
    -
    465 
    -
    466 private:
    -
    467  simdjson_inline element(const internal::tape_ref &tape) noexcept;
    -
    468  internal::tape_ref tape;
    -
    469  friend class document;
    -
    470  friend class object;
    -
    471  friend class array;
    -
    472  friend struct simdjson_result<element>;
    -
    473  template<typename T>
    -
    474  friend class simdjson::internal::string_builder;
    -
    475 
    -
    476 };
    -
    477 
    -
    478 } // namespace dom
    -
    479 
    -
    481 template<>
    -
    482 struct simdjson_result<dom::element> : public internal::simdjson_result_base<dom::element> {
    -
    483 public:
    -
    484  simdjson_inline simdjson_result() noexcept;
    -
    485  simdjson_inline simdjson_result(dom::element &&value) noexcept;
    -
    486  simdjson_inline simdjson_result(error_code error) noexcept;
    -
    487 
    -
    488  simdjson_inline simdjson_result<dom::element_type> type() const noexcept;
    -
    489  template<typename T>
    -
    490  simdjson_inline bool is() const noexcept;
    -
    491  template<typename T>
    -
    492  simdjson_inline simdjson_result<T> get() const noexcept;
    -
    493  template<typename T>
    -
    494  simdjson_warn_unused simdjson_inline error_code get(T &value) const noexcept;
    -
    495 
    -
    496  simdjson_inline simdjson_result<dom::array> get_array() const noexcept;
    -
    497  simdjson_inline simdjson_result<dom::object> get_object() const noexcept;
    -
    498  simdjson_inline simdjson_result<const char *> get_c_str() const noexcept;
    -
    499  simdjson_inline simdjson_result<size_t> get_string_length() const noexcept;
    -
    500  simdjson_inline simdjson_result<std::string_view> get_string() const noexcept;
    -
    501  simdjson_inline simdjson_result<int64_t> get_int64() const noexcept;
    -
    502  simdjson_inline simdjson_result<uint64_t> get_uint64() const noexcept;
    -
    503  simdjson_inline simdjson_result<double> get_double() const noexcept;
    -
    504  simdjson_inline simdjson_result<bool> get_bool() const noexcept;
    -
    505 
    -
    506  simdjson_inline bool is_array() const noexcept;
    -
    507  simdjson_inline bool is_object() const noexcept;
    -
    508  simdjson_inline bool is_string() const noexcept;
    -
    509  simdjson_inline bool is_int64() const noexcept;
    -
    510  simdjson_inline bool is_uint64() const noexcept;
    -
    511  simdjson_inline bool is_double() const noexcept;
    -
    512  simdjson_inline bool is_number() const noexcept;
    -
    513  simdjson_inline bool is_bool() const noexcept;
    -
    514  simdjson_inline bool is_null() const noexcept;
    +
    356  inline simdjson_result<element> operator[](std::string_view key) const noexcept;
    +
    357 
    +
    371  inline simdjson_result<element> operator[](const char *key) const noexcept;
    +
    372 
    +
    395  inline simdjson_result<element> at_pointer(const std::string_view json_pointer) const noexcept;
    +
    396 
    +
    397 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    +
    418  [[deprecated("For standard compliance, use at_pointer instead, and prefix your pointers with a slash '/', see RFC6901 ")]]
    +
    419  inline simdjson_result<element> at(const std::string_view json_pointer) const noexcept;
    +
    420 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    +
    421 
    +
    428  inline simdjson_result<element> at(size_t index) const noexcept;
    +
    429 
    +
    442  inline simdjson_result<element> at_key(std::string_view key) const noexcept;
    +
    443 
    +
    452  inline simdjson_result<element> at_key_case_insensitive(std::string_view key) const noexcept;
    +
    453 
    +
    455  inline bool dump_raw_tape(std::ostream &out) const noexcept;
    +
    456 
    +
    457 private:
    +
    458  simdjson_inline element(const internal::tape_ref &tape) noexcept;
    +
    459  internal::tape_ref tape;
    +
    460  friend class document;
    +
    461  friend class object;
    +
    462  friend class array;
    +
    463  friend struct simdjson_result<element>;
    +
    464  template<typename T>
    +
    465  friend class simdjson::internal::string_builder;
    +
    466 
    +
    467 };
    +
    468 
    +
    469 } // namespace dom
    +
    470 
    +
    472 template<>
    +
    473 struct simdjson_result<dom::element> : public internal::simdjson_result_base<dom::element> {
    +
    474 public:
    +
    475  simdjson_inline simdjson_result() noexcept;
    +
    476  simdjson_inline simdjson_result(dom::element &&value) noexcept;
    +
    477  simdjson_inline simdjson_result(error_code error) noexcept;
    +
    478 
    +
    479  simdjson_inline simdjson_result<dom::element_type> type() const noexcept;
    +
    480  template<typename T>
    +
    481  simdjson_inline bool is() const noexcept;
    +
    482  template<typename T>
    +
    483  simdjson_inline simdjson_result<T> get() const noexcept;
    +
    484  template<typename T>
    +
    485  simdjson_warn_unused simdjson_inline error_code get(T &value) const noexcept;
    +
    486 
    +
    487  simdjson_inline simdjson_result<dom::array> get_array() const noexcept;
    +
    488  simdjson_inline simdjson_result<dom::object> get_object() const noexcept;
    +
    489  simdjson_inline simdjson_result<const char *> get_c_str() const noexcept;
    +
    490  simdjson_inline simdjson_result<size_t> get_string_length() const noexcept;
    +
    491  simdjson_inline simdjson_result<std::string_view> get_string() const noexcept;
    +
    492  simdjson_inline simdjson_result<int64_t> get_int64() const noexcept;
    +
    493  simdjson_inline simdjson_result<uint64_t> get_uint64() const noexcept;
    +
    494  simdjson_inline simdjson_result<double> get_double() const noexcept;
    +
    495  simdjson_inline simdjson_result<bool> get_bool() const noexcept;
    +
    496 
    +
    497  simdjson_inline bool is_array() const noexcept;
    +
    498  simdjson_inline bool is_object() const noexcept;
    +
    499  simdjson_inline bool is_string() const noexcept;
    +
    500  simdjson_inline bool is_int64() const noexcept;
    +
    501  simdjson_inline bool is_uint64() const noexcept;
    +
    502  simdjson_inline bool is_double() const noexcept;
    +
    503  simdjson_inline bool is_number() const noexcept;
    +
    504  simdjson_inline bool is_bool() const noexcept;
    +
    505  simdjson_inline bool is_null() const noexcept;
    +
    506 
    +
    507  simdjson_inline simdjson_result<dom::element> operator[](std::string_view key) const noexcept;
    +
    508  simdjson_inline simdjson_result<dom::element> operator[](const char *key) const noexcept;
    +
    509  simdjson_inline simdjson_result<dom::element> at_pointer(const std::string_view json_pointer) const noexcept;
    +
    510  [[deprecated("For standard compliance, use at_pointer instead, and prefix your pointers with a slash '/', see RFC6901 ")]]
    +
    511  simdjson_inline simdjson_result<dom::element> at(const std::string_view json_pointer) const noexcept;
    +
    512  simdjson_inline simdjson_result<dom::element> at(size_t index) const noexcept;
    +
    513  simdjson_inline simdjson_result<dom::element> at_key(std::string_view key) const noexcept;
    +
    514  simdjson_inline simdjson_result<dom::element> at_key_case_insensitive(std::string_view key) const noexcept;
    515 
    -
    516  simdjson_inline simdjson_result<dom::element> operator[](std::string_view key) const noexcept;
    -
    517  simdjson_inline simdjson_result<dom::element> operator[](const char *key) const noexcept;
    -
    518  simdjson_inline simdjson_result<dom::element> at_pointer(const std::string_view json_pointer) const noexcept;
    -
    519  [[deprecated("For standard compliance, use at_pointer instead, and prefix your pointers with a slash '/', see RFC6901 ")]]
    -
    520  simdjson_inline simdjson_result<dom::element> at(const std::string_view json_pointer) const noexcept;
    -
    521  simdjson_inline simdjson_result<dom::element> at(size_t index) const noexcept;
    -
    522  simdjson_inline simdjson_result<dom::element> at_key(std::string_view key) const noexcept;
    -
    523  simdjson_inline simdjson_result<dom::element> at_key_case_insensitive(std::string_view key) const noexcept;
    -
    524 
    -
    525 #if SIMDJSON_EXCEPTIONS
    -
    526  simdjson_inline operator bool() const noexcept(false);
    -
    527  simdjson_inline explicit operator const char*() const noexcept(false);
    -
    528  simdjson_inline operator std::string_view() const noexcept(false);
    -
    529  simdjson_inline operator uint64_t() const noexcept(false);
    -
    530  simdjson_inline operator int64_t() const noexcept(false);
    -
    531  simdjson_inline operator double() const noexcept(false);
    -
    532  simdjson_inline operator dom::array() const noexcept(false);
    -
    533  simdjson_inline operator dom::object() const noexcept(false);
    -
    534 
    -
    535  simdjson_inline dom::array::iterator begin() const noexcept(false);
    -
    536  simdjson_inline dom::array::iterator end() const noexcept(false);
    -
    537 #endif // SIMDJSON_EXCEPTIONS
    -
    538 };
    -
    539 
    -
    540 
    -
    541 } // namespace simdjson
    -
    542 
    -
    543 #endif // SIMDJSON_DOM_DOCUMENT_H
    - -
    JSON array.
    Definition: array.h:22
    -
    A parsed JSON document.
    Definition: document.h:18
    -
    A JSON element.
    Definition: element.h:40
    -
    bool is_object() const noexcept
    Whether this element is a json object.
    Definition: element-inl.h:333
    -
    bool is_double() const noexcept
    Whether this element is a json number that fits in a double.
    Definition: element-inl.h:337
    -
    simdjson_inline element_type type() const noexcept
    The type of this element.
    Definition: element-inl.h:188
    -
    bool is_number() const noexcept
    Whether this element is a json number.
    Definition: element-inl.h:339
    -
    simdjson_result< const char * > get_c_str() const noexcept
    Cast this element to a null-terminated C string.
    Definition: element-inl.h:203
    -
    simdjson_result< element > at_pointer(const std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: element-inl.h:372
    -
    simdjson_result< double > get_double() const noexcept
    Cast this element to a double floating-point.
    Definition: element-inl.h:261
    -
    simdjson_result< T > get() const noexcept
    Get the value as the provided type (T).
    Definition: element.h:220
    -
    simdjson_inline bool is() const noexcept
    Tell whether the value can be cast to provided type (T).
    Definition: element-inl.h:318
    -
    simdjson_result< element > at_key_case_insensitive(std::string_view key) const noexcept
    Get the value associated with the given key in a case-insensitive manner.
    Definition: element-inl.h:404
    +
    516 #if SIMDJSON_EXCEPTIONS
    +
    517  simdjson_inline operator bool() const noexcept(false);
    +
    518  simdjson_inline explicit operator const char*() const noexcept(false);
    +
    519  simdjson_inline operator std::string_view() const noexcept(false);
    +
    520  simdjson_inline operator uint64_t() const noexcept(false);
    +
    521  simdjson_inline operator int64_t() const noexcept(false);
    +
    522  simdjson_inline operator double() const noexcept(false);
    +
    523  simdjson_inline operator dom::array() const noexcept(false);
    +
    524  simdjson_inline operator dom::object() const noexcept(false);
    +
    525 
    +
    526  simdjson_inline dom::array::iterator begin() const noexcept(false);
    +
    527  simdjson_inline dom::array::iterator end() const noexcept(false);
    +
    528 #endif // SIMDJSON_EXCEPTIONS
    +
    529 };
    +
    530 
    +
    531 } // namespace simdjson
    +
    532 
    +
    533 #endif // SIMDJSON_DOM_DOCUMENT_H
    + +
    JSON array.
    Definition: array.h:13
    +
    A parsed JSON document.
    Definition: document.h:16
    +
    A JSON element.
    Definition: element.h:31
    +
    bool is_object() const noexcept
    Whether this element is a json object.
    Definition: element-inl.h:334
    +
    bool is_double() const noexcept
    Whether this element is a json number that fits in a double.
    Definition: element-inl.h:338
    +
    simdjson_inline element_type type() const noexcept
    The type of this element.
    Definition: element-inl.h:189
    +
    bool is_number() const noexcept
    Whether this element is a json number.
    Definition: element-inl.h:340
    +
    simdjson_result< const char * > get_c_str() const noexcept
    Cast this element to a null-terminated C string.
    Definition: element-inl.h:204
    +
    simdjson_result< element > at_pointer(const std::string_view json_pointer) const noexcept
    Get the value associated with the given JSON pointer.
    Definition: element-inl.h:373
    +
    simdjson_result< double > get_double() const noexcept
    Cast this element to a double floating-point.
    Definition: element-inl.h:262
    +
    simdjson_result< T > get() const noexcept
    Get the value as the provided type (T).
    Definition: element.h:211
    +
    simdjson_inline bool is() const noexcept
    Tell whether the value can be cast to provided type (T).
    Definition: element-inl.h:319
    +
    simdjson_result< element > at_key_case_insensitive(std::string_view key) const noexcept
    Get the value associated with the given key in a case-insensitive manner.
    Definition: element-inl.h:405
    void tie(T &value, error_code &error) &&noexcept
    Get the value as the provided type (T), setting error if it's not the given type.
    -
    simdjson_result< bool > get_bool() const noexcept
    Cast this element to a bool.
    Definition: element-inl.h:194
    -
    bool is_string() const noexcept
    Whether this element is a json string.
    Definition: element-inl.h:334
    -
    simdjson_result< element > at_key(std::string_view key) const noexcept
    Get the value associated with the given key.
    Definition: element-inl.h:401
    -
    dom::array::iterator end() const noexcept(false)
    Iterate over each element in this array.
    Definition: element-inl.h:359
    -
    simdjson_result< array > get_array() const noexcept
    Cast this element to an array.
    Definition: element-inl.h:283
    -
    simdjson_result< size_t > get_string_length() const noexcept
    Gives the length in bytes of the string.
    Definition: element-inl.h:213
    -
    simdjson_inline element() noexcept
    Create a new, invalid element.
    Definition: element-inl.h:185
    -
    simdjson_result< uint64_t > get_uint64() const noexcept
    Cast this element to an unsigned integer.
    Definition: element-inl.h:232
    -
    dom::array::iterator begin() const noexcept(false)
    Iterate over each element in this array.
    Definition: element-inl.h:356
    -
    simdjson_result< element > at(const std::string_view json_pointer) const noexcept
    Version 0.4 of simdjson used an incorrect interpretation of the JSON Pointer standard and allowed the...
    Definition: element-inl.h:391
    -
    simdjson_result< int64_t > get_int64() const noexcept
    Cast this element to a signed integer.
    Definition: element-inl.h:246
    -
    simdjson_result< object > get_object() const noexcept
    Cast this element to an object.
    Definition: element-inl.h:292
    -
    bool is_uint64() const noexcept
    Whether this element is a json number that fits in an unsigned 64-bit integer.
    Definition: element-inl.h:336
    -
    simdjson_result< element > operator[](std::string_view key) const noexcept
    Get the value associated with the given key.
    Definition: element-inl.h:365
    -
    bool is_int64() const noexcept
    Whether this element is a json number that fits in a signed 64-bit integer.
    Definition: element-inl.h:335
    -
    bool is_null() const noexcept
    Whether this element is a json null.
    Definition: element-inl.h:341
    -
    simdjson_result< std::string_view > get_string() const noexcept
    Cast this element to a string.
    Definition: element-inl.h:223
    -
    bool is_array() const noexcept
    Whether this element is a json array.
    Definition: element-inl.h:332
    -
    bool is_bool() const noexcept
    Whether this element is a json true or false.
    Definition: element-inl.h:338
    -
    JSON object.
    Definition: object.h:22
    -
    @ object
    A JSON object ( { "a": 1, "b" 2, ... } )
    - -
    We want to support argument-dependent lookup (ADL).
    +
    simdjson_result< bool > get_bool() const noexcept
    Cast this element to a bool.
    Definition: element-inl.h:195
    +
    bool is_string() const noexcept
    Whether this element is a json string.
    Definition: element-inl.h:335
    +
    simdjson_result< element > at_key(std::string_view key) const noexcept
    Get the value associated with the given key.
    Definition: element-inl.h:402
    +
    dom::array::iterator end() const noexcept(false)
    Iterate over each element in this array.
    Definition: element-inl.h:360
    +
    simdjson_result< array > get_array() const noexcept
    Cast this element to an array.
    Definition: element-inl.h:284
    +
    simdjson_result< size_t > get_string_length() const noexcept
    Gives the length in bytes of the string.
    Definition: element-inl.h:214
    +
    simdjson_inline element() noexcept
    Create a new, invalid element.
    Definition: element-inl.h:186
    +
    simdjson_result< uint64_t > get_uint64() const noexcept
    Cast this element to an unsigned integer.
    Definition: element-inl.h:233
    +
    dom::array::iterator begin() const noexcept(false)
    Iterate over each element in this array.
    Definition: element-inl.h:357
    +
    simdjson_result< element > at(const std::string_view json_pointer) const noexcept
    Version 0.4 of simdjson used an incorrect interpretation of the JSON Pointer standard and allowed the...
    Definition: element-inl.h:392
    +
    simdjson_result< int64_t > get_int64() const noexcept
    Cast this element to a signed integer.
    Definition: element-inl.h:247
    +
    simdjson_result< object > get_object() const noexcept
    Cast this element to an object.
    Definition: element-inl.h:293
    +
    bool is_uint64() const noexcept
    Whether this element is a json number that fits in an unsigned 64-bit integer.
    Definition: element-inl.h:337
    +
    simdjson_result< element > operator[](std::string_view key) const noexcept
    Get the value associated with the given key.
    Definition: element-inl.h:366
    +
    bool is_int64() const noexcept
    Whether this element is a json number that fits in a signed 64-bit integer.
    Definition: element-inl.h:336
    +
    bool is_null() const noexcept
    Whether this element is a json null.
    Definition: element-inl.h:342
    +
    simdjson_result< std::string_view > get_string() const noexcept
    Cast this element to a string.
    Definition: element-inl.h:224
    +
    bool is_array() const noexcept
    Whether this element is a json array.
    Definition: element-inl.h:333
    +
    bool is_bool() const noexcept
    Whether this element is a json true or false.
    Definition: element-inl.h:339
    +
    JSON object.
    Definition: object.h:14
    +
    element_type
    The actual concrete type of a JSON element This is the type it is most easily cast to with get<>.
    Definition: element.h:14
    + +
    @ STRING
    std::string_view
    +
    @ UINT64
    uint64_t: any integer that fits in uint64_t but not int64_t
    + + + + +
    @ DOUBLE
    double: Any number with a "." or "e" that fits in double.
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    -
    The result of a JSON conversion that may fail.
    Definition: array.h:149
    -
    The result of a JSON navigation that may fail.
    Definition: element.h:482
    -
    The result of a JSON conversion that may fail.
    Definition: object.h:238
    +
    The result of a JSON conversion that may fail.
    Definition: array.h:140
    +
    The result of a JSON navigation that may fail.
    Definition: element.h:473
    +
    The result of a JSON conversion that may fail.
    Definition: object.h:230
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    -
    simdjson_warn_unused simdjson_inline error_code get(T &value) &&noexcept
    Move the value to the provided variable.
    Definition: error-inl.h:127
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    +
    simdjson_warn_unused simdjson_inline error_code get(T &value) &&noexcept
    Move the value to the provided variable.
    Definition: error-inl.h:126
    simdjson_inline T & value() &noexcept(false)
    Get the result value.
    diff --git a/error-inl_8h_source.html b/error-inl_8h_source.html index bdf20cace..361a4e1cd 100644 --- a/error-inl_8h_source.html +++ b/error-inl_8h_source.html @@ -94,198 +94,197 @@ $(document).ready(function(){initNavTree('error-inl_8h_source.html',''); initRes
    1 #ifndef SIMDJSON_INLINE_ERROR_H
    2 #define SIMDJSON_INLINE_ERROR_H
    3 
    -
    4 #include <cstring>
    -
    5 #include <string>
    -
    6 #include <utility>
    -
    7 #include "simdjson/error.h"
    -
    8 
    -
    9 namespace simdjson {
    -
    10 namespace internal {
    -
    11  // We store the error code so we can validate the error message is associated with the right code
    -
    12  struct error_code_info {
    -
    13  error_code code;
    -
    14  const char* message; // do not use a fancy std::string where a simple C string will do (no alloc, no destructor)
    -
    15  };
    -
    16  // These MUST match the codes in error_code. We check this constraint in basictests.
    -
    17  extern SIMDJSON_DLLIMPORTEXPORT const error_code_info error_codes[];
    -
    18 } // namespace internal
    +
    4 #include <iostream>
    +
    5 
    +
    6 #include "simdjson/error.h"
    +
    7 
    +
    8 namespace simdjson {
    +
    9 namespace internal {
    +
    10  // We store the error code so we can validate the error message is associated with the right code
    +
    11  struct error_code_info {
    +
    12  error_code code;
    +
    13  const char* message; // do not use a fancy std::string where a simple C string will do (no alloc, no destructor)
    +
    14  };
    +
    15  // These MUST match the codes in error_code. We check this constraint in basictests.
    +
    16  extern SIMDJSON_DLLIMPORTEXPORT const error_code_info error_codes[];
    +
    17 } // namespace internal
    +
    18 
    19 
    -
    20 
    -
    21 inline const char *error_message(error_code error) noexcept {
    -
    22  // If you're using error_code, we're trusting you got it from the enum.
    -
    23  return internal::error_codes[int(error)].message;
    -
    24 }
    -
    25 
    -
    26 // deprecated function
    -
    27 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    -
    28 inline const std::string error_message(int error) noexcept {
    -
    29  if (error < 0 || error >= error_code::NUM_ERROR_CODES) {
    -
    30  return internal::error_codes[UNEXPECTED_ERROR].message;
    -
    31  }
    -
    32  return internal::error_codes[error].message;
    -
    33 }
    -
    34 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    -
    35 
    -
    36 inline std::ostream& operator<<(std::ostream& out, error_code error) noexcept {
    -
    37  return out << error_message(error);
    -
    38 }
    -
    39 
    -
    40 namespace internal {
    -
    41 
    -
    42 //
    -
    43 // internal::simdjson_result_base<T> inline implementation
    -
    44 //
    -
    45 
    -
    46 template<typename T>
    -
    47 simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
    -
    48  error = this->second;
    -
    49  if (!error) {
    -
    50  value = std::forward<simdjson_result_base<T>>(*this).first;
    -
    51  }
    -
    52 }
    -
    53 
    -
    54 template<typename T>
    -
    55 simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
    -
    56  error_code error;
    -
    57  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
    -
    58  return error;
    -
    59 }
    -
    60 
    -
    61 template<typename T>
    -
    62 simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
    -
    63  return this->second;
    -
    64 }
    -
    65 
    -
    66 #if SIMDJSON_EXCEPTIONS
    -
    67 
    -
    68 template<typename T>
    -
    69 simdjson_inline T& simdjson_result_base<T>::value() & noexcept(false) {
    -
    70  if (error()) { throw simdjson_error(error()); }
    -
    71  return this->first;
    -
    72 }
    -
    73 
    -
    74 template<typename T>
    -
    75 simdjson_inline T&& simdjson_result_base<T>::value() && noexcept(false) {
    -
    76  return std::forward<simdjson_result_base<T>>(*this).take_value();
    -
    77 }
    -
    78 
    -
    79 template<typename T>
    -
    80 simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
    -
    81  if (error()) { throw simdjson_error(error()); }
    -
    82  return std::forward<T>(this->first);
    -
    83 }
    -
    84 
    -
    85 template<typename T>
    -
    86 simdjson_inline simdjson_result_base<T>::operator T&&() && noexcept(false) {
    -
    87  return std::forward<simdjson_result_base<T>>(*this).take_value();
    -
    88 }
    -
    89 
    -
    90 #endif // SIMDJSON_EXCEPTIONS
    -
    91 
    -
    92 template<typename T>
    -
    93 simdjson_inline const T& simdjson_result_base<T>::value_unsafe() const& noexcept {
    -
    94  return this->first;
    -
    95 }
    -
    96 
    -
    97 template<typename T>
    -
    98 simdjson_inline T&& simdjson_result_base<T>::value_unsafe() && noexcept {
    -
    99  return std::forward<T>(this->first);
    -
    100 }
    -
    101 
    -
    102 template<typename T>
    -
    103 simdjson_inline simdjson_result_base<T>::simdjson_result_base(T &&value, error_code error) noexcept
    -
    104  : std::pair<T, error_code>(std::forward<T>(value), error) {}
    -
    105 template<typename T>
    -
    106 simdjson_inline simdjson_result_base<T>::simdjson_result_base(error_code error) noexcept
    -
    107  : simdjson_result_base(T{}, error) {}
    -
    108 template<typename T>
    -
    109 simdjson_inline simdjson_result_base<T>::simdjson_result_base(T &&value) noexcept
    -
    110  : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
    -
    111 template<typename T>
    -
    112 simdjson_inline simdjson_result_base<T>::simdjson_result_base() noexcept
    -
    113  : simdjson_result_base(T{}, UNINITIALIZED) {}
    -
    114 
    -
    115 } // namespace internal
    -
    116 
    -
    120 
    -
    121 template<typename T>
    -
    122 simdjson_inline void simdjson_result<T>::tie(T &value, error_code &error) && noexcept {
    -
    123  std::forward<internal::simdjson_result_base<T>>(*this).tie(value, error);
    -
    124 }
    -
    125 
    -
    126 template<typename T>
    -
    127 simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
    -
    128  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
    -
    129 }
    -
    130 
    -
    131 template<typename T>
    -
    132 simdjson_inline error_code simdjson_result<T>::error() const noexcept {
    -
    133  return internal::simdjson_result_base<T>::error();
    -
    134 }
    -
    135 
    -
    136 #if SIMDJSON_EXCEPTIONS
    -
    137 
    -
    138 template<typename T>
    -
    139 simdjson_inline T& simdjson_result<T>::value() & noexcept(false) {
    -
    140  return internal::simdjson_result_base<T>::value();
    -
    141 }
    -
    142 
    -
    143 template<typename T>
    -
    144 simdjson_inline T&& simdjson_result<T>::value() && noexcept(false) {
    -
    145  return std::forward<internal::simdjson_result_base<T>>(*this).value();
    -
    146 }
    -
    147 
    -
    148 template<typename T>
    -
    149 simdjson_inline T&& simdjson_result<T>::take_value() && noexcept(false) {
    -
    150  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
    -
    151 }
    -
    152 
    -
    153 template<typename T>
    -
    154 simdjson_inline simdjson_result<T>::operator T&&() && noexcept(false) {
    -
    155  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
    -
    156 }
    -
    157 
    -
    158 #endif // SIMDJSON_EXCEPTIONS
    -
    159 
    -
    160 template<typename T>
    -
    161 simdjson_inline const T& simdjson_result<T>::value_unsafe() const& noexcept {
    -
    162  return internal::simdjson_result_base<T>::value_unsafe();
    -
    163 }
    -
    164 
    -
    165 template<typename T>
    -
    166 simdjson_inline T&& simdjson_result<T>::value_unsafe() && noexcept {
    -
    167  return std::forward<internal::simdjson_result_base<T>>(*this).value_unsafe();
    -
    168 }
    -
    169 
    -
    170 template<typename T>
    -
    171 simdjson_inline simdjson_result<T>::simdjson_result(T &&value, error_code error) noexcept
    -
    172  : internal::simdjson_result_base<T>(std::forward<T>(value), error) {}
    -
    173 template<typename T>
    -
    174 simdjson_inline simdjson_result<T>::simdjson_result(error_code error) noexcept
    -
    175  : internal::simdjson_result_base<T>(error) {}
    -
    176 template<typename T>
    -
    177 simdjson_inline simdjson_result<T>::simdjson_result(T &&value) noexcept
    -
    178  : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
    -
    179 template<typename T>
    -
    180 simdjson_inline simdjson_result<T>::simdjson_result() noexcept
    -
    181  : internal::simdjson_result_base<T>() {}
    -
    182 
    -
    183 } // namespace simdjson
    -
    184 
    -
    185 #endif // SIMDJSON_INLINE_ERROR_H
    -
    We want to support argument-dependent lookup (ADL).
    -
    std::ostream & operator<<(std::ostream &out, error_code error) noexcept
    Write the error message to the output stream.
    Definition: error-inl.h:36
    -
    const char * error_message(error_code error) noexcept
    Get the error message for the given error code.
    Definition: error-inl.h:21
    +
    20 inline const char *error_message(error_code error) noexcept {
    +
    21  // If you're using error_code, we're trusting you got it from the enum.
    +
    22  return internal::error_codes[int(error)].message;
    +
    23 }
    +
    24 
    +
    25 // deprecated function
    +
    26 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
    +
    27 inline const std::string error_message(int error) noexcept {
    +
    28  if (error < 0 || error >= error_code::NUM_ERROR_CODES) {
    +
    29  return internal::error_codes[UNEXPECTED_ERROR].message;
    +
    30  }
    +
    31  return internal::error_codes[error].message;
    +
    32 }
    +
    33 #endif // SIMDJSON_DISABLE_DEPRECATED_API
    +
    34 
    +
    35 inline std::ostream& operator<<(std::ostream& out, error_code error) noexcept {
    +
    36  return out << error_message(error);
    +
    37 }
    +
    38 
    +
    39 namespace internal {
    +
    40 
    +
    41 //
    +
    42 // internal::simdjson_result_base<T> inline implementation
    +
    43 //
    +
    44 
    +
    45 template<typename T>
    +
    46 simdjson_inline void simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
    +
    47  error = this->second;
    +
    48  if (!error) {
    +
    49  value = std::forward<simdjson_result_base<T>>(*this).first;
    +
    50  }
    +
    51 }
    +
    52 
    +
    53 template<typename T>
    +
    54 simdjson_warn_unused simdjson_inline error_code simdjson_result_base<T>::get(T &value) && noexcept {
    +
    55  error_code error;
    +
    56  std::forward<simdjson_result_base<T>>(*this).tie(value, error);
    +
    57  return error;
    +
    58 }
    +
    59 
    +
    60 template<typename T>
    +
    61 simdjson_inline error_code simdjson_result_base<T>::error() const noexcept {
    +
    62  return this->second;
    +
    63 }
    +
    64 
    +
    65 #if SIMDJSON_EXCEPTIONS
    +
    66 
    +
    67 template<typename T>
    +
    68 simdjson_inline T& simdjson_result_base<T>::value() & noexcept(false) {
    +
    69  if (error()) { throw simdjson_error(error()); }
    +
    70  return this->first;
    +
    71 }
    +
    72 
    +
    73 template<typename T>
    +
    74 simdjson_inline T&& simdjson_result_base<T>::value() && noexcept(false) {
    +
    75  return std::forward<simdjson_result_base<T>>(*this).take_value();
    +
    76 }
    +
    77 
    +
    78 template<typename T>
    +
    79 simdjson_inline T&& simdjson_result_base<T>::take_value() && noexcept(false) {
    +
    80  if (error()) { throw simdjson_error(error()); }
    +
    81  return std::forward<T>(this->first);
    +
    82 }
    +
    83 
    +
    84 template<typename T>
    +
    85 simdjson_inline simdjson_result_base<T>::operator T&&() && noexcept(false) {
    +
    86  return std::forward<simdjson_result_base<T>>(*this).take_value();
    +
    87 }
    +
    88 
    +
    89 #endif // SIMDJSON_EXCEPTIONS
    +
    90 
    +
    91 template<typename T>
    +
    92 simdjson_inline const T& simdjson_result_base<T>::value_unsafe() const& noexcept {
    +
    93  return this->first;
    +
    94 }
    +
    95 
    +
    96 template<typename T>
    +
    97 simdjson_inline T&& simdjson_result_base<T>::value_unsafe() && noexcept {
    +
    98  return std::forward<T>(this->first);
    +
    99 }
    +
    100 
    +
    101 template<typename T>
    +
    102 simdjson_inline simdjson_result_base<T>::simdjson_result_base(T &&value, error_code error) noexcept
    +
    103  : std::pair<T, error_code>(std::forward<T>(value), error) {}
    +
    104 template<typename T>
    +
    105 simdjson_inline simdjson_result_base<T>::simdjson_result_base(error_code error) noexcept
    +
    106  : simdjson_result_base(T{}, error) {}
    +
    107 template<typename T>
    +
    108 simdjson_inline simdjson_result_base<T>::simdjson_result_base(T &&value) noexcept
    +
    109  : simdjson_result_base(std::forward<T>(value), SUCCESS) {}
    +
    110 template<typename T>
    +
    111 simdjson_inline simdjson_result_base<T>::simdjson_result_base() noexcept
    +
    112  : simdjson_result_base(T{}, UNINITIALIZED) {}
    +
    113 
    +
    114 } // namespace internal
    +
    115 
    +
    119 
    +
    120 template<typename T>
    +
    121 simdjson_inline void simdjson_result<T>::tie(T &value, error_code &error) && noexcept {
    +
    122  std::forward<internal::simdjson_result_base<T>>(*this).tie(value, error);
    +
    123 }
    +
    124 
    +
    125 template<typename T>
    +
    126 simdjson_warn_unused simdjson_inline error_code simdjson_result<T>::get(T &value) && noexcept {
    +
    127  return std::forward<internal::simdjson_result_base<T>>(*this).get(value);
    +
    128 }
    +
    129 
    +
    130 template<typename T>
    +
    131 simdjson_inline error_code simdjson_result<T>::error() const noexcept {
    +
    132  return internal::simdjson_result_base<T>::error();
    +
    133 }
    +
    134 
    +
    135 #if SIMDJSON_EXCEPTIONS
    +
    136 
    +
    137 template<typename T>
    +
    138 simdjson_inline T& simdjson_result<T>::value() & noexcept(false) {
    +
    139  return internal::simdjson_result_base<T>::value();
    +
    140 }
    +
    141 
    +
    142 template<typename T>
    +
    143 simdjson_inline T&& simdjson_result<T>::value() && noexcept(false) {
    +
    144  return std::forward<internal::simdjson_result_base<T>>(*this).value();
    +
    145 }
    +
    146 
    +
    147 template<typename T>
    +
    148 simdjson_inline T&& simdjson_result<T>::take_value() && noexcept(false) {
    +
    149  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
    +
    150 }
    +
    151 
    +
    152 template<typename T>
    +
    153 simdjson_inline simdjson_result<T>::operator T&&() && noexcept(false) {
    +
    154  return std::forward<internal::simdjson_result_base<T>>(*this).take_value();
    +
    155 }
    +
    156 
    +
    157 #endif // SIMDJSON_EXCEPTIONS
    +
    158 
    +
    159 template<typename T>
    +
    160 simdjson_inline const T& simdjson_result<T>::value_unsafe() const& noexcept {
    +
    161  return internal::simdjson_result_base<T>::value_unsafe();
    +
    162 }
    +
    163 
    +
    164 template<typename T>
    +
    165 simdjson_inline T&& simdjson_result<T>::value_unsafe() && noexcept {
    +
    166  return std::forward<internal::simdjson_result_base<T>>(*this).value_unsafe();
    +
    167 }
    +
    168 
    +
    169 template<typename T>
    +
    170 simdjson_inline simdjson_result<T>::simdjson_result(T &&value, error_code error) noexcept
    +
    171  : internal::simdjson_result_base<T>(std::forward<T>(value), error) {}
    +
    172 template<typename T>
    +
    173 simdjson_inline simdjson_result<T>::simdjson_result(error_code error) noexcept
    +
    174  : internal::simdjson_result_base<T>(error) {}
    +
    175 template<typename T>
    +
    176 simdjson_inline simdjson_result<T>::simdjson_result(T &&value) noexcept
    +
    177  : internal::simdjson_result_base<T>(std::forward<T>(value)) {}
    +
    178 template<typename T>
    +
    179 simdjson_inline simdjson_result<T>::simdjson_result() noexcept
    +
    180  : internal::simdjson_result_base<T>() {}
    +
    181 
    +
    182 } // namespace simdjson
    +
    183 
    +
    184 #endif // SIMDJSON_INLINE_ERROR_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    std::ostream & operator<<(std::ostream &out, error_code error) noexcept
    Write the error message to the output stream.
    Definition: error-inl.h:35
    +
    const char * error_message(error_code error) noexcept
    Get the error message for the given error code.
    Definition: error-inl.h:20
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ SUCCESS
    No error.
    Definition: error.h:18
    @ UNEXPECTED_ERROR
    indicative of a bug in simdjson
    Definition: error.h:41
    @ UNINITIALIZED
    unknown error, or uninitialized document
    Definition: error.h:29
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    simdjson_inline const T & value_unsafe() const &noexcept
    Get the result value.
    -
    simdjson_inline T && take_value() &&noexcept(false)
    Take the result value (move it).
    Definition: error-inl.h:149
    -
    simdjson_inline void tie(T &value, error_code &error) &&noexcept
    Move the value and the error to the provided variables.
    Definition: error-inl.h:122
    -
    simdjson_warn_unused simdjson_inline error_code get(T &value) &&noexcept
    Move the value to the provided variable.
    Definition: error-inl.h:127
    +
    simdjson_inline T && take_value() &&noexcept(false)
    Take the result value (move it).
    Definition: error-inl.h:148
    +
    simdjson_inline void tie(T &value, error_code &error) &&noexcept
    Move the value and the error to the provided variables.
    Definition: error-inl.h:121
    +
    simdjson_warn_unused simdjson_inline error_code get(T &value) &&noexcept
    Move the value to the provided variable.
    Definition: error-inl.h:126
    simdjson_inline T & value() &noexcept(false)
    Get the result value.
    diff --git a/error_8h_source.html b/error_8h_source.html index e183dc4eb..2506d9596 100644 --- a/error_8h_source.html +++ b/error_8h_source.html @@ -94,7 +94,7 @@ $(document).ready(function(){initNavTree('error_8h_source.html',''); initResizab
    1 #ifndef SIMDJSON_ERROR_H
    2 #define SIMDJSON_ERROR_H
    3 
    -
    4 #include "simdjson/common_defs.h"
    +
    4 #include "simdjson/base.h"
    5 #include <string>
    6 
    7 namespace simdjson {
    @@ -229,9 +229,9 @@ $(document).ready(function(){initNavTree('error_8h_source.html',''); initResizab
    306 } // namespace simdjson
    307 
    308 #endif // SIMDJSON_ERROR_H
    -
    We want to support argument-dependent lookup (ADL).
    -
    std::ostream & operator<<(std::ostream &out, error_code error) noexcept
    Write the error message to the output stream.
    Definition: error-inl.h:36
    -
    const char * error_message(error_code error) noexcept
    Get the error message for the given error code.
    Definition: error-inl.h:21
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    std::ostream & operator<<(std::ostream &out, error_code error) noexcept
    Write the error message to the output stream.
    Definition: error-inl.h:35
    +
    const char * error_message(error_code error) noexcept
    Get the error message for the given error code.
    Definition: error-inl.h:20
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ SCALAR_DOCUMENT_AS_VALUE
    A scalar document is treated as a value.
    Definition: error.h:46
    @ DEPTH_ERROR
    Your document exceeds the user-specified depth limitation.
    Definition: error.h:22
    diff --git a/fallback_2base_8h_source.html b/fallback_2base_8h_source.html new file mode 100644 index 000000000..743773229 --- /dev/null +++ b/fallback_2base_8h_source.html @@ -0,0 +1,128 @@ + + + + + + + +simdjson: include/simdjson/fallback/base.h Source File + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    simdjson +  3.2.1 +
    +
    Ridiculously Fast JSON
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    base.h
    +
    +
    +
    1 #ifndef SIMDJSON_FALLBACK_BASE_H
    +
    2 #define SIMDJSON_FALLBACK_BASE_H
    +
    3 
    +
    4 #ifndef SIMDJSON_AMALGAMATED
    +
    5 #include "simdjson/base.h"
    +
    6 #endif // SIMDJSON_AMALGAMATED
    +
    7 
    +
    8 namespace simdjson {
    +
    12 namespace fallback {
    +
    13 
    +
    14 class implementation;
    +
    15 
    +
    16 } // namespace fallback
    +
    17 } // namespace simdjson
    +
    18 
    +
    19 #ifndef SIMDJSON_AMALGAMATED
    +
    20 // If we're editing one of the files in this directory, begin the implementation!
    +
    21 #ifndef SIMDJSON_IMPLEMENTATION
    +
    22 #include "simdjson/fallback/begin.h"
    +
    23 #endif
    +
    24 #endif // SIMDJSON_AMALGAMATED
    +
    25 
    +
    26 #endif // SIMDJSON_FALLBACK_BASE_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    +
    + + + + diff --git a/fallback_2begin_8h_source.html b/fallback_2begin_8h_source.html index 467bae648..8132b0293 100644 --- a/fallback_2begin_8h_source.html +++ b/fallback_2begin_8h_source.html @@ -92,6 +92,10 @@ $(document).ready(function(){initNavTree('fallback_2begin_8h_source.html',''); i
    1 #define SIMDJSON_IMPLEMENTATION fallback
    +
    2 #include "simdjson/fallback/base.h"
    +
    3 #include "simdjson/fallback/bitmanipulation.h"
    +
    4 #include "simdjson/fallback/stringparsing_defs.h"
    +
    5 #include "simdjson/fallback/numberparsing_defs.h"
    diff --git a/fallback_2bitmanipulation_8h_source.html b/fallback_2bitmanipulation_8h_source.html index c54a97fc9..8700af7f3 100644 --- a/fallback_2bitmanipulation_8h_source.html +++ b/fallback_2bitmanipulation_8h_source.html @@ -94,51 +94,50 @@ $(document).ready(function(){initNavTree('fallback_2bitmanipulation_8h_source.ht
    1 #ifndef SIMDJSON_FALLBACK_BITMANIPULATION_H
    2 #define SIMDJSON_FALLBACK_BITMANIPULATION_H
    3 
    -
    4 #include "simdjson/base.h"
    -
    5 #include <limits>
    -
    6 
    -
    7 namespace simdjson {
    -
    8 namespace SIMDJSON_IMPLEMENTATION {
    -
    9 namespace {
    -
    10 
    -
    11 #if defined(_MSC_VER) && !defined(_M_ARM64) && !defined(_M_X64)
    -
    12 static inline unsigned char _BitScanForward64(unsigned long* ret, uint64_t x) {
    -
    13  unsigned long x0 = (unsigned long)x, top, bottom;
    -
    14  _BitScanForward(&top, (unsigned long)(x >> 32));
    -
    15  _BitScanForward(&bottom, x0);
    -
    16  *ret = x0 ? bottom : 32 + top;
    -
    17  return x != 0;
    -
    18 }
    -
    19 static unsigned char _BitScanReverse64(unsigned long* ret, uint64_t x) {
    -
    20  unsigned long x1 = (unsigned long)(x >> 32), top, bottom;
    -
    21  _BitScanReverse(&top, x1);
    -
    22  _BitScanReverse(&bottom, (unsigned long)x);
    -
    23  *ret = x1 ? top + 32 : bottom;
    -
    24  return x != 0;
    -
    25 }
    -
    26 #endif
    -
    27 
    -
    28 /* result might be undefined when input_num is zero */
    -
    29 simdjson_inline int leading_zeroes(uint64_t input_num) {
    -
    30 #ifdef _MSC_VER
    -
    31  unsigned long leading_zero = 0;
    -
    32  // Search the mask data from most significant bit (MSB)
    -
    33  // to least significant bit (LSB) for a set bit (1).
    -
    34  if (_BitScanReverse64(&leading_zero, input_num))
    -
    35  return (int)(63 - leading_zero);
    -
    36  else
    -
    37  return 64;
    -
    38 #else
    -
    39  return __builtin_clzll(input_num);
    -
    40 #endif// _MSC_VER
    -
    41 }
    -
    42 
    -
    43 } // unnamed namespace
    -
    44 } // namespace SIMDJSON_IMPLEMENTATION
    -
    45 } // namespace simdjson
    -
    46 
    -
    47 #endif // SIMDJSON_FALLBACK_BITMANIPULATION_H
    -
    We want to support argument-dependent lookup (ADL).
    +
    4 #include "simdjson/fallback/base.h"
    +
    5 
    +
    6 namespace simdjson {
    +
    7 namespace SIMDJSON_IMPLEMENTATION {
    +
    8 namespace {
    +
    9 
    +
    10 #if defined(_MSC_VER) && !defined(_M_ARM64) && !defined(_M_X64)
    +
    11 static inline unsigned char _BitScanForward64(unsigned long* ret, uint64_t x) {
    +
    12  unsigned long x0 = (unsigned long)x, top, bottom;
    +
    13  _BitScanForward(&top, (unsigned long)(x >> 32));
    +
    14  _BitScanForward(&bottom, x0);
    +
    15  *ret = x0 ? bottom : 32 + top;
    +
    16  return x != 0;
    +
    17 }
    +
    18 static unsigned char _BitScanReverse64(unsigned long* ret, uint64_t x) {
    +
    19  unsigned long x1 = (unsigned long)(x >> 32), top, bottom;
    +
    20  _BitScanReverse(&top, x1);
    +
    21  _BitScanReverse(&bottom, (unsigned long)x);
    +
    22  *ret = x1 ? top + 32 : bottom;
    +
    23  return x != 0;
    +
    24 }
    +
    25 #endif
    +
    26 
    +
    27 /* result might be undefined when input_num is zero */
    +
    28 simdjson_inline int leading_zeroes(uint64_t input_num) {
    +
    29 #ifdef _MSC_VER
    +
    30  unsigned long leading_zero = 0;
    +
    31  // Search the mask data from most significant bit (MSB)
    +
    32  // to least significant bit (LSB) for a set bit (1).
    +
    33  if (_BitScanReverse64(&leading_zero, input_num))
    +
    34  return (int)(63 - leading_zero);
    +
    35  else
    +
    36  return 64;
    +
    37 #else
    +
    38  return __builtin_clzll(input_num);
    +
    39 #endif// _MSC_VER
    +
    40 }
    +
    41 
    +
    42 } // unnamed namespace
    +
    43 } // namespace SIMDJSON_IMPLEMENTATION
    +
    44 } // namespace simdjson
    +
    45 
    +
    46 #endif // SIMDJSON_FALLBACK_BITMANIPULATION_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/fallback_2implementation_8h_source.html b/fallback_2implementation_8h_source.html index 921b04fc7..5dced2bcc 100644 --- a/fallback_2implementation_8h_source.html +++ b/fallback_2implementation_8h_source.html @@ -99,36 +99,31 @@ $(document).ready(function(){initNavTree('fallback_2implementation_8h_source.htm
    6 namespace simdjson {
    7 namespace fallback {
    8 
    -
    9 namespace {
    -
    10 using namespace simdjson;
    -
    11 using namespace simdjson::dom;
    -
    12 }
    -
    13 
    -
    17 class implementation final : public simdjson::implementation {
    -
    18 public:
    -
    19  simdjson_inline implementation() : simdjson::implementation(
    -
    20  "fallback",
    -
    21  "Generic fallback implementation",
    -
    22  0
    -
    23  ) {}
    -
    24  simdjson_warn_unused error_code create_dom_parser_implementation(
    -
    25  size_t capacity,
    -
    26  size_t max_length,
    -
    27  std::unique_ptr<internal::dom_parser_implementation>& dst
    -
    28  ) const noexcept final;
    -
    29  simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final;
    -
    30  simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final;
    -
    31 };
    -
    32 
    -
    33 } // namespace fallback
    -
    34 } // namespace simdjson
    -
    35 
    -
    36 #endif // SIMDJSON_FALLBACK_IMPLEMENTATION_H
    -
    An implementation of simdjson for a particular CPU architecture.
    -
    virtual simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept=0
    Validate the UTF-8 string.
    -
    We want to support argument-dependent lookup (ADL).
    +
    12 class implementation final : public simdjson::implementation {
    +
    13 public:
    +
    14  simdjson_inline implementation() : simdjson::implementation(
    +
    15  "fallback",
    +
    16  "Generic fallback implementation",
    +
    17  0
    +
    18  ) {}
    +
    19  simdjson_warn_unused error_code create_dom_parser_implementation(
    +
    20  size_t capacity,
    +
    21  size_t max_length,
    +
    22  std::unique_ptr<simdjson::internal::dom_parser_implementation>& dst
    +
    23  ) const noexcept final;
    +
    24  simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final;
    +
    25  simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final;
    +
    26 };
    +
    27 
    +
    28 } // namespace fallback
    +
    29 } // namespace simdjson
    +
    30 
    +
    31 #endif // SIMDJSON_FALLBACK_IMPLEMENTATION_H
    +
    An implementation of simdjson for a particular CPU architecture.
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) noexcept
    Validate the UTF-8 string.
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    -
    std::string minify(T x)
    Minifies a JSON element or document, printing the smallest possible valid JSON.
    +
    std::string minify(T x)
    Minifies a JSON element or document, printing the smallest possible valid JSON.
    diff --git a/fallback_2numberparsing__defs_8h_source.html b/fallback_2numberparsing__defs_8h_source.html new file mode 100644 index 000000000..2956a9e06 --- /dev/null +++ b/fallback_2numberparsing__defs_8h_source.html @@ -0,0 +1,181 @@ + + + + + + + +simdjson: include/simdjson/fallback/numberparsing_defs.h Source File + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    simdjson +  3.2.1 +
    +
    Ridiculously Fast JSON
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    numberparsing_defs.h
    +
    +
    +
    1 #ifndef SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H
    +
    2 #define SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H
    +
    3 
    +
    4 #include "simdjson/fallback/base.h"
    +
    5 
    +
    6 #ifndef SIMDJSON_AMALGAMATED
    +
    7 #include "simdjson/internal/numberparsing_tables.h"
    +
    8 #endif // SIMDJSON_AMALGAMATED
    +
    9 
    +
    10 #ifdef JSON_TEST_NUMBERS // for unit testing
    +
    11 void found_invalid_number(const uint8_t *buf);
    +
    12 void found_integer(int64_t result, const uint8_t *buf);
    +
    13 void found_unsigned_integer(uint64_t result, const uint8_t *buf);
    +
    14 void found_float(double result, const uint8_t *buf);
    +
    15 #endif
    +
    16 
    +
    17 namespace simdjson {
    +
    18 namespace SIMDJSON_IMPLEMENTATION {
    +
    19 namespace numberparsing {
    +
    20 
    +
    21 // credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/
    +
    23 static simdjson_inline uint32_t parse_eight_digits_unrolled(const char *chars) {
    +
    24  uint64_t val;
    +
    25  memcpy(&val, chars, sizeof(uint64_t));
    +
    26  val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8;
    +
    27  val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16;
    +
    28  return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32);
    +
    29 }
    +
    30 
    +
    32 static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) {
    +
    33  return parse_eight_digits_unrolled(reinterpret_cast<const char *>(chars));
    +
    34 }
    +
    35 
    +
    36 #if SIMDJSON_IS_32BITS // _umul128 for x86, arm
    +
    37 // this is a slow emulation routine for 32-bit
    +
    38 //
    +
    39 static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) {
    +
    40  return x * (uint64_t)y;
    +
    41 }
    +
    42 static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) {
    +
    43  uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd);
    +
    44  uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd);
    +
    45  uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32));
    +
    46  uint64_t adbc_carry = !!(adbc < ad);
    +
    47  uint64_t lo = bd + (adbc << 32);
    +
    48  *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) +
    +
    49  (adbc_carry << 32) + !!(lo < bd);
    +
    50  return lo;
    +
    51 }
    +
    52 #endif
    +
    53 
    +
    55 simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) {
    +
    56  internal::value128 answer;
    +
    57 #if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
    +
    58 #ifdef _M_ARM64
    +
    59  // ARM64 has native support for 64-bit multiplications, no need to emultate
    +
    60  answer.high = __umulh(value1, value2);
    +
    61  answer.low = value1 * value2;
    +
    62 #else
    +
    63  answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64
    +
    64 #endif // _M_ARM64
    +
    65 #else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
    +
    66  __uint128_t r = (static_cast<__uint128_t>(value1)) * value2;
    +
    67  answer.low = uint64_t(r);
    +
    68  answer.high = uint64_t(r >> 64);
    +
    69 #endif
    +
    70  return answer;
    +
    71 }
    +
    72 
    +
    73 } // namespace numberparsing
    +
    74 } // namespace SIMDJSON_IMPLEMENTATION
    +
    75 } // namespace simdjson
    +
    76 
    +
    77 #define SIMDJSON_SWAR_NUMBER_PARSING 1
    +
    78 
    +
    79 #endif // SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    +
    + + + + diff --git a/fallback_2ondemand_8h_source.html b/fallback_2ondemand_8h_source.html new file mode 100644 index 000000000..e7f1c26f9 --- /dev/null +++ b/fallback_2ondemand_8h_source.html @@ -0,0 +1,112 @@ + + + + + + + +simdjson: include/simdjson/fallback/ondemand.h Source File + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    simdjson +  3.2.1 +
    +
    Ridiculously Fast JSON
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    ondemand.h
    +
    +
    +
    1 #ifndef SIMDJSON_FALLBACK_ONDEMAND_H
    +
    2 #define SIMDJSON_FALLBACK_ONDEMAND_H
    +
    3 
    +
    4 #include "simdjson/fallback/begin.h"
    +
    5 #include "simdjson/generic/ondemand/amalgamated.h"
    +
    6 #include "simdjson/fallback/end.h"
    +
    7 
    +
    8 #endif // SIMDJSON_FALLBACK_ONDEMAND_H
    +
    +
    + + + + diff --git a/fallback_2stringparsing_8h_source.html b/fallback_2stringparsing__defs_8h_source.html similarity index 93% rename from fallback_2stringparsing_8h_source.html rename to fallback_2stringparsing__defs_8h_source.html index 6dd73e3ec..6b0cdc987 100644 --- a/fallback_2stringparsing_8h_source.html +++ b/fallback_2stringparsing__defs_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/fallback/stringparsing.h Source File +simdjson: include/simdjson/fallback/stringparsing_defs.h Source File @@ -68,7 +68,7 @@ $(function() {
    @@ -88,13 +88,13 @@ $(document).ready(function(){initNavTree('fallback_2stringparsing_8h_source.html
    -
    stringparsing.h
    +
    stringparsing_defs.h
    -
    1 #ifndef SIMDJSON_FALLBACK_STRINGPARSING_H
    -
    2 #define SIMDJSON_FALLBACK_STRINGPARSING_H
    +
    1 #ifndef SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H
    +
    2 #define SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H
    3 
    -
    4 #include "simdjson/base.h"
    +
    4 #include "simdjson/fallback/base.h"
    5 
    6 namespace simdjson {
    7 namespace SIMDJSON_IMPLEMENTATION {
    @@ -124,14 +124,14 @@ $(document).ready(function(){initNavTree('fallback_2stringparsing_8h_source.html
    31 } // namespace SIMDJSON_IMPLEMENTATION
    32 } // namespace simdjson
    33 
    -
    34 #endif // SIMDJSON_FALLBACK_STRINGPARSING_H
    -
    We want to support argument-dependent lookup (ADL).
    +
    34 #endif // SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/fallback_8h_source.html b/fallback_8h_source.html index 3db11fcb4..331827664 100644 --- a/fallback_8h_source.html +++ b/fallback_8h_source.html @@ -94,32 +94,11 @@ $(document).ready(function(){initNavTree('fallback_8h_source.html',''); initResi
    1 #ifndef SIMDJSON_FALLBACK_H
    2 #define SIMDJSON_FALLBACK_H
    3 
    - -
    5 
    -
    6 #if SIMDJSON_IMPLEMENTATION_FALLBACK
    +
    4 #include "simdjson/fallback/begin.h"
    +
    5 #include "simdjson/generic/amalgamated.h"
    +
    6 #include "simdjson/fallback/end.h"
    7 
    -
    8 namespace simdjson {
    -
    12 namespace fallback {
    -
    13 } // namespace fallback
    -
    14 } // namespace simdjson
    -
    15 
    -
    16 #include "simdjson/fallback/implementation.h"
    -
    17 
    -
    18 #include "simdjson/fallback/begin.h"
    -
    19 
    -
    20 // Declarations
    -
    21 #include "simdjson/generic/dom_parser_implementation.h"
    -
    22 #include "simdjson/fallback/bitmanipulation.h"
    -
    23 #include "simdjson/generic/jsoncharutils.h"
    -
    24 #include "simdjson/generic/atomparsing.h"
    -
    25 #include "simdjson/fallback/stringparsing.h"
    -
    26 #include "simdjson/fallback/numberparsing.h"
    -
    27 #include "simdjson/fallback/end.h"
    -
    28 
    -
    29 #endif // SIMDJSON_IMPLEMENTATION_FALLBACK
    -
    30 #endif // SIMDJSON_FALLBACK_H
    -
    Includes common stuff needed for implementations.
    -
    We want to support argument-dependent lookup (ADL).
    +
    8 #endif // SIMDJSON_FALLBACK_H
    diff --git a/field-inl_8h_source.html b/field-inl_8h_source.html index ed866427c..6cc682715 100644 --- a/field-inl_8h_source.html +++ b/field-inl_8h_source.html @@ -91,94 +91,106 @@ $(document).ready(function(){initNavTree('field-inl_8h_source.html',''); initRes
    field-inl.h
    -
    1 namespace simdjson {
    -
    2 namespace SIMDJSON_IMPLEMENTATION {
    -
    3 namespace ondemand {
    -
    4 
    -
    5 // clang 6 doesn't think the default constructor can be noexcept, so we make it explicit
    -
    6 simdjson_inline field::field() noexcept : std::pair<raw_json_string, ondemand::value>() {}
    -
    7 
    -
    8 simdjson_inline field::field(raw_json_string key, ondemand::value &&value) noexcept
    -
    9  : std::pair<raw_json_string, ondemand::value>(key, std::forward<ondemand::value>(value))
    -
    10 {
    -
    11 }
    -
    12 
    -
    13 simdjson_inline simdjson_result<field> field::start(value_iterator &parent_iter) noexcept {
    -
    14  raw_json_string key;
    -
    15  SIMDJSON_TRY( parent_iter.field_key().get(key) );
    -
    16  SIMDJSON_TRY( parent_iter.field_value() );
    -
    17  return field::start(parent_iter, key);
    -
    18 }
    -
    19 
    -
    20 simdjson_inline simdjson_result<field> field::start(const value_iterator &parent_iter, raw_json_string key) noexcept {
    -
    21  return field(key, parent_iter.child());
    -
    22 }
    -
    23 
    -
    24 simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> field::unescaped_key(bool allow_replacement) noexcept {
    -
    25  SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() but Visual Studio won't let us.
    -
    26  simdjson_result<std::string_view> answer = first.unescape(second.iter.json_iter(), allow_replacement);
    -
    27  first.consume();
    -
    28  return answer;
    -
    29 }
    -
    30 
    -
    31 simdjson_inline raw_json_string field::key() const noexcept {
    -
    32  SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() by Visual Studio won't let us.
    -
    33  return first;
    -
    34 }
    -
    35 
    -
    36 simdjson_inline value &field::value() & noexcept {
    -
    37  return second;
    -
    38 }
    -
    39 
    -
    40 simdjson_inline value field::value() && noexcept {
    -
    41  return std::forward<field>(*this).second;
    -
    42 }
    -
    43 
    -
    44 } // namespace ondemand
    -
    45 } // namespace SIMDJSON_IMPLEMENTATION
    -
    46 } // namespace simdjson
    -
    47 
    -
    48 namespace simdjson {
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/ondemand/field.h"
    +
    7 #include "simdjson/generic/ondemand/value-inl.h"
    +
    8 #include "simdjson/generic/ondemand/value_iterator-inl.h"
    +
    9 #endif // SIMDJSON_AMALGAMATED
    +
    10 
    +
    11 namespace simdjson {
    +
    12 namespace SIMDJSON_IMPLEMENTATION {
    +
    13 namespace ondemand {
    +
    14 
    +
    15 // clang 6 doesn't think the default constructor can be noexcept, so we make it explicit
    +
    16 simdjson_inline field::field() noexcept : std::pair<raw_json_string, ondemand::value>() {}
    +
    17 
    +
    18 simdjson_inline field::field(raw_json_string key, ondemand::value &&value) noexcept
    +
    19  : std::pair<raw_json_string, ondemand::value>(key, std::forward<ondemand::value>(value))
    +
    20 {
    +
    21 }
    +
    22 
    +
    23 simdjson_inline simdjson_result<field> field::start(value_iterator &parent_iter) noexcept {
    +
    24  raw_json_string key;
    +
    25  SIMDJSON_TRY( parent_iter.field_key().get(key) );
    +
    26  SIMDJSON_TRY( parent_iter.field_value() );
    +
    27  return field::start(parent_iter, key);
    +
    28 }
    +
    29 
    +
    30 simdjson_inline simdjson_result<field> field::start(const value_iterator &parent_iter, raw_json_string key) noexcept {
    +
    31  return field(key, parent_iter.child());
    +
    32 }
    +
    33 
    +
    34 simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> field::unescaped_key(bool allow_replacement) noexcept {
    +
    35  SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() but Visual Studio won't let us.
    +
    36  simdjson_result<std::string_view> answer = first.unescape(second.iter.json_iter(), allow_replacement);
    +
    37  first.consume();
    +
    38  return answer;
    +
    39 }
    +
    40 
    +
    41 simdjson_inline raw_json_string field::key() const noexcept {
    +
    42  SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() by Visual Studio won't let us.
    +
    43  return first;
    +
    44 }
    +
    45 
    +
    46 simdjson_inline value &field::value() & noexcept {
    +
    47  return second;
    +
    48 }
    49 
    -
    50 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field>::simdjson_result(
    -
    51  SIMDJSON_IMPLEMENTATION::ondemand::field &&value
    -
    52 ) noexcept :
    -
    53  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::field>(
    -
    54  std::forward<SIMDJSON_IMPLEMENTATION::ondemand::field>(value)
    -
    55  )
    -
    56 {
    -
    57 }
    -
    58 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field>::simdjson_result(
    -
    59  error_code error
    -
    60 ) noexcept :
    -
    61  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::field>(error)
    -
    62 {
    -
    63 }
    -
    64 
    -
    65 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field>::key() noexcept {
    -
    66  if (error()) { return error(); }
    -
    67  return first.key();
    -
    68 }
    -
    69 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field>::unescaped_key(bool allow_replacement) noexcept {
    -
    70  if (error()) { return error(); }
    -
    71  return first.unescaped_key(allow_replacement);
    -
    72 }
    -
    73 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field>::value() noexcept {
    -
    74  if (error()) { return error(); }
    -
    75  return std::move(first.value());
    -
    76 }
    -
    77 
    -
    78 } // namespace simdjson
    -
    simdjson_inline raw_json_string key() const noexcept
    Get the key as a raw_json_string.
    Definition: field-inl.h:31
    -
    simdjson_inline simdjson_warn_unused simdjson_result< std::string_view > unescaped_key(bool allow_replacement) noexcept
    Get the key as a string_view (for higher speed, consider raw_key).
    Definition: field-inl.h:24
    -
    simdjson_inline field() noexcept
    Create a new invalid field.
    Definition: field-inl.h:6
    -
    simdjson_inline ondemand::value & value() &noexcept
    Get the field value.
    Definition: field-inl.h:36
    -
    A string escaped per JSON rules, terminated with quote (").
    -
    An ephemeral JSON value returned during iteration.
    Definition: value.h:17
    -
    We want to support argument-dependent lookup (ADL).
    +
    50 simdjson_inline value field::value() && noexcept {
    +
    51  return std::forward<field>(*this).second;
    +
    52 }
    +
    53 
    +
    54 } // namespace ondemand
    +
    55 } // namespace SIMDJSON_IMPLEMENTATION
    +
    56 } // namespace simdjson
    +
    57 
    +
    58 namespace simdjson {
    +
    59 
    +
    60 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field>::simdjson_result(
    +
    61  SIMDJSON_IMPLEMENTATION::ondemand::field &&value
    +
    62 ) noexcept :
    +
    63  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::field>(
    +
    64  std::forward<SIMDJSON_IMPLEMENTATION::ondemand::field>(value)
    +
    65  )
    +
    66 {
    +
    67 }
    +
    68 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field>::simdjson_result(
    +
    69  error_code error
    +
    70 ) noexcept :
    +
    71  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::field>(error)
    +
    72 {
    +
    73 }
    +
    74 
    +
    75 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field>::key() noexcept {
    +
    76  if (error()) { return error(); }
    +
    77  return first.key();
    +
    78 }
    +
    79 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field>::unescaped_key(bool allow_replacement) noexcept {
    +
    80  if (error()) { return error(); }
    +
    81  return first.unescaped_key(allow_replacement);
    +
    82 }
    +
    83 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field>::value() noexcept {
    +
    84  if (error()) { return error(); }
    +
    85  return std::move(first.value());
    +
    86 }
    +
    87 
    +
    88 } // namespace simdjson
    +
    89 
    +
    90 #endif // SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H
    +
    simdjson_inline raw_json_string key() const noexcept
    Get the key as a raw_json_string.
    Definition: field-inl.h:41
    +
    simdjson_inline simdjson_warn_unused simdjson_result< std::string_view > unescaped_key(bool allow_replacement) noexcept
    Get the key as a string_view (for higher speed, consider raw_key).
    Definition: field-inl.h:34
    +
    simdjson_inline field() noexcept
    Create a new invalid field.
    Definition: field-inl.h:16
    +
    simdjson_inline ondemand::value & value() &noexcept
    Get the field value.
    Definition: field-inl.h:46
    +
    A string escaped per JSON rules, terminated with quote (").
    +
    An ephemeral JSON value returned during iteration.
    Definition: value.h:18
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    simdjson_inline T & value() &noexcept(false)
    Get the result value.
    diff --git a/field_8h_source.html b/field_8h_source.html index 4854a2f4f..e3f9713d4 100644 --- a/field_8h_source.html +++ b/field_8h_source.html @@ -91,63 +91,73 @@ $(document).ready(function(){initNavTree('field_8h_source.html',''); initResizab
    field.h
    -
    1 #include "simdjson/error.h"
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_FIELD_H
    2 
    -
    3 namespace simdjson {
    -
    4 namespace SIMDJSON_IMPLEMENTATION {
    -
    5 namespace ondemand {
    -
    6 
    -
    14 class field : public std::pair<raw_json_string, value> {
    -
    15 public:
    -
    21  simdjson_inline field() noexcept;
    -
    22 
    -
    31  simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> unescaped_key(bool allow_replacement) noexcept;
    -
    36  simdjson_inline raw_json_string key() const noexcept;
    -
    40  simdjson_inline ondemand::value &value() & noexcept;
    -
    44  simdjson_inline ondemand::value value() && noexcept;
    -
    45 
    -
    46 protected:
    -
    47  simdjson_inline field(raw_json_string key, ondemand::value &&value) noexcept;
    -
    48  static simdjson_inline simdjson_result<field> start(value_iterator &parent_iter) noexcept;
    -
    49  static simdjson_inline simdjson_result<field> start(const value_iterator &parent_iter, raw_json_string key) noexcept;
    -
    50  friend struct simdjson_result<field>;
    -
    51  friend class object_iterator;
    -
    52 };
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_FIELD_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/implementation_simdjson_result_base.h"
    +
    7 #include "simdjson/generic/ondemand/raw_json_string.h"
    +
    8 #include "simdjson/generic/ondemand/value.h"
    +
    9 #endif // SIMDJSON_AMALGAMATED
    +
    10 
    +
    11 namespace simdjson {
    +
    12 namespace SIMDJSON_IMPLEMENTATION {
    +
    13 namespace ondemand {
    +
    14 
    +
    22 class field : public std::pair<raw_json_string, value> {
    +
    23 public:
    +
    29  simdjson_inline field() noexcept;
    +
    30 
    +
    39  simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> unescaped_key(bool allow_replacement) noexcept;
    +
    44  simdjson_inline raw_json_string key() const noexcept;
    +
    48  simdjson_inline ondemand::value &value() & noexcept;
    +
    52  simdjson_inline ondemand::value value() && noexcept;
    53 
    -
    54 } // namespace ondemand
    -
    55 } // namespace SIMDJSON_IMPLEMENTATION
    -
    56 } // namespace simdjson
    -
    57 
    -
    58 namespace simdjson {
    -
    59 
    -
    60 template<>
    -
    61 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::field> {
    -
    62 public:
    - -
    64  simdjson_inline simdjson_result(error_code error) noexcept;
    -
    65  simdjson_inline simdjson_result() noexcept = default;
    -
    66 
    -
    67  simdjson_inline simdjson_result<std::string_view> unescaped_key(bool allow_replacement = false) noexcept;
    - - -
    70 };
    -
    71 
    -
    72 } // namespace simdjson
    -
    A JSON field (key/value pair) in an object.
    Definition: field.h:14
    -
    simdjson_inline raw_json_string key() const noexcept
    Get the key as a raw_json_string.
    Definition: field-inl.h:31
    -
    simdjson_inline simdjson_warn_unused simdjson_result< std::string_view > unescaped_key(bool allow_replacement) noexcept
    Get the key as a string_view (for higher speed, consider raw_key).
    Definition: field-inl.h:24
    -
    simdjson_inline field() noexcept
    Create a new invalid field.
    Definition: field-inl.h:6
    -
    simdjson_inline ondemand::value & value() &noexcept
    Get the field value.
    Definition: field-inl.h:36
    - -
    A string escaped per JSON rules, terminated with quote (").
    -
    An ephemeral JSON value returned during iteration.
    Definition: value.h:17
    -
    We want to support argument-dependent lookup (ADL).
    +
    54 protected:
    +
    55  simdjson_inline field(raw_json_string key, ondemand::value &&value) noexcept;
    +
    56  static simdjson_inline simdjson_result<field> start(value_iterator &parent_iter) noexcept;
    +
    57  static simdjson_inline simdjson_result<field> start(const value_iterator &parent_iter, raw_json_string key) noexcept;
    +
    58  friend struct simdjson_result<field>;
    +
    59  friend class object_iterator;
    +
    60 };
    +
    61 
    +
    62 } // namespace ondemand
    +
    63 } // namespace SIMDJSON_IMPLEMENTATION
    +
    64 } // namespace simdjson
    +
    65 
    +
    66 namespace simdjson {
    +
    67 
    +
    68 template<>
    +
    69 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::field> {
    +
    70 public:
    + +
    72  simdjson_inline simdjson_result(error_code error) noexcept;
    +
    73  simdjson_inline simdjson_result() noexcept = default;
    +
    74 
    +
    75  simdjson_inline simdjson_result<std::string_view> unescaped_key(bool allow_replacement = false) noexcept;
    + + +
    78 };
    +
    79 
    +
    80 } // namespace simdjson
    +
    81 
    +
    82 #endif // SIMDJSON_GENERIC_ONDEMAND_FIELD_H
    +
    A JSON field (key/value pair) in an object.
    Definition: field.h:22
    +
    simdjson_inline raw_json_string key() const noexcept
    Get the key as a raw_json_string.
    Definition: field-inl.h:41
    +
    simdjson_inline simdjson_warn_unused simdjson_result< std::string_view > unescaped_key(bool allow_replacement) noexcept
    Get the key as a string_view (for higher speed, consider raw_key).
    Definition: field-inl.h:34
    +
    simdjson_inline field() noexcept
    Create a new invalid field.
    Definition: field-inl.h:16
    +
    simdjson_inline ondemand::value & value() &noexcept
    Get the field value.
    Definition: field-inl.h:46
    + +
    A string escaped per JSON rules, terminated with quote (").
    +
    An ephemeral JSON value returned during iteration.
    Definition: value.h:18
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    - - - + + +
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    simdjson_inline T & value() &noexcept(false)
    Get the result value.
    diff --git a/files.html b/files.html index 30a2926a8..ce3721ce7 100644 --- a/files.html +++ b/files.html @@ -96,161 +96,183 @@ $(document).ready(function(){initNavTree('files.html',''); initResizable(); });   include   simdjson   arm64 - begin.h - bitmanipulation.h - bitmask.h - end.h - implementation.h - intrinsics.h - numberparsing.h - simd.h - stringparsing.h -  dom - array-inl.h - array.h - document-inl.h - document.h - document_stream-inl.h - document_stream.h - element-inl.h - element.h - jsonparser.h - object-inl.h - object.h - parsedjson.h - parsedjson_iterator-inl.h - parsedjson_iterator.h - parser-inl.h - parser.h - serialization-inl.h - serialization.h -  fallback - begin.h - bitmanipulation.h - end.h - implementation.h - numberparsing.h - stringparsing.h -  generic -  ondemand - array-inl.h - array.h - array_iterator-inl.h - array_iterator.h - document-inl.h - document.h - document_stream-inl.h - document_stream.h - field-inl.h - field.h - json_iterator-inl.h - json_iterator.h - json_type-inl.h - json_type.h - logger-inl.h - logger.h - object-inl.h - object.h - object_iterator-inl.h - object_iterator.h - parser-inl.h - parser.h - raw_json_string-inl.h - raw_json_string.h - serialization-inl.h - serialization.h - token_iterator-inl.h - token_iterator.h - token_position.h - value-inl.h - value.h - value_iterator-inl.h - value_iterator.h - atomparsing.h - dom_parser_implementation.h - implementation_simdjson_result_base-inl.h - implementation_simdjson_result_base.h - jsoncharutils.h - numberparsing.h - ondemand-inl.h - ondemand.h -  haswell - begin.h - bitmanipulation.h - bitmask.h - end.h - implementation.h - intrinsics.h - numberparsing.h - simd.h - stringparsing.h -  icelake - begin.h - bitmanipulation.h - bitmask.h - end.h - implementation.h - intrinsics.h - numberparsing.h - simd.h - stringparsing.h -  internal - dom_parser_implementation.h - isadetection.h - jsoncharutils_tables.h - jsonformatutils.h - numberparsing_tables.h - simdprune_tables.h - tape_ref-inl.h - tape_ref.h - tape_type.h -  nonstd - string_view.hpp -  ppc64 - begin.h - bitmanipulation.h - bitmask.h - end.h - implementation.h - intrinsics.h - numberparsing.h - simd.h - stringparsing.h -  westmere - begin.h - bitmanipulation.h - bitmask.h - end.h - implementation.h - intrinsics.h - numberparsing.h - simd.h - stringparsing.h - arm64.h - base.h - builtin.h - common_defs.h - compiler_check.h - dom.h - error-inl.h - error.h - fallback.h - haswell.h - icelake.h - implementation-base.hIncludes common stuff needed for implementations + base.h + begin.h + bitmanipulation.h + bitmask.h + end.h + implementation.h + intrinsics.h + numberparsing_defs.h + ondemand.h + simd.h + stringparsing_defs.h +  builtin + base.h + implementation.h + ondemand.h +  dom + array-inl.h + array.h + base.h + document-inl.h + document.h + document_stream-inl.h + document_stream.h + element-inl.h + element.h + jsonparser.h + object-inl.h + object.h + parsedjson.h + parsedjson_iterator-inl.h + parsedjson_iterator.h + parser-inl.h + parser.h + serialization-inl.h + serialization.h +  fallback + base.h + begin.h + bitmanipulation.h + end.h + implementation.h + numberparsing_defs.h + ondemand.h + stringparsing_defs.h +  generic +  ondemand + amalgamated.h + array-inl.h + array.h + array_iterator-inl.h + array_iterator.h + base.h + dependencies.h + document-inl.h + document.h + document_stream-inl.h + document_stream.h + field-inl.h + field.h + json_iterator-inl.h + json_iterator.h + json_type-inl.h + json_type.h + logger-inl.h + logger.h + object-inl.h + object.h + object_iterator-inl.h + object_iterator.h + parser-inl.h + parser.h + raw_json_string-inl.h + raw_json_string.h + serialization-inl.h + serialization.h + token_iterator-inl.h + token_iterator.h + value-inl.h + value.h + value_iterator-inl.h + value_iterator.h + amalgamated.h + atomparsing.h + base.h + dependencies.h + dom_parser_implementation.h + implementation_simdjson_result_base-inl.h + implementation_simdjson_result_base.h + jsoncharutils.h + numberparsing.h +  haswell + base.h + begin.h + bitmanipulation.h + bitmask.h + end.h + implementation.h + intrinsics.h + numberparsing_defs.h + ondemand.h + simd.h + stringparsing_defs.h +  icelake + base.h + begin.h + bitmanipulation.h + bitmask.h + end.h + implementation.h + intrinsics.h + numberparsing_defs.h + ondemand.h + simd.h + stringparsing_defs.h +  internal + atomic_ptr.h + dom_parser_implementation.h + instruction_set.h + isadetection.h + jsoncharutils_tables.h + jsonformatutils.h + numberparsing_tables.h + simdprune_tables.h + tape_ref-inl.h + tape_ref.h + tape_type.h +  nonstd + string_view.hpp +  ppc64 + base.h + begin.h + bitmanipulation.h + bitmask.h + end.h + implementation.h + intrinsics.h + numberparsing_defs.h + ondemand.h + simd.h + stringparsing_defs.h +  westmere + base.h + begin.h + bitmanipulation.h + bitmask.h + end.h + implementation.h + intrinsics.h + numberparsing_defs.h + ondemand.h + simd.h + stringparsing_defs.h + arm64.h + base.h + builtin.h + common_defs.h + compiler_check.h + dom.h + error-inl.h + error.h + fallback.h + haswell.h + icelake.h  implementation.h - implementations.h + implementation_detection.h  jsonioutil.h  minify.h - padded_string-inl.h - padded_string.h - padded_string_view-inl.h - padded_string_view.h - portability.h - ppc64.h - simdjson.h - simdjson_version.h - westmere.h + ondemand.h + padded_string-inl.h + padded_string.h + padded_string_view-inl.h + padded_string_view.h + portability.h + ppc64.h + simdjson.h + simdjson_version.h + westmere.h diff --git a/generic_2base_8h_source.html b/generic_2base_8h_source.html new file mode 100644 index 000000000..dd4c933f1 --- /dev/null +++ b/generic_2base_8h_source.html @@ -0,0 +1,148 @@ + + + + + + + +simdjson: include/simdjson/generic/base.h Source File + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    simdjson +  3.2.1 +
    +
    Ridiculously Fast JSON
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    base.h
    +
    +
    +
    1 #ifndef SIMDJSON_GENERIC_BASE_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_BASE_H
    +
    5 #include "simdjson/base.h"
    +
    6 // If we haven't got an implementation yet, we're in the editor, editing a generic file! Just
    +
    7 // use the most advanced one we can so the most possible stuff can be tested.
    +
    8 #ifndef SIMDJSON_IMPLEMENTATION
    +
    9 #include "simdjson/implementation_detection.h"
    +
    10 #if SIMDJSON_IMPLEMENTATION_ICELAKE
    +
    11 #include "simdjson/icelake/begin.h"
    +
    12 #elif SIMDJSON_IMPLEMENTATION_HASWELL
    +
    13 #include "simdjson/haswell/begin.h"
    +
    14 #elif SIMDJSON_IMPLEMENTATION_WESTMERE
    +
    15 #include "simdjson/westmere/begin.h"
    +
    16 #elif SIMDJSON_IMPLEMENTATION_ARM64
    +
    17 #include "simdjson/arm64/begin.h"
    +
    18 #elif SIMDJSON_IMPLEMENTATION_PPC64
    +
    19 #include "simdjson/ppc64/begin.h"
    +
    20 #elif SIMDJSON_IMPLEMENTATION_FALLBACK
    +
    21 #include "simdjson/fallback/begin.h"
    +
    22 #else
    +
    23 #error "All possible implementations (including fallback) have been disabled! simdjson will not run."
    +
    24 #endif
    +
    25 #endif // SIMDJSON_IMPLEMENTATION
    +
    26 #endif // SIMDJSON_AMALGAMATED
    +
    27 
    +
    28 namespace simdjson {
    +
    29 namespace SIMDJSON_IMPLEMENTATION {
    +
    30 
    +
    31 struct open_container;
    +
    32 class dom_parser_implementation;
    +
    33 
    +
    37 enum class number_type {
    +
    38  floating_point_number=1,
    +
    39  signed_integer,
    +
    40  unsigned_integer
    +
    41 };
    +
    42 
    +
    43 } // namespace SIMDJSON_IMPLEMENTATION
    +
    44 } // namespace simdjson
    +
    45 
    +
    46 #endif // SIMDJSON_GENERIC_BASE_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    +
    + + + + diff --git a/generic_2dom__parser__implementation_8h_source.html b/generic_2dom__parser__implementation_8h_source.html index 6ac50d066..5d2aa4801 100644 --- a/generic_2dom__parser__implementation_8h_source.html +++ b/generic_2dom__parser__implementation_8h_source.html @@ -91,98 +91,105 @@ $(document).ready(function(){initNavTree('generic_2dom__parser__implementation_8
    dom_parser_implementation.h
    -
    1 #include "simdjson/base.h"
    -
    2 #include "simdjson/internal/isadetection.h"
    -
    3 
    -
    4 namespace simdjson {
    -
    5 namespace SIMDJSON_IMPLEMENTATION {
    -
    6 
    -
    7 // expectation: sizeof(open_container) = 64/8.
    -
    8 struct open_container {
    -
    9  uint32_t tape_index; // where, on the tape, does the scope ([,{) begins
    -
    10  uint32_t count; // how many elements in the scope
    -
    11 }; // struct open_container
    -
    12 
    -
    13 static_assert(sizeof(open_container) == 64/8, "Open container must be 64 bits");
    -
    14 
    -
    15 class dom_parser_implementation final : public internal::dom_parser_implementation {
    -
    16 public:
    -
    18  std::unique_ptr<open_container[]> open_containers{};
    -
    20  std::unique_ptr<bool[]> is_array{};
    -
    22  const uint8_t *buf{};
    -
    24  size_t len{0};
    - -
    27 
    -
    28  inline dom_parser_implementation() noexcept;
    - -
    30  inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept;
    - -
    32  dom_parser_implementation &operator=(const dom_parser_implementation &) = delete;
    -
    33 
    -
    34  simdjson_warn_unused error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept final;
    -
    35  simdjson_warn_unused error_code stage1(const uint8_t *buf, size_t len, stage1_mode partial) noexcept final;
    -
    36  simdjson_warn_unused error_code stage2(dom::document &doc) noexcept final;
    -
    37  simdjson_warn_unused error_code stage2_next(dom::document &doc) noexcept final;
    -
    38  simdjson_warn_unused uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept final;
    -
    39  simdjson_warn_unused uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept final;
    -
    40  inline simdjson_warn_unused error_code set_capacity(size_t capacity) noexcept final;
    -
    41  inline simdjson_warn_unused error_code set_max_depth(size_t max_depth) noexcept final;
    -
    42 private:
    -
    43  simdjson_inline simdjson_warn_unused error_code set_capacity_stage1(size_t capacity);
    -
    44 
    -
    45 };
    -
    46 
    -
    47 } // namespace SIMDJSON_IMPLEMENTATION
    -
    48 } // namespace simdjson
    +
    1 #ifndef SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H
    +
    5 #include "simdjson/generic/base.h"
    +
    6 #include "simdjson/internal/dom_parser_implementation.h"
    +
    7 #endif // SIMDJSON_AMALGAMATED
    +
    8 
    +
    9 namespace simdjson {
    +
    10 namespace SIMDJSON_IMPLEMENTATION {
    +
    11 
    +
    12 // expectation: sizeof(open_container) = 64/8.
    + +
    14  uint32_t tape_index; // where, on the tape, does the scope ([,{) begins
    +
    15  uint32_t count; // how many elements in the scope
    +
    16 }; // struct open_container
    +
    17 
    +
    18 static_assert(sizeof(open_container) == 64/8, "Open container must be 64 bits");
    +
    19 
    +
    20 class dom_parser_implementation final : public internal::dom_parser_implementation {
    +
    21 public:
    +
    23  std::unique_ptr<open_container[]> open_containers{};
    +
    25  std::unique_ptr<bool[]> is_array{};
    +
    27  const uint8_t *buf{};
    +
    29  size_t len{0};
    + +
    32 
    +
    33  inline dom_parser_implementation() noexcept;
    + +
    35  inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept;
    + +
    37  dom_parser_implementation &operator=(const dom_parser_implementation &) = delete;
    +
    38 
    +
    39  simdjson_warn_unused error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept final;
    +
    40  simdjson_warn_unused error_code stage1(const uint8_t *buf, size_t len, stage1_mode partial) noexcept final;
    +
    41  simdjson_warn_unused error_code stage2(dom::document &doc) noexcept final;
    +
    42  simdjson_warn_unused error_code stage2_next(dom::document &doc) noexcept final;
    +
    43  simdjson_warn_unused uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept final;
    +
    44  simdjson_warn_unused uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept final;
    +
    45  inline simdjson_warn_unused error_code set_capacity(size_t capacity) noexcept final;
    +
    46  inline simdjson_warn_unused error_code set_max_depth(size_t max_depth) noexcept final;
    +
    47 private:
    +
    48  simdjson_inline simdjson_warn_unused error_code set_capacity_stage1(size_t capacity);
    49 
    -
    50 namespace simdjson {
    -
    51 namespace SIMDJSON_IMPLEMENTATION {
    -
    52 
    -
    53 inline dom_parser_implementation::dom_parser_implementation() noexcept = default;
    - -
    55 inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default;
    -
    56 
    -
    57 // Leaving these here so they can be inlined if so desired
    -
    58 inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept {
    -
    59  if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; }
    -
    60  // Stage 1 index output
    -
    61  size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7;
    -
    62  structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] );
    -
    63  if (!structural_indexes) { _capacity = 0; return MEMALLOC; }
    -
    64  structural_indexes[0] = 0;
    -
    65  n_structural_indexes = 0;
    -
    66 
    -
    67  _capacity = capacity;
    -
    68  return SUCCESS;
    -
    69 }
    -
    70 
    -
    71 inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept {
    -
    72  // Stage 2 stacks
    -
    73  open_containers.reset(new (std::nothrow) open_container[max_depth]);
    -
    74  is_array.reset(new (std::nothrow) bool[max_depth]);
    -
    75  if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; }
    -
    76 
    -
    77  _max_depth = max_depth;
    -
    78  return SUCCESS;
    -
    79 }
    -
    80 
    -
    81 } // namespace SIMDJSON_IMPLEMENTATION
    -
    82 } // namespace simdjson
    - - - - -
    std::unique_ptr< bool[]> is_array
    Whether each open container is a [ or {.
    -
    std::unique_ptr< open_container[]> open_containers
    Tape location of each open { or [.
    -
    A parsed JSON document.
    Definition: document.h:18
    -
    We want to support argument-dependent lookup (ADL).
    +
    50 };
    +
    51 
    +
    52 } // namespace SIMDJSON_IMPLEMENTATION
    +
    53 } // namespace simdjson
    +
    54 
    +
    55 namespace simdjson {
    +
    56 namespace SIMDJSON_IMPLEMENTATION {
    +
    57 
    +
    58 inline dom_parser_implementation::dom_parser_implementation() noexcept = default;
    + +
    60 inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default;
    +
    61 
    +
    62 // Leaving these here so they can be inlined if so desired
    +
    63 inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept {
    +
    64  if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; }
    +
    65  // Stage 1 index output
    +
    66  size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7;
    +
    67  structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] );
    +
    68  if (!structural_indexes) { _capacity = 0; return MEMALLOC; }
    +
    69  structural_indexes[0] = 0;
    +
    70  n_structural_indexes = 0;
    +
    71 
    +
    72  _capacity = capacity;
    +
    73  return SUCCESS;
    +
    74 }
    +
    75 
    +
    76 inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept {
    +
    77  // Stage 2 stacks
    +
    78  open_containers.reset(new (std::nothrow) open_container[max_depth]);
    +
    79  is_array.reset(new (std::nothrow) bool[max_depth]);
    +
    80  if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; }
    +
    81 
    +
    82  _max_depth = max_depth;
    +
    83  return SUCCESS;
    +
    84 }
    +
    85 
    +
    86 } // namespace SIMDJSON_IMPLEMENTATION
    +
    87 } // namespace simdjson
    +
    88 
    +
    89 #endif // SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H
    + + + + +
    std::unique_ptr< bool[]> is_array
    Whether each open container is a [ or {.
    +
    std::unique_ptr< open_container[]> open_containers
    Tape location of each open { or [.
    +
    A parsed JSON document.
    Definition: document.h:16
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    constexpr SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS size_t SIMDJSON_MAXSIZE_BYTES
    The maximum document size supported by simdjson.
    Definition: base.h:20
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ CAPACITY
    This parser can't support a document that big.
    Definition: error.h:19
    @ MEMALLOC
    Error allocating memory, most likely out of memory.
    Definition: error.h:20
    @ SUCCESS
    No error.
    Definition: error.h:18
    -
    constexpr size_t SIMDJSON_MAXSIZE_BYTES
    The maximum document size supported by simdjson.
    Definition: common_defs.h:35
    stage1_mode
    This enum is used with the dom_parser_implementation::stage1 function.
    - +
    diff --git a/generic_2ondemand_2array-inl_8h_source.html b/generic_2ondemand_2array-inl_8h_source.html index 8597725c8..7b4501f74 100644 --- a/generic_2ondemand_2array-inl_8h_source.html +++ b/generic_2ondemand_2array-inl_8h_source.html @@ -91,243 +91,257 @@ $(document).ready(function(){initNavTree('generic_2ondemand_2array-inl_8h_source
    array-inl.h
    -
    1 namespace simdjson {
    -
    2 namespace SIMDJSON_IMPLEMENTATION {
    -
    3 namespace ondemand {
    -
    4 
    -
    5 //
    -
    6 // ### Live States
    -
    7 //
    -
    8 // While iterating or looking up values, depth >= iter->depth. at_start may vary. Error is
    -
    9 // always SUCCESS:
    -
    10 //
    -
    11 // - Start: This is the state when the array is first found and the iterator is just past the `{`.
    -
    12 // In this state, at_start == true.
    -
    13 // - Next: After we hand a scalar value to the user, or an array/object which they then fully
    -
    14 // iterate over, the iterator is at the `,` before the next value (or `]`). In this state,
    -
    15 // depth == iter->depth, at_start == false, and error == SUCCESS.
    -
    16 // - Unfinished Business: When we hand an array/object to the user which they do not fully
    -
    17 // iterate over, we need to finish that iteration by skipping child values until we reach the
    -
    18 // Next state. In this state, depth > iter->depth, at_start == false, and error == SUCCESS.
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/ondemand/array.h"
    +
    7 #include "simdjson/generic/ondemand/array_iterator-inl.h"
    +
    8 #include "simdjson/generic/ondemand/json_iterator.h"
    +
    9 #include "simdjson/generic/ondemand/value.h"
    +
    10 #include "simdjson/generic/ondemand/value_iterator-inl.h"
    +
    11 #endif // SIMDJSON_AMALGAMATED
    +
    12 
    +
    13 namespace simdjson {
    +
    14 namespace SIMDJSON_IMPLEMENTATION {
    +
    15 namespace ondemand {
    +
    16 
    +
    17 //
    +
    18 // ### Live States
    19 //
    -
    20 // ## Error States
    -
    21 //
    -
    22 // In error states, we will yield exactly one more value before stopping. iter->depth == depth
    -
    23 // and at_start is always false. We decrement after yielding the error, moving to the Finished
    -
    24 // state.
    -
    25 //
    -
    26 // - Chained Error: When the array iterator is part of an error chain--for example, in
    -
    27 // `for (auto tweet : doc["tweets"])`, where the tweet element may be missing or not be an
    -
    28 // array--we yield that error in the loop, exactly once. In this state, error != SUCCESS and
    -
    29 // iter->depth == depth, and at_start == false. We decrement depth when we yield the error.
    -
    30 // - Missing Comma Error: When the iterator ++ method discovers there is no comma between elements,
    -
    31 // we flag that as an error and treat it exactly the same as a Chained Error. In this state,
    -
    32 // error == TAPE_ERROR, iter->depth == depth, and at_start == false.
    +
    20 // While iterating or looking up values, depth >= iter->depth. at_start may vary. Error is
    +
    21 // always SUCCESS:
    +
    22 //
    +
    23 // - Start: This is the state when the array is first found and the iterator is just past the `{`.
    +
    24 // In this state, at_start == true.
    +
    25 // - Next: After we hand a scalar value to the user, or an array/object which they then fully
    +
    26 // iterate over, the iterator is at the `,` before the next value (or `]`). In this state,
    +
    27 // depth == iter->depth, at_start == false, and error == SUCCESS.
    +
    28 // - Unfinished Business: When we hand an array/object to the user which they do not fully
    +
    29 // iterate over, we need to finish that iteration by skipping child values until we reach the
    +
    30 // Next state. In this state, depth > iter->depth, at_start == false, and error == SUCCESS.
    +
    31 //
    +
    32 // ## Error States
    33 //
    -
    34 // ## Terminal State
    -
    35 //
    -
    36 // The terminal state has iter->depth < depth. at_start is always false.
    +
    34 // In error states, we will yield exactly one more value before stopping. iter->depth == depth
    +
    35 // and at_start is always false. We decrement after yielding the error, moving to the Finished
    +
    36 // state.
    37 //
    -
    38 // - Finished: When we have reached a `]` or have reported an error, we are finished. We signal this
    -
    39 // by decrementing depth. In this state, iter->depth < depth, at_start == false, and
    -
    40 // error == SUCCESS.
    -
    41 //
    -
    42 
    -
    43 simdjson_inline array::array(const value_iterator &_iter) noexcept
    -
    44  : iter{_iter}
    -
    45 {
    -
    46 }
    -
    47 
    -
    48 simdjson_inline simdjson_result<array> array::start(value_iterator &iter) noexcept {
    -
    49  // We don't need to know if the array is empty to start iteration, but we do want to know if there
    -
    50  // is an error--thus `simdjson_unused`.
    -
    51  simdjson_unused bool has_value;
    -
    52  SIMDJSON_TRY( iter.start_array().get(has_value) );
    -
    53  return array(iter);
    -
    54 }
    -
    55 simdjson_inline simdjson_result<array> array::start_root(value_iterator &iter) noexcept {
    -
    56  simdjson_unused bool has_value;
    -
    57  SIMDJSON_TRY( iter.start_root_array().get(has_value) );
    -
    58  return array(iter);
    -
    59 }
    -
    60 simdjson_inline simdjson_result<array> array::started(value_iterator &iter) noexcept {
    -
    61  bool has_value;
    -
    62  SIMDJSON_TRY(iter.started_array().get(has_value));
    -
    63  return array(iter);
    -
    64 }
    -
    65 
    -
    66 simdjson_inline simdjson_result<array_iterator> array::begin() noexcept {
    -
    67 #if SIMDJSON_DEVELOPMENT_CHECKS
    -
    68  if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; }
    -
    69 #endif
    -
    70  return array_iterator(iter);
    +
    38 // - Chained Error: When the array iterator is part of an error chain--for example, in
    +
    39 // `for (auto tweet : doc["tweets"])`, where the tweet element may be missing or not be an
    +
    40 // array--we yield that error in the loop, exactly once. In this state, error != SUCCESS and
    +
    41 // iter->depth == depth, and at_start == false. We decrement depth when we yield the error.
    +
    42 // - Missing Comma Error: When the iterator ++ method discovers there is no comma between elements,
    +
    43 // we flag that as an error and treat it exactly the same as a Chained Error. In this state,
    +
    44 // error == TAPE_ERROR, iter->depth == depth, and at_start == false.
    +
    45 //
    +
    46 // ## Terminal State
    +
    47 //
    +
    48 // The terminal state has iter->depth < depth. at_start is always false.
    +
    49 //
    +
    50 // - Finished: When we have reached a `]` or have reported an error, we are finished. We signal this
    +
    51 // by decrementing depth. In this state, iter->depth < depth, at_start == false, and
    +
    52 // error == SUCCESS.
    +
    53 //
    +
    54 
    +
    55 simdjson_inline array::array(const value_iterator &_iter) noexcept
    +
    56  : iter{_iter}
    +
    57 {
    +
    58 }
    +
    59 
    +
    60 simdjson_inline simdjson_result<array> array::start(value_iterator &iter) noexcept {
    +
    61  // We don't need to know if the array is empty to start iteration, but we do want to know if there
    +
    62  // is an error--thus `simdjson_unused`.
    +
    63  simdjson_unused bool has_value;
    +
    64  SIMDJSON_TRY( iter.start_array().get(has_value) );
    +
    65  return array(iter);
    +
    66 }
    +
    67 simdjson_inline simdjson_result<array> array::start_root(value_iterator &iter) noexcept {
    +
    68  simdjson_unused bool has_value;
    +
    69  SIMDJSON_TRY( iter.start_root_array().get(has_value) );
    +
    70  return array(iter);
    71 }
    -
    72 simdjson_inline simdjson_result<array_iterator> array::end() noexcept {
    -
    73  return array_iterator(iter);
    -
    74 }
    -
    75 simdjson_inline error_code array::consume() noexcept {
    -
    76  auto error = iter.json_iter().skip_child(iter.depth()-1);
    -
    77  if(error) { iter.abandon(); }
    -
    78  return error;
    -
    79 }
    -
    80 
    - -
    82  const uint8_t * starting_point{iter.peek_start()};
    -
    83  auto error = consume();
    -
    84  if(error) { return error; }
    -
    85  // After 'consume()', we could be left pointing just beyond the document, but that
    -
    86  // is ok because we are not going to dereference the final pointer position, we just
    -
    87  // use it to compute the length in bytes.
    -
    88  const uint8_t * final_point{iter._json_iter->unsafe_pointer()};
    -
    89  return std::string_view(reinterpret_cast<const char*>(starting_point), size_t(final_point - starting_point));
    -
    90 }
    -
    91 
    -
    92 SIMDJSON_PUSH_DISABLE_WARNINGS
    -
    93 SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING
    -
    94 simdjson_inline simdjson_result<size_t> array::count_elements() & noexcept {
    -
    95  size_t count{0};
    -
    96  // Important: we do not consume any of the values.
    -
    97  for(simdjson_unused auto v : *this) { count++; }
    -
    98  // The above loop will always succeed, but we want to report errors.
    -
    99  if(iter.error()) { return iter.error(); }
    -
    100  // We need to move back at the start because we expect users to iterate through
    -
    101  // the array after counting the number of elements.
    -
    102  iter.reset_array();
    -
    103  return count;
    -
    104 }
    -
    105 SIMDJSON_POP_DISABLE_WARNINGS
    -
    106 
    -
    107 simdjson_inline simdjson_result<bool> array::is_empty() & noexcept {
    -
    108  bool is_not_empty;
    -
    109  auto error = iter.reset_array().get(is_not_empty);
    -
    110  if(error) { return error; }
    -
    111  return !is_not_empty;
    -
    112 }
    -
    113 
    -
    114 inline simdjson_result<bool> array::reset() & noexcept {
    -
    115  return iter.reset_array();
    +
    72 simdjson_inline simdjson_result<array> array::started(value_iterator &iter) noexcept {
    +
    73  bool has_value;
    +
    74  SIMDJSON_TRY(iter.started_array().get(has_value));
    +
    75  return array(iter);
    +
    76 }
    +
    77 
    +
    78 simdjson_inline simdjson_result<array_iterator> array::begin() noexcept {
    +
    79 #if SIMDJSON_DEVELOPMENT_CHECKS
    +
    80  if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; }
    +
    81 #endif
    +
    82  return array_iterator(iter);
    +
    83 }
    +
    84 simdjson_inline simdjson_result<array_iterator> array::end() noexcept {
    +
    85  return array_iterator(iter);
    +
    86 }
    +
    87 simdjson_inline error_code array::consume() noexcept {
    +
    88  auto error = iter.json_iter().skip_child(iter.depth()-1);
    +
    89  if(error) { iter.abandon(); }
    +
    90  return error;
    +
    91 }
    +
    92 
    + +
    94  const uint8_t * starting_point{iter.peek_start()};
    +
    95  auto error = consume();
    +
    96  if(error) { return error; }
    +
    97  // After 'consume()', we could be left pointing just beyond the document, but that
    +
    98  // is ok because we are not going to dereference the final pointer position, we just
    +
    99  // use it to compute the length in bytes.
    +
    100  const uint8_t * final_point{iter._json_iter->unsafe_pointer()};
    +
    101  return std::string_view(reinterpret_cast<const char*>(starting_point), size_t(final_point - starting_point));
    +
    102 }
    +
    103 
    +
    104 SIMDJSON_PUSH_DISABLE_WARNINGS
    +
    105 SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING
    +
    106 simdjson_inline simdjson_result<size_t> array::count_elements() & noexcept {
    +
    107  size_t count{0};
    +
    108  // Important: we do not consume any of the values.
    +
    109  for(simdjson_unused auto v : *this) { count++; }
    +
    110  // The above loop will always succeed, but we want to report errors.
    +
    111  if(iter.error()) { return iter.error(); }
    +
    112  // We need to move back at the start because we expect users to iterate through
    +
    113  // the array after counting the number of elements.
    +
    114  iter.reset_array();
    +
    115  return count;
    116 }
    -
    117 
    -
    118 inline simdjson_result<value> array::at_pointer(std::string_view json_pointer) noexcept {
    -
    119  if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; }
    -
    120  json_pointer = json_pointer.substr(1);
    -
    121  // - means "the append position" or "the element after the end of the array"
    -
    122  // We don't support this, because we're returning a real element, not a position.
    -
    123  if (json_pointer == "-") { return INDEX_OUT_OF_BOUNDS; }
    -
    124 
    -
    125  // Read the array index
    -
    126  size_t array_index = 0;
    -
    127  size_t i;
    -
    128  for (i = 0; i < json_pointer.length() && json_pointer[i] != '/'; i++) {
    -
    129  uint8_t digit = uint8_t(json_pointer[i] - '0');
    -
    130  // Check for non-digit in array index. If it's there, we're trying to get a field in an object
    -
    131  if (digit > 9) { return INCORRECT_TYPE; }
    -
    132  array_index = array_index*10 + digit;
    -
    133  }
    -
    134 
    -
    135  // 0 followed by other digits is invalid
    -
    136  if (i > 1 && json_pointer[0] == '0') { return INVALID_JSON_POINTER; } // "JSON pointer array index has other characters after 0"
    -
    137 
    -
    138  // Empty string is invalid; so is a "/" with no digits before it
    -
    139  if (i == 0) { return INVALID_JSON_POINTER; } // "Empty string in JSON pointer array index"
    -
    140  // Get the child
    -
    141  auto child = at(array_index);
    -
    142  // If there is an error, it ends here
    -
    143  if(child.error()) {
    -
    144  return child;
    +
    117 SIMDJSON_POP_DISABLE_WARNINGS
    +
    118 
    +
    119 simdjson_inline simdjson_result<bool> array::is_empty() & noexcept {
    +
    120  bool is_not_empty;
    +
    121  auto error = iter.reset_array().get(is_not_empty);
    +
    122  if(error) { return error; }
    +
    123  return !is_not_empty;
    +
    124 }
    +
    125 
    +
    126 inline simdjson_result<bool> array::reset() & noexcept {
    +
    127  return iter.reset_array();
    +
    128 }
    +
    129 
    +
    130 inline simdjson_result<value> array::at_pointer(std::string_view json_pointer) noexcept {
    +
    131  if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; }
    +
    132  json_pointer = json_pointer.substr(1);
    +
    133  // - means "the append position" or "the element after the end of the array"
    +
    134  // We don't support this, because we're returning a real element, not a position.
    +
    135  if (json_pointer == "-") { return INDEX_OUT_OF_BOUNDS; }
    +
    136 
    +
    137  // Read the array index
    +
    138  size_t array_index = 0;
    +
    139  size_t i;
    +
    140  for (i = 0; i < json_pointer.length() && json_pointer[i] != '/'; i++) {
    +
    141  uint8_t digit = uint8_t(json_pointer[i] - '0');
    +
    142  // Check for non-digit in array index. If it's there, we're trying to get a field in an object
    +
    143  if (digit > 9) { return INCORRECT_TYPE; }
    +
    144  array_index = array_index*10 + digit;
    145  }
    146 
    -
    147  // If there is a /, we're not done yet, call recursively.
    -
    148  if (i < json_pointer.length()) {
    -
    149  child = child.at_pointer(json_pointer.substr(i));
    -
    150  }
    -
    151  return child;
    -
    152 }
    -
    153 
    -
    154 simdjson_inline simdjson_result<value> array::at(size_t index) noexcept {
    -
    155  size_t i = 0;
    -
    156  for (auto value : *this) {
    -
    157  if (i == index) { return value; }
    -
    158  i++;
    -
    159  }
    -
    160  return INDEX_OUT_OF_BOUNDS;
    -
    161 }
    -
    162 
    -
    163 } // namespace ondemand
    -
    164 } // namespace SIMDJSON_IMPLEMENTATION
    -
    165 } // namespace simdjson
    -
    166 
    -
    167 namespace simdjson {
    -
    168 
    -
    169 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::simdjson_result(
    -
    170  SIMDJSON_IMPLEMENTATION::ondemand::array &&value
    -
    171 ) noexcept
    -
    172  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array>(
    -
    173  std::forward<SIMDJSON_IMPLEMENTATION::ondemand::array>(value)
    -
    174  )
    -
    175 {
    -
    176 }
    -
    177 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::simdjson_result(
    -
    178  error_code error
    -
    179 ) noexcept
    -
    180  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array>(error)
    -
    181 {
    -
    182 }
    -
    183 
    -
    184 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::begin() noexcept {
    -
    185  if (error()) { return error(); }
    -
    186  return first.begin();
    -
    187 }
    -
    188 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::end() noexcept {
    -
    189  if (error()) { return error(); }
    -
    190  return first.end();
    -
    191 }
    -
    192 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::count_elements() & noexcept {
    -
    193  if (error()) { return error(); }
    -
    194  return first.count_elements();
    -
    195 }
    -
    196 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::is_empty() & noexcept {
    -
    197  if (error()) { return error(); }
    -
    198  return first.is_empty();
    +
    147  // 0 followed by other digits is invalid
    +
    148  if (i > 1 && json_pointer[0] == '0') { return INVALID_JSON_POINTER; } // "JSON pointer array index has other characters after 0"
    +
    149 
    +
    150  // Empty string is invalid; so is a "/" with no digits before it
    +
    151  if (i == 0) { return INVALID_JSON_POINTER; } // "Empty string in JSON pointer array index"
    +
    152  // Get the child
    +
    153  auto child = at(array_index);
    +
    154  // If there is an error, it ends here
    +
    155  if(child.error()) {
    +
    156  return child;
    +
    157  }
    +
    158 
    +
    159  // If there is a /, we're not done yet, call recursively.
    +
    160  if (i < json_pointer.length()) {
    +
    161  child = child.at_pointer(json_pointer.substr(i));
    +
    162  }
    +
    163  return child;
    +
    164 }
    +
    165 
    +
    166 simdjson_inline simdjson_result<value> array::at(size_t index) noexcept {
    +
    167  size_t i = 0;
    +
    168  for (auto value : *this) {
    +
    169  if (i == index) { return value; }
    +
    170  i++;
    +
    171  }
    +
    172  return INDEX_OUT_OF_BOUNDS;
    +
    173 }
    +
    174 
    +
    175 } // namespace ondemand
    +
    176 } // namespace SIMDJSON_IMPLEMENTATION
    +
    177 } // namespace simdjson
    +
    178 
    +
    179 namespace simdjson {
    +
    180 
    +
    181 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::simdjson_result(
    +
    182  SIMDJSON_IMPLEMENTATION::ondemand::array &&value
    +
    183 ) noexcept
    +
    184  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array>(
    +
    185  std::forward<SIMDJSON_IMPLEMENTATION::ondemand::array>(value)
    +
    186  )
    +
    187 {
    +
    188 }
    +
    189 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::simdjson_result(
    +
    190  error_code error
    +
    191 ) noexcept
    +
    192  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array>(error)
    +
    193 {
    +
    194 }
    +
    195 
    +
    196 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::begin() noexcept {
    +
    197  if (error()) { return error(); }
    +
    198  return first.begin();
    199 }
    -
    200 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::at(size_t index) noexcept {
    -
    201  if (error()) { return error(); }
    -
    202  return first.at(index);
    +
    200 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::end() noexcept {
    +
    201  if (error()) { return error(); }
    +
    202  return first.end();
    203 }
    -
    204 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::at_pointer(std::string_view json_pointer) noexcept {
    +
    204 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::count_elements() & noexcept {
    205  if (error()) { return error(); }
    -
    206  return first.at_pointer(json_pointer);
    +
    206  return first.count_elements();
    207 }
    -
    208 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::raw_json() noexcept {
    -
    209  if (error()) { return error(); }
    -
    210  return first.raw_json();
    +
    208 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::is_empty() & noexcept {
    +
    209  if (error()) { return error(); }
    +
    210  return first.is_empty();
    211 }
    -
    212 } // namespace simdjson
    - - -
    simdjson_inline simdjson_result< value > at(size_t index) noexcept
    Get the value at the given index.
    Definition: array-inl.h:154
    -
    value_iterator iter
    Iterator marking current position.
    Definition: array.h:160
    -
    simdjson_inline simdjson_result< bool > is_empty() &noexcept
    This method scans the beginning of the array and checks whether the array is empty.
    Definition: array-inl.h:107
    -
    simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
    Get the value associated with the given JSON pointer.
    Definition: array-inl.h:118
    -
    static simdjson_inline simdjson_result< array > start(value_iterator &iter) noexcept
    Begin array iteration.
    Definition: array-inl.h:48
    -
    simdjson_inline simdjson_result< array_iterator > begin() noexcept
    Begin array iteration.
    Definition: array-inl.h:66
    +
    212 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::at(size_t index) noexcept {
    +
    213  if (error()) { return error(); }
    +
    214  return first.at(index);
    +
    215 }
    +
    216 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::at_pointer(std::string_view json_pointer) noexcept {
    +
    217  if (error()) { return error(); }
    +
    218  return first.at_pointer(json_pointer);
    +
    219 }
    +
    220 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array>::raw_json() noexcept {
    +
    221  if (error()) { return error(); }
    +
    222  return first.raw_json();
    +
    223 }
    +
    224 } // namespace simdjson
    +
    225 
    +
    226 #endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H
    + + +
    simdjson_inline simdjson_result< value > at(size_t index) noexcept
    Get the value at the given index.
    Definition: array-inl.h:166
    +
    value_iterator iter
    Iterator marking current position.
    Definition: array.h:164
    +
    simdjson_inline simdjson_result< bool > is_empty() &noexcept
    This method scans the beginning of the array and checks whether the array is empty.
    Definition: array-inl.h:119
    +
    simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
    Get the value associated with the given JSON pointer.
    Definition: array-inl.h:130
    +
    static simdjson_inline simdjson_result< array > start(value_iterator &iter) noexcept
    Begin array iteration.
    Definition: array-inl.h:60
    +
    simdjson_inline simdjson_result< array_iterator > begin() noexcept
    Begin array iteration.
    Definition: array-inl.h:78
    simdjson_inline array() noexcept=default
    Create a new invalid array.
    -
    simdjson_inline error_code consume() noexcept
    Go to the end of the array, no matter where you are right now.
    Definition: array-inl.h:75
    -
    simdjson_inline simdjson_result< size_t > count_elements() &noexcept
    This method scans the array and counts the number of elements.
    Definition: array-inl.h:94
    -
    static simdjson_inline simdjson_result< array > start_root(value_iterator &iter) noexcept
    Begin array iteration from the root.
    Definition: array-inl.h:55
    -
    static simdjson_inline simdjson_result< array > started(value_iterator &iter) noexcept
    Begin array iteration.
    Definition: array-inl.h:60
    -
    simdjson_inline simdjson_result< std::string_view > raw_json() noexcept
    Consumes the array and returns a string_view instance corresponding to the array as represented in JS...
    Definition: array-inl.h:81
    -
    simdjson_inline simdjson_result< array_iterator > end() noexcept
    Sentinel representing the end of the array.
    Definition: array-inl.h:72
    -
    simdjson_result< bool > reset() &noexcept
    Reset the iterator so that we are pointing back at the beginning of the array.
    Definition: array-inl.h:114
    -
    An ephemeral JSON value returned during iteration.
    Definition: value.h:17
    -
    We want to support argument-dependent lookup (ADL).
    +
    simdjson_inline error_code consume() noexcept
    Go to the end of the array, no matter where you are right now.
    Definition: array-inl.h:87
    +
    simdjson_inline simdjson_result< size_t > count_elements() &noexcept
    This method scans the array and counts the number of elements.
    Definition: array-inl.h:106
    +
    static simdjson_inline simdjson_result< array > start_root(value_iterator &iter) noexcept
    Begin array iteration from the root.
    Definition: array-inl.h:67
    +
    static simdjson_inline simdjson_result< array > started(value_iterator &iter) noexcept
    Begin array iteration.
    Definition: array-inl.h:72
    +
    simdjson_inline simdjson_result< std::string_view > raw_json() noexcept
    Consumes the array and returns a string_view instance corresponding to the array as represented in JS...
    Definition: array-inl.h:93
    +
    simdjson_inline simdjson_result< array_iterator > end() noexcept
    Sentinel representing the end of the array.
    Definition: array-inl.h:84
    +
    simdjson_result< bool > reset() &noexcept
    Reset the iterator so that we are pointing back at the beginning of the array.
    Definition: array-inl.h:126
    +
    An ephemeral JSON value returned during iteration.
    Definition: value.h:18
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ INCORRECT_TYPE
    JSON element has a different type than user expected.
    Definition: error.h:34
    @ OUT_OF_ORDER_ITERATION
    tried to iterate an array or object out of order
    Definition: error.h:43
    @ INDEX_OUT_OF_BOUNDS
    JSON array index too large.
    Definition: error.h:36
    @ INVALID_JSON_POINTER
    Invalid JSON pointer reference.
    Definition: error.h:39
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    diff --git a/generic_2ondemand_2array_8h_source.html b/generic_2ondemand_2array_8h_source.html index f6c096459..8cf63708f 100644 --- a/generic_2ondemand_2array_8h_source.html +++ b/generic_2ondemand_2array_8h_source.html @@ -91,96 +91,102 @@ $(document).ready(function(){initNavTree('generic_2ondemand_2array_8h_source.htm
    array.h
    -
    1 #include "simdjson/error.h"
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_H
    2 
    -
    3 namespace simdjson {
    -
    4 namespace SIMDJSON_IMPLEMENTATION {
    -
    5 namespace ondemand {
    -
    6 
    -
    7 class value;
    -
    8 class document;
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/implementation_simdjson_result_base.h"
    +
    7 #include "simdjson/generic/ondemand/value_iterator.h"
    +
    8 #endif // SIMDJSON_AMALGAMATED
    9 
    -
    13 class array {
    -
    14 public:
    -
    20  simdjson_inline array() noexcept = default;
    -
    21 
    -
    27  simdjson_inline simdjson_result<array_iterator> begin() noexcept;
    -
    33  simdjson_inline simdjson_result<array_iterator> end() noexcept;
    -
    48  simdjson_inline simdjson_result<size_t> count_elements() & noexcept;
    -
    58  simdjson_inline simdjson_result<bool> is_empty() & noexcept;
    -
    69  inline simdjson_result<bool> reset() & noexcept;
    -
    98  inline simdjson_result<value> at_pointer(std::string_view json_pointer) noexcept;
    -
    103  simdjson_inline simdjson_result<std::string_view> raw_json() noexcept;
    -
    104 
    -
    112  simdjson_inline simdjson_result<value> at(size_t index) noexcept;
    -
    113 protected:
    -
    117  simdjson_inline error_code consume() noexcept;
    -
    118 
    -
    126  static simdjson_inline simdjson_result<array> start(value_iterator &iter) noexcept;
    -
    135  static simdjson_inline simdjson_result<array> start_root(value_iterator &iter) noexcept;
    -
    144  static simdjson_inline simdjson_result<array> started(value_iterator &iter) noexcept;
    -
    145 
    -
    153  simdjson_inline array(const value_iterator &iter) noexcept;
    -
    154 
    -
    160  value_iterator iter{};
    -
    161 
    -
    162  friend class value;
    -
    163  friend class document;
    -
    164  friend struct simdjson_result<value>;
    -
    165  friend struct simdjson_result<array>;
    -
    166  friend class array_iterator;
    -
    167 };
    -
    168 
    -
    169 } // namespace ondemand
    -
    170 } // namespace SIMDJSON_IMPLEMENTATION
    -
    171 } // namespace simdjson
    +
    10 namespace simdjson {
    +
    11 namespace SIMDJSON_IMPLEMENTATION {
    +
    12 namespace ondemand {
    +
    13 
    +
    17 class array {
    +
    18 public:
    +
    24  simdjson_inline array() noexcept = default;
    +
    25 
    +
    31  simdjson_inline simdjson_result<array_iterator> begin() noexcept;
    +
    37  simdjson_inline simdjson_result<array_iterator> end() noexcept;
    +
    52  simdjson_inline simdjson_result<size_t> count_elements() & noexcept;
    +
    62  simdjson_inline simdjson_result<bool> is_empty() & noexcept;
    +
    73  inline simdjson_result<bool> reset() & noexcept;
    +
    102  inline simdjson_result<value> at_pointer(std::string_view json_pointer) noexcept;
    +
    107  simdjson_inline simdjson_result<std::string_view> raw_json() noexcept;
    +
    108 
    +
    116  simdjson_inline simdjson_result<value> at(size_t index) noexcept;
    +
    117 protected:
    +
    121  simdjson_inline error_code consume() noexcept;
    +
    122 
    +
    130  static simdjson_inline simdjson_result<array> start(value_iterator &iter) noexcept;
    +
    139  static simdjson_inline simdjson_result<array> start_root(value_iterator &iter) noexcept;
    +
    148  static simdjson_inline simdjson_result<array> started(value_iterator &iter) noexcept;
    +
    149 
    +
    157  simdjson_inline array(const value_iterator &iter) noexcept;
    +
    158 
    +
    164  value_iterator iter{};
    +
    165 
    +
    166  friend class value;
    +
    167  friend class document;
    +
    168  friend struct simdjson_result<value>;
    +
    169  friend struct simdjson_result<array>;
    +
    170  friend class array_iterator;
    +
    171 };
    172 
    -
    173 namespace simdjson {
    -
    174 
    -
    175 template<>
    -
    176 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array> {
    -
    177 public:
    - -
    179  simdjson_inline simdjson_result(error_code error) noexcept;
    -
    180  simdjson_inline simdjson_result() noexcept = default;
    -
    181 
    - - -
    184  inline simdjson_result<size_t> count_elements() & noexcept;
    -
    185  inline simdjson_result<bool> is_empty() & noexcept;
    -
    186  inline simdjson_result<bool> reset() & noexcept;
    -
    187  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at(size_t index) noexcept;
    -
    188  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at_pointer(std::string_view json_pointer) noexcept;
    -
    189  simdjson_inline simdjson_result<std::string_view> raw_json() noexcept;
    -
    190 
    -
    191 };
    -
    192 
    -
    193 } // namespace simdjson
    - - -
    simdjson_inline simdjson_result< value > at(size_t index) noexcept
    Get the value at the given index.
    Definition: array-inl.h:154
    -
    value_iterator iter
    Iterator marking current position.
    Definition: array.h:160
    -
    simdjson_inline simdjson_result< bool > is_empty() &noexcept
    This method scans the beginning of the array and checks whether the array is empty.
    Definition: array-inl.h:107
    -
    simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
    Get the value associated with the given JSON pointer.
    Definition: array-inl.h:118
    -
    static simdjson_inline simdjson_result< array > start(value_iterator &iter) noexcept
    Begin array iteration.
    Definition: array-inl.h:48
    -
    simdjson_inline simdjson_result< array_iterator > begin() noexcept
    Begin array iteration.
    Definition: array-inl.h:66
    +
    173 } // namespace ondemand
    +
    174 } // namespace SIMDJSON_IMPLEMENTATION
    +
    175 } // namespace simdjson
    +
    176 
    +
    177 namespace simdjson {
    +
    178 
    +
    179 template<>
    +
    180 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::array> {
    +
    181 public:
    + +
    183  simdjson_inline simdjson_result(error_code error) noexcept;
    +
    184  simdjson_inline simdjson_result() noexcept = default;
    +
    185 
    + + +
    188  inline simdjson_result<size_t> count_elements() & noexcept;
    +
    189  inline simdjson_result<bool> is_empty() & noexcept;
    +
    190  inline simdjson_result<bool> reset() & noexcept;
    +
    191  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at(size_t index) noexcept;
    +
    192  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at_pointer(std::string_view json_pointer) noexcept;
    +
    193  simdjson_inline simdjson_result<std::string_view> raw_json() noexcept;
    +
    194 
    +
    195 };
    +
    196 
    +
    197 } // namespace simdjson
    +
    198 
    +
    199 #endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_H
    + + +
    simdjson_inline simdjson_result< value > at(size_t index) noexcept
    Get the value at the given index.
    Definition: array-inl.h:166
    +
    value_iterator iter
    Iterator marking current position.
    Definition: array.h:164
    +
    simdjson_inline simdjson_result< bool > is_empty() &noexcept
    This method scans the beginning of the array and checks whether the array is empty.
    Definition: array-inl.h:119
    +
    simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
    Get the value associated with the given JSON pointer.
    Definition: array-inl.h:130
    +
    static simdjson_inline simdjson_result< array > start(value_iterator &iter) noexcept
    Begin array iteration.
    Definition: array-inl.h:60
    +
    simdjson_inline simdjson_result< array_iterator > begin() noexcept
    Begin array iteration.
    Definition: array-inl.h:78
    simdjson_inline array() noexcept=default
    Create a new invalid array.
    -
    simdjson_inline error_code consume() noexcept
    Go to the end of the array, no matter where you are right now.
    Definition: array-inl.h:75
    -
    simdjson_inline simdjson_result< size_t > count_elements() &noexcept
    This method scans the array and counts the number of elements.
    Definition: array-inl.h:94
    -
    static simdjson_inline simdjson_result< array > start_root(value_iterator &iter) noexcept
    Begin array iteration from the root.
    Definition: array-inl.h:55
    -
    static simdjson_inline simdjson_result< array > started(value_iterator &iter) noexcept
    Begin array iteration.
    Definition: array-inl.h:60
    -
    simdjson_inline simdjson_result< std::string_view > raw_json() noexcept
    Consumes the array and returns a string_view instance corresponding to the array as represented in JS...
    Definition: array-inl.h:81
    -
    simdjson_inline simdjson_result< array_iterator > end() noexcept
    Sentinel representing the end of the array.
    Definition: array-inl.h:72
    -
    simdjson_result< bool > reset() &noexcept
    Reset the iterator so that we are pointing back at the beginning of the array.
    Definition: array-inl.h:114
    - -
    An ephemeral JSON value returned during iteration.
    Definition: value.h:17
    -
    We want to support argument-dependent lookup (ADL).
    +
    simdjson_inline error_code consume() noexcept
    Go to the end of the array, no matter where you are right now.
    Definition: array-inl.h:87
    +
    simdjson_inline simdjson_result< size_t > count_elements() &noexcept
    This method scans the array and counts the number of elements.
    Definition: array-inl.h:106
    +
    static simdjson_inline simdjson_result< array > start_root(value_iterator &iter) noexcept
    Begin array iteration from the root.
    Definition: array-inl.h:67
    +
    static simdjson_inline simdjson_result< array > started(value_iterator &iter) noexcept
    Begin array iteration.
    Definition: array-inl.h:72
    +
    simdjson_inline simdjson_result< std::string_view > raw_json() noexcept
    Consumes the array and returns a string_view instance corresponding to the array as represented in JS...
    Definition: array-inl.h:93
    +
    simdjson_inline simdjson_result< array_iterator > end() noexcept
    Sentinel representing the end of the array.
    Definition: array-inl.h:84
    +
    simdjson_result< bool > reset() &noexcept
    Reset the iterator so that we are pointing back at the beginning of the array.
    Definition: array-inl.h:126
    + +
    An ephemeral JSON value returned during iteration.
    Definition: value.h:18
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    - - - + + +
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    simdjson_inline T & value() &noexcept(false)
    Get the result value.
    diff --git a/generic_2ondemand_2base_8h_source.html b/generic_2ondemand_2base_8h_source.html new file mode 100644 index 000000000..96f0bdba2 --- /dev/null +++ b/generic_2ondemand_2base_8h_source.html @@ -0,0 +1,158 @@ + + + + + + + +simdjson: include/simdjson/generic/ondemand/base.h Source File + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    simdjson +  3.2.1 +
    +
    Ridiculously Fast JSON
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    base.h
    +
    +
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_BASE_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_BASE_H
    +
    5 #include "simdjson/generic/base.h"
    +
    6 #endif // SIMDJSON_AMALGAMATED
    +
    7 
    +
    8 namespace simdjson {
    +
    9 namespace SIMDJSON_IMPLEMENTATION {
    +
    15 namespace ondemand {
    +
    16 
    +
    18 using depth_t = int32_t;
    +
    19 
    +
    21 using number_type = simdjson::SIMDJSON_IMPLEMENTATION::number_type;
    +
    22 
    +
    24 using token_position = const uint32_t *;
    +
    25 
    +
    26 class array;
    +
    27 class array_iterator;
    +
    28 class document;
    +
    29 class document_reference;
    +
    30 class document_stream;
    +
    31 class field;
    +
    32 class json_iterator;
    +
    33 enum class json_type;
    +
    34 struct number;
    +
    35 class object;
    +
    36 class object_iterator;
    +
    37 class parser;
    +
    38 class raw_json_string;
    +
    39 class token_iterator;
    +
    40 class value;
    +
    41 class value_iterator;
    +
    42 
    +
    43 } // namespace ondemand
    +
    44 } // namespace SIMDJSON_IMPLEMENTATION
    +
    45 } // namespace simdjson
    +
    46 
    +
    47 #endif // SIMDJSON_GENERIC_ONDEMAND_BASE_H
    + + +
    A document_reference is a thin wrapper around a document reference instance.
    Definition: document.h:605
    + + +
    A JSON field (key/value pair) in an object.
    Definition: field.h:22
    + +
    A forward-only JSON object field iterator.
    Definition: object.h:17
    + +
    A string escaped per JSON rules, terminated with quote (").
    +
    An ephemeral JSON value returned during iteration.
    Definition: value.h:18
    +
    json_type
    The type of a JSON value.
    Definition: json_type.h:17
    +
    int32_t depth_t
    Represents the depth of a JSON value (number of nested arrays/objects).
    Definition: base.h:18
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    A type representing a JSON number.
    Definition: json_type.h:32
    +
    +
    + + + + diff --git a/generic_2ondemand_2document-inl_8h_source.html b/generic_2ondemand_2document-inl_8h_source.html index d2a6fc32c..594517619 100644 --- a/generic_2ondemand_2document-inl_8h_source.html +++ b/generic_2ondemand_2document-inl_8h_source.html @@ -91,847 +91,865 @@ $(document).ready(function(){initNavTree('generic_2ondemand_2document-inl_8h_sou
    document-inl.h
    -
    1 namespace simdjson {
    -
    2 namespace SIMDJSON_IMPLEMENTATION {
    -
    3 namespace ondemand {
    -
    4 
    -
    5 simdjson_inline document::document(ondemand::json_iterator &&_iter) noexcept
    -
    6  : iter{std::forward<json_iterator>(_iter)}
    -
    7 {
    -
    8  logger::log_start_value(iter, "document");
    -
    9 }
    -
    10 
    -
    11 simdjson_inline document document::start(json_iterator &&iter) noexcept {
    -
    12  return document(std::forward<json_iterator>(iter));
    -
    13 }
    -
    14 
    -
    15 inline void document::rewind() noexcept {
    -
    16  iter.rewind();
    -
    17 }
    -
    18 
    -
    19 inline std::string document::to_debug_string() noexcept {
    -
    20  return iter.to_string();
    -
    21 }
    -
    22 
    - -
    24  return iter.current_location();
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/ondemand/array-inl.h"
    +
    7 #include "simdjson/generic/ondemand/array_iterator.h"
    +
    8 #include "simdjson/generic/ondemand/document.h"
    +
    9 #include "simdjson/generic/ondemand/json_iterator-inl.h"
    +
    10 #include "simdjson/generic/ondemand/json_type.h"
    +
    11 #include "simdjson/generic/ondemand/object-inl.h"
    +
    12 #include "simdjson/generic/ondemand/raw_json_string.h"
    +
    13 #include "simdjson/generic/ondemand/value.h"
    +
    14 #include "simdjson/generic/ondemand/value_iterator-inl.h"
    +
    15 #endif // SIMDJSON_AMALGAMATED
    +
    16 
    +
    17 namespace simdjson {
    +
    18 namespace SIMDJSON_IMPLEMENTATION {
    +
    19 namespace ondemand {
    +
    20 
    +
    21 simdjson_inline document::document(ondemand::json_iterator &&_iter) noexcept
    +
    22  : iter{std::forward<json_iterator>(_iter)}
    +
    23 {
    +
    24  logger::log_start_value(iter, "document");
    25 }
    26 
    -
    27 inline int32_t document::current_depth() const noexcept {
    -
    28  return iter.depth();
    +
    27 simdjson_inline document document::start(json_iterator &&iter) noexcept {
    +
    28  return document(std::forward<json_iterator>(iter));
    29 }
    30 
    -
    31 inline bool document::at_end() const noexcept {
    -
    32  return iter.at_end();
    +
    31 inline void document::rewind() noexcept {
    +
    32  iter.rewind();
    33 }
    34 
    -
    35 
    -
    36 inline bool document::is_alive() noexcept {
    -
    37  return iter.is_alive();
    -
    38 }
    -
    39 simdjson_inline value_iterator document::resume_value_iterator() noexcept {
    -
    40  return value_iterator(&iter, 1, iter.root_position());
    +
    35 inline std::string document::to_debug_string() noexcept {
    +
    36  return iter.to_string();
    +
    37 }
    +
    38 
    + +
    40  return iter.current_location();
    41 }
    -
    42 simdjson_inline value_iterator document::get_root_value_iterator() noexcept {
    -
    43  return resume_value_iterator();
    -
    44 }
    -
    45 simdjson_inline simdjson_result<object> document::start_or_resume_object() noexcept {
    -
    46  if (iter.at_root()) {
    -
    47  return get_object();
    -
    48  } else {
    -
    49  return object::resume(resume_value_iterator());
    -
    50  }
    -
    51 }
    -
    52 simdjson_inline simdjson_result<value> document::get_value() noexcept {
    -
    53  // Make sure we start any arrays or objects before returning, so that start_root_<object/array>()
    -
    54  // gets called.
    -
    55  iter.assert_at_document_depth();
    -
    56  switch (*iter.peek()) {
    -
    57  case '[': {
    -
    58  // The following lines check that the document ends with ].
    -
    59  auto value_iterator = get_root_value_iterator();
    -
    60  auto error = value_iterator.check_root_array();
    -
    61  if(error) { return error; }
    -
    62  return value(get_root_value_iterator());
    -
    63  }
    -
    64  case '{': {
    -
    65  // The following lines would check that the document ends with }.
    -
    66  auto value_iterator = get_root_value_iterator();
    -
    67  auto error = value_iterator.check_root_object();
    -
    68  if(error) { return error; }
    -
    69  return value(get_root_value_iterator());
    -
    70  }
    -
    71  default:
    -
    72  // Unfortunately, scalar documents are a special case in simdjson and they cannot
    -
    73  // be safely converted to value instances.
    - -
    75  }
    -
    76 }
    -
    77 simdjson_inline simdjson_result<array> document::get_array() & noexcept {
    -
    78  auto value = get_root_value_iterator();
    -
    79  return array::start_root(value);
    -
    80 }
    -
    81 simdjson_inline simdjson_result<object> document::get_object() & noexcept {
    -
    82  auto value = get_root_value_iterator();
    -
    83  return object::start_root(value);
    -
    84 }
    -
    85 
    -
    94 simdjson_inline simdjson_result<uint64_t> document::get_uint64() noexcept {
    -
    95  return get_root_value_iterator().get_root_uint64(true);
    +
    42 
    +
    43 inline int32_t document::current_depth() const noexcept {
    +
    44  return iter.depth();
    +
    45 }
    +
    46 
    +
    47 inline bool document::at_end() const noexcept {
    +
    48  return iter.at_end();
    +
    49 }
    +
    50 
    +
    51 
    +
    52 inline bool document::is_alive() noexcept {
    +
    53  return iter.is_alive();
    +
    54 }
    +
    55 simdjson_inline value_iterator document::resume_value_iterator() noexcept {
    +
    56  return value_iterator(&iter, 1, iter.root_position());
    +
    57 }
    +
    58 simdjson_inline value_iterator document::get_root_value_iterator() noexcept {
    +
    59  return resume_value_iterator();
    +
    60 }
    +
    61 simdjson_inline simdjson_result<object> document::start_or_resume_object() noexcept {
    +
    62  if (iter.at_root()) {
    +
    63  return get_object();
    +
    64  } else {
    +
    65  return object::resume(resume_value_iterator());
    +
    66  }
    +
    67 }
    +
    68 simdjson_inline simdjson_result<value> document::get_value() noexcept {
    +
    69  // Make sure we start any arrays or objects before returning, so that start_root_<object/array>()
    +
    70  // gets called.
    +
    71  iter.assert_at_document_depth();
    +
    72  switch (*iter.peek()) {
    +
    73  case '[': {
    +
    74  // The following lines check that the document ends with ].
    +
    75  auto value_iterator = get_root_value_iterator();
    +
    76  auto error = value_iterator.check_root_array();
    +
    77  if(error) { return error; }
    +
    78  return value(get_root_value_iterator());
    +
    79  }
    +
    80  case '{': {
    +
    81  // The following lines would check that the document ends with }.
    +
    82  auto value_iterator = get_root_value_iterator();
    +
    83  auto error = value_iterator.check_root_object();
    +
    84  if(error) { return error; }
    +
    85  return value(get_root_value_iterator());
    +
    86  }
    +
    87  default:
    +
    88  // Unfortunately, scalar documents are a special case in simdjson and they cannot
    +
    89  // be safely converted to value instances.
    + +
    91  }
    +
    92 }
    +
    93 simdjson_inline simdjson_result<array> document::get_array() & noexcept {
    +
    94  auto value = get_root_value_iterator();
    +
    95  return array::start_root(value);
    96 }
    - -
    98  return get_root_value_iterator().get_root_uint64_in_string(true);
    -
    99 }
    -
    100 simdjson_inline simdjson_result<int64_t> document::get_int64() noexcept {
    -
    101  return get_root_value_iterator().get_root_int64(true);
    -
    102 }
    - -
    104  return get_root_value_iterator().get_root_int64_in_string(true);
    -
    105 }
    -
    106 simdjson_inline simdjson_result<double> document::get_double() noexcept {
    -
    107  return get_root_value_iterator().get_root_double(true);
    -
    108 }
    - -
    110  return get_root_value_iterator().get_root_double_in_string(true);
    -
    111 }
    -
    112 simdjson_inline simdjson_result<std::string_view> document::get_string(bool allow_replacement) noexcept {
    -
    113  return get_root_value_iterator().get_root_string(true, allow_replacement);
    -
    114 }
    - -
    116  return get_root_value_iterator().get_root_wobbly_string(true);
    -
    117 }
    - -
    119  return get_root_value_iterator().get_root_raw_json_string(true);
    -
    120 }
    -
    121 simdjson_inline simdjson_result<bool> document::get_bool() noexcept {
    -
    122  return get_root_value_iterator().get_root_bool(true);
    -
    123 }
    -
    124 simdjson_inline simdjson_result<bool> document::is_null() noexcept {
    -
    125  return get_root_value_iterator().is_root_null(true);
    -
    126 }
    -
    127 
    -
    128 template<> simdjson_inline simdjson_result<array> document::get() & noexcept { return get_array(); }
    -
    129 template<> simdjson_inline simdjson_result<object> document::get() & noexcept { return get_object(); }
    -
    130 template<> simdjson_inline simdjson_result<raw_json_string> document::get() & noexcept { return get_raw_json_string(); }
    -
    131 template<> simdjson_inline simdjson_result<std::string_view> document::get() & noexcept { return get_string(false); }
    -
    132 template<> simdjson_inline simdjson_result<double> document::get() & noexcept { return get_double(); }
    -
    133 template<> simdjson_inline simdjson_result<uint64_t> document::get() & noexcept { return get_uint64(); }
    -
    134 template<> simdjson_inline simdjson_result<int64_t> document::get() & noexcept { return get_int64(); }
    -
    135 template<> simdjson_inline simdjson_result<bool> document::get() & noexcept { return get_bool(); }
    -
    136 template<> simdjson_inline simdjson_result<value> document::get() & noexcept { return get_value(); }
    -
    137 
    -
    138 template<> simdjson_inline simdjson_result<raw_json_string> document::get() && noexcept { return get_raw_json_string(); }
    -
    139 template<> simdjson_inline simdjson_result<std::string_view> document::get() && noexcept { return get_string(false); }
    -
    140 template<> simdjson_inline simdjson_result<double> document::get() && noexcept { return std::forward<document>(*this).get_double(); }
    -
    141 template<> simdjson_inline simdjson_result<uint64_t> document::get() && noexcept { return std::forward<document>(*this).get_uint64(); }
    -
    142 template<> simdjson_inline simdjson_result<int64_t> document::get() && noexcept { return std::forward<document>(*this).get_int64(); }
    -
    143 template<> simdjson_inline simdjson_result<bool> document::get() && noexcept { return std::forward<document>(*this).get_bool(); }
    -
    144 template<> simdjson_inline simdjson_result<value> document::get() && noexcept { return get_value(); }
    -
    145 
    -
    146 template<typename T> simdjson_inline error_code document::get(T &out) & noexcept {
    -
    147  return get<T>().get(out);
    -
    148 }
    -
    149 template<typename T> simdjson_inline error_code document::get(T &out) && noexcept {
    -
    150  return std::forward<document>(*this).get<T>().get(out);
    -
    151 }
    -
    152 
    -
    153 #if SIMDJSON_EXCEPTIONS
    -
    154 simdjson_inline document::operator array() & noexcept(false) { return get_array(); }
    -
    155 simdjson_inline document::operator object() & noexcept(false) { return get_object(); }
    -
    156 simdjson_inline document::operator uint64_t() noexcept(false) { return get_uint64(); }
    -
    157 simdjson_inline document::operator int64_t() noexcept(false) { return get_int64(); }
    -
    158 simdjson_inline document::operator double() noexcept(false) { return get_double(); }
    -
    159 simdjson_inline document::operator std::string_view() noexcept(false) { return get_string(false); }
    -
    160 simdjson_inline document::operator raw_json_string() noexcept(false) { return get_raw_json_string(); }
    -
    161 simdjson_inline document::operator bool() noexcept(false) { return get_bool(); }
    -
    162 simdjson_inline document::operator value() noexcept(false) { return get_value(); }
    -
    163 
    -
    164 #endif
    -
    165 simdjson_inline simdjson_result<size_t> document::count_elements() & noexcept {
    -
    166  auto a = get_array();
    -
    167  simdjson_result<size_t> answer = a.count_elements();
    -
    168  /* If there was an array, we are now left pointing at its first element. */
    -
    169  if(answer.error() == SUCCESS) { rewind(); }
    -
    170  return answer;
    -
    171 }
    -
    172 simdjson_inline simdjson_result<size_t> document::count_fields() & noexcept {
    -
    173  auto a = get_object();
    -
    174  simdjson_result<size_t> answer = a.count_fields();
    -
    175  /* If there was an object, we are now left pointing at its first element. */
    -
    176  if(answer.error() == SUCCESS) { rewind(); }
    -
    177  return answer;
    -
    178 }
    -
    179 simdjson_inline simdjson_result<value> document::at(size_t index) & noexcept {
    -
    180  auto a = get_array();
    -
    181  return a.at(index);
    -
    182 }
    -
    183 simdjson_inline simdjson_result<array_iterator> document::begin() & noexcept {
    -
    184  return get_array().begin();
    -
    185 }
    -
    186 simdjson_inline simdjson_result<array_iterator> document::end() & noexcept {
    -
    187  return {};
    -
    188 }
    -
    189 
    -
    190 simdjson_inline simdjson_result<value> document::find_field(std::string_view key) & noexcept {
    -
    191  return start_or_resume_object().find_field(key);
    -
    192 }
    -
    193 simdjson_inline simdjson_result<value> document::find_field(const char *key) & noexcept {
    -
    194  return start_or_resume_object().find_field(key);
    -
    195 }
    -
    196 simdjson_inline simdjson_result<value> document::find_field_unordered(std::string_view key) & noexcept {
    -
    197  return start_or_resume_object().find_field_unordered(key);
    +
    97 simdjson_inline simdjson_result<object> document::get_object() & noexcept {
    +
    98  auto value = get_root_value_iterator();
    +
    99  return object::start_root(value);
    +
    100 }
    +
    101 
    + +
    111  return get_root_value_iterator().get_root_uint64(true);
    +
    112 }
    + +
    114  return get_root_value_iterator().get_root_uint64_in_string(true);
    +
    115 }
    +
    116 simdjson_inline simdjson_result<int64_t> document::get_int64() noexcept {
    +
    117  return get_root_value_iterator().get_root_int64(true);
    +
    118 }
    + +
    120  return get_root_value_iterator().get_root_int64_in_string(true);
    +
    121 }
    +
    122 simdjson_inline simdjson_result<double> document::get_double() noexcept {
    +
    123  return get_root_value_iterator().get_root_double(true);
    +
    124 }
    + +
    126  return get_root_value_iterator().get_root_double_in_string(true);
    +
    127 }
    +
    128 simdjson_inline simdjson_result<std::string_view> document::get_string(bool allow_replacement) noexcept {
    +
    129  return get_root_value_iterator().get_root_string(true, allow_replacement);
    +
    130 }
    + +
    132  return get_root_value_iterator().get_root_wobbly_string(true);
    +
    133 }
    + +
    135  return get_root_value_iterator().get_root_raw_json_string(true);
    +
    136 }
    +
    137 simdjson_inline simdjson_result<bool> document::get_bool() noexcept {
    +
    138  return get_root_value_iterator().get_root_bool(true);
    +
    139 }
    +
    140 simdjson_inline simdjson_result<bool> document::is_null() noexcept {
    +
    141  return get_root_value_iterator().is_root_null(true);
    +
    142 }
    +
    143 
    +
    144 template<> simdjson_inline simdjson_result<array> document::get() & noexcept { return get_array(); }
    +
    145 template<> simdjson_inline simdjson_result<object> document::get() & noexcept { return get_object(); }
    +
    146 template<> simdjson_inline simdjson_result<raw_json_string> document::get() & noexcept { return get_raw_json_string(); }
    +
    147 template<> simdjson_inline simdjson_result<std::string_view> document::get() & noexcept { return get_string(false); }
    +
    148 template<> simdjson_inline simdjson_result<double> document::get() & noexcept { return get_double(); }
    +
    149 template<> simdjson_inline simdjson_result<uint64_t> document::get() & noexcept { return get_uint64(); }
    +
    150 template<> simdjson_inline simdjson_result<int64_t> document::get() & noexcept { return get_int64(); }
    +
    151 template<> simdjson_inline simdjson_result<bool> document::get() & noexcept { return get_bool(); }
    +
    152 template<> simdjson_inline simdjson_result<value> document::get() & noexcept { return get_value(); }
    +
    153 
    +
    154 template<> simdjson_inline simdjson_result<raw_json_string> document::get() && noexcept { return get_raw_json_string(); }
    +
    155 template<> simdjson_inline simdjson_result<std::string_view> document::get() && noexcept { return get_string(false); }
    +
    156 template<> simdjson_inline simdjson_result<double> document::get() && noexcept { return std::forward<document>(*this).get_double(); }
    +
    157 template<> simdjson_inline simdjson_result<uint64_t> document::get() && noexcept { return std::forward<document>(*this).get_uint64(); }
    +
    158 template<> simdjson_inline simdjson_result<int64_t> document::get() && noexcept { return std::forward<document>(*this).get_int64(); }
    +
    159 template<> simdjson_inline simdjson_result<bool> document::get() && noexcept { return std::forward<document>(*this).get_bool(); }
    +
    160 template<> simdjson_inline simdjson_result<value> document::get() && noexcept { return get_value(); }
    +
    161 
    +
    162 template<typename T> simdjson_inline error_code document::get(T &out) & noexcept {
    +
    163  return get<T>().get(out);
    +
    164 }
    +
    165 template<typename T> simdjson_inline error_code document::get(T &out) && noexcept {
    +
    166  return std::forward<document>(*this).get<T>().get(out);
    +
    167 }
    +
    168 
    +
    169 #if SIMDJSON_EXCEPTIONS
    +
    170 simdjson_inline document::operator array() & noexcept(false) { return get_array(); }
    +
    171 simdjson_inline document::operator object() & noexcept(false) { return get_object(); }
    +
    172 simdjson_inline document::operator uint64_t() noexcept(false) { return get_uint64(); }
    +
    173 simdjson_inline document::operator int64_t() noexcept(false) { return get_int64(); }
    +
    174 simdjson_inline document::operator double() noexcept(false) { return get_double(); }
    +
    175 simdjson_inline document::operator std::string_view() noexcept(false) { return get_string(false); }
    +
    176 simdjson_inline document::operator raw_json_string() noexcept(false) { return get_raw_json_string(); }
    +
    177 simdjson_inline document::operator bool() noexcept(false) { return get_bool(); }
    +
    178 simdjson_inline document::operator value() noexcept(false) { return get_value(); }
    +
    179 
    +
    180 #endif
    +
    181 simdjson_inline simdjson_result<size_t> document::count_elements() & noexcept {
    +
    182  auto a = get_array();
    +
    183  simdjson_result<size_t> answer = a.count_elements();
    +
    184  /* If there was an array, we are now left pointing at its first element. */
    +
    185  if(answer.error() == SUCCESS) { rewind(); }
    +
    186  return answer;
    +
    187 }
    +
    188 simdjson_inline simdjson_result<size_t> document::count_fields() & noexcept {
    +
    189  auto a = get_object();
    +
    190  simdjson_result<size_t> answer = a.count_fields();
    +
    191  /* If there was an object, we are now left pointing at its first element. */
    +
    192  if(answer.error() == SUCCESS) { rewind(); }
    +
    193  return answer;
    +
    194 }
    +
    195 simdjson_inline simdjson_result<value> document::at(size_t index) & noexcept {
    +
    196  auto a = get_array();
    +
    197  return a.at(index);
    198 }
    -
    199 simdjson_inline simdjson_result<value> document::find_field_unordered(const char *key) & noexcept {
    -
    200  return start_or_resume_object().find_field_unordered(key);
    +
    199 simdjson_inline simdjson_result<array_iterator> document::begin() & noexcept {
    +
    200  return get_array().begin();
    201 }
    -
    202 simdjson_inline simdjson_result<value> document::operator[](std::string_view key) & noexcept {
    -
    203  return start_or_resume_object()[key];
    +
    202 simdjson_inline simdjson_result<array_iterator> document::end() & noexcept {
    +
    203  return {};
    204 }
    -
    205 simdjson_inline simdjson_result<value> document::operator[](const char *key) & noexcept {
    -
    206  return start_or_resume_object()[key];
    -
    207 }
    -
    208 
    -
    209 simdjson_inline error_code document::consume() noexcept {
    -
    210  auto error = iter.skip_child(0);
    -
    211  if(error) { iter.abandon(); }
    -
    212  return error;
    -
    213 }
    -
    214 
    - -
    216  auto _iter = get_root_value_iterator();
    -
    217  const uint8_t * starting_point{_iter.peek_start()};
    -
    218  auto error = consume();
    -
    219  if(error) { return error; }
    -
    220  // After 'consume()', we could be left pointing just beyond the document, but that
    -
    221  // is ok because we are not going to dereference the final pointer position, we just
    -
    222  // use it to compute the length in bytes.
    -
    223  const uint8_t * final_point{iter.unsafe_pointer()};
    -
    224  return std::string_view(reinterpret_cast<const char*>(starting_point), size_t(final_point - starting_point));
    -
    225 }
    -
    226 
    -
    227 simdjson_inline simdjson_result<json_type> document::type() noexcept {
    -
    228  return get_root_value_iterator().type();
    +
    205 
    +
    206 simdjson_inline simdjson_result<value> document::find_field(std::string_view key) & noexcept {
    +
    207  return start_or_resume_object().find_field(key);
    +
    208 }
    +
    209 simdjson_inline simdjson_result<value> document::find_field(const char *key) & noexcept {
    +
    210  return start_or_resume_object().find_field(key);
    +
    211 }
    +
    212 simdjson_inline simdjson_result<value> document::find_field_unordered(std::string_view key) & noexcept {
    +
    213  return start_or_resume_object().find_field_unordered(key);
    +
    214 }
    +
    215 simdjson_inline simdjson_result<value> document::find_field_unordered(const char *key) & noexcept {
    +
    216  return start_or_resume_object().find_field_unordered(key);
    +
    217 }
    +
    218 simdjson_inline simdjson_result<value> document::operator[](std::string_view key) & noexcept {
    +
    219  return start_or_resume_object()[key];
    +
    220 }
    +
    221 simdjson_inline simdjson_result<value> document::operator[](const char *key) & noexcept {
    +
    222  return start_or_resume_object()[key];
    +
    223 }
    +
    224 
    +
    225 simdjson_inline error_code document::consume() noexcept {
    +
    226  auto error = iter.skip_child(0);
    +
    227  if(error) { iter.abandon(); }
    +
    228  return error;
    229 }
    230 
    -
    231 simdjson_inline simdjson_result<bool> document::is_scalar() noexcept {
    -
    232  json_type this_type;
    -
    233  auto error = type().get(this_type);
    -
    234  if(error) { return error; }
    -
    235  return ! ((this_type == json_type::array) || (this_type == json_type::object));
    -
    236 }
    -
    237 
    -
    238 simdjson_inline bool document::is_negative() noexcept {
    -
    239  return get_root_value_iterator().is_root_negative();
    -
    240 }
    -
    241 
    -
    242 simdjson_inline simdjson_result<bool> document::is_integer() noexcept {
    -
    243  return get_root_value_iterator().is_root_integer(true);
    -
    244 }
    -
    245 
    - -
    247  return get_root_value_iterator().get_root_number_type(true);
    -
    248 }
    -
    249 
    -
    250 simdjson_inline simdjson_result<number> document::get_number() noexcept {
    -
    251  return get_root_value_iterator().get_root_number(true);
    + +
    232  auto _iter = get_root_value_iterator();
    +
    233  const uint8_t * starting_point{_iter.peek_start()};
    +
    234  auto error = consume();
    +
    235  if(error) { return error; }
    +
    236  // After 'consume()', we could be left pointing just beyond the document, but that
    +
    237  // is ok because we are not going to dereference the final pointer position, we just
    +
    238  // use it to compute the length in bytes.
    +
    239  const uint8_t * final_point{iter.unsafe_pointer()};
    +
    240  return std::string_view(reinterpret_cast<const char*>(starting_point), size_t(final_point - starting_point));
    +
    241 }
    +
    242 
    +
    243 simdjson_inline simdjson_result<json_type> document::type() noexcept {
    +
    244  return get_root_value_iterator().type();
    +
    245 }
    +
    246 
    +
    247 simdjson_inline simdjson_result<bool> document::is_scalar() noexcept {
    +
    248  json_type this_type;
    +
    249  auto error = type().get(this_type);
    +
    250  if(error) { return error; }
    +
    251  return ! ((this_type == json_type::array) || (this_type == json_type::object));
    252 }
    253 
    -
    254 
    - -
    256  auto _iter = get_root_value_iterator();
    -
    257  return std::string_view(reinterpret_cast<const char*>(_iter.peek_start()), _iter.peek_start_length());
    -
    258 }
    -
    259 
    -
    260 simdjson_inline simdjson_result<value> document::at_pointer(std::string_view json_pointer) noexcept {
    -
    261  rewind(); // Rewind the document each time at_pointer is called
    -
    262  if (json_pointer.empty()) {
    -
    263  return this->get_value();
    -
    264  }
    -
    265  json_type t;
    -
    266  SIMDJSON_TRY(type().get(t));
    -
    267  switch (t)
    -
    268  {
    -
    269  case json_type::array:
    -
    270  return (*this).get_array().at_pointer(json_pointer);
    -
    271  case json_type::object:
    -
    272  return (*this).get_object().at_pointer(json_pointer);
    -
    273  default:
    -
    274  return INVALID_JSON_POINTER;
    -
    275  }
    -
    276 }
    -
    277 
    -
    278 } // namespace ondemand
    -
    279 } // namespace SIMDJSON_IMPLEMENTATION
    -
    280 } // namespace simdjson
    -
    281 
    -
    282 namespace simdjson {
    -
    283 
    -
    284 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::simdjson_result(
    -
    285  SIMDJSON_IMPLEMENTATION::ondemand::document &&value
    -
    286 ) noexcept :
    -
    287  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document>(
    -
    288  std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document>(value)
    -
    289  )
    -
    290 {
    -
    291 }
    -
    292 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::simdjson_result(
    -
    293  error_code error
    -
    294 ) noexcept :
    -
    295  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document>(
    -
    296  error
    -
    297  )
    -
    298 {
    -
    299 }
    -
    300 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::count_elements() & noexcept {
    -
    301  if (error()) { return error(); }
    -
    302  return first.count_elements();
    -
    303 }
    -
    304 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::count_fields() & noexcept {
    -
    305  if (error()) { return error(); }
    -
    306  return first.count_fields();
    +
    254 simdjson_inline bool document::is_negative() noexcept {
    +
    255  return get_root_value_iterator().is_root_negative();
    +
    256 }
    +
    257 
    +
    258 simdjson_inline simdjson_result<bool> document::is_integer() noexcept {
    +
    259  return get_root_value_iterator().is_root_integer(true);
    +
    260 }
    +
    261 
    + +
    263  return get_root_value_iterator().get_root_number_type(true);
    +
    264 }
    +
    265 
    +
    266 simdjson_inline simdjson_result<number> document::get_number() noexcept {
    +
    267  return get_root_value_iterator().get_root_number(true);
    +
    268 }
    +
    269 
    +
    270 
    + +
    272  auto _iter = get_root_value_iterator();
    +
    273  return std::string_view(reinterpret_cast<const char*>(_iter.peek_start()), _iter.peek_start_length());
    +
    274 }
    +
    275 
    +
    276 simdjson_inline simdjson_result<value> document::at_pointer(std::string_view json_pointer) noexcept {
    +
    277  rewind(); // Rewind the document each time at_pointer is called
    +
    278  if (json_pointer.empty()) {
    +
    279  return this->get_value();
    +
    280  }
    +
    281  json_type t;
    +
    282  SIMDJSON_TRY(type().get(t));
    +
    283  switch (t)
    +
    284  {
    +
    285  case json_type::array:
    +
    286  return (*this).get_array().at_pointer(json_pointer);
    +
    287  case json_type::object:
    +
    288  return (*this).get_object().at_pointer(json_pointer);
    +
    289  default:
    +
    290  return INVALID_JSON_POINTER;
    +
    291  }
    +
    292 }
    +
    293 
    +
    294 } // namespace ondemand
    +
    295 } // namespace SIMDJSON_IMPLEMENTATION
    +
    296 } // namespace simdjson
    +
    297 
    +
    298 namespace simdjson {
    +
    299 
    +
    300 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::simdjson_result(
    +
    301  SIMDJSON_IMPLEMENTATION::ondemand::document &&value
    +
    302 ) noexcept :
    +
    303  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document>(
    +
    304  std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document>(value)
    +
    305  )
    +
    306 {
    307 }
    -
    308 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::at(size_t index) & noexcept {
    -
    309  if (error()) { return error(); }
    -
    310  return first.at(index);
    -
    311 }
    -
    312 simdjson_inline error_code simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::rewind() noexcept {
    -
    313  if (error()) { return error(); }
    -
    314  first.rewind();
    -
    315  return SUCCESS;
    -
    316 }
    -
    317 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::begin() & noexcept {
    -
    318  if (error()) { return error(); }
    -
    319  return first.begin();
    -
    320 }
    -
    321 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::end() & noexcept {
    -
    322  return {};
    +
    308 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::simdjson_result(
    +
    309  error_code error
    +
    310 ) noexcept :
    +
    311  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document>(
    +
    312  error
    +
    313  )
    +
    314 {
    +
    315 }
    +
    316 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::count_elements() & noexcept {
    +
    317  if (error()) { return error(); }
    +
    318  return first.count_elements();
    +
    319 }
    +
    320 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::count_fields() & noexcept {
    +
    321  if (error()) { return error(); }
    +
    322  return first.count_fields();
    323 }
    -
    324 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::find_field_unordered(std::string_view key) & noexcept {
    +
    324 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::at(size_t index) & noexcept {
    325  if (error()) { return error(); }
    -
    326  return first.find_field_unordered(key);
    +
    326  return first.at(index);
    327 }
    -
    328 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::find_field_unordered(const char *key) & noexcept {
    -
    329  if (error()) { return error(); }
    -
    330  return first.find_field_unordered(key);
    -
    331 }
    -
    332 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator[](std::string_view key) & noexcept {
    -
    333  if (error()) { return error(); }
    -
    334  return first[key];
    -
    335 }
    -
    336 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator[](const char *key) & noexcept {
    -
    337  if (error()) { return error(); }
    -
    338  return first[key];
    +
    328 simdjson_inline error_code simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::rewind() noexcept {
    +
    329  if (error()) { return error(); }
    +
    330  first.rewind();
    +
    331  return SUCCESS;
    +
    332 }
    +
    333 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::begin() & noexcept {
    +
    334  if (error()) { return error(); }
    +
    335  return first.begin();
    +
    336 }
    +
    337 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::end() & noexcept {
    +
    338  return {};
    339 }
    -
    340 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::find_field(std::string_view key) & noexcept {
    +
    340 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::find_field_unordered(std::string_view key) & noexcept {
    341  if (error()) { return error(); }
    -
    342  return first.find_field(key);
    +
    342  return first.find_field_unordered(key);
    343 }
    -
    344 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::find_field(const char *key) & noexcept {
    +
    344 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::find_field_unordered(const char *key) & noexcept {
    345  if (error()) { return error(); }
    -
    346  return first.find_field(key);
    +
    346  return first.find_field_unordered(key);
    347 }
    -
    348 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_array() & noexcept {
    +
    348 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator[](std::string_view key) & noexcept {
    349  if (error()) { return error(); }
    -
    350  return first.get_array();
    +
    350  return first[key];
    351 }
    -
    352 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_object() & noexcept {
    +
    352 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator[](const char *key) & noexcept {
    353  if (error()) { return error(); }
    -
    354  return first.get_object();
    +
    354  return first[key];
    355 }
    -
    356 simdjson_inline simdjson_result<uint64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_uint64() noexcept {
    -
    357  if (error()) { return error(); }
    -
    358  return first.get_uint64();
    +
    356 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::find_field(std::string_view key) & noexcept {
    +
    357  if (error()) { return error(); }
    +
    358  return first.find_field(key);
    359 }
    -
    360 simdjson_inline simdjson_result<uint64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_uint64_in_string() noexcept {
    -
    361  if (error()) { return error(); }
    -
    362  return first.get_uint64_in_string();
    +
    360 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::find_field(const char *key) & noexcept {
    +
    361  if (error()) { return error(); }
    +
    362  return first.find_field(key);
    363 }
    -
    364 simdjson_inline simdjson_result<int64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_int64() noexcept {
    -
    365  if (error()) { return error(); }
    -
    366  return first.get_int64();
    +
    364 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_array() & noexcept {
    +
    365  if (error()) { return error(); }
    +
    366  return first.get_array();
    367 }
    -
    368 simdjson_inline simdjson_result<int64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_int64_in_string() noexcept {
    -
    369  if (error()) { return error(); }
    -
    370  return first.get_int64_in_string();
    +
    368 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_object() & noexcept {
    +
    369  if (error()) { return error(); }
    +
    370  return first.get_object();
    371 }
    -
    372 simdjson_inline simdjson_result<double> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_double() noexcept {
    +
    372 simdjson_inline simdjson_result<uint64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_uint64() noexcept {
    373  if (error()) { return error(); }
    -
    374  return first.get_double();
    +
    374  return first.get_uint64();
    375 }
    -
    376 simdjson_inline simdjson_result<double> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_double_in_string() noexcept {
    +
    376 simdjson_inline simdjson_result<uint64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_uint64_in_string() noexcept {
    377  if (error()) { return error(); }
    -
    378  return first.get_double_in_string();
    +
    378  return first.get_uint64_in_string();
    379 }
    -
    380 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_string(bool allow_replacement) noexcept {
    -
    381  if (error()) { return error(); }
    -
    382  return first.get_string(allow_replacement);
    +
    380 simdjson_inline simdjson_result<int64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_int64() noexcept {
    +
    381  if (error()) { return error(); }
    +
    382  return first.get_int64();
    383 }
    -
    384 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_wobbly_string() noexcept {
    +
    384 simdjson_inline simdjson_result<int64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_int64_in_string() noexcept {
    385  if (error()) { return error(); }
    -
    386  return first.get_wobbly_string();
    +
    386  return first.get_int64_in_string();
    387 }
    -
    388 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_raw_json_string() noexcept {
    +
    388 simdjson_inline simdjson_result<double> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_double() noexcept {
    389  if (error()) { return error(); }
    -
    390  return first.get_raw_json_string();
    +
    390  return first.get_double();
    391 }
    -
    392 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_bool() noexcept {
    +
    392 simdjson_inline simdjson_result<double> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_double_in_string() noexcept {
    393  if (error()) { return error(); }
    -
    394  return first.get_bool();
    +
    394  return first.get_double_in_string();
    395 }
    -
    396 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_value() noexcept {
    -
    397  if (error()) { return error(); }
    -
    398  return first.get_value();
    +
    396 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_string(bool allow_replacement) noexcept {
    +
    397  if (error()) { return error(); }
    +
    398  return first.get_string(allow_replacement);
    399 }
    -
    400 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::is_null() noexcept {
    +
    400 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_wobbly_string() noexcept {
    401  if (error()) { return error(); }
    -
    402  return first.is_null();
    +
    402  return first.get_wobbly_string();
    403 }
    -
    404 
    -
    405 template<typename T>
    -
    406 simdjson_inline simdjson_result<T> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get() & noexcept {
    -
    407  if (error()) { return error(); }
    -
    408  return first.get<T>();
    -
    409 }
    -
    410 template<typename T>
    -
    411 simdjson_inline simdjson_result<T> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get() && noexcept {
    -
    412  if (error()) { return error(); }
    -
    413  return std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document>(first).get<T>();
    -
    414 }
    -
    415 template<typename T>
    - -
    417  if (error()) { return error(); }
    -
    418  return first.get<T>(out);
    +
    404 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_raw_json_string() noexcept {
    +
    405  if (error()) { return error(); }
    +
    406  return first.get_raw_json_string();
    +
    407 }
    +
    408 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_bool() noexcept {
    +
    409  if (error()) { return error(); }
    +
    410  return first.get_bool();
    +
    411 }
    +
    412 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_value() noexcept {
    +
    413  if (error()) { return error(); }
    +
    414  return first.get_value();
    +
    415 }
    +
    416 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::is_null() noexcept {
    +
    417  if (error()) { return error(); }
    +
    418  return first.is_null();
    419 }
    -
    420 template<typename T>
    - -
    422  if (error()) { return error(); }
    -
    423  return std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document>(first).get<T>(out);
    -
    424 }
    -
    425 
    -
    426 template<> simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get<SIMDJSON_IMPLEMENTATION::ondemand::document>() & noexcept = delete;
    -
    427 template<> simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get<SIMDJSON_IMPLEMENTATION::ondemand::document>() && noexcept {
    +
    420 
    +
    421 template<typename T>
    +
    422 simdjson_inline simdjson_result<T> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get() & noexcept {
    +
    423  if (error()) { return error(); }
    +
    424  return first.get<T>();
    +
    425 }
    +
    426 template<typename T>
    +
    427 simdjson_inline simdjson_result<T> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get() && noexcept {
    428  if (error()) { return error(); }
    -
    429  return std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document>(first);
    +
    429  return std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document>(first).get<T>();
    430 }
    -
    431 template<> simdjson_inline error_code simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get<SIMDJSON_IMPLEMENTATION::ondemand::document>(SIMDJSON_IMPLEMENTATION::ondemand::document &out) & noexcept = delete;
    -
    432 template<> simdjson_inline error_code simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get<SIMDJSON_IMPLEMENTATION::ondemand::document>(SIMDJSON_IMPLEMENTATION::ondemand::document &out) && noexcept {
    +
    431 template<typename T>
    +
    433  if (error()) { return error(); }
    -
    434  out = std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document>(first);
    -
    435  return SUCCESS;
    -
    436 }
    -
    437 
    -
    438 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_type> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::type() noexcept {
    -
    439  if (error()) { return error(); }
    -
    440  return first.type();
    -
    441 }
    -
    442 
    -
    443 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::is_scalar() noexcept {
    -
    444  if (error()) { return error(); }
    -
    445  return first.is_scalar();
    +
    434  return first.get<T>(out);
    +
    435 }
    +
    436 template<typename T>
    + +
    438  if (error()) { return error(); }
    +
    439  return std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document>(first).get<T>(out);
    +
    440 }
    +
    441 
    +
    442 template<> simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get<SIMDJSON_IMPLEMENTATION::ondemand::document>() & noexcept = delete;
    +
    443 template<> simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get<SIMDJSON_IMPLEMENTATION::ondemand::document>() && noexcept {
    +
    444  if (error()) { return error(); }
    +
    445  return std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document>(first);
    446 }
    -
    447 
    -
    448 
    -
    449 simdjson_inline bool simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::is_negative() noexcept {
    -
    450  if (error()) { return error(); }
    -
    451  return first.is_negative();
    +
    447 template<> simdjson_inline error_code simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get<SIMDJSON_IMPLEMENTATION::ondemand::document>(SIMDJSON_IMPLEMENTATION::ondemand::document &out) & noexcept = delete;
    +
    448 template<> simdjson_inline error_code simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get<SIMDJSON_IMPLEMENTATION::ondemand::document>(SIMDJSON_IMPLEMENTATION::ondemand::document &out) && noexcept {
    +
    449  if (error()) { return error(); }
    +
    450  out = std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document>(first);
    +
    451  return SUCCESS;
    452 }
    453 
    -
    454 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::is_integer() noexcept {
    +
    454 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_type> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::type() noexcept {
    455  if (error()) { return error(); }
    -
    456  return first.is_integer();
    +
    456  return first.type();
    457 }
    458 
    -
    459 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::numberparsing::number_type> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_number_type() noexcept {
    +
    459 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::is_scalar() noexcept {
    460  if (error()) { return error(); }
    -
    461  return first.get_number_type();
    +
    461  return first.is_scalar();
    462 }
    463 
    -
    464 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::number> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_number() noexcept {
    -
    465  if (error()) { return error(); }
    -
    466  return first.get_number();
    -
    467 }
    -
    468 
    +
    464 
    +
    465 simdjson_inline bool simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::is_negative() noexcept {
    +
    466  if (error()) { return error(); }
    +
    467  return first.is_negative();
    +
    468 }
    469 
    -
    470 #if SIMDJSON_EXCEPTIONS
    -
    471 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator SIMDJSON_IMPLEMENTATION::ondemand::array() & noexcept(false) {
    -
    472  if (error()) { throw simdjson_error(error()); }
    -
    473  return first;
    -
    474 }
    -
    475 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator SIMDJSON_IMPLEMENTATION::ondemand::object() & noexcept(false) {
    -
    476  if (error()) { throw simdjson_error(error()); }
    -
    477  return first;
    +
    470 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::is_integer() noexcept {
    +
    471  if (error()) { return error(); }
    +
    472  return first.is_integer();
    +
    473 }
    +
    474 
    +
    475 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::number_type> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_number_type() noexcept {
    +
    476  if (error()) { return error(); }
    +
    477  return first.get_number_type();
    478 }
    -
    479 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator uint64_t() noexcept(false) {
    -
    480  if (error()) { throw simdjson_error(error()); }
    -
    481  return first;
    -
    482 }
    -
    483 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator int64_t() noexcept(false) {
    -
    484  if (error()) { throw simdjson_error(error()); }
    -
    485  return first;
    -
    486 }
    -
    487 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator double() noexcept(false) {
    +
    479 
    +
    480 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::number> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::get_number() noexcept {
    +
    481  if (error()) { return error(); }
    +
    482  return first.get_number();
    +
    483 }
    +
    484 
    +
    485 
    +
    486 #if SIMDJSON_EXCEPTIONS
    +
    487 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator SIMDJSON_IMPLEMENTATION::ondemand::array() & noexcept(false) {
    488  if (error()) { throw simdjson_error(error()); }
    489  return first;
    490 }
    -
    491 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator std::string_view() noexcept(false) {
    +
    491 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator SIMDJSON_IMPLEMENTATION::ondemand::object() & noexcept(false) {
    492  if (error()) { throw simdjson_error(error()); }
    493  return first;
    494 }
    -
    495 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string() noexcept(false) {
    +
    495 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator uint64_t() noexcept(false) {
    496  if (error()) { throw simdjson_error(error()); }
    497  return first;
    498 }
    -
    499 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator bool() noexcept(false) {
    +
    499 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator int64_t() noexcept(false) {
    500  if (error()) { throw simdjson_error(error()); }
    501  return first;
    502 }
    -
    503 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator SIMDJSON_IMPLEMENTATION::ondemand::value() noexcept(false) {
    +
    503 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator double() noexcept(false) {
    504  if (error()) { throw simdjson_error(error()); }
    505  return first;
    506 }
    -
    507 #endif
    -
    508 
    -
    509 
    -
    510 simdjson_inline simdjson_result<const char *> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::current_location() noexcept {
    -
    511  if (error()) { return error(); }
    -
    512  return first.current_location();
    -
    513 }
    -
    514 
    -
    515 simdjson_inline bool simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::at_end() const noexcept {
    -
    516  if (error()) { return error(); }
    -
    517  return first.at_end();
    +
    507 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator std::string_view() noexcept(false) {
    +
    508  if (error()) { throw simdjson_error(error()); }
    +
    509  return first;
    +
    510 }
    +
    511 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string() noexcept(false) {
    +
    512  if (error()) { throw simdjson_error(error()); }
    +
    513  return first;
    +
    514 }
    +
    515 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator bool() noexcept(false) {
    +
    516  if (error()) { throw simdjson_error(error()); }
    +
    517  return first;
    518 }
    -
    519 
    -
    520 
    -
    521 simdjson_inline int32_t simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::current_depth() const noexcept {
    -
    522  if (error()) { return error(); }
    -
    523  return first.current_depth();
    -
    524 }
    +
    519 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::operator SIMDJSON_IMPLEMENTATION::ondemand::value() noexcept(false) {
    +
    520  if (error()) { throw simdjson_error(error()); }
    +
    521  return first;
    +
    522 }
    +
    523 #endif
    +
    524 
    525 
    - +
    526 simdjson_inline simdjson_result<const char *> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::current_location() noexcept {
    527  if (error()) { return error(); }
    -
    528  return first.raw_json_token();
    +
    528  return first.current_location();
    529 }
    530 
    - -
    532  if (error()) { return error(); }
    -
    533  return first.at_pointer(json_pointer);
    +
    531 simdjson_inline bool simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::at_end() const noexcept {
    +
    532  if (error()) { return error(); }
    +
    533  return first.at_end();
    534 }
    535 
    536 
    -
    537 } // namespace simdjson
    -
    538 
    -
    539 
    -
    540 namespace simdjson {
    -
    541 namespace SIMDJSON_IMPLEMENTATION {
    -
    542 namespace ondemand {
    -
    543 
    -
    544 simdjson_inline document_reference::document_reference() noexcept : doc{nullptr} {}
    -
    545 simdjson_inline document_reference::document_reference(document &d) noexcept : doc(&d) {}
    -
    546 simdjson_inline void document_reference::rewind() noexcept { doc->rewind(); }
    -
    547 simdjson_inline simdjson_result<array> document_reference::get_array() & noexcept { return doc->get_array(); }
    -
    548 simdjson_inline simdjson_result<object> document_reference::get_object() & noexcept { return doc->get_object(); }
    -
    563 simdjson_inline simdjson_result<uint64_t> document_reference::get_uint64() noexcept { return doc->get_root_value_iterator().get_root_uint64(false); }
    -
    564 simdjson_inline simdjson_result<uint64_t> document_reference::get_uint64_in_string() noexcept { return doc->get_root_value_iterator().get_root_uint64_in_string(false); }
    -
    565 simdjson_inline simdjson_result<int64_t> document_reference::get_int64() noexcept { return doc->get_root_value_iterator().get_root_int64(false); }
    -
    566 simdjson_inline simdjson_result<int64_t> document_reference::get_int64_in_string() noexcept { return doc->get_root_value_iterator().get_root_int64_in_string(false); }
    -
    567 simdjson_inline simdjson_result<double> document_reference::get_double() noexcept { return doc->get_root_value_iterator().get_root_double(false); }
    -
    568 simdjson_inline simdjson_result<double> document_reference::get_double_in_string() noexcept { return doc->get_root_value_iterator().get_root_double(false); }
    -
    569 simdjson_inline simdjson_result<std::string_view> document_reference::get_string(bool allow_replacement) noexcept { return doc->get_root_value_iterator().get_root_string(false, allow_replacement); }
    -
    570 simdjson_inline simdjson_result<std::string_view> document_reference::get_wobbly_string() noexcept { return doc->get_root_value_iterator().get_root_wobbly_string(false); }
    -
    571 simdjson_inline simdjson_result<raw_json_string> document_reference::get_raw_json_string() noexcept { return doc->get_root_value_iterator().get_root_raw_json_string(false); }
    -
    572 simdjson_inline simdjson_result<bool> document_reference::get_bool() noexcept { return doc->get_root_value_iterator().get_root_bool(false); }
    -
    573 simdjson_inline simdjson_result<value> document_reference::get_value() noexcept { return doc->get_value(); }
    -
    574 simdjson_inline simdjson_result<bool> document_reference::is_null() noexcept { return doc->get_root_value_iterator().is_root_null(false); }
    -
    575 
    -
    576 #if SIMDJSON_EXCEPTIONS
    -
    577 simdjson_inline document_reference::operator array() & noexcept(false) { return array(*doc); }
    -
    578 simdjson_inline document_reference::operator object() & noexcept(false) { return object(*doc); }
    -
    579 simdjson_inline document_reference::operator uint64_t() noexcept(false) { return get_uint64(); }
    -
    580 simdjson_inline document_reference::operator int64_t() noexcept(false) { return get_int64(); }
    -
    581 simdjson_inline document_reference::operator double() noexcept(false) { return get_double(); }
    -
    582 simdjson_inline document_reference::operator std::string_view() noexcept(false) { return std::string_view(*doc); }
    -
    583 simdjson_inline document_reference::operator raw_json_string() noexcept(false) { return raw_json_string(*doc); }
    -
    584 simdjson_inline document_reference::operator bool() noexcept(false) { return get_bool(); }
    -
    585 simdjson_inline document_reference::operator value() noexcept(false) { return value(*doc); }
    -
    586 #endif
    -
    587 simdjson_inline simdjson_result<size_t> document_reference::count_elements() & noexcept { return doc->count_elements(); }
    -
    588 simdjson_inline simdjson_result<size_t> document_reference::count_fields() & noexcept { return doc->count_fields(); }
    -
    589 simdjson_inline simdjson_result<value> document_reference::at(size_t index) & noexcept { return doc->at(index); }
    -
    590 simdjson_inline simdjson_result<array_iterator> document_reference::begin() & noexcept { return doc->begin(); }
    -
    591 simdjson_inline simdjson_result<array_iterator> document_reference::end() & noexcept { return doc->end(); }
    -
    592 simdjson_inline simdjson_result<value> document_reference::find_field(std::string_view key) & noexcept { return doc->find_field(key); }
    -
    593 simdjson_inline simdjson_result<value> document_reference::find_field(const char *key) & noexcept { return doc->find_field(key); }
    -
    594 simdjson_inline simdjson_result<value> document_reference::operator[](std::string_view key) & noexcept { return (*doc)[key]; }
    -
    595 simdjson_inline simdjson_result<value> document_reference::operator[](const char *key) & noexcept { return (*doc)[key]; }
    -
    596 simdjson_inline simdjson_result<value> document_reference::find_field_unordered(std::string_view key) & noexcept { return doc->find_field_unordered(key); }
    -
    597 simdjson_inline simdjson_result<value> document_reference::find_field_unordered(const char *key) & noexcept { return doc->find_field_unordered(key); }
    -
    598 simdjson_inline simdjson_result<json_type> document_reference::type() noexcept { return doc->type(); }
    -
    599 simdjson_inline simdjson_result<bool> document_reference::is_scalar() noexcept { return doc->is_scalar(); }
    -
    600 simdjson_inline simdjson_result<const char *> document_reference::current_location() noexcept { return doc->current_location(); }
    -
    601 simdjson_inline int32_t document_reference::current_depth() const noexcept { return doc->current_depth(); }
    -
    602 simdjson_inline bool document_reference::is_negative() noexcept { return doc->is_negative(); }
    -
    603 simdjson_inline simdjson_result<bool> document_reference::is_integer() noexcept { return doc->get_root_value_iterator().is_root_integer(false); }
    -
    604 simdjson_inline simdjson_result<number_type> document_reference::get_number_type() noexcept { return doc->get_root_value_iterator().get_root_number_type(false); }
    -
    605 simdjson_inline simdjson_result<number> document_reference::get_number() noexcept { return doc->get_root_value_iterator().get_root_number(false); }
    -
    606 simdjson_inline simdjson_result<std::string_view> document_reference::raw_json_token() noexcept { return doc->raw_json_token(); }
    -
    607 simdjson_inline simdjson_result<value> document_reference::at_pointer(std::string_view json_pointer) noexcept { return doc->at_pointer(json_pointer); }
    -
    608 simdjson_inline simdjson_result<std::string_view> document_reference::raw_json() noexcept { return doc->raw_json();}
    -
    609 simdjson_inline document_reference::operator document&() const noexcept { return *doc; }
    -
    610 
    -
    611 } // namespace ondemand
    -
    612 } // namespace SIMDJSON_IMPLEMENTATION
    -
    613 } // namespace simdjson
    -
    614 
    -
    615 
    -
    616 
    -
    617 namespace simdjson {
    -
    618 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::document_reference value, error_code error)
    -
    619  noexcept : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>(value), error) {}
    -
    620 
    -
    621 
    -
    622 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::count_elements() & noexcept {
    -
    623  if (error()) { return error(); }
    -
    624  return first.count_elements();
    -
    625 }
    -
    626 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::count_fields() & noexcept {
    -
    627  if (error()) { return error(); }
    -
    628  return first.count_fields();
    -
    629 }
    -
    630 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::at(size_t index) & noexcept {
    -
    631  if (error()) { return error(); }
    -
    632  return first.at(index);
    -
    633 }
    -
    634 simdjson_inline error_code simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::rewind() noexcept {
    -
    635  if (error()) { return error(); }
    -
    636  first.rewind();
    -
    637  return SUCCESS;
    -
    638 }
    -
    639 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::begin() & noexcept {
    -
    640  if (error()) { return error(); }
    -
    641  return first.begin();
    -
    642 }
    -
    643 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::end() & noexcept {
    -
    644  return {};
    +
    537 simdjson_inline int32_t simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document>::current_depth() const noexcept {
    +
    538  if (error()) { return error(); }
    +
    539  return first.current_depth();
    +
    540 }
    +
    541 
    + +
    543  if (error()) { return error(); }
    +
    544  return first.raw_json_token();
    +
    545 }
    +
    546 
    + +
    548  if (error()) { return error(); }
    +
    549  return first.at_pointer(json_pointer);
    +
    550 }
    +
    551 
    +
    552 
    +
    553 } // namespace simdjson
    +
    554 
    +
    555 
    +
    556 namespace simdjson {
    +
    557 namespace SIMDJSON_IMPLEMENTATION {
    +
    558 namespace ondemand {
    +
    559 
    +
    560 simdjson_inline document_reference::document_reference() noexcept : doc{nullptr} {}
    +
    561 simdjson_inline document_reference::document_reference(document &d) noexcept : doc(&d) {}
    +
    562 simdjson_inline void document_reference::rewind() noexcept { doc->rewind(); }
    +
    563 simdjson_inline simdjson_result<array> document_reference::get_array() & noexcept { return doc->get_array(); }
    +
    564 simdjson_inline simdjson_result<object> document_reference::get_object() & noexcept { return doc->get_object(); }
    +
    579 simdjson_inline simdjson_result<uint64_t> document_reference::get_uint64() noexcept { return doc->get_root_value_iterator().get_root_uint64(false); }
    +
    580 simdjson_inline simdjson_result<uint64_t> document_reference::get_uint64_in_string() noexcept { return doc->get_root_value_iterator().get_root_uint64_in_string(false); }
    +
    581 simdjson_inline simdjson_result<int64_t> document_reference::get_int64() noexcept { return doc->get_root_value_iterator().get_root_int64(false); }
    +
    582 simdjson_inline simdjson_result<int64_t> document_reference::get_int64_in_string() noexcept { return doc->get_root_value_iterator().get_root_int64_in_string(false); }
    +
    583 simdjson_inline simdjson_result<double> document_reference::get_double() noexcept { return doc->get_root_value_iterator().get_root_double(false); }
    +
    584 simdjson_inline simdjson_result<double> document_reference::get_double_in_string() noexcept { return doc->get_root_value_iterator().get_root_double(false); }
    +
    585 simdjson_inline simdjson_result<std::string_view> document_reference::get_string(bool allow_replacement) noexcept { return doc->get_root_value_iterator().get_root_string(false, allow_replacement); }
    +
    586 simdjson_inline simdjson_result<std::string_view> document_reference::get_wobbly_string() noexcept { return doc->get_root_value_iterator().get_root_wobbly_string(false); }
    +
    587 simdjson_inline simdjson_result<raw_json_string> document_reference::get_raw_json_string() noexcept { return doc->get_root_value_iterator().get_root_raw_json_string(false); }
    +
    588 simdjson_inline simdjson_result<bool> document_reference::get_bool() noexcept { return doc->get_root_value_iterator().get_root_bool(false); }
    +
    589 simdjson_inline simdjson_result<value> document_reference::get_value() noexcept { return doc->get_value(); }
    +
    590 simdjson_inline simdjson_result<bool> document_reference::is_null() noexcept { return doc->get_root_value_iterator().is_root_null(false); }
    +
    591 
    +
    592 #if SIMDJSON_EXCEPTIONS
    +
    593 simdjson_inline document_reference::operator array() & noexcept(false) { return array(*doc); }
    +
    594 simdjson_inline document_reference::operator object() & noexcept(false) { return object(*doc); }
    +
    595 simdjson_inline document_reference::operator uint64_t() noexcept(false) { return get_uint64(); }
    +
    596 simdjson_inline document_reference::operator int64_t() noexcept(false) { return get_int64(); }
    +
    597 simdjson_inline document_reference::operator double() noexcept(false) { return get_double(); }
    +
    598 simdjson_inline document_reference::operator std::string_view() noexcept(false) { return std::string_view(*doc); }
    +
    599 simdjson_inline document_reference::operator raw_json_string() noexcept(false) { return raw_json_string(*doc); }
    +
    600 simdjson_inline document_reference::operator bool() noexcept(false) { return get_bool(); }
    +
    601 simdjson_inline document_reference::operator value() noexcept(false) { return value(*doc); }
    +
    602 #endif
    +
    603 simdjson_inline simdjson_result<size_t> document_reference::count_elements() & noexcept { return doc->count_elements(); }
    +
    604 simdjson_inline simdjson_result<size_t> document_reference::count_fields() & noexcept { return doc->count_fields(); }
    +
    605 simdjson_inline simdjson_result<value> document_reference::at(size_t index) & noexcept { return doc->at(index); }
    +
    606 simdjson_inline simdjson_result<array_iterator> document_reference::begin() & noexcept { return doc->begin(); }
    +
    607 simdjson_inline simdjson_result<array_iterator> document_reference::end() & noexcept { return doc->end(); }
    +
    608 simdjson_inline simdjson_result<value> document_reference::find_field(std::string_view key) & noexcept { return doc->find_field(key); }
    +
    609 simdjson_inline simdjson_result<value> document_reference::find_field(const char *key) & noexcept { return doc->find_field(key); }
    +
    610 simdjson_inline simdjson_result<value> document_reference::operator[](std::string_view key) & noexcept { return (*doc)[key]; }
    +
    611 simdjson_inline simdjson_result<value> document_reference::operator[](const char *key) & noexcept { return (*doc)[key]; }
    +
    612 simdjson_inline simdjson_result<value> document_reference::find_field_unordered(std::string_view key) & noexcept { return doc->find_field_unordered(key); }
    +
    613 simdjson_inline simdjson_result<value> document_reference::find_field_unordered(const char *key) & noexcept { return doc->find_field_unordered(key); }
    +
    614 simdjson_inline simdjson_result<json_type> document_reference::type() noexcept { return doc->type(); }
    +
    615 simdjson_inline simdjson_result<bool> document_reference::is_scalar() noexcept { return doc->is_scalar(); }
    +
    616 simdjson_inline simdjson_result<const char *> document_reference::current_location() noexcept { return doc->current_location(); }
    +
    617 simdjson_inline int32_t document_reference::current_depth() const noexcept { return doc->current_depth(); }
    +
    618 simdjson_inline bool document_reference::is_negative() noexcept { return doc->is_negative(); }
    +
    619 simdjson_inline simdjson_result<bool> document_reference::is_integer() noexcept { return doc->get_root_value_iterator().is_root_integer(false); }
    +
    620 simdjson_inline simdjson_result<number_type> document_reference::get_number_type() noexcept { return doc->get_root_value_iterator().get_root_number_type(false); }
    +
    621 simdjson_inline simdjson_result<number> document_reference::get_number() noexcept { return doc->get_root_value_iterator().get_root_number(false); }
    +
    622 simdjson_inline simdjson_result<std::string_view> document_reference::raw_json_token() noexcept { return doc->raw_json_token(); }
    +
    623 simdjson_inline simdjson_result<value> document_reference::at_pointer(std::string_view json_pointer) noexcept { return doc->at_pointer(json_pointer); }
    +
    624 simdjson_inline simdjson_result<std::string_view> document_reference::raw_json() noexcept { return doc->raw_json();}
    +
    625 simdjson_inline document_reference::operator document&() const noexcept { return *doc; }
    +
    626 
    +
    627 } // namespace ondemand
    +
    628 } // namespace SIMDJSON_IMPLEMENTATION
    +
    629 } // namespace simdjson
    +
    630 
    +
    631 
    +
    632 
    +
    633 namespace simdjson {
    +
    634 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::document_reference value, error_code error)
    +
    635  noexcept : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>(value), error) {}
    +
    636 
    +
    637 
    +
    638 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::count_elements() & noexcept {
    +
    639  if (error()) { return error(); }
    +
    640  return first.count_elements();
    +
    641 }
    +
    642 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::count_fields() & noexcept {
    +
    643  if (error()) { return error(); }
    +
    644  return first.count_fields();
    645 }
    -
    646 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::find_field_unordered(std::string_view key) & noexcept {
    +
    646 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::at(size_t index) & noexcept {
    647  if (error()) { return error(); }
    -
    648  return first.find_field_unordered(key);
    +
    648  return first.at(index);
    649 }
    -
    650 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::find_field_unordered(const char *key) & noexcept {
    -
    651  if (error()) { return error(); }
    -
    652  return first.find_field_unordered(key);
    -
    653 }
    -
    654 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator[](std::string_view key) & noexcept {
    -
    655  if (error()) { return error(); }
    -
    656  return first[key];
    -
    657 }
    -
    658 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator[](const char *key) & noexcept {
    -
    659  if (error()) { return error(); }
    -
    660  return first[key];
    +
    650 simdjson_inline error_code simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::rewind() noexcept {
    +
    651  if (error()) { return error(); }
    +
    652  first.rewind();
    +
    653  return SUCCESS;
    +
    654 }
    +
    655 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::begin() & noexcept {
    +
    656  if (error()) { return error(); }
    +
    657  return first.begin();
    +
    658 }
    +
    659 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::end() & noexcept {
    +
    660  return {};
    661 }
    -
    662 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::find_field(std::string_view key) & noexcept {
    +
    662 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::find_field_unordered(std::string_view key) & noexcept {
    663  if (error()) { return error(); }
    -
    664  return first.find_field(key);
    +
    664  return first.find_field_unordered(key);
    665 }
    -
    666 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::find_field(const char *key) & noexcept {
    +
    666 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::find_field_unordered(const char *key) & noexcept {
    667  if (error()) { return error(); }
    -
    668  return first.find_field(key);
    +
    668  return first.find_field_unordered(key);
    669 }
    -
    670 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_array() & noexcept {
    +
    670 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator[](std::string_view key) & noexcept {
    671  if (error()) { return error(); }
    -
    672  return first.get_array();
    +
    672  return first[key];
    673 }
    -
    674 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_object() & noexcept {
    +
    674 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator[](const char *key) & noexcept {
    675  if (error()) { return error(); }
    -
    676  return first.get_object();
    +
    676  return first[key];
    677 }
    -
    678 simdjson_inline simdjson_result<uint64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_uint64() noexcept {
    -
    679  if (error()) { return error(); }
    -
    680  return first.get_uint64();
    +
    678 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::find_field(std::string_view key) & noexcept {
    +
    679  if (error()) { return error(); }
    +
    680  return first.find_field(key);
    681 }
    -
    682 simdjson_inline simdjson_result<uint64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_uint64_in_string() noexcept {
    -
    683  if (error()) { return error(); }
    -
    684  return first.get_uint64_in_string();
    +
    682 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::find_field(const char *key) & noexcept {
    +
    683  if (error()) { return error(); }
    +
    684  return first.find_field(key);
    685 }
    -
    686 simdjson_inline simdjson_result<int64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_int64() noexcept {
    -
    687  if (error()) { return error(); }
    -
    688  return first.get_int64();
    +
    686 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_array() & noexcept {
    +
    687  if (error()) { return error(); }
    +
    688  return first.get_array();
    689 }
    -
    690 simdjson_inline simdjson_result<int64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_int64_in_string() noexcept {
    -
    691  if (error()) { return error(); }
    -
    692  return first.get_int64_in_string();
    +
    690 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_object() & noexcept {
    +
    691  if (error()) { return error(); }
    +
    692  return first.get_object();
    693 }
    -
    694 simdjson_inline simdjson_result<double> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_double() noexcept {
    +
    694 simdjson_inline simdjson_result<uint64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_uint64() noexcept {
    695  if (error()) { return error(); }
    -
    696  return first.get_double();
    +
    696  return first.get_uint64();
    697 }
    -
    698 simdjson_inline simdjson_result<double> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_double_in_string() noexcept {
    +
    698 simdjson_inline simdjson_result<uint64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_uint64_in_string() noexcept {
    699  if (error()) { return error(); }
    -
    700  return first.get_double_in_string();
    +
    700  return first.get_uint64_in_string();
    701 }
    -
    702 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_string(bool allow_replacement) noexcept {
    -
    703  if (error()) { return error(); }
    -
    704  return first.get_string(allow_replacement);
    +
    702 simdjson_inline simdjson_result<int64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_int64() noexcept {
    +
    703  if (error()) { return error(); }
    +
    704  return first.get_int64();
    705 }
    -
    706 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_wobbly_string() noexcept {
    +
    706 simdjson_inline simdjson_result<int64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_int64_in_string() noexcept {
    707  if (error()) { return error(); }
    -
    708  return first.get_wobbly_string();
    +
    708  return first.get_int64_in_string();
    709 }
    -
    710 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_raw_json_string() noexcept {
    +
    710 simdjson_inline simdjson_result<double> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_double() noexcept {
    711  if (error()) { return error(); }
    -
    712  return first.get_raw_json_string();
    +
    712  return first.get_double();
    713 }
    -
    714 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_bool() noexcept {
    +
    714 simdjson_inline simdjson_result<double> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_double_in_string() noexcept {
    715  if (error()) { return error(); }
    -
    716  return first.get_bool();
    +
    716  return first.get_double_in_string();
    717 }
    -
    718 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_value() noexcept {
    -
    719  if (error()) { return error(); }
    -
    720  return first.get_value();
    +
    718 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_string(bool allow_replacement) noexcept {
    +
    719  if (error()) { return error(); }
    +
    720  return first.get_string(allow_replacement);
    721 }
    -
    722 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::is_null() noexcept {
    +
    722 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_wobbly_string() noexcept {
    723  if (error()) { return error(); }
    -
    724  return first.is_null();
    +
    724  return first.get_wobbly_string();
    725 }
    -
    726 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_type> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::type() noexcept {
    +
    726 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_raw_json_string() noexcept {
    727  if (error()) { return error(); }
    -
    728  return first.type();
    +
    728  return first.get_raw_json_string();
    729 }
    -
    730 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::is_scalar() noexcept {
    +
    730 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_bool() noexcept {
    731  if (error()) { return error(); }
    -
    732  return first.is_scalar();
    +
    732  return first.get_bool();
    733 }
    -
    734 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::is_negative() noexcept {
    +
    734 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_value() noexcept {
    735  if (error()) { return error(); }
    -
    736  return first.is_negative();
    +
    736  return first.get_value();
    737 }
    -
    738 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::is_integer() noexcept {
    +
    738 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::is_null() noexcept {
    739  if (error()) { return error(); }
    -
    740  return first.is_integer();
    +
    740  return first.is_null();
    741 }
    -
    742 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::numberparsing::number_type> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_number_type() noexcept {
    +
    742 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_type> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::type() noexcept {
    743  if (error()) { return error(); }
    -
    744  return first.get_number_type();
    +
    744  return first.type();
    745 }
    -
    746 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::number> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_number() noexcept {
    +
    746 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::is_scalar() noexcept {
    747  if (error()) { return error(); }
    -
    748  return first.get_number();
    +
    748  return first.is_scalar();
    749 }
    -
    750 #if SIMDJSON_EXCEPTIONS
    -
    751 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator SIMDJSON_IMPLEMENTATION::ondemand::array() & noexcept(false) {
    -
    752  if (error()) { throw simdjson_error(error()); }
    -
    753  return first;
    -
    754 }
    -
    755 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator SIMDJSON_IMPLEMENTATION::ondemand::object() & noexcept(false) {
    -
    756  if (error()) { throw simdjson_error(error()); }
    -
    757  return first;
    -
    758 }
    -
    759 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator uint64_t() noexcept(false) {
    -
    760  if (error()) { throw simdjson_error(error()); }
    -
    761  return first;
    -
    762 }
    -
    763 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator int64_t() noexcept(false) {
    -
    764  if (error()) { throw simdjson_error(error()); }
    -
    765  return first;
    -
    766 }
    -
    767 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator double() noexcept(false) {
    +
    750 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::is_negative() noexcept {
    +
    751  if (error()) { return error(); }
    +
    752  return first.is_negative();
    +
    753 }
    +
    754 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::is_integer() noexcept {
    +
    755  if (error()) { return error(); }
    +
    756  return first.is_integer();
    +
    757 }
    +
    758 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::number_type> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_number_type() noexcept {
    +
    759  if (error()) { return error(); }
    +
    760  return first.get_number_type();
    +
    761 }
    +
    762 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::number> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::get_number() noexcept {
    +
    763  if (error()) { return error(); }
    +
    764  return first.get_number();
    +
    765 }
    +
    766 #if SIMDJSON_EXCEPTIONS
    +
    767 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator SIMDJSON_IMPLEMENTATION::ondemand::array() & noexcept(false) {
    768  if (error()) { throw simdjson_error(error()); }
    769  return first;
    770 }
    -
    771 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator std::string_view() noexcept(false) {
    +
    771 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator SIMDJSON_IMPLEMENTATION::ondemand::object() & noexcept(false) {
    772  if (error()) { throw simdjson_error(error()); }
    773  return first;
    774 }
    -
    775 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string() noexcept(false) {
    +
    775 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator uint64_t() noexcept(false) {
    776  if (error()) { throw simdjson_error(error()); }
    777  return first;
    778 }
    -
    779 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator bool() noexcept(false) {
    +
    779 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator int64_t() noexcept(false) {
    780  if (error()) { throw simdjson_error(error()); }
    781  return first;
    782 }
    -
    783 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator SIMDJSON_IMPLEMENTATION::ondemand::value() noexcept(false) {
    +
    783 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator double() noexcept(false) {
    784  if (error()) { throw simdjson_error(error()); }
    785  return first;
    786 }
    -
    787 #endif
    -
    788 
    -
    789 simdjson_inline simdjson_result<const char *> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::current_location() noexcept {
    -
    790  if (error()) { return error(); }
    -
    791  return first.current_location();
    -
    792 }
    -
    793 
    - -
    795  if (error()) { return error(); }
    -
    796  return first.raw_json_token();
    -
    797 }
    -
    798 
    - -
    800  if (error()) { return error(); }
    -
    801  return first.at_pointer(json_pointer);
    +
    787 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator std::string_view() noexcept(false) {
    +
    788  if (error()) { throw simdjson_error(error()); }
    +
    789  return first;
    +
    790 }
    +
    791 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string() noexcept(false) {
    +
    792  if (error()) { throw simdjson_error(error()); }
    +
    793  return first;
    +
    794 }
    +
    795 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator bool() noexcept(false) {
    +
    796  if (error()) { throw simdjson_error(error()); }
    +
    797  return first;
    +
    798 }
    +
    799 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::operator SIMDJSON_IMPLEMENTATION::ondemand::value() noexcept(false) {
    +
    800  if (error()) { throw simdjson_error(error()); }
    +
    801  return first;
    802 }
    -
    803 
    +
    803 #endif
    804 
    -
    805 } // namespace simdjson
    - -
    static simdjson_inline simdjson_result< array > start_root(value_iterator &iter) noexcept
    Begin array iteration from the root.
    Definition: array-inl.h:55
    -
    simdjson_inline simdjson_result< uint64_t > get_uint64() noexcept
    The document_reference instances are used primarily/solely for streams of JSON documents.
    Definition: document-inl.h:563
    -
    simdjson_inline simdjson_result< value > at(size_t index) &noexcept
    Get the value at the given index in the array.
    Definition: document-inl.h:179
    -
    simdjson_inline int32_t current_depth() const noexcept
    Returns the current depth in the document if in bounds.
    Definition: document-inl.h:27
    -
    simdjson_inline simdjson_result< array_iterator > begin() &noexcept
    Begin array iteration.
    Definition: document-inl.h:183
    -
    simdjson_inline simdjson_result< size_t > count_fields() &noexcept
    This method scans the object and counts the number of key-value pairs.
    Definition: document-inl.h:172
    -
    simdjson_inline simdjson_result< std::string_view > get_string(bool allow_replacement=false) noexcept
    Cast this JSON value to a string.
    Definition: document-inl.h:112
    -
    simdjson_warn_unused simdjson_inline simdjson_result< number > get_number() noexcept
    Attempt to parse an ondemand::number.
    Definition: document-inl.h:250
    -
    bool is_alive() noexcept
    Some unrecoverable error conditions may render the document instance unusable.
    Definition: document-inl.h:36
    -
    simdjson_inline simdjson_result< bool > get_bool() noexcept
    Cast this JSON value to a bool.
    Definition: document-inl.h:121
    -
    simdjson_inline simdjson_result< object > get_object() &noexcept
    Cast this JSON value to an object.
    Definition: document-inl.h:81
    -
    simdjson_inline simdjson_result< uint64_t > get_uint64() noexcept
    Cast this JSON value to an unsigned integer.
    Definition: document-inl.h:94
    -
    simdjson_inline bool is_negative() noexcept
    Checks whether the document is a negative number.
    Definition: document-inl.h:238
    +
    805 simdjson_inline simdjson_result<const char *> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference>::current_location() noexcept {
    +
    806  if (error()) { return error(); }
    +
    807  return first.current_location();
    +
    808 }
    +
    809 
    + +
    811  if (error()) { return error(); }
    +
    812  return first.raw_json_token();
    +
    813 }
    +
    814 
    + +
    816  if (error()) { return error(); }
    +
    817  return first.at_pointer(json_pointer);
    +
    818 }
    +
    819 
    +
    820 
    +
    821 } // namespace simdjson
    +
    822 
    +
    823 #endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H
    + +
    static simdjson_inline simdjson_result< array > start_root(value_iterator &iter) noexcept
    Begin array iteration from the root.
    Definition: array-inl.h:67
    +
    simdjson_inline simdjson_result< uint64_t > get_uint64() noexcept
    The document_reference instances are used primarily/solely for streams of JSON documents.
    Definition: document-inl.h:579
    +
    simdjson_inline simdjson_result< value > at(size_t index) &noexcept
    Get the value at the given index in the array.
    Definition: document-inl.h:195
    +
    simdjson_inline int32_t current_depth() const noexcept
    Returns the current depth in the document if in bounds.
    Definition: document-inl.h:43
    +
    simdjson_inline simdjson_result< array_iterator > begin() &noexcept
    Begin array iteration.
    Definition: document-inl.h:199
    +
    simdjson_inline simdjson_result< size_t > count_fields() &noexcept
    This method scans the object and counts the number of key-value pairs.
    Definition: document-inl.h:188
    +
    simdjson_inline simdjson_result< std::string_view > get_string(bool allow_replacement=false) noexcept
    Cast this JSON value to a string.
    Definition: document-inl.h:128
    +
    simdjson_warn_unused simdjson_inline simdjson_result< number > get_number() noexcept
    Attempt to parse an ondemand::number.
    Definition: document-inl.h:266
    +
    bool is_alive() noexcept
    Some unrecoverable error conditions may render the document instance unusable.
    Definition: document-inl.h:52
    +
    simdjson_inline simdjson_result< bool > get_bool() noexcept
    Cast this JSON value to a bool.
    Definition: document-inl.h:137
    +
    simdjson_inline simdjson_result< object > get_object() &noexcept
    Cast this JSON value to an object.
    Definition: document-inl.h:97
    +
    simdjson_inline simdjson_result< uint64_t > get_uint64() noexcept
    Cast this JSON value to an unsigned integer.
    Definition: document-inl.h:110
    +
    simdjson_inline bool is_negative() noexcept
    Checks whether the document is a negative number.
    Definition: document-inl.h:254
    simdjson_inline document() noexcept=default
    Create a new invalid document.
    -
    simdjson_inline simdjson_result< std::string_view > raw_json_token() noexcept
    Get the raw JSON for this token.
    Definition: document-inl.h:255
    -
    simdjson_inline simdjson_result< uint64_t > get_uint64_in_string() noexcept
    Cast this JSON value (inside string) to an unsigned integer.
    Definition: document-inl.h:97
    -
    simdjson_inline simdjson_result< bool > is_null() noexcept
    Checks if this JSON value is null.
    Definition: document-inl.h:124
    -
    simdjson_inline simdjson_result< int64_t > get_int64() noexcept
    Cast this JSON value to a signed integer.
    Definition: document-inl.h:100
    -
    simdjson_inline simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
    Get the value associated with the given JSON pointer.
    Definition: document-inl.h:260
    -
    simdjson_inline simdjson_result< json_type > type() noexcept
    Get the type of this JSON value.
    Definition: document-inl.h:227
    -
    simdjson_inline simdjson_result< array_iterator > end() &noexcept
    Sentinel representing the end of the array.
    Definition: document-inl.h:186
    -
    simdjson_inline simdjson_result< T > get() &noexcept
    Get this value as the given type.
    Definition: document.h:162
    -
    simdjson_inline simdjson_result< double > get_double_in_string() noexcept
    Cast this JSON value (inside string) to a double.
    Definition: document-inl.h:109
    -
    json_iterator iter
    Current position in the document.
    Definition: document.h:589
    -
    simdjson_inline simdjson_result< double > get_double() noexcept
    Cast this JSON value to a double.
    Definition: document-inl.h:106
    -
    std::string to_debug_string() noexcept
    Returns debugging information.
    Definition: document-inl.h:19
    -
    void rewind() noexcept
    Reset the iterator inside the document instance so we are pointing back at the beginning of the docum...
    Definition: document-inl.h:15
    -
    simdjson_inline simdjson_result< std::string_view > raw_json() noexcept
    Consumes the document and returns a string_view instance corresponding to the document as represented...
    Definition: document-inl.h:215
    -
    simdjson_inline simdjson_result< value > find_field_unordered(std::string_view key) &noexcept
    Look up a field by name on an object, without regard to key order.
    Definition: document-inl.h:196
    -
    simdjson_inline simdjson_result< int64_t > get_int64_in_string() noexcept
    Cast this JSON value (inside string) to a signed integer.
    Definition: document-inl.h:103
    -
    simdjson_inline simdjson_result< size_t > count_elements() &noexcept
    This method scans the array and counts the number of elements.
    Definition: document-inl.h:165
    -
    simdjson_inline simdjson_result< value > get_value() noexcept
    Cast this JSON value to a value when the document is an object or an array.
    Definition: document-inl.h:52
    -
    simdjson_inline simdjson_result< value > find_field(std::string_view key) &noexcept
    Look up a field by name on an object (order-sensitive).
    Definition: document-inl.h:190
    -
    simdjson_inline simdjson_result< number_type > get_number_type() noexcept
    Determine the number type (integer or floating-point number) as quickly as possible.
    Definition: document-inl.h:246
    -
    simdjson_inline error_code consume() noexcept
    Consumes the document.
    Definition: document-inl.h:209
    -
    simdjson_inline simdjson_result< bool > is_scalar() noexcept
    Checks whether the document is a scalar (string, number, null, Boolean).
    Definition: document-inl.h:231
    -
    simdjson_inline simdjson_result< std::string_view > get_wobbly_string() noexcept
    Cast this JSON value to a string.
    Definition: document-inl.h:115
    -
    bool at_end() const noexcept
    Returns true if this document has been fully parsed.
    Definition: document-inl.h:31
    -
    simdjson_inline simdjson_result< array > get_array() &noexcept
    Cast this JSON value to an array.
    Definition: document-inl.h:77
    -
    simdjson_inline simdjson_result< bool > is_integer() noexcept
    Checks whether the document is an integer number.
    Definition: document-inl.h:242
    -
    simdjson_result< const char * > current_location() const noexcept
    Returns the current location in the document if in bounds.
    Definition: document-inl.h:23
    -
    simdjson_inline simdjson_result< raw_json_string > get_raw_json_string() noexcept
    Cast this JSON value to a raw_json_string.
    Definition: document-inl.h:118
    -
    A forward-only JSON object field iterator.
    Definition: object.h:10
    -
    A string escaped per JSON rules, terminated with quote (").
    -
    An ephemeral JSON value returned during iteration.
    Definition: value.h:17
    -
    json_type
    The type of a JSON value.
    Definition: json_type.h:7
    +
    simdjson_inline simdjson_result< std::string_view > raw_json_token() noexcept
    Get the raw JSON for this token.
    Definition: document-inl.h:271
    +
    simdjson_inline simdjson_result< uint64_t > get_uint64_in_string() noexcept
    Cast this JSON value (inside string) to an unsigned integer.
    Definition: document-inl.h:113
    +
    simdjson_inline simdjson_result< bool > is_null() noexcept
    Checks if this JSON value is null.
    Definition: document-inl.h:140
    +
    simdjson_inline simdjson_result< int64_t > get_int64() noexcept
    Cast this JSON value to a signed integer.
    Definition: document-inl.h:116
    +
    simdjson_inline simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
    Get the value associated with the given JSON pointer.
    Definition: document-inl.h:276
    +
    simdjson_inline simdjson_result< json_type > type() noexcept
    Get the type of this JSON value.
    Definition: document-inl.h:243
    +
    simdjson_inline simdjson_result< array_iterator > end() &noexcept
    Sentinel representing the end of the array.
    Definition: document-inl.h:202
    +
    simdjson_inline simdjson_result< T > get() &noexcept
    Get this value as the given type.
    Definition: document.h:160
    +
    simdjson_inline simdjson_result< double > get_double_in_string() noexcept
    Cast this JSON value (inside string) to a double.
    Definition: document-inl.h:125
    +
    json_iterator iter
    Current position in the document.
    Definition: document.h:587
    +
    simdjson_inline simdjson_result< double > get_double() noexcept
    Cast this JSON value to a double.
    Definition: document-inl.h:122
    +
    std::string to_debug_string() noexcept
    Returns debugging information.
    Definition: document-inl.h:35
    +
    void rewind() noexcept
    Reset the iterator inside the document instance so we are pointing back at the beginning of the docum...
    Definition: document-inl.h:31
    +
    simdjson_inline simdjson_result< std::string_view > raw_json() noexcept
    Consumes the document and returns a string_view instance corresponding to the document as represented...
    Definition: document-inl.h:231
    +
    simdjson_inline simdjson_result< value > find_field_unordered(std::string_view key) &noexcept
    Look up a field by name on an object, without regard to key order.
    Definition: document-inl.h:212
    +
    simdjson_inline simdjson_result< int64_t > get_int64_in_string() noexcept
    Cast this JSON value (inside string) to a signed integer.
    Definition: document-inl.h:119
    +
    simdjson_inline simdjson_result< size_t > count_elements() &noexcept
    This method scans the array and counts the number of elements.
    Definition: document-inl.h:181
    +
    simdjson_inline simdjson_result< value > get_value() noexcept
    Cast this JSON value to a value when the document is an object or an array.
    Definition: document-inl.h:68
    +
    simdjson_inline simdjson_result< value > find_field(std::string_view key) &noexcept
    Look up a field by name on an object (order-sensitive).
    Definition: document-inl.h:206
    +
    simdjson_inline simdjson_result< number_type > get_number_type() noexcept
    Determine the number type (integer or floating-point number) as quickly as possible.
    Definition: document-inl.h:262
    +
    simdjson_inline error_code consume() noexcept
    Consumes the document.
    Definition: document-inl.h:225
    +
    simdjson_inline simdjson_result< bool > is_scalar() noexcept
    Checks whether the document is a scalar (string, number, null, Boolean).
    Definition: document-inl.h:247
    +
    simdjson_inline simdjson_result< std::string_view > get_wobbly_string() noexcept
    Cast this JSON value to a string.
    Definition: document-inl.h:131
    +
    bool at_end() const noexcept
    Returns true if this document has been fully parsed.
    Definition: document-inl.h:47
    +
    simdjson_inline simdjson_result< array > get_array() &noexcept
    Cast this JSON value to an array.
    Definition: document-inl.h:93
    +
    simdjson_inline simdjson_result< bool > is_integer() noexcept
    Checks whether the document is an integer number.
    Definition: document-inl.h:258
    +
    simdjson_result< const char * > current_location() const noexcept
    Returns the current location in the document if in bounds.
    Definition: document-inl.h:39
    +
    simdjson_inline simdjson_result< raw_json_string > get_raw_json_string() noexcept
    Cast this JSON value to a raw_json_string.
    Definition: document-inl.h:134
    +
    A forward-only JSON object field iterator.
    Definition: object.h:17
    +
    A string escaped per JSON rules, terminated with quote (").
    +
    An ephemeral JSON value returned during iteration.
    Definition: value.h:18
    +
    json_type
    The type of a JSON value.
    Definition: json_type.h:17
    @ object
    A JSON object ( { "a": 1, "b" 2, ... } )
    -
    We want to support argument-dependent lookup (ADL).
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ SCALAR_DOCUMENT_AS_VALUE
    A scalar document is treated as a value.
    Definition: error.h:46
    @ SUCCESS
    No error.
    Definition: error.h:18
    @ INVALID_JSON_POINTER
    Invalid JSON pointer reference.
    Definition: error.h:39
    - +
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    -
    simdjson_warn_unused simdjson_inline error_code get(T &value) &&noexcept
    Move the value to the provided variable.
    Definition: error-inl.h:127
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    +
    simdjson_warn_unused simdjson_inline error_code get(T &value) &&noexcept
    Move the value to the provided variable.
    Definition: error-inl.h:126
    diff --git a/generic_2ondemand_2document_8h_source.html b/generic_2ondemand_2document_8h_source.html index 7416975bf..c062138aa 100644 --- a/generic_2ondemand_2document_8h_source.html +++ b/generic_2ondemand_2document_8h_source.html @@ -91,404 +91,402 @@ $(document).ready(function(){initNavTree('generic_2ondemand_2document_8h_source.
    document.h
    -
    1 #include "simdjson/error.h"
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H
    2 
    -
    3 namespace simdjson {
    -
    4 namespace SIMDJSON_IMPLEMENTATION {
    -
    5 namespace ondemand {
    -
    6 
    -
    7 class parser;
    -
    8 class array;
    -
    9 class object;
    -
    10 class value;
    -
    11 class raw_json_string;
    -
    12 class array_iterator;
    -
    13 class document_stream;
    -
    14 
    -
    22 class document {
    -
    23 public:
    -
    29  simdjson_inline document() noexcept = default;
    -
    30  simdjson_inline document(const document &other) noexcept = delete; // pass your documents by reference, not by copy
    -
    31  simdjson_inline document(document &&other) noexcept = default;
    -
    32  simdjson_inline document &operator=(const document &other) noexcept = delete;
    -
    33  simdjson_inline document &operator=(document &&other) noexcept = default;
    -
    34 
    -
    41  simdjson_inline simdjson_result<array> get_array() & noexcept;
    -
    48  simdjson_inline simdjson_result<object> get_object() & noexcept;
    -
    55  simdjson_inline simdjson_result<uint64_t> get_uint64() noexcept;
    -
    62  simdjson_inline simdjson_result<uint64_t> get_uint64_in_string() noexcept;
    -
    69  simdjson_inline simdjson_result<int64_t> get_int64() noexcept;
    -
    76  simdjson_inline simdjson_result<int64_t> get_int64_in_string() noexcept;
    -
    83  simdjson_inline simdjson_result<double> get_double() noexcept;
    -
    84 
    -
    91  simdjson_inline simdjson_result<double> get_double_in_string() noexcept;
    -
    104  simdjson_inline simdjson_result<std::string_view> get_string(bool allow_replacement = false) noexcept;
    -
    116  simdjson_inline simdjson_result<std::string_view> get_wobbly_string() noexcept;
    -
    125  simdjson_inline simdjson_result<raw_json_string> get_raw_json_string() noexcept;
    -
    132  simdjson_inline simdjson_result<bool> get_bool() noexcept;
    -
    139  simdjson_inline simdjson_result<value> get_value() noexcept;
    -
    140 
    -
    149  simdjson_inline simdjson_result<bool> is_null() noexcept;
    -
    150 
    -
    162  template<typename T> simdjson_inline simdjson_result<T> get() & noexcept {
    -
    163  // Unless the simdjson library provides an inline implementation, calling this method should
    -
    164  // immediately fail.
    -
    165  static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library.");
    -
    166  }
    -
    168  template<typename T> simdjson_inline simdjson_result<T> get() && noexcept {
    -
    169  // Unless the simdjson library provides an inline implementation, calling this method should
    -
    170  // immediately fail.
    -
    171  static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library.");
    -
    172  }
    -
    173 
    -
    185  template<typename T> simdjson_inline error_code get(T &out) & noexcept;
    -
    187  template<typename T> simdjson_inline error_code get(T &out) && noexcept;
    -
    188 
    -
    189 #if SIMDJSON_EXCEPTIONS
    -
    196  simdjson_inline operator array() & noexcept(false);
    -
    203  simdjson_inline operator object() & noexcept(false);
    -
    210  simdjson_inline operator uint64_t() noexcept(false);
    -
    217  simdjson_inline operator int64_t() noexcept(false);
    -
    224  simdjson_inline operator double() noexcept(false);
    -
    234  simdjson_inline operator std::string_view() noexcept(false);
    -
    243  simdjson_inline operator raw_json_string() noexcept(false);
    -
    250  simdjson_inline operator bool() noexcept(false);
    -
    257  simdjson_inline operator value() noexcept(false);
    -
    258 #endif
    -
    270  simdjson_inline simdjson_result<size_t> count_elements() & noexcept;
    -
    285  simdjson_inline simdjson_result<size_t> count_fields() & noexcept;
    -
    293  simdjson_inline simdjson_result<value> at(size_t index) & noexcept;
    -
    299  simdjson_inline simdjson_result<array_iterator> begin() & noexcept;
    -
    305  simdjson_inline simdjson_result<array_iterator> end() & noexcept;
    -
    306 
    -
    339  simdjson_inline simdjson_result<value> find_field(std::string_view key) & noexcept;
    -
    341  simdjson_inline simdjson_result<value> find_field(const char *key) & noexcept;
    -
    342 
    -
    373  simdjson_inline simdjson_result<value> find_field_unordered(std::string_view key) & noexcept;
    -
    375  simdjson_inline simdjson_result<value> find_field_unordered(const char *key) & noexcept;
    -
    377  simdjson_inline simdjson_result<value> operator[](std::string_view key) & noexcept;
    -
    379  simdjson_inline simdjson_result<value> operator[](const char *key) & noexcept;
    -
    380 
    -
    392  simdjson_inline simdjson_result<json_type> type() noexcept;
    -
    393 
    -
    401  simdjson_inline simdjson_result<bool> is_scalar() noexcept;
    -
    402 
    -
    408  simdjson_inline bool is_negative() noexcept;
    -
    418  simdjson_inline simdjson_result<bool> is_integer() noexcept;
    -
    441  simdjson_inline simdjson_result<number_type> get_number_type() noexcept;
    -
    442 
    -
    469  simdjson_warn_unused simdjson_inline simdjson_result<number> get_number() noexcept;
    -
    470 
    -
    493  simdjson_inline simdjson_result<std::string_view> raw_json_token() noexcept;
    -
    494 
    -
    500  inline void rewind() noexcept;
    -
    504  inline std::string to_debug_string() noexcept;
    -
    509  inline bool is_alive() noexcept;
    -
    510 
    -
    514  inline simdjson_result<const char *> current_location() const noexcept;
    -
    515 
    -
    521  inline bool at_end() const noexcept;
    -
    522 
    -
    532  simdjson_inline int32_t current_depth() const noexcept;
    -
    533 
    -
    565  simdjson_inline simdjson_result<value> at_pointer(std::string_view json_pointer) noexcept;
    -
    571  simdjson_inline simdjson_result<std::string_view> raw_json() noexcept;
    -
    572 protected:
    -
    576  simdjson_inline error_code consume() noexcept;
    -
    577 
    -
    578  simdjson_inline document(ondemand::json_iterator &&iter) noexcept;
    -
    579  simdjson_inline const uint8_t *text(uint32_t idx) const noexcept;
    -
    580 
    -
    581  simdjson_inline value_iterator resume_value_iterator() noexcept;
    -
    582  simdjson_inline value_iterator get_root_value_iterator() noexcept;
    -
    583  simdjson_inline simdjson_result<object> start_or_resume_object() noexcept;
    -
    584  static simdjson_inline document start(ondemand::json_iterator &&iter) noexcept;
    -
    585 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/ondemand/json_iterator.h"
    +
    7 #endif // SIMDJSON_AMALGAMATED
    +
    8 
    +
    9 namespace simdjson {
    +
    10 namespace SIMDJSON_IMPLEMENTATION {
    +
    11 namespace ondemand {
    +
    12 
    +
    20 class document {
    +
    21 public:
    +
    27  simdjson_inline document() noexcept = default;
    +
    28  simdjson_inline document(const document &other) noexcept = delete; // pass your documents by reference, not by copy
    +
    29  simdjson_inline document(document &&other) noexcept = default;
    +
    30  simdjson_inline document &operator=(const document &other) noexcept = delete;
    +
    31  simdjson_inline document &operator=(document &&other) noexcept = default;
    +
    32 
    +
    39  simdjson_inline simdjson_result<array> get_array() & noexcept;
    +
    46  simdjson_inline simdjson_result<object> get_object() & noexcept;
    +
    53  simdjson_inline simdjson_result<uint64_t> get_uint64() noexcept;
    +
    60  simdjson_inline simdjson_result<uint64_t> get_uint64_in_string() noexcept;
    +
    67  simdjson_inline simdjson_result<int64_t> get_int64() noexcept;
    +
    74  simdjson_inline simdjson_result<int64_t> get_int64_in_string() noexcept;
    +
    81  simdjson_inline simdjson_result<double> get_double() noexcept;
    +
    82 
    +
    89  simdjson_inline simdjson_result<double> get_double_in_string() noexcept;
    +
    102  simdjson_inline simdjson_result<std::string_view> get_string(bool allow_replacement = false) noexcept;
    +
    114  simdjson_inline simdjson_result<std::string_view> get_wobbly_string() noexcept;
    +
    123  simdjson_inline simdjson_result<raw_json_string> get_raw_json_string() noexcept;
    +
    130  simdjson_inline simdjson_result<bool> get_bool() noexcept;
    +
    137  simdjson_inline simdjson_result<value> get_value() noexcept;
    +
    138 
    +
    147  simdjson_inline simdjson_result<bool> is_null() noexcept;
    +
    148 
    +
    160  template<typename T> simdjson_inline simdjson_result<T> get() & noexcept {
    +
    161  // Unless the simdjson library provides an inline implementation, calling this method should
    +
    162  // immediately fail.
    +
    163  static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library.");
    +
    164  }
    +
    166  template<typename T> simdjson_inline simdjson_result<T> get() && noexcept {
    +
    167  // Unless the simdjson library provides an inline implementation, calling this method should
    +
    168  // immediately fail.
    +
    169  static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library.");
    +
    170  }
    +
    171 
    +
    183  template<typename T> simdjson_inline error_code get(T &out) & noexcept;
    +
    185  template<typename T> simdjson_inline error_code get(T &out) && noexcept;
    +
    186 
    +
    187 #if SIMDJSON_EXCEPTIONS
    +
    194  simdjson_inline operator array() & noexcept(false);
    +
    201  simdjson_inline operator object() & noexcept(false);
    +
    208  simdjson_inline operator uint64_t() noexcept(false);
    +
    215  simdjson_inline operator int64_t() noexcept(false);
    +
    222  simdjson_inline operator double() noexcept(false);
    +
    232  simdjson_inline operator std::string_view() noexcept(false);
    +
    241  simdjson_inline operator raw_json_string() noexcept(false);
    +
    248  simdjson_inline operator bool() noexcept(false);
    +
    255  simdjson_inline operator value() noexcept(false);
    +
    256 #endif
    +
    268  simdjson_inline simdjson_result<size_t> count_elements() & noexcept;
    +
    283  simdjson_inline simdjson_result<size_t> count_fields() & noexcept;
    +
    291  simdjson_inline simdjson_result<value> at(size_t index) & noexcept;
    +
    297  simdjson_inline simdjson_result<array_iterator> begin() & noexcept;
    +
    303  simdjson_inline simdjson_result<array_iterator> end() & noexcept;
    +
    304 
    +
    337  simdjson_inline simdjson_result<value> find_field(std::string_view key) & noexcept;
    +
    339  simdjson_inline simdjson_result<value> find_field(const char *key) & noexcept;
    +
    340 
    +
    371  simdjson_inline simdjson_result<value> find_field_unordered(std::string_view key) & noexcept;
    +
    373  simdjson_inline simdjson_result<value> find_field_unordered(const char *key) & noexcept;
    +
    375  simdjson_inline simdjson_result<value> operator[](std::string_view key) & noexcept;
    +
    377  simdjson_inline simdjson_result<value> operator[](const char *key) & noexcept;
    +
    378 
    +
    390  simdjson_inline simdjson_result<json_type> type() noexcept;
    +
    391 
    +
    399  simdjson_inline simdjson_result<bool> is_scalar() noexcept;
    +
    400 
    +
    406  simdjson_inline bool is_negative() noexcept;
    +
    416  simdjson_inline simdjson_result<bool> is_integer() noexcept;
    +
    439  simdjson_inline simdjson_result<number_type> get_number_type() noexcept;
    +
    440 
    +
    467  simdjson_warn_unused simdjson_inline simdjson_result<number> get_number() noexcept;
    +
    468 
    +
    491  simdjson_inline simdjson_result<std::string_view> raw_json_token() noexcept;
    +
    492 
    +
    498  inline void rewind() noexcept;
    +
    502  inline std::string to_debug_string() noexcept;
    +
    507  inline bool is_alive() noexcept;
    +
    508 
    +
    512  inline simdjson_result<const char *> current_location() const noexcept;
    +
    513 
    +
    519  inline bool at_end() const noexcept;
    +
    520 
    +
    530  simdjson_inline int32_t current_depth() const noexcept;
    +
    531 
    +
    563  simdjson_inline simdjson_result<value> at_pointer(std::string_view json_pointer) noexcept;
    +
    569  simdjson_inline simdjson_result<std::string_view> raw_json() noexcept;
    +
    570 protected:
    +
    574  simdjson_inline error_code consume() noexcept;
    +
    575 
    +
    576  simdjson_inline document(ondemand::json_iterator &&iter) noexcept;
    +
    577  simdjson_inline const uint8_t *text(uint32_t idx) const noexcept;
    +
    578 
    +
    579  simdjson_inline value_iterator resume_value_iterator() noexcept;
    +
    580  simdjson_inline value_iterator get_root_value_iterator() noexcept;
    +
    581  simdjson_inline simdjson_result<object> start_or_resume_object() noexcept;
    +
    582  static simdjson_inline document start(ondemand::json_iterator &&iter) noexcept;
    +
    583 
    +
    584  //
    +
    585  // Fields
    586  //
    -
    587  // Fields
    -
    588  //
    -
    589  json_iterator iter{};
    -
    590  static constexpr depth_t DOCUMENT_DEPTH = 0;
    -
    591 
    -
    592  friend class array_iterator;
    -
    593  friend class value;
    -
    594  friend class ondemand::parser;
    -
    595  friend class object;
    -
    596  friend class array;
    -
    597  friend class field;
    -
    598  friend class token;
    -
    599  friend class document_stream;
    -
    600  friend class document_reference;
    -
    601 };
    -
    602 
    -
    603 
    - -
    608 public:
    -
    609  simdjson_inline document_reference() noexcept;
    -
    610  simdjson_inline document_reference(document &d) noexcept;
    -
    611  simdjson_inline document_reference(const document_reference &other) noexcept = default;
    -
    612  simdjson_inline document_reference& operator=(const document_reference &other) noexcept = default;
    -
    613  simdjson_inline void rewind() noexcept;
    -
    614  simdjson_inline simdjson_result<array> get_array() & noexcept;
    -
    615  simdjson_inline simdjson_result<object> get_object() & noexcept;
    -
    616  simdjson_inline simdjson_result<uint64_t> get_uint64() noexcept;
    -
    617  simdjson_inline simdjson_result<uint64_t> get_uint64_in_string() noexcept;
    -
    618  simdjson_inline simdjson_result<int64_t> get_int64() noexcept;
    -
    619  simdjson_inline simdjson_result<int64_t> get_int64_in_string() noexcept;
    -
    620  simdjson_inline simdjson_result<double> get_double() noexcept;
    -
    621  simdjson_inline simdjson_result<double> get_double_in_string() noexcept;
    -
    622  simdjson_inline simdjson_result<std::string_view> get_string(bool allow_replacement = false) noexcept;
    -
    623  simdjson_inline simdjson_result<std::string_view> get_wobbly_string() noexcept;
    -
    624  simdjson_inline simdjson_result<raw_json_string> get_raw_json_string() noexcept;
    -
    625  simdjson_inline simdjson_result<bool> get_bool() noexcept;
    -
    626  simdjson_inline simdjson_result<value> get_value() noexcept;
    -
    627 
    -
    628  simdjson_inline simdjson_result<bool> is_null() noexcept;
    -
    629  simdjson_inline simdjson_result<std::string_view> raw_json() noexcept;
    -
    630  simdjson_inline operator document&() const noexcept;
    -
    631 
    -
    632 #if SIMDJSON_EXCEPTIONS
    -
    633  simdjson_inline operator array() & noexcept(false);
    -
    634  simdjson_inline operator object() & noexcept(false);
    -
    635  simdjson_inline operator uint64_t() noexcept(false);
    -
    636  simdjson_inline operator int64_t() noexcept(false);
    -
    637  simdjson_inline operator double() noexcept(false);
    -
    638  simdjson_inline operator std::string_view() noexcept(false);
    -
    639  simdjson_inline operator raw_json_string() noexcept(false);
    -
    640  simdjson_inline operator bool() noexcept(false);
    -
    641  simdjson_inline operator value() noexcept(false);
    -
    642 #endif
    -
    643  simdjson_inline simdjson_result<size_t> count_elements() & noexcept;
    -
    644  simdjson_inline simdjson_result<size_t> count_fields() & noexcept;
    -
    645  simdjson_inline simdjson_result<value> at(size_t index) & noexcept;
    -
    646  simdjson_inline simdjson_result<array_iterator> begin() & noexcept;
    -
    647  simdjson_inline simdjson_result<array_iterator> end() & noexcept;
    -
    648  simdjson_inline simdjson_result<value> find_field(std::string_view key) & noexcept;
    -
    649  simdjson_inline simdjson_result<value> find_field(const char *key) & noexcept;
    -
    650  simdjson_inline simdjson_result<value> operator[](std::string_view key) & noexcept;
    -
    651  simdjson_inline simdjson_result<value> operator[](const char *key) & noexcept;
    -
    652  simdjson_inline simdjson_result<value> find_field_unordered(std::string_view key) & noexcept;
    -
    653  simdjson_inline simdjson_result<value> find_field_unordered(const char *key) & noexcept;
    -
    654 
    -
    655  simdjson_inline simdjson_result<json_type> type() noexcept;
    -
    656  simdjson_inline simdjson_result<bool> is_scalar() noexcept;
    -
    657 
    -
    658  simdjson_inline simdjson_result<const char *> current_location() noexcept;
    -
    659  simdjson_inline int32_t current_depth() const noexcept;
    -
    660  simdjson_inline bool is_negative() noexcept;
    -
    661  simdjson_inline simdjson_result<bool> is_integer() noexcept;
    -
    662  simdjson_inline simdjson_result<number_type> get_number_type() noexcept;
    -
    663  simdjson_inline simdjson_result<number> get_number() noexcept;
    -
    664  simdjson_inline simdjson_result<std::string_view> raw_json_token() noexcept;
    -
    665  simdjson_inline simdjson_result<value> at_pointer(std::string_view json_pointer) noexcept;
    -
    666 private:
    -
    667  document *doc{nullptr};
    -
    668 };
    -
    669 } // namespace ondemand
    -
    670 } // namespace SIMDJSON_IMPLEMENTATION
    -
    671 } // namespace simdjson
    +
    587  json_iterator iter{};
    +
    588  static constexpr depth_t DOCUMENT_DEPTH = 0;
    +
    589 
    +
    590  friend class array_iterator;
    +
    591  friend class value;
    +
    592  friend class ondemand::parser;
    +
    593  friend class object;
    +
    594  friend class array;
    +
    595  friend class field;
    +
    596  friend class token;
    +
    597  friend class document_stream;
    +
    598  friend class document_reference;
    +
    599 };
    +
    600 
    +
    601 
    + +
    606 public:
    +
    607  simdjson_inline document_reference() noexcept;
    +
    608  simdjson_inline document_reference(document &d) noexcept;
    +
    609  simdjson_inline document_reference(const document_reference &other) noexcept = default;
    +
    610  simdjson_inline document_reference& operator=(const document_reference &other) noexcept = default;
    +
    611  simdjson_inline void rewind() noexcept;
    +
    612  simdjson_inline simdjson_result<array> get_array() & noexcept;
    +
    613  simdjson_inline simdjson_result<object> get_object() & noexcept;
    +
    614  simdjson_inline simdjson_result<uint64_t> get_uint64() noexcept;
    +
    615  simdjson_inline simdjson_result<uint64_t> get_uint64_in_string() noexcept;
    +
    616  simdjson_inline simdjson_result<int64_t> get_int64() noexcept;
    +
    617  simdjson_inline simdjson_result<int64_t> get_int64_in_string() noexcept;
    +
    618  simdjson_inline simdjson_result<double> get_double() noexcept;
    +
    619  simdjson_inline simdjson_result<double> get_double_in_string() noexcept;
    +
    620  simdjson_inline simdjson_result<std::string_view> get_string(bool allow_replacement = false) noexcept;
    +
    621  simdjson_inline simdjson_result<std::string_view> get_wobbly_string() noexcept;
    +
    622  simdjson_inline simdjson_result<raw_json_string> get_raw_json_string() noexcept;
    +
    623  simdjson_inline simdjson_result<bool> get_bool() noexcept;
    +
    624  simdjson_inline simdjson_result<value> get_value() noexcept;
    +
    625 
    +
    626  simdjson_inline simdjson_result<bool> is_null() noexcept;
    +
    627  simdjson_inline simdjson_result<std::string_view> raw_json() noexcept;
    +
    628  simdjson_inline operator document&() const noexcept;
    +
    629 
    +
    630 #if SIMDJSON_EXCEPTIONS
    +
    631  simdjson_inline operator array() & noexcept(false);
    +
    632  simdjson_inline operator object() & noexcept(false);
    +
    633  simdjson_inline operator uint64_t() noexcept(false);
    +
    634  simdjson_inline operator int64_t() noexcept(false);
    +
    635  simdjson_inline operator double() noexcept(false);
    +
    636  simdjson_inline operator std::string_view() noexcept(false);
    +
    637  simdjson_inline operator raw_json_string() noexcept(false);
    +
    638  simdjson_inline operator bool() noexcept(false);
    +
    639  simdjson_inline operator value() noexcept(false);
    +
    640 #endif
    +
    641  simdjson_inline simdjson_result<size_t> count_elements() & noexcept;
    +
    642  simdjson_inline simdjson_result<size_t> count_fields() & noexcept;
    +
    643  simdjson_inline simdjson_result<value> at(size_t index) & noexcept;
    +
    644  simdjson_inline simdjson_result<array_iterator> begin() & noexcept;
    +
    645  simdjson_inline simdjson_result<array_iterator> end() & noexcept;
    +
    646  simdjson_inline simdjson_result<value> find_field(std::string_view key) & noexcept;
    +
    647  simdjson_inline simdjson_result<value> find_field(const char *key) & noexcept;
    +
    648  simdjson_inline simdjson_result<value> operator[](std::string_view key) & noexcept;
    +
    649  simdjson_inline simdjson_result<value> operator[](const char *key) & noexcept;
    +
    650  simdjson_inline simdjson_result<value> find_field_unordered(std::string_view key) & noexcept;
    +
    651  simdjson_inline simdjson_result<value> find_field_unordered(const char *key) & noexcept;
    +
    652 
    +
    653  simdjson_inline simdjson_result<json_type> type() noexcept;
    +
    654  simdjson_inline simdjson_result<bool> is_scalar() noexcept;
    +
    655 
    +
    656  simdjson_inline simdjson_result<const char *> current_location() noexcept;
    +
    657  simdjson_inline int32_t current_depth() const noexcept;
    +
    658  simdjson_inline bool is_negative() noexcept;
    +
    659  simdjson_inline simdjson_result<bool> is_integer() noexcept;
    +
    660  simdjson_inline simdjson_result<number_type> get_number_type() noexcept;
    +
    661  simdjson_inline simdjson_result<number> get_number() noexcept;
    +
    662  simdjson_inline simdjson_result<std::string_view> raw_json_token() noexcept;
    +
    663  simdjson_inline simdjson_result<value> at_pointer(std::string_view json_pointer) noexcept;
    +
    664 private:
    +
    665  document *doc{nullptr};
    +
    666 };
    +
    667 } // namespace ondemand
    +
    668 } // namespace SIMDJSON_IMPLEMENTATION
    +
    669 } // namespace simdjson
    +
    670 
    +
    671 namespace simdjson {
    672 
    -
    673 namespace simdjson {
    -
    674 
    -
    675 template<>
    -
    676 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document> {
    -
    677 public:
    - -
    679  simdjson_inline simdjson_result(error_code error) noexcept;
    -
    680  simdjson_inline simdjson_result() noexcept = default;
    -
    681  simdjson_inline error_code rewind() noexcept;
    -
    682 
    -
    683  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> get_array() & noexcept;
    -
    684  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> get_object() & noexcept;
    -
    685  simdjson_inline simdjson_result<uint64_t> get_uint64() noexcept;
    -
    686  simdjson_inline simdjson_result<uint64_t> get_uint64_in_string() noexcept;
    -
    687  simdjson_inline simdjson_result<int64_t> get_int64() noexcept;
    -
    688  simdjson_inline simdjson_result<int64_t> get_int64_in_string() noexcept;
    -
    689  simdjson_inline simdjson_result<double> get_double() noexcept;
    -
    690  simdjson_inline simdjson_result<double> get_double_in_string() noexcept;
    -
    691  simdjson_inline simdjson_result<std::string_view> get_string(bool allow_replacement = false) noexcept;
    -
    692  simdjson_inline simdjson_result<std::string_view> get_wobbly_string() noexcept;
    -
    693  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> get_raw_json_string() noexcept;
    -
    694  simdjson_inline simdjson_result<bool> get_bool() noexcept;
    -
    695  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> get_value() noexcept;
    -
    696  simdjson_inline simdjson_result<bool> is_null() noexcept;
    -
    697 
    -
    698  template<typename T> simdjson_inline simdjson_result<T> get() & noexcept;
    -
    699  template<typename T> simdjson_inline simdjson_result<T> get() && noexcept;
    -
    700 
    -
    701  template<typename T> simdjson_inline error_code get(T &out) & noexcept;
    -
    702  template<typename T> simdjson_inline error_code get(T &out) && noexcept;
    -
    703 
    -
    704 #if SIMDJSON_EXCEPTIONS
    -
    705  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::array() & noexcept(false);
    -
    706  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::object() & noexcept(false);
    -
    707  simdjson_inline operator uint64_t() noexcept(false);
    -
    708  simdjson_inline operator int64_t() noexcept(false);
    -
    709  simdjson_inline operator double() noexcept(false);
    -
    710  simdjson_inline operator std::string_view() noexcept(false);
    -
    711  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string() noexcept(false);
    -
    712  simdjson_inline operator bool() noexcept(false);
    -
    713  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::value() noexcept(false);
    -
    714 #endif
    -
    715  simdjson_inline simdjson_result<size_t> count_elements() & noexcept;
    -
    716  simdjson_inline simdjson_result<size_t> count_fields() & noexcept;
    -
    717  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at(size_t index) & noexcept;
    - - -
    720  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(std::string_view key) & noexcept;
    -
    721  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(const char *key) & noexcept;
    -
    722  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](std::string_view key) & noexcept;
    -
    723  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](const char *key) & noexcept;
    -
    724  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(std::string_view key) & noexcept;
    -
    725  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(const char *key) & noexcept;
    - -
    727  simdjson_inline simdjson_result<bool> is_scalar() noexcept;
    -
    728  simdjson_inline simdjson_result<const char *> current_location() noexcept;
    -
    729  simdjson_inline int32_t current_depth() const noexcept;
    -
    730  simdjson_inline bool at_end() const noexcept;
    -
    731  simdjson_inline bool is_negative() noexcept;
    -
    732  simdjson_inline simdjson_result<bool> is_integer() noexcept;
    -
    733  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::numberparsing::number_type> get_number_type() noexcept;
    -
    734  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::number> get_number() noexcept;
    -
    736  simdjson_inline simdjson_result<std::string_view> raw_json_token() noexcept;
    -
    737 
    -
    738  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at_pointer(std::string_view json_pointer) noexcept;
    -
    739 };
    -
    740 
    +
    673 template<>
    +
    674 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document> {
    +
    675 public:
    + +
    677  simdjson_inline simdjson_result(error_code error) noexcept;
    +
    678  simdjson_inline simdjson_result() noexcept = default;
    +
    679  simdjson_inline error_code rewind() noexcept;
    +
    680 
    +
    681  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> get_array() & noexcept;
    +
    682  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> get_object() & noexcept;
    +
    683  simdjson_inline simdjson_result<uint64_t> get_uint64() noexcept;
    +
    684  simdjson_inline simdjson_result<uint64_t> get_uint64_in_string() noexcept;
    +
    685  simdjson_inline simdjson_result<int64_t> get_int64() noexcept;
    +
    686  simdjson_inline simdjson_result<int64_t> get_int64_in_string() noexcept;
    +
    687  simdjson_inline simdjson_result<double> get_double() noexcept;
    +
    688  simdjson_inline simdjson_result<double> get_double_in_string() noexcept;
    +
    689  simdjson_inline simdjson_result<std::string_view> get_string(bool allow_replacement = false) noexcept;
    +
    690  simdjson_inline simdjson_result<std::string_view> get_wobbly_string() noexcept;
    +
    691  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> get_raw_json_string() noexcept;
    +
    692  simdjson_inline simdjson_result<bool> get_bool() noexcept;
    +
    693  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> get_value() noexcept;
    +
    694  simdjson_inline simdjson_result<bool> is_null() noexcept;
    +
    695 
    +
    696  template<typename T> simdjson_inline simdjson_result<T> get() & noexcept;
    +
    697  template<typename T> simdjson_inline simdjson_result<T> get() && noexcept;
    +
    698 
    +
    699  template<typename T> simdjson_inline error_code get(T &out) & noexcept;
    +
    700  template<typename T> simdjson_inline error_code get(T &out) && noexcept;
    +
    701 
    +
    702 #if SIMDJSON_EXCEPTIONS
    +
    703  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::array() & noexcept(false);
    +
    704  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::object() & noexcept(false);
    +
    705  simdjson_inline operator uint64_t() noexcept(false);
    +
    706  simdjson_inline operator int64_t() noexcept(false);
    +
    707  simdjson_inline operator double() noexcept(false);
    +
    708  simdjson_inline operator std::string_view() noexcept(false);
    +
    709  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string() noexcept(false);
    +
    710  simdjson_inline operator bool() noexcept(false);
    +
    711  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::value() noexcept(false);
    +
    712 #endif
    +
    713  simdjson_inline simdjson_result<size_t> count_elements() & noexcept;
    +
    714  simdjson_inline simdjson_result<size_t> count_fields() & noexcept;
    +
    715  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at(size_t index) & noexcept;
    + + +
    718  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(std::string_view key) & noexcept;
    +
    719  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(const char *key) & noexcept;
    +
    720  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](std::string_view key) & noexcept;
    +
    721  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](const char *key) & noexcept;
    +
    722  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(std::string_view key) & noexcept;
    +
    723  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(const char *key) & noexcept;
    + +
    725  simdjson_inline simdjson_result<bool> is_scalar() noexcept;
    +
    726  simdjson_inline simdjson_result<const char *> current_location() noexcept;
    +
    727  simdjson_inline int32_t current_depth() const noexcept;
    +
    728  simdjson_inline bool at_end() const noexcept;
    +
    729  simdjson_inline bool is_negative() noexcept;
    +
    730  simdjson_inline simdjson_result<bool> is_integer() noexcept;
    +
    731  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::number_type> get_number_type() noexcept;
    +
    732  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::number> get_number() noexcept;
    +
    734  simdjson_inline simdjson_result<std::string_view> raw_json_token() noexcept;
    +
    735 
    +
    736  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at_pointer(std::string_view json_pointer) noexcept;
    +
    737 };
    +
    738 
    +
    739 
    +
    740 } // namespace simdjson
    741 
    -
    742 } // namespace simdjson
    +
    742 
    743 
    -
    744 
    +
    744 namespace simdjson {
    745 
    -
    746 namespace simdjson {
    -
    747 
    -
    748 template<>
    -
    749 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document_reference> {
    -
    750 public:
    - -
    752  simdjson_inline simdjson_result() noexcept = default;
    -
    753  simdjson_inline error_code rewind() noexcept;
    -
    754 
    -
    755  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> get_array() & noexcept;
    -
    756  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> get_object() & noexcept;
    -
    757  simdjson_inline simdjson_result<uint64_t> get_uint64() noexcept;
    -
    758  simdjson_inline simdjson_result<uint64_t> get_uint64_in_string() noexcept;
    -
    759  simdjson_inline simdjson_result<int64_t> get_int64() noexcept;
    -
    760  simdjson_inline simdjson_result<int64_t> get_int64_in_string() noexcept;
    -
    761  simdjson_inline simdjson_result<double> get_double() noexcept;
    -
    762  simdjson_inline simdjson_result<double> get_double_in_string() noexcept;
    -
    763  simdjson_inline simdjson_result<std::string_view> get_string(bool allow_replacement = false) noexcept;
    -
    764  simdjson_inline simdjson_result<std::string_view> get_wobbly_string() noexcept;
    -
    765  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> get_raw_json_string() noexcept;
    -
    766  simdjson_inline simdjson_result<bool> get_bool() noexcept;
    -
    767  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> get_value() noexcept;
    -
    768  simdjson_inline simdjson_result<bool> is_null() noexcept;
    -
    769 
    -
    770 #if SIMDJSON_EXCEPTIONS
    -
    771  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::array() & noexcept(false);
    -
    772  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::object() & noexcept(false);
    -
    773  simdjson_inline operator uint64_t() noexcept(false);
    -
    774  simdjson_inline operator int64_t() noexcept(false);
    -
    775  simdjson_inline operator double() noexcept(false);
    -
    776  simdjson_inline operator std::string_view() noexcept(false);
    -
    777  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string() noexcept(false);
    -
    778  simdjson_inline operator bool() noexcept(false);
    -
    779  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::value() noexcept(false);
    -
    780 #endif
    -
    781  simdjson_inline simdjson_result<size_t> count_elements() & noexcept;
    -
    782  simdjson_inline simdjson_result<size_t> count_fields() & noexcept;
    -
    783  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at(size_t index) & noexcept;
    - - -
    786  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(std::string_view key) & noexcept;
    -
    787  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(const char *key) & noexcept;
    -
    788  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](std::string_view key) & noexcept;
    -
    789  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](const char *key) & noexcept;
    -
    790  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(std::string_view key) & noexcept;
    -
    791  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(const char *key) & noexcept;
    - -
    793  simdjson_inline simdjson_result<bool> is_scalar() noexcept;
    -
    794  simdjson_inline simdjson_result<const char *> current_location() noexcept;
    -
    795  simdjson_inline simdjson_result<int32_t> current_depth() const noexcept;
    -
    796  simdjson_inline simdjson_result<bool> is_negative() noexcept;
    -
    797  simdjson_inline simdjson_result<bool> is_integer() noexcept;
    -
    798  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::numberparsing::number_type> get_number_type() noexcept;
    -
    799  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::number> get_number() noexcept;
    -
    801  simdjson_inline simdjson_result<std::string_view> raw_json_token() noexcept;
    -
    802 
    -
    803  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at_pointer(std::string_view json_pointer) noexcept;
    -
    804 };
    -
    805 
    +
    746 template<>
    +
    747 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document_reference> {
    +
    748 public:
    + +
    750  simdjson_inline simdjson_result() noexcept = default;
    +
    751  simdjson_inline error_code rewind() noexcept;
    +
    752 
    +
    753  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> get_array() & noexcept;
    +
    754  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> get_object() & noexcept;
    +
    755  simdjson_inline simdjson_result<uint64_t> get_uint64() noexcept;
    +
    756  simdjson_inline simdjson_result<uint64_t> get_uint64_in_string() noexcept;
    +
    757  simdjson_inline simdjson_result<int64_t> get_int64() noexcept;
    +
    758  simdjson_inline simdjson_result<int64_t> get_int64_in_string() noexcept;
    +
    759  simdjson_inline simdjson_result<double> get_double() noexcept;
    +
    760  simdjson_inline simdjson_result<double> get_double_in_string() noexcept;
    +
    761  simdjson_inline simdjson_result<std::string_view> get_string(bool allow_replacement = false) noexcept;
    +
    762  simdjson_inline simdjson_result<std::string_view> get_wobbly_string() noexcept;
    +
    763  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> get_raw_json_string() noexcept;
    +
    764  simdjson_inline simdjson_result<bool> get_bool() noexcept;
    +
    765  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> get_value() noexcept;
    +
    766  simdjson_inline simdjson_result<bool> is_null() noexcept;
    +
    767 
    +
    768 #if SIMDJSON_EXCEPTIONS
    +
    769  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::array() & noexcept(false);
    +
    770  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::object() & noexcept(false);
    +
    771  simdjson_inline operator uint64_t() noexcept(false);
    +
    772  simdjson_inline operator int64_t() noexcept(false);
    +
    773  simdjson_inline operator double() noexcept(false);
    +
    774  simdjson_inline operator std::string_view() noexcept(false);
    +
    775  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string() noexcept(false);
    +
    776  simdjson_inline operator bool() noexcept(false);
    +
    777  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::value() noexcept(false);
    +
    778 #endif
    +
    779  simdjson_inline simdjson_result<size_t> count_elements() & noexcept;
    +
    780  simdjson_inline simdjson_result<size_t> count_fields() & noexcept;
    +
    781  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at(size_t index) & noexcept;
    + + +
    784  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(std::string_view key) & noexcept;
    +
    785  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(const char *key) & noexcept;
    +
    786  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](std::string_view key) & noexcept;
    +
    787  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](const char *key) & noexcept;
    +
    788  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(std::string_view key) & noexcept;
    +
    789  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(const char *key) & noexcept;
    + +
    791  simdjson_inline simdjson_result<bool> is_scalar() noexcept;
    +
    792  simdjson_inline simdjson_result<const char *> current_location() noexcept;
    +
    793  simdjson_inline simdjson_result<int32_t> current_depth() const noexcept;
    +
    794  simdjson_inline simdjson_result<bool> is_negative() noexcept;
    +
    795  simdjson_inline simdjson_result<bool> is_integer() noexcept;
    +
    796  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::number_type> get_number_type() noexcept;
    +
    797  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::number> get_number() noexcept;
    +
    799  simdjson_inline simdjson_result<std::string_view> raw_json_token() noexcept;
    +
    800 
    +
    801  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at_pointer(std::string_view json_pointer) noexcept;
    +
    802 };
    +
    803 
    +
    804 
    +
    805 } // namespace simdjson
    806 
    -
    807 } // namespace simdjson
    - - -
    A document_reference is a thin wrapper around a document reference instance.
    Definition: document.h:607
    -
    simdjson_inline simdjson_result< uint64_t > get_uint64() noexcept
    The document_reference instances are used primarily/solely for streams of JSON documents.
    Definition: document-inl.h:563
    - - -
    simdjson_inline simdjson_result< value > at(size_t index) &noexcept
    Get the value at the given index in the array.
    Definition: document-inl.h:179
    -
    static constexpr depth_t DOCUMENT_DEPTH
    document depth is always 0
    Definition: document.h:590
    -
    simdjson_inline int32_t current_depth() const noexcept
    Returns the current depth in the document if in bounds.
    Definition: document-inl.h:27
    -
    simdjson_inline simdjson_result< array_iterator > begin() &noexcept
    Begin array iteration.
    Definition: document-inl.h:183
    -
    simdjson_inline simdjson_result< size_t > count_fields() &noexcept
    This method scans the object and counts the number of key-value pairs.
    Definition: document-inl.h:172
    -
    simdjson_inline simdjson_result< std::string_view > get_string(bool allow_replacement=false) noexcept
    Cast this JSON value to a string.
    Definition: document-inl.h:112
    -
    simdjson_warn_unused simdjson_inline simdjson_result< number > get_number() noexcept
    Attempt to parse an ondemand::number.
    Definition: document-inl.h:250
    -
    bool is_alive() noexcept
    Some unrecoverable error conditions may render the document instance unusable.
    Definition: document-inl.h:36
    -
    simdjson_inline simdjson_result< bool > get_bool() noexcept
    Cast this JSON value to a bool.
    Definition: document-inl.h:121
    -
    simdjson_inline simdjson_result< object > get_object() &noexcept
    Cast this JSON value to an object.
    Definition: document-inl.h:81
    -
    simdjson_inline simdjson_result< uint64_t > get_uint64() noexcept
    Cast this JSON value to an unsigned integer.
    Definition: document-inl.h:94
    -
    simdjson_inline bool is_negative() noexcept
    Checks whether the document is a negative number.
    Definition: document-inl.h:238
    +
    807 #endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H
    + + +
    A document_reference is a thin wrapper around a document reference instance.
    Definition: document.h:605
    +
    simdjson_inline simdjson_result< uint64_t > get_uint64() noexcept
    The document_reference instances are used primarily/solely for streams of JSON documents.
    Definition: document-inl.h:579
    + + +
    simdjson_inline simdjson_result< value > at(size_t index) &noexcept
    Get the value at the given index in the array.
    Definition: document-inl.h:195
    +
    static constexpr depth_t DOCUMENT_DEPTH
    document depth is always 0
    Definition: document.h:588
    +
    simdjson_inline int32_t current_depth() const noexcept
    Returns the current depth in the document if in bounds.
    Definition: document-inl.h:43
    +
    simdjson_inline simdjson_result< array_iterator > begin() &noexcept
    Begin array iteration.
    Definition: document-inl.h:199
    +
    simdjson_inline simdjson_result< size_t > count_fields() &noexcept
    This method scans the object and counts the number of key-value pairs.
    Definition: document-inl.h:188
    +
    simdjson_inline simdjson_result< std::string_view > get_string(bool allow_replacement=false) noexcept
    Cast this JSON value to a string.
    Definition: document-inl.h:128
    +
    simdjson_warn_unused simdjson_inline simdjson_result< number > get_number() noexcept
    Attempt to parse an ondemand::number.
    Definition: document-inl.h:266
    +
    bool is_alive() noexcept
    Some unrecoverable error conditions may render the document instance unusable.
    Definition: document-inl.h:52
    +
    simdjson_inline simdjson_result< bool > get_bool() noexcept
    Cast this JSON value to a bool.
    Definition: document-inl.h:137
    +
    simdjson_inline simdjson_result< object > get_object() &noexcept
    Cast this JSON value to an object.
    Definition: document-inl.h:97
    +
    simdjson_inline simdjson_result< uint64_t > get_uint64() noexcept
    Cast this JSON value to an unsigned integer.
    Definition: document-inl.h:110
    +
    simdjson_inline bool is_negative() noexcept
    Checks whether the document is a negative number.
    Definition: document-inl.h:254
    simdjson_inline document() noexcept=default
    Create a new invalid document.
    -
    simdjson_inline simdjson_result< std::string_view > raw_json_token() noexcept
    Get the raw JSON for this token.
    Definition: document-inl.h:255
    -
    simdjson_inline simdjson_result< uint64_t > get_uint64_in_string() noexcept
    Cast this JSON value (inside string) to an unsigned integer.
    Definition: document-inl.h:97
    -
    simdjson_inline simdjson_result< bool > is_null() noexcept
    Checks if this JSON value is null.
    Definition: document-inl.h:124
    -
    simdjson_inline simdjson_result< int64_t > get_int64() noexcept
    Cast this JSON value to a signed integer.
    Definition: document-inl.h:100
    -
    simdjson_inline simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
    Get the value associated with the given JSON pointer.
    Definition: document-inl.h:260
    -
    simdjson_inline simdjson_result< json_type > type() noexcept
    Get the type of this JSON value.
    Definition: document-inl.h:227
    -
    simdjson_inline simdjson_result< array_iterator > end() &noexcept
    Sentinel representing the end of the array.
    Definition: document-inl.h:186
    -
    simdjson_inline simdjson_result< T > get() &noexcept
    Get this value as the given type.
    Definition: document.h:162
    -
    simdjson_inline simdjson_result< double > get_double_in_string() noexcept
    Cast this JSON value (inside string) to a double.
    Definition: document-inl.h:109
    -
    json_iterator iter
    Current position in the document.
    Definition: document.h:589
    -
    simdjson_inline simdjson_result< double > get_double() noexcept
    Cast this JSON value to a double.
    Definition: document-inl.h:106
    -
    std::string to_debug_string() noexcept
    Returns debugging information.
    Definition: document-inl.h:19
    -
    void rewind() noexcept
    Reset the iterator inside the document instance so we are pointing back at the beginning of the docum...
    Definition: document-inl.h:15
    -
    simdjson_inline simdjson_result< std::string_view > raw_json() noexcept
    Consumes the document and returns a string_view instance corresponding to the document as represented...
    Definition: document-inl.h:215
    -
    simdjson_inline simdjson_result< value > find_field_unordered(std::string_view key) &noexcept
    Look up a field by name on an object, without regard to key order.
    Definition: document-inl.h:196
    -
    simdjson_inline simdjson_result< int64_t > get_int64_in_string() noexcept
    Cast this JSON value (inside string) to a signed integer.
    Definition: document-inl.h:103
    -
    simdjson_inline simdjson_result< size_t > count_elements() &noexcept
    This method scans the array and counts the number of elements.
    Definition: document-inl.h:165
    -
    simdjson_inline simdjson_result< value > get_value() noexcept
    Cast this JSON value to a value when the document is an object or an array.
    Definition: document-inl.h:52
    -
    simdjson_inline simdjson_result< value > find_field(std::string_view key) &noexcept
    Look up a field by name on an object (order-sensitive).
    Definition: document-inl.h:190
    -
    simdjson_inline simdjson_result< number_type > get_number_type() noexcept
    Determine the number type (integer or floating-point number) as quickly as possible.
    Definition: document-inl.h:246
    -
    simdjson_inline error_code consume() noexcept
    Consumes the document.
    Definition: document-inl.h:209
    -
    simdjson_inline simdjson_result< bool > is_scalar() noexcept
    Checks whether the document is a scalar (string, number, null, Boolean).
    Definition: document-inl.h:231
    -
    simdjson_inline simdjson_result< std::string_view > get_wobbly_string() noexcept
    Cast this JSON value to a string.
    Definition: document-inl.h:115
    -
    bool at_end() const noexcept
    Returns true if this document has been fully parsed.
    Definition: document-inl.h:31
    -
    simdjson_inline simdjson_result< array > get_array() &noexcept
    Cast this JSON value to an array.
    Definition: document-inl.h:77
    +
    simdjson_inline simdjson_result< std::string_view > raw_json_token() noexcept
    Get the raw JSON for this token.
    Definition: document-inl.h:271
    +
    simdjson_inline simdjson_result< uint64_t > get_uint64_in_string() noexcept
    Cast this JSON value (inside string) to an unsigned integer.
    Definition: document-inl.h:113
    +
    simdjson_inline simdjson_result< bool > is_null() noexcept
    Checks if this JSON value is null.
    Definition: document-inl.h:140
    +
    simdjson_inline simdjson_result< int64_t > get_int64() noexcept
    Cast this JSON value to a signed integer.
    Definition: document-inl.h:116
    +
    simdjson_inline simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
    Get the value associated with the given JSON pointer.
    Definition: document-inl.h:276
    +
    simdjson_inline simdjson_result< json_type > type() noexcept
    Get the type of this JSON value.
    Definition: document-inl.h:243
    +
    simdjson_inline simdjson_result< array_iterator > end() &noexcept
    Sentinel representing the end of the array.
    Definition: document-inl.h:202
    +
    simdjson_inline simdjson_result< T > get() &noexcept
    Get this value as the given type.
    Definition: document.h:160
    +
    simdjson_inline simdjson_result< double > get_double_in_string() noexcept
    Cast this JSON value (inside string) to a double.
    Definition: document-inl.h:125
    +
    json_iterator iter
    Current position in the document.
    Definition: document.h:587
    +
    simdjson_inline simdjson_result< double > get_double() noexcept
    Cast this JSON value to a double.
    Definition: document-inl.h:122
    +
    std::string to_debug_string() noexcept
    Returns debugging information.
    Definition: document-inl.h:35
    +
    void rewind() noexcept
    Reset the iterator inside the document instance so we are pointing back at the beginning of the docum...
    Definition: document-inl.h:31
    +
    simdjson_inline simdjson_result< std::string_view > raw_json() noexcept
    Consumes the document and returns a string_view instance corresponding to the document as represented...
    Definition: document-inl.h:231
    +
    simdjson_inline simdjson_result< value > find_field_unordered(std::string_view key) &noexcept
    Look up a field by name on an object, without regard to key order.
    Definition: document-inl.h:212
    +
    simdjson_inline simdjson_result< int64_t > get_int64_in_string() noexcept
    Cast this JSON value (inside string) to a signed integer.
    Definition: document-inl.h:119
    +
    simdjson_inline simdjson_result< size_t > count_elements() &noexcept
    This method scans the array and counts the number of elements.
    Definition: document-inl.h:181
    +
    simdjson_inline simdjson_result< value > get_value() noexcept
    Cast this JSON value to a value when the document is an object or an array.
    Definition: document-inl.h:68
    +
    simdjson_inline simdjson_result< value > find_field(std::string_view key) &noexcept
    Look up a field by name on an object (order-sensitive).
    Definition: document-inl.h:206
    +
    simdjson_inline simdjson_result< number_type > get_number_type() noexcept
    Determine the number type (integer or floating-point number) as quickly as possible.
    Definition: document-inl.h:262
    +
    simdjson_inline error_code consume() noexcept
    Consumes the document.
    Definition: document-inl.h:225
    +
    simdjson_inline simdjson_result< bool > is_scalar() noexcept
    Checks whether the document is a scalar (string, number, null, Boolean).
    Definition: document-inl.h:247
    +
    simdjson_inline simdjson_result< std::string_view > get_wobbly_string() noexcept
    Cast this JSON value to a string.
    Definition: document-inl.h:131
    +
    bool at_end() const noexcept
    Returns true if this document has been fully parsed.
    Definition: document-inl.h:47
    +
    simdjson_inline simdjson_result< array > get_array() &noexcept
    Cast this JSON value to an array.
    Definition: document-inl.h:93
    simdjson_inline error_code get(T &out) &noexcept
    Get this value as the given type.
    -
    simdjson_inline simdjson_result< bool > is_integer() noexcept
    Checks whether the document is an integer number.
    Definition: document-inl.h:242
    -
    simdjson_result< const char * > current_location() const noexcept
    Returns the current location in the document if in bounds.
    Definition: document-inl.h:23
    -
    simdjson_inline simdjson_result< raw_json_string > get_raw_json_string() noexcept
    Cast this JSON value to a raw_json_string.
    Definition: document-inl.h:118
    -
    A JSON field (key/value pair) in an object.
    Definition: field.h:14
    -
    A forward-only JSON object field iterator.
    Definition: object.h:10
    -
    A string escaped per JSON rules, terminated with quote (").
    -
    An ephemeral JSON value returned during iteration.
    Definition: value.h:17
    -
    @ object
    A JSON object ( { "a": 1, "b" 2, ... } )
    - -
    int32_t depth_t
    Represents the depth of a JSON value (number of nested arrays/objects).
    Definition: ondemand.h:11
    -
    We want to support argument-dependent lookup (ADL).
    +
    simdjson_inline simdjson_result< bool > is_integer() noexcept
    Checks whether the document is an integer number.
    Definition: document-inl.h:258
    +
    simdjson_result< const char * > current_location() const noexcept
    Returns the current location in the document if in bounds.
    Definition: document-inl.h:39
    +
    simdjson_inline simdjson_result< raw_json_string > get_raw_json_string() noexcept
    Cast this JSON value to a raw_json_string.
    Definition: document-inl.h:134
    +
    A JSON field (key/value pair) in an object.
    Definition: field.h:22
    +
    A forward-only JSON object field iterator.
    Definition: object.h:17
    +
    A string escaped per JSON rules, terminated with quote (").
    +
    An ephemeral JSON value returned during iteration.
    Definition: value.h:18
    +
    int32_t depth_t
    Represents the depth of a JSON value (number of nested arrays/objects).
    Definition: base.h:18
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    - -
    A type representing a JSON number.
    Definition: json_type.h:24
    - - - - - - + +
    A type representing a JSON number.
    Definition: json_type.h:32
    + + + + + +
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    -
    simdjson_warn_unused simdjson_inline error_code get(T &value) &&noexcept
    Move the value to the provided variable.
    Definition: error-inl.h:127
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    +
    simdjson_warn_unused simdjson_inline error_code get(T &value) &&noexcept
    Move the value to the provided variable.
    Definition: error-inl.h:126
    simdjson_inline T & value() &noexcept(false)
    Get the result value.
    diff --git a/generic_2ondemand_2document__stream-inl_8h_source.html b/generic_2ondemand_2document__stream-inl_8h_source.html index cd26ff81e..52e363503 100644 --- a/generic_2ondemand_2document__stream-inl_8h_source.html +++ b/generic_2ondemand_2document__stream-inl_8h_source.html @@ -91,394 +91,406 @@ $(document).ready(function(){initNavTree('generic_2ondemand_2document__stream-in
    document_stream-inl.h
    -
    1 #include <algorithm>
    -
    2 #include <limits>
    -
    3 #include <stdexcept>
    -
    4 namespace simdjson {
    -
    5 namespace SIMDJSON_IMPLEMENTATION {
    -
    6 namespace ondemand {
    -
    7 
    -
    8 #ifdef SIMDJSON_THREADS_ENABLED
    -
    9 
    -
    10 inline void stage1_worker::finish() {
    -
    11  // After calling "run" someone would call finish() to wait
    -
    12  // for the end of the processing.
    -
    13  // This function will wait until either the thread has done
    -
    14  // the processing or, else, the destructor has been called.
    -
    15  std::unique_lock<std::mutex> lock(locking_mutex);
    -
    16  cond_var.wait(lock, [this]{return has_work == false;});
    -
    17 }
    -
    18 
    -
    19 inline stage1_worker::~stage1_worker() {
    -
    20  // The thread may never outlive the stage1_worker instance
    -
    21  // and will always be stopped/joined before the stage1_worker
    -
    22  // instance is gone.
    -
    23  stop_thread();
    -
    24 }
    -
    25 
    -
    26 inline void stage1_worker::start_thread() {
    -
    27  std::unique_lock<std::mutex> lock(locking_mutex);
    -
    28  if(thread.joinable()) {
    -
    29  return; // This should never happen but we never want to create more than one thread.
    -
    30  }
    -
    31  thread = std::thread([this]{
    -
    32  while(true) {
    -
    33  std::unique_lock<std::mutex> thread_lock(locking_mutex);
    -
    34  // We wait for either "run" or "stop_thread" to be called.
    -
    35  cond_var.wait(thread_lock, [this]{return has_work || !can_work;});
    -
    36  // If, for some reason, the stop_thread() method was called (i.e., the
    -
    37  // destructor of stage1_worker is called, then we want to immediately destroy
    -
    38  // the thread (and not do any more processing).
    -
    39  if(!can_work) {
    -
    40  break;
    -
    41  }
    -
    42  this->owner->stage1_thread_error = this->owner->run_stage1(*this->stage1_thread_parser,
    -
    43  this->_next_batch_start);
    -
    44  this->has_work = false;
    -
    45  // The condition variable call should be moved after thread_lock.unlock() for performance
    -
    46  // reasons but thread sanitizers may report it as a data race if we do.
    -
    47  // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock
    -
    48  cond_var.notify_one(); // will notify "finish"
    -
    49  thread_lock.unlock();
    -
    50  }
    -
    51  }
    -
    52  );
    -
    53 }
    -
    54 
    -
    55 
    -
    56 inline void stage1_worker::stop_thread() {
    -
    57  std::unique_lock<std::mutex> lock(locking_mutex);
    -
    58  // We have to make sure that all locks can be released.
    -
    59  can_work = false;
    -
    60  has_work = false;
    -
    61  cond_var.notify_all();
    -
    62  lock.unlock();
    -
    63  if(thread.joinable()) {
    -
    64  thread.join();
    -
    65  }
    -
    66 }
    -
    67 
    -
    68 inline void stage1_worker::run(document_stream * ds, parser * stage1, size_t next_batch_start) {
    -
    69  std::unique_lock<std::mutex> lock(locking_mutex);
    -
    70  owner = ds;
    -
    71  _next_batch_start = next_batch_start;
    -
    72  stage1_thread_parser = stage1;
    -
    73  has_work = true;
    -
    74  // The condition variable call should be moved after thread_lock.unlock() for performance
    -
    75  // reasons but thread sanitizers may report it as a data race if we do.
    -
    76  // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock
    -
    77  cond_var.notify_one(); // will notify the thread lock that we have work
    -
    78  lock.unlock();
    -
    79 }
    -
    80 
    -
    81 #endif // SIMDJSON_THREADS_ENABLED
    -
    82 
    -
    83 simdjson_inline document_stream::document_stream(
    -
    84  ondemand::parser &_parser,
    -
    85  const uint8_t *_buf,
    -
    86  size_t _len,
    -
    87  size_t _batch_size,
    -
    88  bool _allow_comma_separated
    -
    89 ) noexcept
    -
    90  : parser{&_parser},
    -
    91  buf{_buf},
    -
    92  len{_len},
    -
    93  batch_size{_batch_size <= MINIMAL_BATCH_SIZE ? MINIMAL_BATCH_SIZE : _batch_size},
    -
    94  allow_comma_separated{_allow_comma_separated},
    -
    95  error{SUCCESS}
    -
    96  #ifdef SIMDJSON_THREADS_ENABLED
    -
    97  , use_thread(_parser.threaded) // we need to make a copy because _parser.threaded can change
    -
    98  #endif
    -
    99 {
    -
    100 #ifdef SIMDJSON_THREADS_ENABLED
    -
    101  if(worker.get() == nullptr) {
    -
    102  error = MEMALLOC;
    -
    103  }
    -
    104 #endif
    -
    105 }
    -
    106 
    -
    107 simdjson_inline document_stream::document_stream() noexcept
    -
    108  : parser{nullptr},
    -
    109  buf{nullptr},
    -
    110  len{0},
    -
    111  batch_size{0},
    -
    112  allow_comma_separated{false},
    -
    113  error{UNINITIALIZED}
    -
    114  #ifdef SIMDJSON_THREADS_ENABLED
    -
    115  , use_thread(false)
    -
    116  #endif
    -
    117 {
    -
    118 }
    -
    119 
    -
    120 simdjson_inline document_stream::~document_stream() noexcept
    -
    121 {
    -
    122  #ifdef SIMDJSON_THREADS_ENABLED
    -
    123  worker.reset();
    -
    124  #endif
    -
    125 }
    -
    126 
    -
    127 inline size_t document_stream::size_in_bytes() const noexcept {
    -
    128  return len;
    -
    129 }
    -
    130 
    -
    131 inline size_t document_stream::truncated_bytes() const noexcept {
    -
    132  if(error == CAPACITY) { return len - batch_start; }
    -
    133  return parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] - parser->implementation->structural_indexes[parser->implementation->n_structural_indexes + 1];
    -
    134 }
    -
    135 
    -
    136 simdjson_inline document_stream::iterator::iterator() noexcept
    -
    137  : stream{nullptr}, finished{true} {
    -
    138 }
    -
    139 
    -
    140 simdjson_inline document_stream::iterator::iterator(document_stream* _stream, bool is_end) noexcept
    -
    141  : stream{_stream}, finished{is_end} {
    -
    142 }
    -
    143 
    - -
    145  //if(stream->error) { return stream->error; }
    -
    146  return simdjson_result<ondemand::document_reference>(stream->doc, stream->error);
    -
    147 }
    -
    148 
    - -
    150  // If there is an error, then we want the iterator
    -
    151  // to be finished, no matter what. (E.g., we do not
    -
    152  // keep generating documents with errors, or go beyond
    -
    153  // a document with errors.)
    -
    154  //
    -
    155  // Users do not have to call "operator*()" when they use operator++,
    -
    156  // so we need to end the stream in the operator++ function.
    -
    157  //
    -
    158  // Note that setting finished = true is essential otherwise
    -
    159  // we would enter an infinite loop.
    -
    160  if (stream->error) { finished = true; }
    -
    161  // Note that stream->error() is guarded against error conditions
    -
    162  // (it will immediately return if stream->error casts to false).
    -
    163  // In effect, this next function does nothing when (stream->error)
    -
    164  // is true (hence the risk of an infinite loop).
    -
    165  stream->next();
    -
    166  // If that was the last document, we're finished.
    -
    167  // It is the only type of error we do not want to appear
    -
    168  // in operator*.
    -
    169  if (stream->error == EMPTY) { finished = true; }
    -
    170  // If we had any other kind of error (not EMPTY) then we want
    -
    171  // to pass it along to the operator* and we cannot mark the result
    -
    172  // as "finished" just yet.
    -
    173  return *this;
    -
    174 }
    -
    175 
    -
    176 simdjson_inline bool document_stream::iterator::operator!=(const document_stream::iterator &other) const noexcept {
    -
    177  return finished != other.finished;
    -
    178 }
    -
    179 
    - -
    181  start();
    -
    182  // If there are no documents, we're finished.
    -
    183  return iterator(this, error == EMPTY);
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/ondemand/document_stream.h"
    +
    7 #include "simdjson/generic/ondemand/document-inl.h"
    +
    8 #include "simdjson/generic/implementation_simdjson_result_base-inl.h"
    +
    9 #endif // SIMDJSON_AMALGAMATED
    +
    10 
    +
    11 #include <algorithm>
    +
    12 #include <stdexcept>
    +
    13 
    +
    14 namespace simdjson {
    +
    15 namespace SIMDJSON_IMPLEMENTATION {
    +
    16 namespace ondemand {
    +
    17 
    +
    18 #ifdef SIMDJSON_THREADS_ENABLED
    +
    19 
    +
    20 inline void stage1_worker::finish() {
    +
    21  // After calling "run" someone would call finish() to wait
    +
    22  // for the end of the processing.
    +
    23  // This function will wait until either the thread has done
    +
    24  // the processing or, else, the destructor has been called.
    +
    25  std::unique_lock<std::mutex> lock(locking_mutex);
    +
    26  cond_var.wait(lock, [this]{return has_work == false;});
    +
    27 }
    +
    28 
    +
    29 inline stage1_worker::~stage1_worker() {
    +
    30  // The thread may never outlive the stage1_worker instance
    +
    31  // and will always be stopped/joined before the stage1_worker
    +
    32  // instance is gone.
    +
    33  stop_thread();
    +
    34 }
    +
    35 
    +
    36 inline void stage1_worker::start_thread() {
    +
    37  std::unique_lock<std::mutex> lock(locking_mutex);
    +
    38  if(thread.joinable()) {
    +
    39  return; // This should never happen but we never want to create more than one thread.
    +
    40  }
    +
    41  thread = std::thread([this]{
    +
    42  while(true) {
    +
    43  std::unique_lock<std::mutex> thread_lock(locking_mutex);
    +
    44  // We wait for either "run" or "stop_thread" to be called.
    +
    45  cond_var.wait(thread_lock, [this]{return has_work || !can_work;});
    +
    46  // If, for some reason, the stop_thread() method was called (i.e., the
    +
    47  // destructor of stage1_worker is called, then we want to immediately destroy
    +
    48  // the thread (and not do any more processing).
    +
    49  if(!can_work) {
    +
    50  break;
    +
    51  }
    +
    52  this->owner->stage1_thread_error = this->owner->run_stage1(*this->stage1_thread_parser,
    +
    53  this->_next_batch_start);
    +
    54  this->has_work = false;
    +
    55  // The condition variable call should be moved after thread_lock.unlock() for performance
    +
    56  // reasons but thread sanitizers may report it as a data race if we do.
    +
    57  // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock
    +
    58  cond_var.notify_one(); // will notify "finish"
    +
    59  thread_lock.unlock();
    +
    60  }
    +
    61  }
    +
    62  );
    +
    63 }
    +
    64 
    +
    65 
    +
    66 inline void stage1_worker::stop_thread() {
    +
    67  std::unique_lock<std::mutex> lock(locking_mutex);
    +
    68  // We have to make sure that all locks can be released.
    +
    69  can_work = false;
    +
    70  has_work = false;
    +
    71  cond_var.notify_all();
    +
    72  lock.unlock();
    +
    73  if(thread.joinable()) {
    +
    74  thread.join();
    +
    75  }
    +
    76 }
    +
    77 
    +
    78 inline void stage1_worker::run(document_stream * ds, parser * stage1, size_t next_batch_start) {
    +
    79  std::unique_lock<std::mutex> lock(locking_mutex);
    +
    80  owner = ds;
    +
    81  _next_batch_start = next_batch_start;
    +
    82  stage1_thread_parser = stage1;
    +
    83  has_work = true;
    +
    84  // The condition variable call should be moved after thread_lock.unlock() for performance
    +
    85  // reasons but thread sanitizers may report it as a data race if we do.
    +
    86  // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock
    +
    87  cond_var.notify_one(); // will notify the thread lock that we have work
    +
    88  lock.unlock();
    +
    89 }
    +
    90 
    +
    91 #endif // SIMDJSON_THREADS_ENABLED
    +
    92 
    +
    93 simdjson_inline document_stream::document_stream(
    +
    94  ondemand::parser &_parser,
    +
    95  const uint8_t *_buf,
    +
    96  size_t _len,
    +
    97  size_t _batch_size,
    +
    98  bool _allow_comma_separated
    +
    99 ) noexcept
    +
    100  : parser{&_parser},
    +
    101  buf{_buf},
    +
    102  len{_len},
    +
    103  batch_size{_batch_size <= MINIMAL_BATCH_SIZE ? MINIMAL_BATCH_SIZE : _batch_size},
    +
    104  allow_comma_separated{_allow_comma_separated},
    +
    105  error{SUCCESS}
    +
    106  #ifdef SIMDJSON_THREADS_ENABLED
    +
    107  , use_thread(_parser.threaded) // we need to make a copy because _parser.threaded can change
    +
    108  #endif
    +
    109 {
    +
    110 #ifdef SIMDJSON_THREADS_ENABLED
    +
    111  if(worker.get() == nullptr) {
    +
    112  error = MEMALLOC;
    +
    113  }
    +
    114 #endif
    +
    115 }
    +
    116 
    +
    117 simdjson_inline document_stream::document_stream() noexcept
    +
    118  : parser{nullptr},
    +
    119  buf{nullptr},
    +
    120  len{0},
    +
    121  batch_size{0},
    +
    122  allow_comma_separated{false},
    +
    123  error{UNINITIALIZED}
    +
    124  #ifdef SIMDJSON_THREADS_ENABLED
    +
    125  , use_thread(false)
    +
    126  #endif
    +
    127 {
    +
    128 }
    +
    129 
    +
    130 simdjson_inline document_stream::~document_stream() noexcept
    +
    131 {
    +
    132  #ifdef SIMDJSON_THREADS_ENABLED
    +
    133  worker.reset();
    +
    134  #endif
    +
    135 }
    +
    136 
    +
    137 inline size_t document_stream::size_in_bytes() const noexcept {
    +
    138  return len;
    +
    139 }
    +
    140 
    +
    141 inline size_t document_stream::truncated_bytes() const noexcept {
    +
    142  if(error == CAPACITY) { return len - batch_start; }
    +
    143  return parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] - parser->implementation->structural_indexes[parser->implementation->n_structural_indexes + 1];
    +
    144 }
    +
    145 
    +
    146 simdjson_inline document_stream::iterator::iterator() noexcept
    +
    147  : stream{nullptr}, finished{true} {
    +
    148 }
    +
    149 
    +
    150 simdjson_inline document_stream::iterator::iterator(document_stream* _stream, bool is_end) noexcept
    +
    151  : stream{_stream}, finished{is_end} {
    +
    152 }
    +
    153 
    + +
    155  //if(stream->error) { return stream->error; }
    +
    156  return simdjson_result<ondemand::document_reference>(stream->doc, stream->error);
    +
    157 }
    +
    158 
    + +
    160  // If there is an error, then we want the iterator
    +
    161  // to be finished, no matter what. (E.g., we do not
    +
    162  // keep generating documents with errors, or go beyond
    +
    163  // a document with errors.)
    +
    164  //
    +
    165  // Users do not have to call "operator*()" when they use operator++,
    +
    166  // so we need to end the stream in the operator++ function.
    +
    167  //
    +
    168  // Note that setting finished = true is essential otherwise
    +
    169  // we would enter an infinite loop.
    +
    170  if (stream->error) { finished = true; }
    +
    171  // Note that stream->error() is guarded against error conditions
    +
    172  // (it will immediately return if stream->error casts to false).
    +
    173  // In effect, this next function does nothing when (stream->error)
    +
    174  // is true (hence the risk of an infinite loop).
    +
    175  stream->next();
    +
    176  // If that was the last document, we're finished.
    +
    177  // It is the only type of error we do not want to appear
    +
    178  // in operator*.
    +
    179  if (stream->error == EMPTY) { finished = true; }
    +
    180  // If we had any other kind of error (not EMPTY) then we want
    +
    181  // to pass it along to the operator* and we cannot mark the result
    +
    182  // as "finished" just yet.
    +
    183  return *this;
    184 }
    185 
    - -
    187  return iterator(this, true);
    +
    186 simdjson_inline bool document_stream::iterator::operator!=(const document_stream::iterator &other) const noexcept {
    +
    187  return finished != other.finished;
    188 }
    189 
    -
    190 inline void document_stream::start() noexcept {
    -
    191  if (error) { return; }
    -
    192  error = parser->allocate(batch_size);
    -
    193  if (error) { return; }
    -
    194  // Always run the first stage 1 parse immediately
    -
    195  batch_start = 0;
    -
    196  error = run_stage1(*parser, batch_start);
    -
    197  while(error == EMPTY) {
    -
    198  // In exceptional cases, we may start with an empty block
    -
    199  batch_start = next_batch_start();
    -
    200  if (batch_start >= len) { return; }
    -
    201  error = run_stage1(*parser, batch_start);
    -
    202  }
    + +
    191  start();
    +
    192  // If there are no documents, we're finished.
    +
    193  return iterator(this, error == EMPTY);
    +
    194 }
    +
    195 
    + +
    197  return iterator(this, true);
    +
    198 }
    +
    199 
    +
    200 inline void document_stream::start() noexcept {
    +
    201  if (error) { return; }
    +
    202  error = parser->allocate(batch_size);
    203  if (error) { return; }
    -
    204  doc_index = batch_start;
    -
    205  doc = document(json_iterator(&buf[batch_start], parser));
    -
    206  doc.iter._streaming = true;
    -
    207 
    -
    208  #ifdef SIMDJSON_THREADS_ENABLED
    -
    209  if (use_thread && next_batch_start() < len) {
    -
    210  // Kick off the first thread on next batch if needed
    -
    211  error = stage1_thread_parser.allocate(batch_size);
    -
    212  if (error) { return; }
    -
    213  worker->start_thread();
    -
    214  start_stage1_thread();
    -
    215  if (error) { return; }
    -
    216  }
    -
    217  #endif // SIMDJSON_THREADS_ENABLED
    -
    218 }
    -
    219 
    -
    220 inline void document_stream::next() noexcept {
    -
    221  // We always enter at once once in an error condition.
    -
    222  if (error) { return; }
    -
    223  next_document();
    -
    224  if (error) { return; }
    -
    225  auto cur_struct_index = doc.iter._root - parser->implementation->structural_indexes.get();
    -
    226  doc_index = batch_start + parser->implementation->structural_indexes[cur_struct_index];
    -
    227 
    -
    228  // Check if at end of structural indexes (i.e. at end of batch)
    -
    229  if(cur_struct_index >= static_cast<int64_t>(parser->implementation->n_structural_indexes)) {
    -
    230  error = EMPTY;
    -
    231  // Load another batch (if available)
    -
    232  while (error == EMPTY) {
    -
    233  batch_start = next_batch_start();
    -
    234  if (batch_start >= len) { break; }
    -
    235  #ifdef SIMDJSON_THREADS_ENABLED
    -
    236  if(use_thread) {
    -
    237  load_from_stage1_thread();
    -
    238  } else {
    -
    239  error = run_stage1(*parser, batch_start);
    -
    240  }
    -
    241  #else
    -
    242  error = run_stage1(*parser, batch_start);
    -
    243  #endif
    -
    278  doc.iter = json_iterator(&buf[batch_start], parser);
    -
    279  doc.iter._streaming = true;
    -
    284  if (error) { continue; } // If the error was EMPTY, we may want to load another batch.
    -
    285  doc_index = batch_start;
    -
    286  }
    -
    287  }
    -
    288 }
    -
    289 
    -
    290 inline void document_stream::next_document() noexcept {
    -
    291  // Go to next place where depth=0 (document depth)
    -
    292  error = doc.iter.skip_child(0);
    -
    293  if (error) { return; }
    -
    294  // Always set depth=1 at the start of document
    -
    295  doc.iter._depth = 1;
    -
    296  // consume comma if comma separated is allowed
    -
    297  if (allow_comma_separated) { doc.iter.consume_character(','); }
    -
    298  // Resets the string buffer at the beginning, thus invalidating the strings.
    -
    299  doc.iter._string_buf_loc = parser->string_buf.get();
    -
    300  doc.iter._root = doc.iter.position();
    -
    301 }
    -
    302 
    -
    303 inline size_t document_stream::next_batch_start() const noexcept {
    -
    304  return batch_start + parser->implementation->structural_indexes[parser->implementation->n_structural_indexes];
    -
    305 }
    -
    306 
    -
    307 inline error_code document_stream::run_stage1(ondemand::parser &p, size_t _batch_start) noexcept {
    -
    308  // This code only updates the structural index in the parser, it does not update any json_iterator
    -
    309  // instance.
    -
    310  size_t remaining = len - _batch_start;
    -
    311  if (remaining <= batch_size) {
    -
    312  return p.implementation->stage1(&buf[_batch_start], remaining, stage1_mode::streaming_final);
    -
    313  } else {
    -
    314  return p.implementation->stage1(&buf[_batch_start], batch_size, stage1_mode::streaming_partial);
    -
    315  }
    -
    316 }
    -
    317 
    -
    318 simdjson_inline size_t document_stream::iterator::current_index() const noexcept {
    -
    319  return stream->doc_index;
    -
    320 }
    -
    321 
    -
    322 simdjson_inline std::string_view document_stream::iterator::source() const noexcept {
    -
    323  auto depth = stream->doc.iter.depth();
    -
    324  auto cur_struct_index = stream->doc.iter._root - stream->parser->implementation->structural_indexes.get();
    -
    325 
    -
    326  // If at root, process the first token to determine if scalar value
    -
    327  if (stream->doc.iter.at_root()) {
    -
    328  switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) {
    -
    329  case '{': case '[': // Depth=1 already at start of document
    -
    330  break;
    -
    331  case '}': case ']':
    -
    332  depth--;
    -
    333  break;
    -
    334  default: // Scalar value document
    -
    335  // TODO: Remove any trailing whitespaces
    -
    336  // This returns a string spanning from start of value to the beginning of the next document (excluded)
    -
    337  return std::string_view(reinterpret_cast<const char*>(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[++cur_struct_index] - current_index() - 1);
    -
    338  }
    -
    339  cur_struct_index++;
    -
    340  }
    -
    341 
    -
    342  while (cur_struct_index <= static_cast<int64_t>(stream->parser->implementation->n_structural_indexes)) {
    -
    343  switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) {
    -
    344  case '{': case '[':
    -
    345  depth++;
    -
    346  break;
    -
    347  case '}': case ']':
    -
    348  depth--;
    -
    349  break;
    -
    350  }
    -
    351  if (depth == 0) { break; }
    -
    352  cur_struct_index++;
    -
    353  }
    -
    354 
    -
    355  return std::string_view(reinterpret_cast<const char*>(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[cur_struct_index] - current_index() + stream->batch_start + 1);;
    -
    356 }
    -
    357 
    - -
    359  return stream->error;
    -
    360 }
    -
    361 
    -
    362 #ifdef SIMDJSON_THREADS_ENABLED
    -
    363 
    -
    364 inline void document_stream::load_from_stage1_thread() noexcept {
    -
    365  worker->finish();
    -
    366  // Swap to the parser that was loaded up in the thread. Make sure the parser has
    -
    367  // enough memory to swap to, as well.
    -
    368  std::swap(stage1_thread_parser,*parser);
    -
    369  error = stage1_thread_error;
    -
    370  if (error) { return; }
    +
    204  // Always run the first stage 1 parse immediately
    +
    205  batch_start = 0;
    +
    206  error = run_stage1(*parser, batch_start);
    +
    207  while(error == EMPTY) {
    +
    208  // In exceptional cases, we may start with an empty block
    +
    209  batch_start = next_batch_start();
    +
    210  if (batch_start >= len) { return; }
    +
    211  error = run_stage1(*parser, batch_start);
    +
    212  }
    +
    213  if (error) { return; }
    +
    214  doc_index = batch_start;
    +
    215  doc = document(json_iterator(&buf[batch_start], parser));
    +
    216  doc.iter._streaming = true;
    +
    217 
    +
    218  #ifdef SIMDJSON_THREADS_ENABLED
    +
    219  if (use_thread && next_batch_start() < len) {
    +
    220  // Kick off the first thread on next batch if needed
    +
    221  error = stage1_thread_parser.allocate(batch_size);
    +
    222  if (error) { return; }
    +
    223  worker->start_thread();
    +
    224  start_stage1_thread();
    +
    225  if (error) { return; }
    +
    226  }
    +
    227  #endif // SIMDJSON_THREADS_ENABLED
    +
    228 }
    +
    229 
    +
    230 inline void document_stream::next() noexcept {
    +
    231  // We always enter at once once in an error condition.
    +
    232  if (error) { return; }
    +
    233  next_document();
    +
    234  if (error) { return; }
    +
    235  auto cur_struct_index = doc.iter._root - parser->implementation->structural_indexes.get();
    +
    236  doc_index = batch_start + parser->implementation->structural_indexes[cur_struct_index];
    +
    237 
    +
    238  // Check if at end of structural indexes (i.e. at end of batch)
    +
    239  if(cur_struct_index >= static_cast<int64_t>(parser->implementation->n_structural_indexes)) {
    +
    240  error = EMPTY;
    +
    241  // Load another batch (if available)
    +
    242  while (error == EMPTY) {
    +
    243  batch_start = next_batch_start();
    +
    244  if (batch_start >= len) { break; }
    +
    245  #ifdef SIMDJSON_THREADS_ENABLED
    +
    246  if(use_thread) {
    +
    247  load_from_stage1_thread();
    +
    248  } else {
    +
    249  error = run_stage1(*parser, batch_start);
    +
    250  }
    +
    251  #else
    +
    252  error = run_stage1(*parser, batch_start);
    +
    253  #endif
    +
    288  doc.iter = json_iterator(&buf[batch_start], parser);
    +
    289  doc.iter._streaming = true;
    +
    294  if (error) { continue; } // If the error was EMPTY, we may want to load another batch.
    +
    295  doc_index = batch_start;
    +
    296  }
    +
    297  }
    +
    298 }
    +
    299 
    +
    300 inline void document_stream::next_document() noexcept {
    +
    301  // Go to next place where depth=0 (document depth)
    +
    302  error = doc.iter.skip_child(0);
    +
    303  if (error) { return; }
    +
    304  // Always set depth=1 at the start of document
    +
    305  doc.iter._depth = 1;
    +
    306  // consume comma if comma separated is allowed
    +
    307  if (allow_comma_separated) { doc.iter.consume_character(','); }
    +
    308  // Resets the string buffer at the beginning, thus invalidating the strings.
    +
    309  doc.iter._string_buf_loc = parser->string_buf.get();
    +
    310  doc.iter._root = doc.iter.position();
    +
    311 }
    +
    312 
    +
    313 inline size_t document_stream::next_batch_start() const noexcept {
    +
    314  return batch_start + parser->implementation->structural_indexes[parser->implementation->n_structural_indexes];
    +
    315 }
    +
    316 
    +
    317 inline error_code document_stream::run_stage1(ondemand::parser &p, size_t _batch_start) noexcept {
    +
    318  // This code only updates the structural index in the parser, it does not update any json_iterator
    +
    319  // instance.
    +
    320  size_t remaining = len - _batch_start;
    +
    321  if (remaining <= batch_size) {
    +
    322  return p.implementation->stage1(&buf[_batch_start], remaining, stage1_mode::streaming_final);
    +
    323  } else {
    +
    324  return p.implementation->stage1(&buf[_batch_start], batch_size, stage1_mode::streaming_partial);
    +
    325  }
    +
    326 }
    +
    327 
    +
    328 simdjson_inline size_t document_stream::iterator::current_index() const noexcept {
    +
    329  return stream->doc_index;
    +
    330 }
    +
    331 
    +
    332 simdjson_inline std::string_view document_stream::iterator::source() const noexcept {
    +
    333  auto depth = stream->doc.iter.depth();
    +
    334  auto cur_struct_index = stream->doc.iter._root - stream->parser->implementation->structural_indexes.get();
    +
    335 
    +
    336  // If at root, process the first token to determine if scalar value
    +
    337  if (stream->doc.iter.at_root()) {
    +
    338  switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) {
    +
    339  case '{': case '[': // Depth=1 already at start of document
    +
    340  break;
    +
    341  case '}': case ']':
    +
    342  depth--;
    +
    343  break;
    +
    344  default: // Scalar value document
    +
    345  // TODO: Remove any trailing whitespaces
    +
    346  // This returns a string spanning from start of value to the beginning of the next document (excluded)
    +
    347  return std::string_view(reinterpret_cast<const char*>(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[++cur_struct_index] - current_index() - 1);
    +
    348  }
    +
    349  cur_struct_index++;
    +
    350  }
    +
    351 
    +
    352  while (cur_struct_index <= static_cast<int64_t>(stream->parser->implementation->n_structural_indexes)) {
    +
    353  switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) {
    +
    354  case '{': case '[':
    +
    355  depth++;
    +
    356  break;
    +
    357  case '}': case ']':
    +
    358  depth--;
    +
    359  break;
    +
    360  }
    +
    361  if (depth == 0) { break; }
    +
    362  cur_struct_index++;
    +
    363  }
    +
    364 
    +
    365  return std::string_view(reinterpret_cast<const char*>(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[cur_struct_index] - current_index() + stream->batch_start + 1);;
    +
    366 }
    +
    367 
    + +
    369  return stream->error;
    +
    370 }
    371 
    -
    372  // If there's anything left, start the stage 1 thread!
    -
    373  if (next_batch_start() < len) {
    -
    374  start_stage1_thread();
    -
    375  }
    -
    376 }
    -
    377 
    -
    378 inline void document_stream::start_stage1_thread() noexcept {
    -
    379  // we call the thread on a lambda that will update
    -
    380  // this->stage1_thread_error
    -
    381  // there is only one thread that may write to this value
    -
    382  // TODO this is NOT exception-safe.
    -
    383  this->stage1_thread_error = UNINITIALIZED; // In case something goes wrong, make sure it's an error
    -
    384  size_t _next_batch_start = this->next_batch_start();
    -
    385 
    -
    386  worker->run(this, & this->stage1_thread_parser, _next_batch_start);
    -
    387 }
    -
    388 
    -
    389 #endif // SIMDJSON_THREADS_ENABLED
    -
    390 
    -
    391 } // namespace ondemand
    -
    392 } // namespace SIMDJSON_IMPLEMENTATION
    -
    393 } // namespace simdjson
    -
    394 
    -
    395 namespace simdjson {
    -
    396 
    -
    397 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_stream>::simdjson_result(
    -
    398  error_code error
    -
    399 ) noexcept :
    -
    400  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document_stream>(error)
    -
    401 {
    -
    402 }
    -
    403 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_stream>::simdjson_result(
    -
    404  SIMDJSON_IMPLEMENTATION::ondemand::document_stream &&value
    -
    405 ) noexcept :
    -
    406  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document_stream>(
    -
    407  std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document_stream>(value)
    -
    408  )
    -
    409 {
    -
    410 }
    -
    411 
    +
    372 #ifdef SIMDJSON_THREADS_ENABLED
    +
    373 
    +
    374 inline void document_stream::load_from_stage1_thread() noexcept {
    +
    375  worker->finish();
    +
    376  // Swap to the parser that was loaded up in the thread. Make sure the parser has
    +
    377  // enough memory to swap to, as well.
    +
    378  std::swap(stage1_thread_parser,*parser);
    +
    379  error = stage1_thread_error;
    +
    380  if (error) { return; }
    +
    381 
    +
    382  // If there's anything left, start the stage 1 thread!
    +
    383  if (next_batch_start() < len) {
    +
    384  start_stage1_thread();
    +
    385  }
    +
    386 }
    +
    387 
    +
    388 inline void document_stream::start_stage1_thread() noexcept {
    +
    389  // we call the thread on a lambda that will update
    +
    390  // this->stage1_thread_error
    +
    391  // there is only one thread that may write to this value
    +
    392  // TODO this is NOT exception-safe.
    +
    393  this->stage1_thread_error = UNINITIALIZED; // In case something goes wrong, make sure it's an error
    +
    394  size_t _next_batch_start = this->next_batch_start();
    +
    395 
    +
    396  worker->run(this, & this->stage1_thread_parser, _next_batch_start);
    +
    397 }
    +
    398 
    +
    399 #endif // SIMDJSON_THREADS_ENABLED
    +
    400 
    +
    401 } // namespace ondemand
    +
    402 } // namespace SIMDJSON_IMPLEMENTATION
    +
    403 } // namespace simdjson
    +
    404 
    +
    405 namespace simdjson {
    +
    406 
    +
    407 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_stream>::simdjson_result(
    +
    408  error_code error
    +
    409 ) noexcept :
    +
    410  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document_stream>(error)
    +
    411 {
    412 }
    - -
    iterator & operator++() noexcept
    Advance to the next document (prefix).
    -
    simdjson_inline bool operator!=(const iterator &other) const noexcept
    Check if we're at the end yet.
    - -
    error_code error() const noexcept
    Returns error of the stream (if any).
    -
    simdjson_inline simdjson_result< ondemand::document_reference > operator*() noexcept
    Get the current document (or error).
    -
    simdjson_inline iterator end() noexcept
    The end of the stream, for iterator comparison purposes.
    -
    size_t size_in_bytes() const noexcept
    Returns the input size in bytes.
    -
    size_t truncated_bytes() const noexcept
    After iterating through the stream, this method returns the number of bytes that were not parsed at t...
    -
    simdjson_inline iterator begin() noexcept
    Start iterating the documents in the stream.
    -
    simdjson_inline document_stream() noexcept
    Construct an uninitialized document_stream.
    -
    json_iterator iter
    Current position in the document.
    Definition: document.h:589
    +
    413 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_stream>::simdjson_result(
    +
    414  SIMDJSON_IMPLEMENTATION::ondemand::document_stream &&value
    +
    415 ) noexcept :
    +
    416  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document_stream>(
    +
    417  std::forward<SIMDJSON_IMPLEMENTATION::ondemand::document_stream>(value)
    +
    418  )
    +
    419 {
    +
    420 }
    +
    421 
    +
    422 }
    +
    423 
    +
    424 #endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H
    + +
    iterator & operator++() noexcept
    Advance to the next document (prefix).
    +
    simdjson_inline bool operator!=(const iterator &other) const noexcept
    Check if we're at the end yet.
    + +
    error_code error() const noexcept
    Returns error of the stream (if any).
    +
    simdjson_inline simdjson_result< ondemand::document_reference > operator*() noexcept
    Get the current document (or error).
    +
    simdjson_inline iterator end() noexcept
    The end of the stream, for iterator comparison purposes.
    +
    size_t size_in_bytes() const noexcept
    Returns the input size in bytes.
    +
    size_t truncated_bytes() const noexcept
    After iterating through the stream, this method returns the number of bytes that were not parsed at t...
    +
    simdjson_inline iterator begin() noexcept
    Start iterating the documents in the stream.
    +
    simdjson_inline document_stream() noexcept
    Construct an uninitialized document_stream.
    +
    json_iterator iter
    Current position in the document.
    Definition: document.h:587
    -
    We want to support argument-dependent lookup (ADL).
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ CAPACITY
    This parser can't support a document that big.
    Definition: error.h:19
    @ EMPTY
    no structural element found
    Definition: error.h:30
    diff --git a/generic_2ondemand_2document__stream_8h_source.html b/generic_2ondemand_2document__stream_8h_source.html index 3894a8e3d..6788aadd5 100644 --- a/generic_2ondemand_2document__stream_8h_source.html +++ b/generic_2ondemand_2document__stream_8h_source.html @@ -91,180 +91,187 @@ $(document).ready(function(){initNavTree('generic_2ondemand_2document__stream_8h
    document_stream.h
    -
    1 #include "simdjson/error.h"
    -
    2 #ifdef SIMDJSON_THREADS_ENABLED
    -
    3 #include <thread>
    -
    4 #include <mutex>
    -
    5 #include <condition_variable>
    -
    6 #endif
    -
    7 
    -
    8 namespace simdjson {
    -
    9 namespace SIMDJSON_IMPLEMENTATION {
    -
    10 namespace ondemand {
    -
    11 
    -
    12 class parser;
    -
    13 class json_iterator;
    -
    14 class document;
    -
    15 
    -
    16 #ifdef SIMDJSON_THREADS_ENABLED
    -
    18 struct stage1_worker {
    -
    19  stage1_worker() noexcept = default;
    -
    20  stage1_worker(const stage1_worker&) = delete;
    -
    21  stage1_worker(stage1_worker&&) = delete;
    -
    22  stage1_worker operator=(const stage1_worker&) = delete;
    -
    23  ~stage1_worker();
    -
    28  void start_thread();
    -
    33  void run(document_stream * ds, parser * stage1, size_t next_batch_start);
    -
    35  void finish();
    -
    36 
    -
    37 private:
    -
    38 
    -
    44  void stop_thread();
    -
    45 
    -
    46  std::thread thread{};
    -
    48  ondemand::parser * stage1_thread_parser{};
    -
    49  size_t _next_batch_start{};
    -
    50  document_stream * owner{};
    -
    55  bool has_work{false};
    -
    56  bool can_work{true};
    -
    57 
    -
    61  std::mutex locking_mutex{};
    -
    62  std::condition_variable cond_var{};
    -
    63 
    -
    64  friend class document_stream;
    -
    65 };
    -
    66 #endif // SIMDJSON_THREADS_ENABLED
    -
    67 
    - -
    75 public:
    -
    84  simdjson_inline document_stream() noexcept;
    -
    86  simdjson_inline document_stream(document_stream &&other) noexcept = default;
    -
    88  simdjson_inline document_stream &operator=(document_stream &&other) noexcept = default;
    -
    89 
    -
    90  simdjson_inline ~document_stream() noexcept;
    -
    91 
    -
    95  inline size_t size_in_bytes() const noexcept;
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/implementation_simdjson_result_base.h"
    +
    7 #include "simdjson/generic/ondemand/document.h"
    +
    8 #include "simdjson/generic/ondemand/parser.h"
    +
    9 #endif // SIMDJSON_AMALGAMATED
    +
    10 
    +
    11 #ifdef SIMDJSON_THREADS_ENABLED
    +
    12 #include <thread>
    +
    13 #include <mutex>
    +
    14 #include <condition_variable>
    +
    15 #endif
    +
    16 
    +
    17 namespace simdjson {
    +
    18 namespace SIMDJSON_IMPLEMENTATION {
    +
    19 namespace ondemand {
    +
    20 
    +
    21 #ifdef SIMDJSON_THREADS_ENABLED
    +
    23 struct stage1_worker {
    +
    24  stage1_worker() noexcept = default;
    +
    25  stage1_worker(const stage1_worker&) = delete;
    +
    26  stage1_worker(stage1_worker&&) = delete;
    +
    27  stage1_worker operator=(const stage1_worker&) = delete;
    +
    28  ~stage1_worker();
    +
    33  void start_thread();
    +
    38  void run(document_stream * ds, parser * stage1, size_t next_batch_start);
    +
    40  void finish();
    +
    41 
    +
    42 private:
    +
    43 
    +
    49  void stop_thread();
    +
    50 
    +
    51  std::thread thread{};
    +
    53  ondemand::parser * stage1_thread_parser{};
    +
    54  size_t _next_batch_start{};
    +
    55  document_stream * owner{};
    +
    60  bool has_work{false};
    +
    61  bool can_work{true};
    +
    62 
    +
    66  std::mutex locking_mutex{};
    +
    67  std::condition_variable cond_var{};
    +
    68 
    +
    69  friend class document_stream;
    +
    70 };
    +
    71 #endif // SIMDJSON_THREADS_ENABLED
    +
    72 
    + +
    80 public:
    +
    89  simdjson_inline document_stream() noexcept;
    +
    91  simdjson_inline document_stream(document_stream &&other) noexcept = default;
    +
    93  simdjson_inline document_stream &operator=(document_stream &&other) noexcept = default;
    +
    94 
    +
    95  simdjson_inline ~document_stream() noexcept;
    96 
    -
    115  inline size_t truncated_bytes() const noexcept;
    -
    116 
    -
    117  class iterator {
    -
    118  public:
    - -
    120  using reference = value_type;
    +
    100  inline size_t size_in_bytes() const noexcept;
    +
    101 
    +
    120  inline size_t truncated_bytes() const noexcept;
    121 
    -
    122  using difference_type = std::ptrdiff_t;
    -
    123 
    -
    124  using iterator_category = std::input_iterator_tag;
    -
    125 
    -
    129  simdjson_inline iterator() noexcept;
    -
    133  simdjson_inline simdjson_result<ondemand::document_reference> operator*() noexcept;
    -
    137  inline iterator& operator++() noexcept;
    -
    142  simdjson_inline bool operator!=(const iterator &other) const noexcept;
    -
    158  simdjson_inline size_t current_index() const noexcept;
    -
    159 
    -
    179  simdjson_inline std::string_view source() const noexcept;
    -
    180 
    -
    184  inline error_code error() const noexcept;
    +
    122  class iterator {
    +
    123  public:
    + +
    125  using reference = value_type;
    +
    126 
    +
    127  using difference_type = std::ptrdiff_t;
    +
    128 
    +
    129  using iterator_category = std::input_iterator_tag;
    +
    130 
    +
    134  simdjson_inline iterator() noexcept;
    +
    138  simdjson_inline simdjson_result<ondemand::document_reference> operator*() noexcept;
    +
    142  inline iterator& operator++() noexcept;
    +
    147  simdjson_inline bool operator!=(const iterator &other) const noexcept;
    +
    163  simdjson_inline size_t current_index() const noexcept;
    +
    164 
    +
    184  simdjson_inline std::string_view source() const noexcept;
    185 
    -
    186  private:
    -
    187  simdjson_inline iterator(document_stream *s, bool finished) noexcept;
    -
    189  document_stream* stream;
    -
    191  bool finished;
    -
    192 
    -
    193  friend class document;
    -
    194  friend class document_stream;
    -
    195  friend class json_iterator;
    -
    196  };
    +
    189  inline error_code error() const noexcept;
    +
    190 
    +
    191  private:
    +
    192  simdjson_inline iterator(document_stream *s, bool finished) noexcept;
    +
    194  document_stream* stream;
    +
    196  bool finished;
    197 
    -
    201  simdjson_inline iterator begin() noexcept;
    -
    205  simdjson_inline iterator end() noexcept;
    -
    206 
    -
    207 private:
    -
    208 
    -
    209  document_stream &operator=(const document_stream &) = delete; // Disallow copying
    -
    210  document_stream(const document_stream &other) = delete; // Disallow copying
    +
    198  friend class document;
    +
    199  friend class document_stream;
    +
    200  friend class json_iterator;
    +
    201  };
    +
    202 
    +
    206  simdjson_inline iterator begin() noexcept;
    +
    210  simdjson_inline iterator end() noexcept;
    211 
    -
    221  simdjson_inline document_stream(
    -
    222  ondemand::parser &parser,
    -
    223  const uint8_t *buf,
    -
    224  size_t len,
    -
    225  size_t batch_size,
    -
    226  bool allow_comma_separated
    -
    227  ) noexcept;
    -
    228 
    -
    233  inline void start() noexcept;
    -
    234 
    -
    259  inline void next() noexcept;
    -
    260 
    -
    262  inline void next_document() noexcept;
    -
    263 
    -
    265  inline size_t next_batch_start() const noexcept;
    -
    266 
    -
    268  inline error_code run_stage1(ondemand::parser &p, size_t batch_start) noexcept;
    -
    269 
    -
    270  // Fields
    -
    271  ondemand::parser *parser;
    -
    272  const uint8_t *buf;
    -
    273  size_t len;
    -
    274  size_t batch_size;
    -
    275  bool allow_comma_separated;
    -
    281  document doc{};
    -
    283  error_code error;
    -
    284  size_t batch_start{0};
    -
    285  size_t doc_index{};
    -
    286 
    -
    287  #ifdef SIMDJSON_THREADS_ENABLED
    -
    289  bool use_thread;
    -
    290 
    -
    291  inline void load_from_stage1_thread() noexcept;
    -
    292 
    -
    294  inline void start_stage1_thread() noexcept;
    +
    212 private:
    +
    213 
    +
    214  document_stream &operator=(const document_stream &) = delete; // Disallow copying
    +
    215  document_stream(const document_stream &other) = delete; // Disallow copying
    +
    216 
    +
    226  simdjson_inline document_stream(
    +
    227  ondemand::parser &parser,
    +
    228  const uint8_t *buf,
    +
    229  size_t len,
    +
    230  size_t batch_size,
    +
    231  bool allow_comma_separated
    +
    232  ) noexcept;
    +
    233 
    +
    238  inline void start() noexcept;
    +
    239 
    +
    264  inline void next() noexcept;
    +
    265 
    +
    267  inline void next_document() noexcept;
    +
    268 
    +
    270  inline size_t next_batch_start() const noexcept;
    +
    271 
    +
    273  inline error_code run_stage1(ondemand::parser &p, size_t batch_start) noexcept;
    +
    274 
    +
    275  // Fields
    +
    276  ondemand::parser *parser;
    +
    277  const uint8_t *buf;
    +
    278  size_t len;
    +
    279  size_t batch_size;
    +
    280  bool allow_comma_separated;
    +
    286  document doc{};
    +
    288  error_code error;
    +
    289  size_t batch_start{0};
    +
    290  size_t doc_index{};
    +
    291 
    +
    292  #ifdef SIMDJSON_THREADS_ENABLED
    +
    294  bool use_thread;
    295 
    -
    297  inline void finish_stage1_thread() noexcept;
    -
    298 
    -
    300  error_code stage1_thread_error{UNINITIALIZED};
    -
    302  std::unique_ptr<stage1_worker> worker{new(std::nothrow) stage1_worker()};
    -
    307  ondemand::parser stage1_thread_parser{};
    -
    308 
    -
    309  friend struct stage1_worker;
    -
    310  #endif // SIMDJSON_THREADS_ENABLED
    -
    311 
    -
    312  friend class parser;
    -
    313  friend class document;
    -
    314  friend class json_iterator;
    -
    315  friend struct simdjson_result<ondemand::document_stream>;
    -
    316  friend struct internal::simdjson_result_base<ondemand::document_stream>;
    -
    317 }; // document_stream
    -
    318 
    -
    319 } // namespace ondemand
    -
    320 } // namespace SIMDJSON_IMPLEMENTATION
    -
    321 } // namespace simdjson
    -
    322 
    -
    323 namespace simdjson {
    -
    324 template<>
    -
    325 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_stream> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document_stream> {
    -
    326 public:
    -
    327  simdjson_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::document_stream &&value) noexcept;
    -
    328  simdjson_inline simdjson_result(error_code error) noexcept;
    -
    329  simdjson_inline simdjson_result() noexcept = default;
    -
    330 };
    -
    331 
    -
    332 } // namespace simdjson
    - - -
    simdjson_inline iterator end() noexcept
    The end of the stream, for iterator comparison purposes.
    +
    296  inline void load_from_stage1_thread() noexcept;
    +
    297 
    +
    299  inline void start_stage1_thread() noexcept;
    +
    300 
    +
    302  inline void finish_stage1_thread() noexcept;
    +
    303 
    +
    305  error_code stage1_thread_error{UNINITIALIZED};
    +
    307  std::unique_ptr<stage1_worker> worker{new(std::nothrow) stage1_worker()};
    +
    312  ondemand::parser stage1_thread_parser{};
    +
    313 
    +
    314  friend struct stage1_worker;
    +
    315  #endif // SIMDJSON_THREADS_ENABLED
    +
    316 
    +
    317  friend class parser;
    +
    318  friend class document;
    +
    319  friend class json_iterator;
    +
    320  friend struct simdjson_result<ondemand::document_stream>;
    +
    321  friend struct internal::simdjson_result_base<ondemand::document_stream>;
    +
    322 }; // document_stream
    +
    323 
    +
    324 } // namespace ondemand
    +
    325 } // namespace SIMDJSON_IMPLEMENTATION
    +
    326 } // namespace simdjson
    +
    327 
    +
    328 namespace simdjson {
    +
    329 template<>
    +
    330 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_stream> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::document_stream> {
    +
    331 public:
    +
    332  simdjson_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::document_stream &&value) noexcept;
    +
    333  simdjson_inline simdjson_result(error_code error) noexcept;
    +
    334  simdjson_inline simdjson_result() noexcept = default;
    +
    335 };
    +
    336 
    +
    337 } // namespace simdjson
    +
    338 
    +
    339 #endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H
    + + +
    simdjson_inline iterator end() noexcept
    The end of the stream, for iterator comparison purposes.
    simdjson_inline document_stream(document_stream &&other) noexcept=default
    Move one document_stream to another.
    -
    size_t size_in_bytes() const noexcept
    Returns the input size in bytes.
    +
    size_t size_in_bytes() const noexcept
    Returns the input size in bytes.
    simdjson_inline document_stream & operator=(document_stream &&other) noexcept=default
    Move one document_stream to another.
    -
    size_t truncated_bytes() const noexcept
    After iterating through the stream, this method returns the number of bytes that were not parsed at t...
    -
    simdjson_inline iterator begin() noexcept
    Start iterating the documents in the stream.
    -
    simdjson_inline document_stream() noexcept
    Construct an uninitialized document_stream.
    - +
    size_t truncated_bytes() const noexcept
    After iterating through the stream, this method returns the number of bytes that were not parsed at t...
    +
    simdjson_inline iterator begin() noexcept
    Start iterating the documents in the stream.
    +
    simdjson_inline document_stream() noexcept
    Construct an uninitialized document_stream.
    + -
    We want to support argument-dependent lookup (ADL).
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ UNINITIALIZED
    unknown error, or uninitialized document
    Definition: error.h:29
    - +
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    diff --git a/generic_2ondemand_2object-inl_8h_source.html b/generic_2ondemand_2object-inl_8h_source.html index d51189699..db651876a 100644 --- a/generic_2ondemand_2object-inl_8h_source.html +++ b/generic_2ondemand_2object-inl_8h_source.html @@ -91,257 +91,272 @@ $(document).ready(function(){initNavTree('generic_2ondemand_2object-inl_8h_sourc
    object-inl.h
    -
    1 namespace simdjson {
    -
    2 namespace SIMDJSON_IMPLEMENTATION {
    -
    3 namespace ondemand {
    -
    4 
    -
    5 simdjson_inline simdjson_result<value> object::find_field_unordered(const std::string_view key) & noexcept {
    -
    6  bool has_value;
    -
    7  SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) );
    -
    8  if (!has_value) {
    -
    9  logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast<int>(key.size()), key.data());
    -
    10  return NO_SUCH_FIELD;
    -
    11  }
    -
    12  return value(iter.child());
    -
    13 }
    -
    14 simdjson_inline simdjson_result<value> object::find_field_unordered(const std::string_view key) && noexcept {
    -
    15  bool has_value;
    -
    16  SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) );
    -
    17  if (!has_value) {
    -
    18  logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast<int>(key.size()), key.data());
    -
    19  return NO_SUCH_FIELD;
    -
    20  }
    -
    21  return value(iter.child());
    -
    22 }
    -
    23 simdjson_inline simdjson_result<value> object::operator[](const std::string_view key) & noexcept {
    -
    24  return find_field_unordered(key);
    -
    25 }
    -
    26 simdjson_inline simdjson_result<value> object::operator[](const std::string_view key) && noexcept {
    -
    27  return std::forward<object>(*this).find_field_unordered(key);
    -
    28 }
    -
    29 simdjson_inline simdjson_result<value> object::find_field(const std::string_view key) & noexcept {
    -
    30  bool has_value;
    -
    31  SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) );
    -
    32  if (!has_value) {
    -
    33  logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast<int>(key.size()), key.data());
    -
    34  return NO_SUCH_FIELD;
    -
    35  }
    -
    36  return value(iter.child());
    -
    37 }
    -
    38 simdjson_inline simdjson_result<value> object::find_field(const std::string_view key) && noexcept {
    -
    39  bool has_value;
    -
    40  SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) );
    -
    41  if (!has_value) {
    -
    42  logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast<int>(key.size()), key.data());
    -
    43  return NO_SUCH_FIELD;
    -
    44  }
    -
    45  return value(iter.child());
    -
    46 }
    -
    47 
    -
    48 simdjson_inline simdjson_result<object> object::start(value_iterator &iter) noexcept {
    -
    49  SIMDJSON_TRY( iter.start_object().error() );
    -
    50  return object(iter);
    -
    51 }
    -
    52 simdjson_inline simdjson_result<object> object::start_root(value_iterator &iter) noexcept {
    -
    53  SIMDJSON_TRY( iter.start_root_object().error() );
    -
    54  return object(iter);
    -
    55 }
    -
    56 simdjson_inline error_code object::consume() noexcept {
    -
    57  if(iter.is_at_key()) {
    -
    71  simdjson_unused raw_json_string actual_key;
    -
    72  auto error = iter.field_key().get(actual_key);
    -
    73  if (error) { iter.abandon(); return error; };
    -
    74  // Let us move to the value while we are at it.
    -
    75  if ((error = iter.field_value())) { iter.abandon(); return error; }
    -
    76  }
    -
    77  auto error_skip = iter.json_iter().skip_child(iter.depth()-1);
    -
    78  if(error_skip) { iter.abandon(); }
    -
    79  return error_skip;
    -
    80 }
    -
    81 
    - -
    83  const uint8_t * starting_point{iter.peek_start()};
    -
    84  auto error = consume();
    -
    85  if(error) { return error; }
    -
    86  const uint8_t * final_point{iter._json_iter->peek(0)};
    -
    87  return std::string_view(reinterpret_cast<const char*>(starting_point), size_t(final_point - starting_point));
    -
    88 }
    -
    89 
    -
    90 simdjson_inline simdjson_result<object> object::started(value_iterator &iter) noexcept {
    -
    91  SIMDJSON_TRY( iter.started_object().error() );
    -
    92  return object(iter);
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/ondemand/field.h"
    +
    7 #include "simdjson/generic/ondemand/object.h"
    +
    8 #include "simdjson/generic/ondemand/object_iterator.h"
    +
    9 #include "simdjson/generic/ondemand/raw_json_string.h"
    +
    10 #include "simdjson/generic/ondemand/json_iterator.h"
    +
    11 #include "simdjson/generic/ondemand/value-inl.h"
    +
    12 #endif // SIMDJSON_AMALGAMATED
    +
    13 
    +
    14 namespace simdjson {
    +
    15 namespace SIMDJSON_IMPLEMENTATION {
    +
    16 namespace ondemand {
    +
    17 
    +
    18 simdjson_inline simdjson_result<value> object::find_field_unordered(const std::string_view key) & noexcept {
    +
    19  bool has_value;
    +
    20  SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) );
    +
    21  if (!has_value) {
    +
    22  logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast<int>(key.size()), key.data());
    +
    23  return NO_SUCH_FIELD;
    +
    24  }
    +
    25  return value(iter.child());
    +
    26 }
    +
    27 simdjson_inline simdjson_result<value> object::find_field_unordered(const std::string_view key) && noexcept {
    +
    28  bool has_value;
    +
    29  SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) );
    +
    30  if (!has_value) {
    +
    31  logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast<int>(key.size()), key.data());
    +
    32  return NO_SUCH_FIELD;
    +
    33  }
    +
    34  return value(iter.child());
    +
    35 }
    +
    36 simdjson_inline simdjson_result<value> object::operator[](const std::string_view key) & noexcept {
    +
    37  return find_field_unordered(key);
    +
    38 }
    +
    39 simdjson_inline simdjson_result<value> object::operator[](const std::string_view key) && noexcept {
    +
    40  return std::forward<object>(*this).find_field_unordered(key);
    +
    41 }
    +
    42 simdjson_inline simdjson_result<value> object::find_field(const std::string_view key) & noexcept {
    +
    43  bool has_value;
    +
    44  SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) );
    +
    45  if (!has_value) {
    +
    46  logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast<int>(key.size()), key.data());
    +
    47  return NO_SUCH_FIELD;
    +
    48  }
    +
    49  return value(iter.child());
    +
    50 }
    +
    51 simdjson_inline simdjson_result<value> object::find_field(const std::string_view key) && noexcept {
    +
    52  bool has_value;
    +
    53  SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) );
    +
    54  if (!has_value) {
    +
    55  logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast<int>(key.size()), key.data());
    +
    56  return NO_SUCH_FIELD;
    +
    57  }
    +
    58  return value(iter.child());
    +
    59 }
    +
    60 
    +
    61 simdjson_inline simdjson_result<object> object::start(value_iterator &iter) noexcept {
    +
    62  SIMDJSON_TRY( iter.start_object().error() );
    +
    63  return object(iter);
    +
    64 }
    +
    65 simdjson_inline simdjson_result<object> object::start_root(value_iterator &iter) noexcept {
    +
    66  SIMDJSON_TRY( iter.start_root_object().error() );
    +
    67  return object(iter);
    +
    68 }
    +
    69 simdjson_inline error_code object::consume() noexcept {
    +
    70  if(iter.is_at_key()) {
    +
    84  simdjson_unused raw_json_string actual_key;
    +
    85  auto error = iter.field_key().get(actual_key);
    +
    86  if (error) { iter.abandon(); return error; };
    +
    87  // Let us move to the value while we are at it.
    +
    88  if ((error = iter.field_value())) { iter.abandon(); return error; }
    +
    89  }
    +
    90  auto error_skip = iter.json_iter().skip_child(iter.depth()-1);
    +
    91  if(error_skip) { iter.abandon(); }
    +
    92  return error_skip;
    93 }
    94 
    -
    95 simdjson_inline object object::resume(const value_iterator &iter) noexcept {
    -
    96  return iter;
    -
    97 }
    -
    98 
    -
    99 simdjson_inline object::object(const value_iterator &_iter) noexcept
    -
    100  : iter{_iter}
    -
    101 {
    -
    102 }
    -
    103 
    -
    104 simdjson_inline simdjson_result<object_iterator> object::begin() noexcept {
    -
    105 #if SIMDJSON_DEVELOPMENT_CHECKS
    -
    106  if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; }
    -
    107 #endif
    -
    108  return object_iterator(iter);
    -
    109 }
    -
    110 simdjson_inline simdjson_result<object_iterator> object::end() noexcept {
    -
    111  return object_iterator(iter);
    -
    112 }
    -
    113 
    -
    114 inline simdjson_result<value> object::at_pointer(std::string_view json_pointer) noexcept {
    -
    115  if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; }
    -
    116  json_pointer = json_pointer.substr(1);
    -
    117  size_t slash = json_pointer.find('/');
    -
    118  std::string_view key = json_pointer.substr(0, slash);
    -
    119  // Grab the child with the given key
    - -
    121 
    -
    122  // If there is an escape character in the key, unescape it and then get the child.
    -
    123  size_t escape = key.find('~');
    -
    124  if (escape != std::string_view::npos) {
    -
    125  // Unescape the key
    -
    126  std::string unescaped(key);
    -
    127  do {
    -
    128  switch (unescaped[escape+1]) {
    -
    129  case '0':
    -
    130  unescaped.replace(escape, 2, "~");
    -
    131  break;
    -
    132  case '1':
    -
    133  unescaped.replace(escape, 2, "/");
    -
    134  break;
    -
    135  default:
    -
    136  return INVALID_JSON_POINTER; // "Unexpected ~ escape character in JSON pointer");
    -
    137  }
    -
    138  escape = unescaped.find('~', escape+1);
    -
    139  } while (escape != std::string::npos);
    -
    140  child = find_field(unescaped); // Take note find_field does not unescape keys when matching
    -
    141  } else {
    -
    142  child = find_field(key);
    -
    143  }
    -
    144  if(child.error()) {
    -
    145  return child; // we do not continue if there was an error
    -
    146  }
    -
    147  // If there is a /, we have to recurse and look up more of the path
    -
    148  if (slash != std::string_view::npos) {
    -
    149  child = child.at_pointer(json_pointer.substr(slash));
    -
    150  }
    -
    151  return child;
    -
    152 }
    -
    153 
    -
    154 simdjson_inline simdjson_result<size_t> object::count_fields() & noexcept {
    -
    155  size_t count{0};
    -
    156  // Important: we do not consume any of the values.
    -
    157  for(simdjson_unused auto v : *this) { count++; }
    -
    158  // The above loop will always succeed, but we want to report errors.
    -
    159  if(iter.error()) { return iter.error(); }
    -
    160  // We need to move back at the start because we expect users to iterate through
    -
    161  // the object after counting the number of elements.
    -
    162  iter.reset_object();
    -
    163  return count;
    -
    164 }
    -
    165 
    -
    166 simdjson_inline simdjson_result<bool> object::is_empty() & noexcept {
    -
    167  bool is_not_empty;
    -
    168  auto error = iter.reset_object().get(is_not_empty);
    -
    169  if(error) { return error; }
    -
    170  return !is_not_empty;
    -
    171 }
    -
    172 
    -
    173 simdjson_inline simdjson_result<bool> object::reset() & noexcept {
    -
    174  return iter.reset_object();
    -
    175 }
    -
    176 
    -
    177 } // namespace ondemand
    -
    178 } // namespace SIMDJSON_IMPLEMENTATION
    -
    179 } // namespace simdjson
    -
    180 
    -
    181 namespace simdjson {
    -
    182 
    -
    183 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::object &&value) noexcept
    -
    184  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::object>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::object>(value)) {}
    -
    185 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::simdjson_result(error_code error) noexcept
    -
    186  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::object>(error) {}
    -
    187 
    -
    188 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::begin() noexcept {
    -
    189  if (error()) { return error(); }
    -
    190  return first.begin();
    -
    191 }
    -
    192 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::end() noexcept {
    -
    193  if (error()) { return error(); }
    -
    194  return first.end();
    -
    195 }
    -
    196 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::find_field_unordered(std::string_view key) & noexcept {
    -
    197  if (error()) { return error(); }
    -
    198  return first.find_field_unordered(key);
    -
    199 }
    -
    200 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::find_field_unordered(std::string_view key) && noexcept {
    -
    201  if (error()) { return error(); }
    -
    202  return std::forward<SIMDJSON_IMPLEMENTATION::ondemand::object>(first).find_field_unordered(key);
    -
    203 }
    -
    204 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::operator[](std::string_view key) & noexcept {
    -
    205  if (error()) { return error(); }
    -
    206  return first[key];
    -
    207 }
    -
    208 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::operator[](std::string_view key) && noexcept {
    -
    209  if (error()) { return error(); }
    -
    210  return std::forward<SIMDJSON_IMPLEMENTATION::ondemand::object>(first)[key];
    -
    211 }
    -
    212 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::find_field(std::string_view key) & noexcept {
    -
    213  if (error()) { return error(); }
    -
    214  return first.find_field(key);
    -
    215 }
    -
    216 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::find_field(std::string_view key) && noexcept {
    -
    217  if (error()) { return error(); }
    -
    218  return std::forward<SIMDJSON_IMPLEMENTATION::ondemand::object>(first).find_field(key);
    -
    219 }
    -
    220 
    -
    221 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::at_pointer(std::string_view json_pointer) noexcept {
    + +
    96  const uint8_t * starting_point{iter.peek_start()};
    +
    97  auto error = consume();
    +
    98  if(error) { return error; }
    +
    99  const uint8_t * final_point{iter._json_iter->peek(0)};
    +
    100  return std::string_view(reinterpret_cast<const char*>(starting_point), size_t(final_point - starting_point));
    +
    101 }
    +
    102 
    +
    103 simdjson_inline simdjson_result<object> object::started(value_iterator &iter) noexcept {
    +
    104  SIMDJSON_TRY( iter.started_object().error() );
    +
    105  return object(iter);
    +
    106 }
    +
    107 
    +
    108 simdjson_inline object object::resume(const value_iterator &iter) noexcept {
    +
    109  return iter;
    +
    110 }
    +
    111 
    +
    112 simdjson_inline object::object(const value_iterator &_iter) noexcept
    +
    113  : iter{_iter}
    +
    114 {
    +
    115 }
    +
    116 
    +
    117 simdjson_inline simdjson_result<object_iterator> object::begin() noexcept {
    +
    118 #if SIMDJSON_DEVELOPMENT_CHECKS
    +
    119  if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; }
    +
    120 #endif
    +
    121  return object_iterator(iter);
    +
    122 }
    +
    123 simdjson_inline simdjson_result<object_iterator> object::end() noexcept {
    +
    124  return object_iterator(iter);
    +
    125 }
    +
    126 
    +
    127 inline simdjson_result<value> object::at_pointer(std::string_view json_pointer) noexcept {
    +
    128  if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; }
    +
    129  json_pointer = json_pointer.substr(1);
    +
    130  size_t slash = json_pointer.find('/');
    +
    131  std::string_view key = json_pointer.substr(0, slash);
    +
    132  // Grab the child with the given key
    + +
    134 
    +
    135  // If there is an escape character in the key, unescape it and then get the child.
    +
    136  size_t escape = key.find('~');
    +
    137  if (escape != std::string_view::npos) {
    +
    138  // Unescape the key
    +
    139  std::string unescaped(key);
    +
    140  do {
    +
    141  switch (unescaped[escape+1]) {
    +
    142  case '0':
    +
    143  unescaped.replace(escape, 2, "~");
    +
    144  break;
    +
    145  case '1':
    +
    146  unescaped.replace(escape, 2, "/");
    +
    147  break;
    +
    148  default:
    +
    149  return INVALID_JSON_POINTER; // "Unexpected ~ escape character in JSON pointer");
    +
    150  }
    +
    151  escape = unescaped.find('~', escape+1);
    +
    152  } while (escape != std::string::npos);
    +
    153  child = find_field(unescaped); // Take note find_field does not unescape keys when matching
    +
    154  } else {
    +
    155  child = find_field(key);
    +
    156  }
    +
    157  if(child.error()) {
    +
    158  return child; // we do not continue if there was an error
    +
    159  }
    +
    160  // If there is a /, we have to recurse and look up more of the path
    +
    161  if (slash != std::string_view::npos) {
    +
    162  child = child.at_pointer(json_pointer.substr(slash));
    +
    163  }
    +
    164  return child;
    +
    165 }
    +
    166 
    +
    167 simdjson_inline simdjson_result<size_t> object::count_fields() & noexcept {
    +
    168  size_t count{0};
    +
    169  // Important: we do not consume any of the values.
    +
    170  for(simdjson_unused auto v : *this) { count++; }
    +
    171  // The above loop will always succeed, but we want to report errors.
    +
    172  if(iter.error()) { return iter.error(); }
    +
    173  // We need to move back at the start because we expect users to iterate through
    +
    174  // the object after counting the number of elements.
    +
    175  iter.reset_object();
    +
    176  return count;
    +
    177 }
    +
    178 
    +
    179 simdjson_inline simdjson_result<bool> object::is_empty() & noexcept {
    +
    180  bool is_not_empty;
    +
    181  auto error = iter.reset_object().get(is_not_empty);
    +
    182  if(error) { return error; }
    +
    183  return !is_not_empty;
    +
    184 }
    +
    185 
    +
    186 simdjson_inline simdjson_result<bool> object::reset() & noexcept {
    +
    187  return iter.reset_object();
    +
    188 }
    +
    189 
    +
    190 } // namespace ondemand
    +
    191 } // namespace SIMDJSON_IMPLEMENTATION
    +
    192 } // namespace simdjson
    +
    193 
    +
    194 namespace simdjson {
    +
    195 
    +
    196 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::object &&value) noexcept
    +
    197  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::object>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::object>(value)) {}
    +
    198 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::simdjson_result(error_code error) noexcept
    +
    199  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::object>(error) {}
    +
    200 
    +
    201 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::begin() noexcept {
    +
    202  if (error()) { return error(); }
    +
    203  return first.begin();
    +
    204 }
    +
    205 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::end() noexcept {
    +
    206  if (error()) { return error(); }
    +
    207  return first.end();
    +
    208 }
    +
    209 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::find_field_unordered(std::string_view key) & noexcept {
    +
    210  if (error()) { return error(); }
    +
    211  return first.find_field_unordered(key);
    +
    212 }
    +
    213 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::find_field_unordered(std::string_view key) && noexcept {
    +
    214  if (error()) { return error(); }
    +
    215  return std::forward<SIMDJSON_IMPLEMENTATION::ondemand::object>(first).find_field_unordered(key);
    +
    216 }
    +
    217 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::operator[](std::string_view key) & noexcept {
    +
    218  if (error()) { return error(); }
    +
    219  return first[key];
    +
    220 }
    +
    221 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::operator[](std::string_view key) && noexcept {
    222  if (error()) { return error(); }
    -
    223  return first.at_pointer(json_pointer);
    +
    223  return std::forward<SIMDJSON_IMPLEMENTATION::ondemand::object>(first)[key];
    224 }
    -
    225 
    -
    226 inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::reset() noexcept {
    -
    227  if (error()) { return error(); }
    -
    228  return first.reset();
    -
    229 }
    -
    230 
    -
    231 inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::is_empty() noexcept {
    -
    232  if (error()) { return error(); }
    -
    233  return first.is_empty();
    -
    234 }
    -
    235 
    -
    236 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::count_fields() & noexcept {
    -
    237  if (error()) { return error(); }
    -
    238  return first.count_fields();
    -
    239 }
    -
    240 
    -
    241 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::raw_json() noexcept {
    -
    242  if (error()) { return error(); }
    -
    243  return first.raw_json();
    -
    244 }
    -
    245 } // namespace simdjson
    -
    A forward-only JSON object field iterator.
    Definition: object.h:10
    +
    225 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::find_field(std::string_view key) & noexcept {
    +
    226  if (error()) { return error(); }
    +
    227  return first.find_field(key);
    +
    228 }
    +
    229 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::find_field(std::string_view key) && noexcept {
    +
    230  if (error()) { return error(); }
    +
    231  return std::forward<SIMDJSON_IMPLEMENTATION::ondemand::object>(first).find_field(key);
    +
    232 }
    +
    233 
    +
    234 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::at_pointer(std::string_view json_pointer) noexcept {
    +
    235  if (error()) { return error(); }
    +
    236  return first.at_pointer(json_pointer);
    +
    237 }
    +
    238 
    +
    239 inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::reset() noexcept {
    +
    240  if (error()) { return error(); }
    +
    241  return first.reset();
    +
    242 }
    +
    243 
    +
    244 inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::is_empty() noexcept {
    +
    245  if (error()) { return error(); }
    +
    246  return first.is_empty();
    +
    247 }
    +
    248 
    +
    249 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::count_fields() & noexcept {
    +
    250  if (error()) { return error(); }
    +
    251  return first.count_fields();
    +
    252 }
    +
    253 
    +
    254 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object>::raw_json() noexcept {
    +
    255  if (error()) { return error(); }
    +
    256  return first.raw_json();
    +
    257 }
    +
    258 } // namespace simdjson
    +
    259 
    +
    260 #endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H
    +
    A forward-only JSON object field iterator.
    Definition: object.h:17
    simdjson_inline object() noexcept=default
    Create a new invalid object.
    -
    simdjson_inline simdjson_result< value > find_field_unordered(std::string_view key) &noexcept
    Look up a field by name on an object, without regard to key order.
    Definition: object-inl.h:5
    -
    simdjson_inline simdjson_result< std::string_view > raw_json() noexcept
    Consumes the object and returns a string_view instance corresponding to the object as represented in ...
    Definition: object-inl.h:82
    -
    simdjson_inline simdjson_result< value > find_field(std::string_view key) &noexcept
    Look up a field by name on an object (order-sensitive).
    Definition: object-inl.h:29
    -
    simdjson_result< bool > is_empty() &noexcept
    This method scans the beginning of the object and checks whether the object is empty.
    Definition: object-inl.h:166
    -
    simdjson_inline error_code consume() noexcept
    Go to the end of the object, no matter where you are right now.
    Definition: object-inl.h:56
    -
    simdjson_result< bool > reset() &noexcept
    Reset the iterator so that we are pointing back at the beginning of the object.
    Definition: object-inl.h:173
    -
    simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
    Get the value associated with the given JSON pointer.
    Definition: object-inl.h:114
    -
    simdjson_inline simdjson_result< size_t > count_fields() &noexcept
    This method scans the object and counts the number of key-value pairs.
    Definition: object-inl.h:154
    -
    A string escaped per JSON rules, terminated with quote (").
    -
    An ephemeral JSON value returned during iteration.
    Definition: value.h:17
    -
    We want to support argument-dependent lookup (ADL).
    +
    simdjson_inline simdjson_result< value > find_field_unordered(std::string_view key) &noexcept
    Look up a field by name on an object, without regard to key order.
    Definition: object-inl.h:18
    +
    simdjson_inline simdjson_result< std::string_view > raw_json() noexcept
    Consumes the object and returns a string_view instance corresponding to the object as represented in ...
    Definition: object-inl.h:95
    +
    simdjson_inline simdjson_result< value > find_field(std::string_view key) &noexcept
    Look up a field by name on an object (order-sensitive).
    Definition: object-inl.h:42
    +
    simdjson_result< bool > is_empty() &noexcept
    This method scans the beginning of the object and checks whether the object is empty.
    Definition: object-inl.h:179
    +
    simdjson_inline error_code consume() noexcept
    Go to the end of the object, no matter where you are right now.
    Definition: object-inl.h:69
    +
    simdjson_result< bool > reset() &noexcept
    Reset the iterator so that we are pointing back at the beginning of the object.
    Definition: object-inl.h:186
    +
    simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
    Get the value associated with the given JSON pointer.
    Definition: object-inl.h:127
    +
    simdjson_inline simdjson_result< size_t > count_fields() &noexcept
    This method scans the object and counts the number of key-value pairs.
    Definition: object-inl.h:167
    +
    A string escaped per JSON rules, terminated with quote (").
    +
    An ephemeral JSON value returned during iteration.
    Definition: value.h:18
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ OUT_OF_ORDER_ITERATION
    tried to iterate an array or object out of order
    Definition: error.h:43
    @ NO_SUCH_FIELD
    JSON field not found in object.
    Definition: error.h:37
    @ INVALID_JSON_POINTER
    Invalid JSON pointer reference.
    Definition: error.h:39
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    diff --git a/generic_2ondemand_2object_8h_source.html b/generic_2ondemand_2object_8h_source.html index 9c3322be5..e5b514d55 100644 --- a/generic_2ondemand_2object_8h_source.html +++ b/generic_2ondemand_2object_8h_source.html @@ -91,100 +91,109 @@ $(document).ready(function(){initNavTree('generic_2ondemand_2object_8h_source.ht
    object.h
    -
    1 #include "simdjson/error.h"
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_H
    2 
    -
    3 namespace simdjson {
    -
    4 namespace SIMDJSON_IMPLEMENTATION {
    -
    5 namespace ondemand {
    -
    6 
    -
    10 class object {
    -
    11 public:
    -
    17  simdjson_inline object() noexcept = default;
    -
    18 
    -
    19  simdjson_inline simdjson_result<object_iterator> begin() noexcept;
    -
    20  simdjson_inline simdjson_result<object_iterator> end() noexcept;
    -
    55  simdjson_inline simdjson_result<value> find_field(std::string_view key) & noexcept;
    -
    57  simdjson_inline simdjson_result<value> find_field(std::string_view key) && noexcept;
    -
    58 
    -
    92  simdjson_inline simdjson_result<value> find_field_unordered(std::string_view key) & noexcept;
    -
    94  simdjson_inline simdjson_result<value> find_field_unordered(std::string_view key) && noexcept;
    -
    96  simdjson_inline simdjson_result<value> operator[](std::string_view key) & noexcept;
    -
    98  simdjson_inline simdjson_result<value> operator[](std::string_view key) && noexcept;
    -
    99 
    -
    134  inline simdjson_result<value> at_pointer(std::string_view json_pointer) noexcept;
    -
    135 
    -
    145  inline simdjson_result<bool> reset() & noexcept;
    -
    155  inline simdjson_result<bool> is_empty() & noexcept;
    -
    173  simdjson_inline simdjson_result<size_t> count_fields() & noexcept;
    -
    179  simdjson_inline simdjson_result<std::string_view> raw_json() noexcept;
    -
    180 
    -
    181 protected:
    -
    185  simdjson_inline error_code consume() noexcept;
    -
    186  static simdjson_inline simdjson_result<object> start(value_iterator &iter) noexcept;
    -
    187  static simdjson_inline simdjson_result<object> start_root(value_iterator &iter) noexcept;
    -
    188  static simdjson_inline simdjson_result<object> started(value_iterator &iter) noexcept;
    -
    189  static simdjson_inline object resume(const value_iterator &iter) noexcept;
    -
    190  simdjson_inline object(const value_iterator &iter) noexcept;
    -
    191 
    -
    192  simdjson_warn_unused simdjson_inline error_code find_field_raw(const std::string_view key) noexcept;
    -
    193 
    -
    194  value_iterator iter{};
    -
    195 
    -
    196  friend class value;
    -
    197  friend class document;
    -
    198  friend struct simdjson_result<object>;
    -
    199 };
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/implementation_simdjson_result_base.h"
    +
    7 #include "simdjson/generic/ondemand/value_iterator.h"
    +
    8 #endif // SIMDJSON_AMALGAMATED
    +
    9 
    +
    10 namespace simdjson {
    +
    11 namespace SIMDJSON_IMPLEMENTATION {
    +
    12 namespace ondemand {
    +
    13 
    +
    17 class object {
    +
    18 public:
    +
    24  simdjson_inline object() noexcept = default;
    +
    25 
    +
    26  simdjson_inline simdjson_result<object_iterator> begin() noexcept;
    +
    27  simdjson_inline simdjson_result<object_iterator> end() noexcept;
    +
    62  simdjson_inline simdjson_result<value> find_field(std::string_view key) & noexcept;
    +
    64  simdjson_inline simdjson_result<value> find_field(std::string_view key) && noexcept;
    +
    65 
    +
    99  simdjson_inline simdjson_result<value> find_field_unordered(std::string_view key) & noexcept;
    +
    101  simdjson_inline simdjson_result<value> find_field_unordered(std::string_view key) && noexcept;
    +
    103  simdjson_inline simdjson_result<value> operator[](std::string_view key) & noexcept;
    +
    105  simdjson_inline simdjson_result<value> operator[](std::string_view key) && noexcept;
    +
    106 
    +
    141  inline simdjson_result<value> at_pointer(std::string_view json_pointer) noexcept;
    +
    142 
    +
    152  inline simdjson_result<bool> reset() & noexcept;
    +
    162  inline simdjson_result<bool> is_empty() & noexcept;
    +
    180  simdjson_inline simdjson_result<size_t> count_fields() & noexcept;
    +
    186  simdjson_inline simdjson_result<std::string_view> raw_json() noexcept;
    +
    187 
    +
    188 protected:
    +
    192  simdjson_inline error_code consume() noexcept;
    +
    193  static simdjson_inline simdjson_result<object> start(value_iterator &iter) noexcept;
    +
    194  static simdjson_inline simdjson_result<object> start_root(value_iterator &iter) noexcept;
    +
    195  static simdjson_inline simdjson_result<object> started(value_iterator &iter) noexcept;
    +
    196  static simdjson_inline object resume(const value_iterator &iter) noexcept;
    +
    197  simdjson_inline object(const value_iterator &iter) noexcept;
    +
    198 
    +
    199  simdjson_warn_unused simdjson_inline error_code find_field_raw(const std::string_view key) noexcept;
    200 
    -
    201 } // namespace ondemand
    -
    202 } // namespace SIMDJSON_IMPLEMENTATION
    -
    203 } // namespace simdjson
    -
    204 
    -
    205 namespace simdjson {
    -
    206 
    -
    207 template<>
    -
    208 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::object> {
    -
    209 public:
    - -
    211  simdjson_inline simdjson_result(error_code error) noexcept;
    -
    212  simdjson_inline simdjson_result() noexcept = default;
    +
    201  value_iterator iter{};
    +
    202 
    +
    203  friend class value;
    +
    204  friend class document;
    +
    205  friend struct simdjson_result<object>;
    +
    206 };
    +
    207 
    +
    208 } // namespace ondemand
    +
    209 } // namespace SIMDJSON_IMPLEMENTATION
    +
    210 } // namespace simdjson
    +
    211 
    +
    212 namespace simdjson {
    213 
    - - -
    216  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(std::string_view key) & noexcept;
    -
    217  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(std::string_view key) && noexcept;
    -
    218  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(std::string_view key) & noexcept;
    -
    219  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(std::string_view key) && noexcept;
    -
    220  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](std::string_view key) & noexcept;
    -
    221  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](std::string_view key) && noexcept;
    -
    222  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at_pointer(std::string_view json_pointer) noexcept;
    -
    223  inline simdjson_result<bool> reset() noexcept;
    -
    224  inline simdjson_result<bool> is_empty() noexcept;
    -
    225  inline simdjson_result<size_t> count_fields() & noexcept;
    -
    226  inline simdjson_result<std::string_view> raw_json() noexcept;
    -
    227 
    -
    228 };
    -
    229 
    -
    230 } // namespace simdjson
    - - -
    A forward-only JSON object field iterator.
    Definition: object.h:10
    +
    214 template<>
    +
    215 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::object> {
    +
    216 public:
    + +
    218  simdjson_inline simdjson_result(error_code error) noexcept;
    +
    219  simdjson_inline simdjson_result() noexcept = default;
    +
    220 
    + + +
    223  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(std::string_view key) & noexcept;
    +
    224  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(std::string_view key) && noexcept;
    +
    225  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(std::string_view key) & noexcept;
    +
    226  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(std::string_view key) && noexcept;
    +
    227  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](std::string_view key) & noexcept;
    +
    228  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](std::string_view key) && noexcept;
    +
    229  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at_pointer(std::string_view json_pointer) noexcept;
    +
    230  inline simdjson_result<bool> reset() noexcept;
    +
    231  inline simdjson_result<bool> is_empty() noexcept;
    +
    232  inline simdjson_result<size_t> count_fields() & noexcept;
    +
    233  inline simdjson_result<std::string_view> raw_json() noexcept;
    +
    234 
    +
    235 };
    +
    236 
    +
    237 } // namespace simdjson
    +
    238 
    +
    239 #endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_H
    + + +
    A forward-only JSON object field iterator.
    Definition: object.h:17
    simdjson_inline object() noexcept=default
    Create a new invalid object.
    -
    simdjson_inline simdjson_result< value > find_field_unordered(std::string_view key) &noexcept
    Look up a field by name on an object, without regard to key order.
    Definition: object-inl.h:5
    -
    simdjson_inline simdjson_result< std::string_view > raw_json() noexcept
    Consumes the object and returns a string_view instance corresponding to the object as represented in ...
    Definition: object-inl.h:82
    -
    simdjson_inline simdjson_result< value > find_field(std::string_view key) &noexcept
    Look up a field by name on an object (order-sensitive).
    Definition: object-inl.h:29
    -
    simdjson_result< bool > is_empty() &noexcept
    This method scans the beginning of the object and checks whether the object is empty.
    Definition: object-inl.h:166
    -
    simdjson_inline error_code consume() noexcept
    Go to the end of the object, no matter where you are right now.
    Definition: object-inl.h:56
    -
    simdjson_result< bool > reset() &noexcept
    Reset the iterator so that we are pointing back at the beginning of the object.
    Definition: object-inl.h:173
    -
    simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
    Get the value associated with the given JSON pointer.
    Definition: object-inl.h:114
    -
    simdjson_inline simdjson_result< size_t > count_fields() &noexcept
    This method scans the object and counts the number of key-value pairs.
    Definition: object-inl.h:154
    -
    An ephemeral JSON value returned during iteration.
    Definition: value.h:17
    -
    We want to support argument-dependent lookup (ADL).
    +
    simdjson_inline simdjson_result< value > find_field_unordered(std::string_view key) &noexcept
    Look up a field by name on an object, without regard to key order.
    Definition: object-inl.h:18
    +
    simdjson_inline simdjson_result< std::string_view > raw_json() noexcept
    Consumes the object and returns a string_view instance corresponding to the object as represented in ...
    Definition: object-inl.h:95
    +
    simdjson_inline simdjson_result< value > find_field(std::string_view key) &noexcept
    Look up a field by name on an object (order-sensitive).
    Definition: object-inl.h:42
    +
    simdjson_result< bool > is_empty() &noexcept
    This method scans the beginning of the object and checks whether the object is empty.
    Definition: object-inl.h:179
    +
    simdjson_inline error_code consume() noexcept
    Go to the end of the object, no matter where you are right now.
    Definition: object-inl.h:69
    +
    simdjson_result< bool > reset() &noexcept
    Reset the iterator so that we are pointing back at the beginning of the object.
    Definition: object-inl.h:186
    +
    simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
    Get the value associated with the given JSON pointer.
    Definition: object-inl.h:127
    +
    simdjson_inline simdjson_result< size_t > count_fields() &noexcept
    This method scans the object and counts the number of key-value pairs.
    Definition: object-inl.h:167
    +
    An ephemeral JSON value returned during iteration.
    Definition: value.h:18
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    - - - + + +
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    simdjson_inline T & value() &noexcept(false)
    Get the result value.
    diff --git a/generic_2ondemand_2parser-inl_8h_source.html b/generic_2ondemand_2parser-inl_8h_source.html index 8abee2b63..24e50f4ae 100644 --- a/generic_2ondemand_2parser-inl_8h_source.html +++ b/generic_2ondemand_2parser-inl_8h_source.html @@ -91,174 +91,189 @@ $(document).ready(function(){initNavTree('generic_2ondemand_2parser-inl_8h_sourc
    parser-inl.h
    -
    1 namespace simdjson {
    -
    2 namespace SIMDJSON_IMPLEMENTATION {
    -
    3 namespace ondemand {
    -
    4 
    -
    5 simdjson_inline parser::parser(size_t max_capacity) noexcept
    -
    6  : _max_capacity{max_capacity} {
    -
    7 }
    -
    8 
    -
    9 simdjson_warn_unused simdjson_inline error_code parser::allocate(size_t new_capacity, size_t new_max_depth) noexcept {
    -
    10  if (new_capacity > max_capacity()) { return CAPACITY; }
    -
    11  if (string_buf && new_capacity == capacity() && new_max_depth == max_depth()) { return SUCCESS; }
    -
    12 
    -
    13  // string_capacity copied from document::allocate
    -
    14  _capacity = 0;
    -
    15  size_t string_capacity = SIMDJSON_ROUNDUP_N(5 * new_capacity / 3 + SIMDJSON_PADDING, 64);
    -
    16  string_buf.reset(new (std::nothrow) uint8_t[string_capacity]);
    -
    17 #if SIMDJSON_DEVELOPMENT_CHECKS
    -
    18  start_positions.reset(new (std::nothrow) token_position[new_max_depth]);
    -
    19 #endif
    -
    20  if (implementation) {
    -
    21  SIMDJSON_TRY( implementation->set_capacity(new_capacity) );
    -
    22  SIMDJSON_TRY( implementation->set_max_depth(new_max_depth) );
    -
    23  } else {
    -
    24  SIMDJSON_TRY( simdjson::get_active_implementation()->create_dom_parser_implementation(new_capacity, new_max_depth, implementation) );
    -
    25  }
    -
    26  _capacity = new_capacity;
    -
    27  _max_depth = new_max_depth;
    -
    28  return SUCCESS;
    -
    29 }
    -
    30 
    -
    31 simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(padded_string_view json) & noexcept {
    -
    32  if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; }
    -
    33 
    -
    34  // Allocate if needed
    -
    35  if (capacity() < json.length() || !string_buf) {
    -
    36  SIMDJSON_TRY( allocate(json.length(), max_depth()) );
    -
    37  }
    -
    38 
    -
    39  // Run stage 1.
    -
    40  SIMDJSON_TRY( implementation->stage1(reinterpret_cast<const uint8_t *>(json.data()), json.length(), stage1_mode::regular) );
    -
    41  return document::start({ reinterpret_cast<const uint8_t *>(json.data()), this });
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H
    +
    5 #include "simdjson/padded_string.h"
    +
    6 #include "simdjson/padded_string_view.h"
    +
    7 #include "simdjson/dom/base.h" // for MINIMAL_DOCUMENT_CAPACITY
    +
    8 #include "simdjson/generic/ondemand/base.h"
    +
    9 #include "simdjson/generic/ondemand/document_stream.h"
    +
    10 #include "simdjson/generic/ondemand/parser.h"
    +
    11 #include "simdjson/generic/ondemand/raw_json_string.h"
    +
    12 #endif // SIMDJSON_AMALGAMATED
    +
    13 
    +
    14 namespace simdjson {
    +
    15 namespace SIMDJSON_IMPLEMENTATION {
    +
    16 namespace ondemand {
    +
    17 
    +
    18 simdjson_inline parser::parser(size_t max_capacity) noexcept
    +
    19  : _max_capacity{max_capacity} {
    +
    20 }
    +
    21 
    +
    22 simdjson_warn_unused simdjson_inline error_code parser::allocate(size_t new_capacity, size_t new_max_depth) noexcept {
    +
    23  if (new_capacity > max_capacity()) { return CAPACITY; }
    +
    24  if (string_buf && new_capacity == capacity() && new_max_depth == max_depth()) { return SUCCESS; }
    +
    25 
    +
    26  // string_capacity copied from document::allocate
    +
    27  _capacity = 0;
    +
    28  size_t string_capacity = SIMDJSON_ROUNDUP_N(5 * new_capacity / 3 + SIMDJSON_PADDING, 64);
    +
    29  string_buf.reset(new (std::nothrow) uint8_t[string_capacity]);
    +
    30 #if SIMDJSON_DEVELOPMENT_CHECKS
    +
    31  start_positions.reset(new (std::nothrow) token_position[new_max_depth]);
    +
    32 #endif
    +
    33  if (implementation) {
    +
    34  SIMDJSON_TRY( implementation->set_capacity(new_capacity) );
    +
    35  SIMDJSON_TRY( implementation->set_max_depth(new_max_depth) );
    +
    36  } else {
    +
    37  SIMDJSON_TRY( simdjson::get_active_implementation()->create_dom_parser_implementation(new_capacity, new_max_depth, implementation) );
    +
    38  }
    +
    39  _capacity = new_capacity;
    +
    40  _max_depth = new_max_depth;
    +
    41  return SUCCESS;
    42 }
    43 
    -
    44 simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(const char *json, size_t len, size_t allocated) & noexcept {
    -
    45  return iterate(padded_string_view(json, len, allocated));
    -
    46 }
    -
    47 
    -
    48 simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(const uint8_t *json, size_t len, size_t allocated) & noexcept {
    -
    49  return iterate(padded_string_view(json, len, allocated));
    -
    50 }
    +
    44 simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(padded_string_view json) & noexcept {
    +
    45  if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; }
    +
    46 
    +
    47  // Allocate if needed
    +
    48  if (capacity() < json.length() || !string_buf) {
    +
    49  SIMDJSON_TRY( allocate(json.length(), max_depth()) );
    +
    50  }
    51 
    -
    52 simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(std::string_view json, size_t allocated) & noexcept {
    -
    53  return iterate(padded_string_view(json, allocated));
    -
    54 }
    -
    55 
    -
    56 simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(const std::string &json) & noexcept {
    -
    57  return iterate(padded_string_view(json));
    -
    58 }
    -
    59 
    -
    60 simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(const simdjson_result<padded_string_view> &result) & noexcept {
    -
    61  // We don't presently have a way to temporarily get a const T& from a simdjson_result<T> without throwing an exception
    -
    62  SIMDJSON_TRY( result.error() );
    -
    63  padded_string_view json = result.value_unsafe();
    -
    64  return iterate(json);
    -
    65 }
    -
    66 
    -
    67 simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(const simdjson_result<padded_string> &result) & noexcept {
    -
    68  // We don't presently have a way to temporarily get a const T& from a simdjson_result<T> without throwing an exception
    -
    69  SIMDJSON_TRY( result.error() );
    -
    70  const padded_string &json = result.value_unsafe();
    -
    71  return iterate(json);
    -
    72 }
    -
    73 
    -
    74 simdjson_warn_unused simdjson_inline simdjson_result<json_iterator> parser::iterate_raw(padded_string_view json) & noexcept {
    -
    75  if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; }
    -
    76 
    -
    77  // Allocate if needed
    -
    78  if (capacity() < json.length()) {
    -
    79  SIMDJSON_TRY( allocate(json.length(), max_depth()) );
    -
    80  }
    -
    81 
    -
    82  // Run stage 1.
    -
    83  SIMDJSON_TRY( implementation->stage1(reinterpret_cast<const uint8_t *>(json.data()), json.length(), stage1_mode::regular) );
    -
    84  return json_iterator(reinterpret_cast<const uint8_t *>(json.data()), this);
    +
    52  // Run stage 1.
    +
    53  SIMDJSON_TRY( implementation->stage1(reinterpret_cast<const uint8_t *>(json.data()), json.length(), stage1_mode::regular) );
    +
    54  return document::start({ reinterpret_cast<const uint8_t *>(json.data()), this });
    +
    55 }
    +
    56 
    +
    57 simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(const char *json, size_t len, size_t allocated) & noexcept {
    +
    58  return iterate(padded_string_view(json, len, allocated));
    +
    59 }
    +
    60 
    +
    61 simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(const uint8_t *json, size_t len, size_t allocated) & noexcept {
    +
    62  return iterate(padded_string_view(json, len, allocated));
    +
    63 }
    +
    64 
    +
    65 simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(std::string_view json, size_t allocated) & noexcept {
    +
    66  return iterate(padded_string_view(json, allocated));
    +
    67 }
    +
    68 
    +
    69 simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(const std::string &json) & noexcept {
    +
    70  return iterate(padded_string_view(json));
    +
    71 }
    +
    72 
    +
    73 simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(const simdjson_result<padded_string_view> &result) & noexcept {
    +
    74  // We don't presently have a way to temporarily get a const T& from a simdjson_result<T> without throwing an exception
    +
    75  SIMDJSON_TRY( result.error() );
    +
    76  padded_string_view json = result.value_unsafe();
    +
    77  return iterate(json);
    +
    78 }
    +
    79 
    +
    80 simdjson_warn_unused simdjson_inline simdjson_result<document> parser::iterate(const simdjson_result<padded_string> &result) & noexcept {
    +
    81  // We don't presently have a way to temporarily get a const T& from a simdjson_result<T> without throwing an exception
    +
    82  SIMDJSON_TRY( result.error() );
    +
    83  const padded_string &json = result.value_unsafe();
    +
    84  return iterate(json);
    85 }
    86 
    -
    87 inline simdjson_result<document_stream> parser::iterate_many(const uint8_t *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept {
    -
    88  if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; }
    -
    89  if(allow_comma_separated && batch_size < len) { batch_size = len; }
    -
    90  return document_stream(*this, buf, len, batch_size, allow_comma_separated);
    -
    91 }
    -
    92 inline simdjson_result<document_stream> parser::iterate_many(const char *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept {
    -
    93  return iterate_many(reinterpret_cast<const uint8_t *>(buf), len, batch_size, allow_comma_separated);
    -
    94 }
    -
    95 inline simdjson_result<document_stream> parser::iterate_many(const std::string &s, size_t batch_size, bool allow_comma_separated) noexcept {
    -
    96  return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated);
    -
    97 }
    -
    98 inline simdjson_result<document_stream> parser::iterate_many(const padded_string &s, size_t batch_size, bool allow_comma_separated) noexcept {
    -
    99  return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated);
    -
    100 }
    -
    101 
    -
    102 simdjson_inline size_t parser::capacity() const noexcept {
    -
    103  return _capacity;
    +
    87 simdjson_warn_unused simdjson_inline simdjson_result<json_iterator> parser::iterate_raw(padded_string_view json) & noexcept {
    +
    88  if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; }
    +
    89 
    +
    90  // Allocate if needed
    +
    91  if (capacity() < json.length()) {
    +
    92  SIMDJSON_TRY( allocate(json.length(), max_depth()) );
    +
    93  }
    +
    94 
    +
    95  // Run stage 1.
    +
    96  SIMDJSON_TRY( implementation->stage1(reinterpret_cast<const uint8_t *>(json.data()), json.length(), stage1_mode::regular) );
    +
    97  return json_iterator(reinterpret_cast<const uint8_t *>(json.data()), this);
    +
    98 }
    +
    99 
    +
    100 inline simdjson_result<document_stream> parser::iterate_many(const uint8_t *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept {
    +
    101  if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; }
    +
    102  if(allow_comma_separated && batch_size < len) { batch_size = len; }
    +
    103  return document_stream(*this, buf, len, batch_size, allow_comma_separated);
    104 }
    -
    105 simdjson_inline size_t parser::max_capacity() const noexcept {
    -
    106  return _max_capacity;
    +
    105 inline simdjson_result<document_stream> parser::iterate_many(const char *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept {
    +
    106  return iterate_many(reinterpret_cast<const uint8_t *>(buf), len, batch_size, allow_comma_separated);
    107 }
    -
    108 simdjson_inline size_t parser::max_depth() const noexcept {
    -
    109  return _max_depth;
    +
    108 inline simdjson_result<document_stream> parser::iterate_many(const std::string &s, size_t batch_size, bool allow_comma_separated) noexcept {
    +
    109  return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated);
    110 }
    -
    111 
    -
    112 simdjson_inline void parser::set_max_capacity(size_t max_capacity) noexcept {
    -
    113  if(max_capacity < dom::MINIMAL_DOCUMENT_CAPACITY) {
    -
    114  _max_capacity = max_capacity;
    -
    115  } else {
    -
    116  _max_capacity = dom::MINIMAL_DOCUMENT_CAPACITY;
    -
    117  }
    -
    118 }
    -
    119 
    -
    120 simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> parser::unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement) const noexcept {
    -
    121  uint8_t *end = implementation->parse_string(in.buf, dst, allow_replacement);
    -
    122  if (!end) { return STRING_ERROR; }
    -
    123  std::string_view result(reinterpret_cast<const char *>(dst), end-dst);
    -
    124  dst = end;
    -
    125  return result;
    -
    126 }
    -
    127 
    -
    128 simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> parser::unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept {
    -
    129  uint8_t *end = implementation->parse_wobbly_string(in.buf, dst);
    -
    130  if (!end) { return STRING_ERROR; }
    -
    131  std::string_view result(reinterpret_cast<const char *>(dst), end-dst);
    -
    132  dst = end;
    -
    133  return result;
    -
    134 }
    -
    135 
    -
    136 } // namespace ondemand
    -
    137 } // namespace SIMDJSON_IMPLEMENTATION
    -
    138 } // namespace simdjson
    -
    139 
    -
    140 namespace simdjson {
    -
    141 
    -
    142 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::parser>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::parser &&value) noexcept
    -
    143  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::parser>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::parser>(value)) {}
    -
    144 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::parser>::simdjson_result(error_code error) noexcept
    -
    145  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::parser>(error) {}
    -
    146 
    -
    147 } // namespace simdjson
    - -
    simdjson_inline size_t max_capacity() const noexcept
    The maximum capacity of this parser (the largest document it is allowed to process).
    Definition: parser-inl.h:105
    -
    simdjson_warn_unused simdjson_result< document > iterate(padded_string_view json) &noexcept
    Start iterating an on-demand JSON document.
    Definition: parser-inl.h:31
    -
    simdjson_inline simdjson_result< std::string_view > unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement=false) const noexcept
    Unescape this JSON string, replacing \ with \, with newline, etc.
    Definition: parser-inl.h:120
    -
    parser(size_t max_capacity=SIMDJSON_MAXSIZE_BYTES) noexcept
    Create a JSON parser.
    Definition: parser-inl.h:5
    -
    simdjson_inline simdjson_result< std::string_view > unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept
    Unescape this JSON string, replacing \ with \, with newline, etc.
    Definition: parser-inl.h:128
    -
    simdjson_inline size_t max_depth() const noexcept
    The maximum depth of this parser (the most deeply nested objects and arrays it can process).
    Definition: parser-inl.h:108
    -
    simdjson_warn_unused error_code allocate(size_t capacity, size_t max_depth=DEFAULT_MAX_DEPTH) noexcept
    Ensure this parser has enough memory to process JSON documents up to capacity bytes in length and max...
    Definition: parser-inl.h:9
    -
    simdjson_inline size_t capacity() const noexcept
    The capacity of this parser (the largest document it can process).
    Definition: parser-inl.h:102
    -
    simdjson_result< document_stream > iterate_many(const uint8_t *buf, size_t len, size_t batch_size=DEFAULT_BATCH_SIZE, bool allow_comma_separated=false) noexcept
    Parse a buffer containing many JSON documents.
    Definition: parser-inl.h:87
    -
    A string escaped per JSON rules, terminated with quote (").
    -
    An implementation of simdjson for a particular CPU architecture.
    +
    111 inline simdjson_result<document_stream> parser::iterate_many(const padded_string &s, size_t batch_size, bool allow_comma_separated) noexcept {
    +
    112  return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated);
    +
    113 }
    +
    114 
    +
    115 simdjson_inline size_t parser::capacity() const noexcept {
    +
    116  return _capacity;
    +
    117 }
    +
    118 simdjson_inline size_t parser::max_capacity() const noexcept {
    +
    119  return _max_capacity;
    +
    120 }
    +
    121 simdjson_inline size_t parser::max_depth() const noexcept {
    +
    122  return _max_depth;
    +
    123 }
    +
    124 
    +
    125 simdjson_inline void parser::set_max_capacity(size_t max_capacity) noexcept {
    +
    126  if(max_capacity < dom::MINIMAL_DOCUMENT_CAPACITY) {
    +
    127  _max_capacity = max_capacity;
    +
    128  } else {
    +
    129  _max_capacity = dom::MINIMAL_DOCUMENT_CAPACITY;
    +
    130  }
    +
    131 }
    +
    132 
    +
    133 simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> parser::unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement) const noexcept {
    +
    134  uint8_t *end = implementation->parse_string(in.buf, dst, allow_replacement);
    +
    135  if (!end) { return STRING_ERROR; }
    +
    136  std::string_view result(reinterpret_cast<const char *>(dst), end-dst);
    +
    137  dst = end;
    +
    138  return result;
    +
    139 }
    +
    140 
    +
    141 simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> parser::unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept {
    +
    142  uint8_t *end = implementation->parse_wobbly_string(in.buf, dst);
    +
    143  if (!end) { return STRING_ERROR; }
    +
    144  std::string_view result(reinterpret_cast<const char *>(dst), end-dst);
    +
    145  dst = end;
    +
    146  return result;
    +
    147 }
    +
    148 
    +
    149 } // namespace ondemand
    +
    150 } // namespace SIMDJSON_IMPLEMENTATION
    +
    151 } // namespace simdjson
    +
    152 
    +
    153 namespace simdjson {
    +
    154 
    +
    155 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::parser>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::parser &&value) noexcept
    +
    156  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::parser>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::parser>(value)) {}
    +
    157 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::parser>::simdjson_result(error_code error) noexcept
    +
    158  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::parser>(error) {}
    +
    159 
    +
    160 } // namespace simdjson
    +
    161 
    +
    162 #endif // SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H
    + +
    simdjson_inline size_t max_capacity() const noexcept
    The maximum capacity of this parser (the largest document it is allowed to process).
    Definition: parser-inl.h:118
    +
    simdjson_warn_unused simdjson_result< document > iterate(padded_string_view json) &noexcept
    Start iterating an on-demand JSON document.
    Definition: parser-inl.h:44
    +
    simdjson_inline simdjson_result< std::string_view > unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement=false) const noexcept
    Unescape this JSON string, replacing \ with \, with newline, etc.
    Definition: parser-inl.h:133
    +
    parser(size_t max_capacity=SIMDJSON_MAXSIZE_BYTES) noexcept
    Create a JSON parser.
    Definition: parser-inl.h:18
    +
    simdjson_inline simdjson_result< std::string_view > unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept
    Unescape this JSON string, replacing \ with \, with newline, etc.
    Definition: parser-inl.h:141
    +
    simdjson_inline size_t max_depth() const noexcept
    The maximum depth of this parser (the most deeply nested objects and arrays it can process).
    Definition: parser-inl.h:121
    +
    simdjson_warn_unused error_code allocate(size_t capacity, size_t max_depth=DEFAULT_MAX_DEPTH) noexcept
    Ensure this parser has enough memory to process JSON documents up to capacity bytes in length and max...
    Definition: parser-inl.h:22
    +
    simdjson_inline size_t capacity() const noexcept
    The capacity of this parser (the largest document it can process).
    Definition: parser-inl.h:115
    +
    simdjson_result< document_stream > iterate_many(const uint8_t *buf, size_t len, size_t batch_size=DEFAULT_BATCH_SIZE, bool allow_comma_separated=false) noexcept
    Parse a buffer containing many JSON documents.
    Definition: parser-inl.h:100
    +
    A string escaped per JSON rules, terminated with quote (").
    +
    An implementation of simdjson for a particular CPU architecture.
    User-provided string that promises it has extra padded bytes at the end for use with parser::parse().
    -
    We want to support argument-dependent lookup (ADL).
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ CAPACITY
    This parser can't support a document that big.
    Definition: error.h:19
    @ STRING_ERROR
    Problem while parsing a string.
    Definition: error.h:23
    @ SUCCESS
    No error.
    Definition: error.h:18
    @ INSUFFICIENT_PADDING
    The JSON doesn't have enough padding for simdjson to safely parse it.
    Definition: error.h:44
    SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr< const implementation > & get_active_implementation()
    The active implementation.
    -
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: common_defs.h:45
    +
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: base.h:30
    String with extra allocation for ease of use with parser::parse()
    Definition: padded_string.h:21
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    diff --git a/generic_2ondemand_2parser_8h_source.html b/generic_2ondemand_2parser_8h_source.html index f4f9d8740..efb22e858 100644 --- a/generic_2ondemand_2parser_8h_source.html +++ b/generic_2ondemand_2parser_8h_source.html @@ -91,24 +91,24 @@ $(document).ready(function(){initNavTree('generic_2ondemand_2parser_8h_source.ht
    parser.h
    -
    1 #include "simdjson/error.h"
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_PARSER_H
    2 
    -
    3 namespace simdjson {
    -
    4 namespace SIMDJSON_IMPLEMENTATION {
    -
    5 namespace ondemand {
    -
    6 
    -
    7 class array;
    -
    8 class object;
    -
    9 class value;
    -
    10 class raw_json_string;
    -
    11 class document_stream;
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_PARSER_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/implementation_simdjson_result_base.h"
    +
    7 #endif // SIMDJSON_AMALGAMATED
    +
    8 
    +
    9 namespace simdjson {
    +
    10 namespace SIMDJSON_IMPLEMENTATION {
    +
    11 namespace ondemand {
    12 
    18 static constexpr size_t DEFAULT_BATCH_SIZE = 1000000;
    27 static constexpr size_t MINIMAL_BATCH_SIZE = 32;
    28 
    34 class parser {
    35 public:
    -
    41  inline explicit parser(size_t max_capacity = SIMDJSON_MAXSIZE_BYTES) noexcept;
    +
    41  inline explicit parser(size_t max_capacity = SIMDJSON_MAXSIZE_BYTES) noexcept;
    42 
    43  inline parser(parser &&other) noexcept = default;
    44  simdjson_inline parser(const parser &other) = delete;
    @@ -182,33 +182,33 @@ $(document).ready(function(){initNavTree('generic_2ondemand_2parser_8h_source.ht
    349 };
    350 
    351 } // namespace simdjson
    - - - +
    352 
    +
    353 #endif // SIMDJSON_GENERIC_ONDEMAND_PARSER_H
    + + + -
    simdjson_inline size_t max_capacity() const noexcept
    The maximum capacity of this parser (the largest document it is allowed to process).
    Definition: parser-inl.h:105
    -
    simdjson_warn_unused simdjson_result< document > iterate(padded_string_view json) &noexcept
    Start iterating an on-demand JSON document.
    Definition: parser-inl.h:31
    -
    simdjson_inline simdjson_result< std::string_view > unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement=false) const noexcept
    Unescape this JSON string, replacing \ with \, with newline, etc.
    Definition: parser-inl.h:120
    +
    simdjson_inline size_t max_capacity() const noexcept
    The maximum capacity of this parser (the largest document it is allowed to process).
    Definition: parser-inl.h:118
    +
    simdjson_warn_unused simdjson_result< document > iterate(padded_string_view json) &noexcept
    Start iterating an on-demand JSON document.
    Definition: parser-inl.h:44
    +
    simdjson_inline simdjson_result< std::string_view > unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement=false) const noexcept
    Unescape this JSON string, replacing \ with \, with newline, etc.
    Definition: parser-inl.h:133
    ~parser() noexcept=default
    Deallocate the JSON parser.
    -
    parser(size_t max_capacity=SIMDJSON_MAXSIZE_BYTES) noexcept
    Create a JSON parser.
    Definition: parser-inl.h:5
    -
    simdjson_inline simdjson_result< std::string_view > unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept
    Unescape this JSON string, replacing \ with \, with newline, etc.
    Definition: parser-inl.h:128
    -
    simdjson_inline size_t max_depth() const noexcept
    The maximum depth of this parser (the most deeply nested objects and arrays it can process).
    Definition: parser-inl.h:108
    -
    simdjson_warn_unused error_code allocate(size_t capacity, size_t max_depth=DEFAULT_MAX_DEPTH) noexcept
    Ensure this parser has enough memory to process JSON documents up to capacity bytes in length and max...
    Definition: parser-inl.h:9
    -
    simdjson_inline size_t capacity() const noexcept
    The capacity of this parser (the largest document it can process).
    Definition: parser-inl.h:102
    -
    simdjson_result< document_stream > iterate_many(const uint8_t *buf, size_t len, size_t batch_size=DEFAULT_BATCH_SIZE, bool allow_comma_separated=false) noexcept
    Parse a buffer containing many JSON documents.
    Definition: parser-inl.h:87
    -
    A string escaped per JSON rules, terminated with quote (").
    -
    An implementation of simdjson for a particular CPU architecture.
    +
    parser(size_t max_capacity=SIMDJSON_MAXSIZE_BYTES) noexcept
    Create a JSON parser.
    Definition: parser-inl.h:18
    +
    simdjson_inline simdjson_result< std::string_view > unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept
    Unescape this JSON string, replacing \ with \, with newline, etc.
    Definition: parser-inl.h:141
    +
    simdjson_inline size_t max_depth() const noexcept
    The maximum depth of this parser (the most deeply nested objects and arrays it can process).
    Definition: parser-inl.h:121
    +
    simdjson_warn_unused error_code allocate(size_t capacity, size_t max_depth=DEFAULT_MAX_DEPTH) noexcept
    Ensure this parser has enough memory to process JSON documents up to capacity bytes in length and max...
    Definition: parser-inl.h:22
    +
    simdjson_inline size_t capacity() const noexcept
    The capacity of this parser (the largest document it can process).
    Definition: parser-inl.h:115
    +
    simdjson_result< document_stream > iterate_many(const uint8_t *buf, size_t len, size_t batch_size=DEFAULT_BATCH_SIZE, bool allow_comma_separated=false) noexcept
    Parse a buffer containing many JSON documents.
    Definition: parser-inl.h:100
    +
    A string escaped per JSON rules, terminated with quote (").
    +
    An implementation of simdjson for a particular CPU architecture.
    User-provided string that promises it has extra padded bytes at the end for use with parser::parse().
    -
    @ object
    A JSON object ( { "a": 1, "b" 2, ... } )
    - -
    We want to support argument-dependent lookup (ADL).
    -
    constexpr size_t DEFAULT_MAX_DEPTH
    By default, simdjson supports this many nested objects and arrays.
    Definition: common_defs.h:52
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    constexpr SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS size_t SIMDJSON_MAXSIZE_BYTES
    The maximum document size supported by simdjson.
    Definition: base.h:20
    +
    constexpr size_t DEFAULT_MAX_DEPTH
    By default, simdjson supports this many nested objects and arrays.
    Definition: base.h:37
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    -
    constexpr size_t SIMDJSON_MAXSIZE_BYTES
    The maximum document size supported by simdjson.
    Definition: common_defs.h:35
    - +
    String with extra allocation for ease of use with parser::parse()
    Definition: padded_string.h:21
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    simdjson_inline T & value() &noexcept(false)
    Get the result value.
    diff --git a/generic_2ondemand_2serialization-inl_8h_source.html b/generic_2ondemand_2serialization-inl_8h_source.html index efce8ab1b..d978acac1 100644 --- a/generic_2ondemand_2serialization-inl_8h_source.html +++ b/generic_2ondemand_2serialization-inl_8h_source.html @@ -91,235 +91,248 @@ $(document).ready(function(){initNavTree('generic_2ondemand_2serialization-inl_8
    serialization-inl.h
    -
    1 
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H
    2 
    -
    3 namespace simdjson {
    -
    4 
    -
    5 inline std::string_view trim(const std::string_view str) noexcept {
    -
    6  // We can almost surely do better by rolling our own find_first_not_of function.
    -
    7  size_t first = str.find_first_not_of(" \t\n\r");
    -
    8  // If we have the empty string (just white space), then no trimming is possible, and
    -
    9  // we return the empty string_view.
    -
    10  if (std::string_view::npos == first) { return std::string_view(); }
    -
    11  size_t last = str.find_last_not_of(" \t\n\r");
    -
    12  return str.substr(first, (last - first + 1));
    -
    13 }
    -
    14 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/ondemand/array.h"
    +
    7 #include "simdjson/generic/ondemand/document-inl.h"
    +
    8 #include "simdjson/generic/ondemand/json_type.h"
    +
    9 #include "simdjson/generic/ondemand/object.h"
    +
    10 #include "simdjson/generic/ondemand/serialization.h"
    +
    11 #include "simdjson/generic/ondemand/value.h"
    +
    12 #endif // SIMDJSON_AMALGAMATED
    +
    13 
    +
    14 namespace simdjson {
    15 
    - -
    17  std::string_view v;
    -
    18  auto error = x.raw_json().get(v);
    -
    19  if(error) {return error; }
    -
    20  return trim(v);
    -
    21 }
    -
    22 
    -
    23 inline simdjson_result<std::string_view> to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document_reference& x) noexcept {
    -
    24  std::string_view v;
    -
    25  auto error = x.raw_json().get(v);
    -
    26  if(error) {return error; }
    -
    27  return trim(v);
    -
    28 }
    -
    29 
    - -
    37  using namespace SIMDJSON_IMPLEMENTATION::ondemand;
    - -
    39  auto error = x.type().get(t);
    -
    40  if(error != SUCCESS) { return error; }
    -
    41  switch (t)
    -
    42  {
    -
    43  case json_type::array:
    -
    44  {
    - -
    46  error = x.get_array().get(array);
    -
    47  if(error) { return error; }
    -
    48  return to_json_string(array);
    -
    49  }
    -
    50  case json_type::object:
    -
    51  {
    - -
    53  error = x.get_object().get(object);
    -
    54  if(error) { return error; }
    -
    55  return to_json_string(object);
    -
    56  }
    -
    57  default:
    -
    58  return trim(x.raw_json_token());
    -
    59  }
    -
    60 }
    -
    61 
    - -
    63  std::string_view v;
    -
    64  auto error = x.raw_json().get(v);
    -
    65  if(error) {return error; }
    -
    66  return trim(v);
    -
    67 }
    -
    68 
    - -
    70  std::string_view v;
    -
    71  auto error = x.raw_json().get(v);
    -
    72  if(error) {return error; }
    -
    73  return trim(v);
    -
    74 }
    -
    75 
    -
    76 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document> x) {
    -
    77  if (x.error()) { return x.error(); }
    -
    78  return to_json_string(x.value_unsafe());
    -
    79 }
    -
    80 
    -
    81 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference> x) {
    -
    82  if (x.error()) { return x.error(); }
    -
    83  return to_json_string(x.value_unsafe());
    -
    84 }
    -
    85 
    -
    86 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> x) {
    -
    87  if (x.error()) { return x.error(); }
    -
    88  return to_json_string(x.value_unsafe());
    -
    89 }
    -
    90 
    -
    91 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> x) {
    -
    92  if (x.error()) { return x.error(); }
    -
    93  return to_json_string(x.value_unsafe());
    -
    94 }
    -
    95 
    -
    96 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> x) {
    -
    97  if (x.error()) { return x.error(); }
    -
    98  return to_json_string(x.value_unsafe());
    -
    99 }
    -
    100 } // namespace simdjson
    +
    16 inline std::string_view trim(const std::string_view str) noexcept {
    +
    17  // We can almost surely do better by rolling our own find_first_not_of function.
    +
    18  size_t first = str.find_first_not_of(" \t\n\r");
    +
    19  // If we have the empty string (just white space), then no trimming is possible, and
    +
    20  // we return the empty string_view.
    +
    21  if (std::string_view::npos == first) { return std::string_view(); }
    +
    22  size_t last = str.find_last_not_of(" \t\n\r");
    +
    23  return str.substr(first, (last - first + 1));
    +
    24 }
    +
    25 
    +
    26 
    + +
    28  std::string_view v;
    +
    29  auto error = x.raw_json().get(v);
    +
    30  if(error) {return error; }
    +
    31  return trim(v);
    +
    32 }
    +
    33 
    +
    34 inline simdjson_result<std::string_view> to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document_reference& x) noexcept {
    +
    35  std::string_view v;
    +
    36  auto error = x.raw_json().get(v);
    +
    37  if(error) {return error; }
    +
    38  return trim(v);
    +
    39 }
    +
    40 
    + +
    48  using namespace SIMDJSON_IMPLEMENTATION::ondemand;
    + +
    50  auto error = x.type().get(t);
    +
    51  if(error != SUCCESS) { return error; }
    +
    52  switch (t)
    +
    53  {
    +
    54  case json_type::array:
    +
    55  {
    + +
    57  error = x.get_array().get(array);
    +
    58  if(error) { return error; }
    +
    59  return to_json_string(array);
    +
    60  }
    +
    61  case json_type::object:
    +
    62  {
    + +
    64  error = x.get_object().get(object);
    +
    65  if(error) { return error; }
    +
    66  return to_json_string(object);
    +
    67  }
    +
    68  default:
    +
    69  return trim(x.raw_json_token());
    +
    70  }
    +
    71 }
    +
    72 
    + +
    74  std::string_view v;
    +
    75  auto error = x.raw_json().get(v);
    +
    76  if(error) {return error; }
    +
    77  return trim(v);
    +
    78 }
    +
    79 
    + +
    81  std::string_view v;
    +
    82  auto error = x.raw_json().get(v);
    +
    83  if(error) {return error; }
    +
    84  return trim(v);
    +
    85 }
    +
    86 
    +
    87 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document> x) {
    +
    88  if (x.error()) { return x.error(); }
    +
    89  return to_json_string(x.value_unsafe());
    +
    90 }
    +
    91 
    +
    92 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document_reference> x) {
    +
    93  if (x.error()) { return x.error(); }
    +
    94  return to_json_string(x.value_unsafe());
    +
    95 }
    +
    96 
    +
    97 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> x) {
    +
    98  if (x.error()) { return x.error(); }
    +
    99  return to_json_string(x.value_unsafe());
    +
    100 }
    101 
    -
    102 namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand {
    -
    103 
    -
    104 #if SIMDJSON_EXCEPTIONS
    -
    105 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value x) {
    -
    106  std::string_view v;
    -
    107  auto error = simdjson::to_json_string(x).get(v);
    -
    108  if(error == simdjson::SUCCESS) {
    -
    109  return (out << v);
    -
    110  } else {
    -
    111  throw simdjson::simdjson_error(error);
    -
    112  }
    -
    113 }
    - -
    115  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    -
    116  return (out << x.value());
    -
    117 }
    -
    118 #else
    -
    119 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value x) {
    -
    120  std::string_view v;
    -
    121  auto error = simdjson::to_json_string(x).get(v);
    -
    122  if(error == simdjson::SUCCESS) {
    -
    123  return (out << v);
    -
    124  } else {
    -
    125  return (out << error);
    -
    126  }
    -
    127 }
    -
    128 #endif
    -
    129 
    -
    130 #if SIMDJSON_EXCEPTIONS
    -
    131 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array value) {
    -
    132  std::string_view v;
    -
    133  auto error = simdjson::to_json_string(value).get(v);
    -
    134  if(error == simdjson::SUCCESS) {
    -
    135  return (out << v);
    -
    136  } else {
    -
    137  throw simdjson::simdjson_error(error);
    -
    138  }
    -
    139 }
    - -
    141  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    -
    142  return (out << x.value());
    -
    143 }
    -
    144 #else
    -
    145 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array value) {
    -
    146  std::string_view v;
    -
    147  auto error = simdjson::to_json_string(value).get(v);
    -
    148  if(error == simdjson::SUCCESS) {
    -
    149  return (out << v);
    -
    150  } else {
    -
    151  return (out << error);
    -
    152  }
    -
    153 }
    -
    154 #endif
    -
    155 
    -
    156 #if SIMDJSON_EXCEPTIONS
    -
    157 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document& value) {
    -
    158  std::string_view v;
    -
    159  auto error = simdjson::to_json_string(value).get(v);
    -
    160  if(error == simdjson::SUCCESS) {
    -
    161  return (out << v);
    -
    162  } else {
    -
    163  throw simdjson::simdjson_error(error);
    -
    164  }
    -
    165 }
    -
    166 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference& value) {
    -
    167  std::string_view v;
    -
    168  auto error = simdjson::to_json_string(value).get(v);
    -
    169  if(error == simdjson::SUCCESS) {
    -
    170  return (out << v);
    -
    171  } else {
    -
    172  throw simdjson::simdjson_error(error);
    -
    173  }
    -
    174 }
    - -
    176  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    -
    177  return (out << x.value());
    -
    178 }
    - -
    180  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    -
    181  return (out << x.value());
    -
    182 }
    -
    183 #else
    -
    184 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document& value) {
    -
    185  std::string_view v;
    -
    186  auto error = simdjson::to_json_string(value).get(v);
    -
    187  if(error == simdjson::SUCCESS) {
    -
    188  return (out << v);
    -
    189  } else {
    -
    190  return (out << error);
    -
    191  }
    -
    192 }
    -
    193 #endif
    -
    194 
    -
    195 #if SIMDJSON_EXCEPTIONS
    -
    196 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object value) {
    -
    197  std::string_view v;
    -
    198  auto error = simdjson::to_json_string(value).get(v);
    -
    199  if(error == simdjson::SUCCESS) {
    -
    200  return (out << v);
    -
    201  } else {
    -
    202  throw simdjson::simdjson_error(error);
    -
    203  }
    -
    204 }
    - -
    206  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    -
    207  return (out << x.value());
    -
    208 }
    -
    209 #else
    -
    210 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object value) {
    -
    211  std::string_view v;
    -
    212  auto error = simdjson::to_json_string(value).get(v);
    -
    213  if(error == simdjson::SUCCESS) {
    -
    214  return (out << v);
    -
    215  } else {
    -
    216  return (out << error);
    -
    217  }
    -
    218 }
    -
    219 #endif
    -
    220 }}} // namespace simdjson::SIMDJSON_IMPLEMENTATION::ondemand
    - -
    A document_reference is a thin wrapper around a document reference instance.
    Definition: document.h:607
    - -
    A forward-only JSON object field iterator.
    Definition: object.h:10
    -
    An ephemeral JSON value returned during iteration.
    Definition: value.h:17
    -
    std::ostream & operator<<(std::ostream &out, json_type type) noexcept
    Write the JSON type to the output stream.
    Definition: json_type-inl.h:5
    -
    json_type
    The type of a JSON value.
    Definition: json_type.h:7
    +
    102 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> x) {
    +
    103  if (x.error()) { return x.error(); }
    +
    104  return to_json_string(x.value_unsafe());
    +
    105 }
    +
    106 
    +
    107 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> x) {
    +
    108  if (x.error()) { return x.error(); }
    +
    109  return to_json_string(x.value_unsafe());
    +
    110 }
    +
    111 } // namespace simdjson
    +
    112 
    +
    113 namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand {
    +
    114 
    +
    115 #if SIMDJSON_EXCEPTIONS
    +
    116 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value x) {
    +
    117  std::string_view v;
    +
    118  auto error = simdjson::to_json_string(x).get(v);
    +
    119  if(error == simdjson::SUCCESS) {
    +
    120  return (out << v);
    +
    121  } else {
    +
    122  throw simdjson::simdjson_error(error);
    +
    123  }
    +
    124 }
    + +
    126  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    +
    127  return (out << x.value());
    +
    128 }
    +
    129 #else
    +
    130 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value x) {
    +
    131  std::string_view v;
    +
    132  auto error = simdjson::to_json_string(x).get(v);
    +
    133  if(error == simdjson::SUCCESS) {
    +
    134  return (out << v);
    +
    135  } else {
    +
    136  return (out << error);
    +
    137  }
    +
    138 }
    +
    139 #endif
    +
    140 
    +
    141 #if SIMDJSON_EXCEPTIONS
    +
    142 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array value) {
    +
    143  std::string_view v;
    +
    144  auto error = simdjson::to_json_string(value).get(v);
    +
    145  if(error == simdjson::SUCCESS) {
    +
    146  return (out << v);
    +
    147  } else {
    +
    148  throw simdjson::simdjson_error(error);
    +
    149  }
    +
    150 }
    + +
    152  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    +
    153  return (out << x.value());
    +
    154 }
    +
    155 #else
    +
    156 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array value) {
    +
    157  std::string_view v;
    +
    158  auto error = simdjson::to_json_string(value).get(v);
    +
    159  if(error == simdjson::SUCCESS) {
    +
    160  return (out << v);
    +
    161  } else {
    +
    162  return (out << error);
    +
    163  }
    +
    164 }
    +
    165 #endif
    +
    166 
    +
    167 #if SIMDJSON_EXCEPTIONS
    +
    168 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document& value) {
    +
    169  std::string_view v;
    +
    170  auto error = simdjson::to_json_string(value).get(v);
    +
    171  if(error == simdjson::SUCCESS) {
    +
    172  return (out << v);
    +
    173  } else {
    +
    174  throw simdjson::simdjson_error(error);
    +
    175  }
    +
    176 }
    +
    177 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference& value) {
    +
    178  std::string_view v;
    +
    179  auto error = simdjson::to_json_string(value).get(v);
    +
    180  if(error == simdjson::SUCCESS) {
    +
    181  return (out << v);
    +
    182  } else {
    +
    183  throw simdjson::simdjson_error(error);
    +
    184  }
    +
    185 }
    + +
    187  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    +
    188  return (out << x.value());
    +
    189 }
    + +
    191  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    +
    192  return (out << x.value());
    +
    193 }
    +
    194 #else
    +
    195 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document& value) {
    +
    196  std::string_view v;
    +
    197  auto error = simdjson::to_json_string(value).get(v);
    +
    198  if(error == simdjson::SUCCESS) {
    +
    199  return (out << v);
    +
    200  } else {
    +
    201  return (out << error);
    +
    202  }
    +
    203 }
    +
    204 #endif
    +
    205 
    +
    206 #if SIMDJSON_EXCEPTIONS
    +
    207 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object value) {
    +
    208  std::string_view v;
    +
    209  auto error = simdjson::to_json_string(value).get(v);
    +
    210  if(error == simdjson::SUCCESS) {
    +
    211  return (out << v);
    +
    212  } else {
    +
    213  throw simdjson::simdjson_error(error);
    +
    214  }
    +
    215 }
    + +
    217  if (x.error()) { throw simdjson::simdjson_error(x.error()); }
    +
    218  return (out << x.value());
    +
    219 }
    +
    220 #else
    +
    221 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object value) {
    +
    222  std::string_view v;
    +
    223  auto error = simdjson::to_json_string(value).get(v);
    +
    224  if(error == simdjson::SUCCESS) {
    +
    225  return (out << v);
    +
    226  } else {
    +
    227  return (out << error);
    +
    228  }
    +
    229 }
    +
    230 #endif
    +
    231 }}} // namespace simdjson::SIMDJSON_IMPLEMENTATION::ondemand
    +
    232 
    +
    233 #endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H
    + +
    A document_reference is a thin wrapper around a document reference instance.
    Definition: document.h:605
    + +
    A forward-only JSON object field iterator.
    Definition: object.h:17
    +
    An ephemeral JSON value returned during iteration.
    Definition: value.h:18
    +
    std::ostream & operator<<(std::ostream &out, json_type type) noexcept
    Write the JSON type to the output stream.
    Definition: json_type-inl.h:14
    +
    json_type
    The type of a JSON value.
    Definition: json_type.h:17
    @ object
    A JSON object ( { "a": 1, "b" 2, ... } )
    -
    We want to support argument-dependent lookup (ADL).
    -
    simdjson_result< std::string_view > to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document &x) noexcept
    Create a string-view instance out of a document instance.
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    simdjson_result< std::string_view > to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document &x) noexcept
    Create a string-view instance out of a document instance.
    @ SUCCESS
    No error.
    Definition: error.h:18
    Exception thrown when an exception-supporting simdjson method is called.
    Definition: error.h:72
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    simdjson_inline T & value() &noexcept(false)
    Get the result value.
    diff --git a/generic_2ondemand_2serialization_8h_source.html b/generic_2ondemand_2serialization_8h_source.html index 06a728c79..ac11cf3f0 100644 --- a/generic_2ondemand_2serialization_8h_source.html +++ b/generic_2ondemand_2serialization_8h_source.html @@ -91,51 +91,57 @@ $(document).ready(function(){initNavTree('generic_2ondemand_2serialization_8h_so
    serialization.h
    -
    1 #include "simdjson/dom/serialization.h"
    -
    2 #include "simdjson/error.h"
    -
    3 
    -
    4 namespace simdjson {
    -
    10 inline simdjson_result<std::string_view> to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document& x) noexcept;
    -
    17 inline simdjson_result<std::string_view> to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::value& x) noexcept;
    -
    23 inline simdjson_result<std::string_view> to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::object& x) noexcept;
    -
    29 inline simdjson_result<std::string_view> to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::array& x) noexcept;
    -
    30 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document> x);
    -
    31 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> x);
    -
    32 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> x);
    -
    33 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> x);
    -
    34 } // namespace simdjson
    -
    35 
    -
    43 namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand {
    -
    44 
    -
    53 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value x);
    -
    54 #if SIMDJSON_EXCEPTIONS
    - -
    56 #endif
    -
    65 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array value);
    -
    66 #if SIMDJSON_EXCEPTIONS
    - -
    68 #endif
    -
    77 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document& value);
    -
    78 #if SIMDJSON_EXCEPTIONS
    - -
    80 #endif
    -
    81 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference& value);
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #endif // SIMDJSON_AMALGAMATED
    +
    7 
    +
    8 namespace simdjson {
    +
    14 inline simdjson_result<std::string_view> to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document& x) noexcept;
    +
    21 inline simdjson_result<std::string_view> to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::value& x) noexcept;
    +
    27 inline simdjson_result<std::string_view> to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::object& x) noexcept;
    +
    33 inline simdjson_result<std::string_view> to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::array& x) noexcept;
    +
    34 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::document> x);
    +
    35 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> x);
    +
    36 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> x);
    +
    37 inline simdjson_result<std::string_view> to_json_string(simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> x);
    +
    38 } // namespace simdjson
    +
    39 
    +
    47 namespace simdjson { namespace SIMDJSON_IMPLEMENTATION { namespace ondemand {
    +
    48 
    +
    57 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value x);
    +
    58 #if SIMDJSON_EXCEPTIONS
    + +
    60 #endif
    +
    69 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array value);
    +
    70 #if SIMDJSON_EXCEPTIONS
    + +
    72 #endif
    +
    81 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document& value);
    82 #if SIMDJSON_EXCEPTIONS
    - +
    84 #endif
    -
    93 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object value);
    -
    94 #if SIMDJSON_EXCEPTIONS
    - -
    96 #endif
    -
    97 }}} // namespace simdjson::SIMDJSON_IMPLEMENTATION::ondemand
    - -
    A document_reference is a thin wrapper around a document reference instance.
    Definition: document.h:607
    - -
    A forward-only JSON object field iterator.
    Definition: object.h:10
    -
    An ephemeral JSON value returned during iteration.
    Definition: value.h:17
    -
    std::ostream & operator<<(std::ostream &out, json_type type) noexcept
    Write the JSON type to the output stream.
    Definition: json_type-inl.h:5
    -
    We want to support argument-dependent lookup (ADL).
    -
    simdjson_result< std::string_view > to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document &x) noexcept
    Create a string-view instance out of a document instance.
    +
    85 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference& value);
    +
    86 #if SIMDJSON_EXCEPTIONS
    + +
    88 #endif
    +
    97 inline std::ostream& operator<<(std::ostream& out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object value);
    +
    98 #if SIMDJSON_EXCEPTIONS
    + +
    100 #endif
    +
    101 }}} // namespace simdjson::SIMDJSON_IMPLEMENTATION::ondemand
    +
    102 
    +
    103 #endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H
    + +
    A document_reference is a thin wrapper around a document reference instance.
    Definition: document.h:605
    + +
    A forward-only JSON object field iterator.
    Definition: object.h:17
    +
    An ephemeral JSON value returned during iteration.
    Definition: value.h:18
    +
    std::ostream & operator<<(std::ostream &out, json_type type) noexcept
    Write the JSON type to the output stream.
    Definition: json_type-inl.h:14
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    simdjson_result< std::string_view > to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document &x) noexcept
    Create a string-view instance out of a document instance.
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    diff --git a/group__array.html b/group__array.html index ec7bd9517..cdbc6d1d8 100644 --- a/group__array.html +++ b/group__array.html @@ -153,7 +153,7 @@ simdjson_warn_unused simdjson_inline value_iterator 
    Returns
    SUCCESS if it is possible to safely start an array from the root (document level). @error INCORRECT_TYPE If there is no [. @error TAPE_ERROR if there is no matching ] at end of document
    -

    Definition at line 433 of file value_iterator-inl.h.

    +

    Definition at line 446 of file value_iterator-inl.h.

    @@ -184,7 +184,7 @@ simdjson_warn_unused simdjson_inline value_iterator 
    Returns
    Whether there is another element in the array. @error TAPE_ERROR If there is a comma missing between elements.
    -

    Definition at line 469 of file value_iterator-inl.h.

    +

    Definition at line 482 of file value_iterator-inl.h.

    @@ -214,7 +214,7 @@ simdjson_warn_unused simdjson_inline value_iterator 
    Returns
    Whether the array had any elements (returns false for empty). @error INCORRECT_TYPE If there is no [.
    -

    Definition at line 401 of file value_iterator-inl.h.

    +

    Definition at line 414 of file value_iterator-inl.h.

    @@ -244,7 +244,7 @@ simdjson_warn_unused simdjson_inline value_iterator 
    Returns
    Whether the array had any elements (returns false for empty). @error INCORRECT_TYPE If there is no [. @error TAPE_ERROR if there is no matching ] at end of document
    -

    Definition at line 406 of file value_iterator-inl.h.

    +

    Definition at line 419 of file value_iterator-inl.h.

    @@ -275,7 +275,7 @@ simdjson_warn_unused simdjson_inline value_iterator 
    Returns
    Whether the array had any elements (returns false for empty). @error INCOMPLETE_ARRAY_OR_OBJECT If there are no more tokens (implying the parent array or object is incomplete).
    -

    Definition at line 418 of file value_iterator-inl.h.

    +

    Definition at line 431 of file value_iterator-inl.h.

    @@ -306,7 +306,7 @@ simdjson_warn_unused simdjson_inline value_iterator 
    Returns
    Whether the array had any elements (returns false for empty). @error INCOMPLETE_ARRAY_OR_OBJECT If there are no more tokens (implying the parent array or object is incomplete).
    -

    Definition at line 463 of file value_iterator-inl.h.

    +

    Definition at line 476 of file value_iterator-inl.h.

    diff --git a/group__object.html b/group__object.html index b7c801f0e..d5c612835 100644 --- a/group__object.html +++ b/group__object.html @@ -166,7 +166,7 @@ simdjson_warn_unused simdjson_inline
    Returns
    SUCCESS if it is possible to safely start an object from the root (document level). @error INCORRECT_TYPE if there is no opening { @error TAPE_ERROR if there is no matching } at end of document
    -

    Definition at line 37 of file value_iterator-inl.h.

    +

    Definition at line 50 of file value_iterator-inl.h.

    @@ -237,7 +237,7 @@ simdjson_warn_unused simdjson_inline Definition at line 99 of file value_iterator-inl.h.

    +

    Definition at line 112 of file value_iterator-inl.h.

    @@ -275,7 +275,7 @@ simdjson_warn_unused simdjson_inline Definition at line 196 of file value_iterator-inl.h.

    +

    Definition at line 209 of file value_iterator-inl.h.

    @@ -306,7 +306,7 @@ simdjson_warn_unused simdjson_inline
    Returns
    whether there is another field in the object. @error TAPE_ERROR If there is a comma missing between fields. @error TAPE_ERROR If there is a comma, but not enough tokens remaining to have a key, :, and value.
    -

    Definition at line 82 of file value_iterator-inl.h.

    +

    Definition at line 95 of file value_iterator-inl.h.

    @@ -336,7 +336,7 @@ simdjson_warn_unused simdjson_inline
    Returns
    Whether the object had any fields (returns false for empty). @error INCORRECT_TYPE if there is no opening {
    -

    Definition at line 13 of file value_iterator-inl.h.

    +

    Definition at line 26 of file value_iterator-inl.h.

    @@ -366,7 +366,7 @@ simdjson_warn_unused simdjson_inline
    Returns
    Whether the object had any fields (returns false for empty). @error INCORRECT_TYPE if there is no opening { @error TAPE_ERROR if there is no matching } at end of document
    -

    Definition at line 18 of file value_iterator-inl.h.

    +

    Definition at line 31 of file value_iterator-inl.h.

    @@ -397,7 +397,7 @@ simdjson_warn_unused simdjson_inline
    Returns
    Whether the object had any fields (returns false for empty). @error INCOMPLETE_ARRAY_OR_OBJECT If there are no more tokens (implying the parent array or object is incomplete).
    -

    Definition at line 23 of file value_iterator-inl.h.

    +

    Definition at line 36 of file value_iterator-inl.h.

    @@ -428,7 +428,7 @@ simdjson_warn_unused simdjson_inline
    Returns
    Whether the object had any fields (returns false for empty). @error INCOMPLETE_ARRAY_OR_OBJECT If there are no more tokens (implying the parent array or object is incomplete).
    -

    Definition at line 67 of file value_iterator-inl.h.

    +

    Definition at line 80 of file value_iterator-inl.h.

    diff --git a/group__scalar.html b/group__scalar.html index 53c0e99e0..902a7e685 100644 --- a/group__scalar.html +++ b/group__scalar.html @@ -136,7 +136,7 @@ simdjson_warn_unused simdjson_inline bool simdjson_result< bool > simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::is_integer () noexcept   -simdjson_warn_unused simdjson_inline simdjson_result< number_typesimdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::get_number_type () noexcept +simdjson_warn_unused simdjson_inline simdjson_result< number_typesimdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::get_number_type () noexcept   simdjson_warn_unused simdjson_inline simdjson_result< numbersimdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::get_number () noexcept @@ -177,9 +177,9 @@ simdjson_warn_unused simdjson_inline bool  simdjson_warn_unused simdjson_inline simdjson_result< bool > simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::is_root_integer (bool check_trailing) noexcept   - -simdjson_warn_unused simdjson_inline simdjson_result< number_typesimdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::get_root_number_type (bool check_trailing) noexcept -  + +simdjson_warn_unused simdjson_inline simdjson_result< number_typesimdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::get_root_number_type (bool check_trailing) noexcept +  simdjson_warn_unused simdjson_inline simdjson_result< numbersimdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::get_root_number (bool check_trailing) noexcept   diff --git a/haswell_2numberparsing_8h_source.html b/haswell_2base_8h_source.html similarity index 65% rename from haswell_2numberparsing_8h_source.html rename to haswell_2base_8h_source.html index ec58ca156..e2bd19d97 100644 --- a/haswell_2numberparsing_8h_source.html +++ b/haswell_2base_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/haswell/numberparsing.h Source File +simdjson: include/simdjson/haswell/base.h Source File @@ -68,7 +68,7 @@ $(function() {
    @@ -88,50 +88,47 @@ $(document).ready(function(){initNavTree('haswell_2numberparsing_8h_source.html'
    -
    numberparsing.h
    +
    base.h
    -
    1 #ifndef SIMDJSON_HASWELL_NUMBERPARSING_H
    -
    2 #define SIMDJSON_HASWELL_NUMBERPARSING_H
    +
    1 #ifndef SIMDJSON_HASWELL_BASE_H
    +
    2 #define SIMDJSON_HASWELL_BASE_H
    3 
    -
    4 namespace simdjson {
    -
    5 namespace SIMDJSON_IMPLEMENTATION {
    -
    6 namespace numberparsing {
    +
    4 #ifndef SIMDJSON_AMALGAMATED
    +
    5 #include "simdjson/base.h"
    +
    6 #endif // SIMDJSON_AMALGAMATED
    7 
    -
    9 static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) {
    -
    10  // this actually computes *16* values so we are being wasteful.
    -
    11  const __m128i ascii0 = _mm_set1_epi8('0');
    -
    12  const __m128i mul_1_10 =
    -
    13  _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1);
    -
    14  const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1);
    -
    15  const __m128i mul_1_10000 =
    -
    16  _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1);
    -
    17  const __m128i input = _mm_sub_epi8(
    -
    18  _mm_loadu_si128(reinterpret_cast<const __m128i *>(chars)), ascii0);
    -
    19  const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10);
    -
    20  const __m128i t2 = _mm_madd_epi16(t1, mul_1_100);
    -
    21  const __m128i t3 = _mm_packus_epi32(t2, t2);
    -
    22  const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000);
    -
    23  return _mm_cvtsi128_si32(
    -
    24  t4); // only captures the sum of the first 8 digits, drop the rest
    -
    25 }
    +
    8 // The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_HASWELL
    +
    9 namespace simdjson {
    +
    13 namespace haswell {
    +
    14 
    +
    15 class implementation;
    +
    16 
    +
    17 namespace {
    +
    18 namespace simd {
    +
    19 template <typename T> struct simd8;
    +
    20 template <typename T> struct simd8x64;
    +
    21 } // namespace simd
    +
    22 } // unnamed namespace
    +
    23 
    +
    24 } // namespace haswell
    +
    25 } // namespace simdjson
    26 
    -
    27 } // namespace numberparsing
    -
    28 } // namespace SIMDJSON_IMPLEMENTATION
    -
    29 } // namespace simdjson
    -
    30 
    -
    31 #define SIMDJSON_SWAR_NUMBER_PARSING 1
    -
    32 
    -
    33 #include "simdjson/generic/numberparsing.h"
    -
    34 
    -
    35 #endif // SIMDJSON_HASWELL_NUMBERPARSING_H
    -
    We want to support argument-dependent lookup (ADL).
    +
    27 #ifndef SIMDJSON_AMALGAMATED
    +
    28 // If we're editing one of the files in this directory, begin the implementation!
    +
    29 #ifndef SIMDJSON_IMPLEMENTATION
    +
    30 #include "simdjson/haswell/begin.h"
    +
    31 #endif
    +
    32 #endif // SIMDJSON_AMALGAMATED
    +
    33 
    +
    34 #endif // SIMDJSON_HASWELL_BASE_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/haswell_2begin_8h_source.html b/haswell_2begin_8h_source.html index 230f566ce..0ea5e6b4b 100644 --- a/haswell_2begin_8h_source.html +++ b/haswell_2begin_8h_source.html @@ -92,7 +92,18 @@ $(document).ready(function(){initNavTree('haswell_2begin_8h_source.html',''); in
    1 #define SIMDJSON_IMPLEMENTATION haswell
    -
    2 SIMDJSON_TARGET_HASWELL
    +
    2 #include "simdjson/haswell/base.h"
    +
    3 #include "simdjson/haswell/intrinsics.h"
    +
    4 
    +
    5 #if !SIMDJSON_CAN_ALWAYS_RUN_HASWELL
    +
    6 SIMDJSON_TARGET_REGION("avx2,bmi,pclmul,lzcnt,popcnt")
    +
    7 #endif
    +
    8 
    +
    9 #include "simdjson/haswell/bitmanipulation.h"
    +
    10 #include "simdjson/haswell/bitmask.h"
    +
    11 #include "simdjson/haswell/numberparsing_defs.h"
    +
    12 #include "simdjson/haswell/simd.h"
    +
    13 #include "simdjson/haswell/stringparsing_defs.h"
    diff --git a/haswell_2bitmanipulation_8h_source.html b/haswell_2bitmanipulation_8h_source.html index eecf911b8..4b10cad11 100644 --- a/haswell_2bitmanipulation_8h_source.html +++ b/haswell_2bitmanipulation_8h_source.html @@ -94,67 +94,71 @@ $(document).ready(function(){initNavTree('haswell_2bitmanipulation_8h_source.htm
    1 #ifndef SIMDJSON_HASWELL_BITMANIPULATION_H
    2 #define SIMDJSON_HASWELL_BITMANIPULATION_H
    3 
    -
    4 namespace simdjson {
    -
    5 namespace SIMDJSON_IMPLEMENTATION {
    -
    6 namespace {
    +
    4 #include "simdjson/haswell/base.h"
    +
    5 #include "simdjson/haswell/intrinsics.h"
    +
    6 #include "simdjson/haswell/bitmask.h"
    7 
    -
    8 // We sometimes call trailing_zero on inputs that are zero,
    -
    9 // but the algorithms do not end up using the returned value.
    -
    10 // Sadly, sanitizers are not smart enough to figure it out.
    -
    11 SIMDJSON_NO_SANITIZE_UNDEFINED
    -
    12 // This function can be used safely even if not all bytes have been
    -
    13 // initialized.
    -
    14 // See issue https://github.com/simdjson/simdjson/issues/1965
    -
    15 SIMDJSON_NO_SANITIZE_MEMORY
    -
    16 simdjson_inline int trailing_zeroes(uint64_t input_num) {
    -
    17 #if SIMDJSON_REGULAR_VISUAL_STUDIO
    -
    18  return (int)_tzcnt_u64(input_num);
    -
    19 #else // SIMDJSON_REGULAR_VISUAL_STUDIO
    -
    21  // You might expect the next line to be equivalent to
    -
    22  // return (int)_tzcnt_u64(input_num);
    -
    23  // but the generated code differs and might be less efficient?
    -
    25  return __builtin_ctzll(input_num);
    -
    26 #endif // SIMDJSON_REGULAR_VISUAL_STUDIO
    -
    27 }
    -
    28 
    -
    29 /* result might be undefined when input_num is zero */
    -
    30 simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) {
    -
    31  return _blsr_u64(input_num);
    -
    32 }
    -
    33 
    -
    34 /* result might be undefined when input_num is zero */
    -
    35 simdjson_inline int leading_zeroes(uint64_t input_num) {
    -
    36  return int(_lzcnt_u64(input_num));
    -
    37 }
    -
    38 
    -
    39 #if SIMDJSON_REGULAR_VISUAL_STUDIO
    -
    40 simdjson_inline unsigned __int64 count_ones(uint64_t input_num) {
    -
    41  // note: we do not support legacy 32-bit Windows
    -
    42  return __popcnt64(input_num);// Visual Studio wants two underscores
    -
    43 }
    -
    44 #else
    -
    45 simdjson_inline long long int count_ones(uint64_t input_num) {
    -
    46  return _popcnt64(input_num);
    +
    8 namespace simdjson {
    +
    9 namespace SIMDJSON_IMPLEMENTATION {
    +
    10 namespace {
    +
    11 
    +
    12 // We sometimes call trailing_zero on inputs that are zero,
    +
    13 // but the algorithms do not end up using the returned value.
    +
    14 // Sadly, sanitizers are not smart enough to figure it out.
    +
    15 SIMDJSON_NO_SANITIZE_UNDEFINED
    +
    16 // This function can be used safely even if not all bytes have been
    +
    17 // initialized.
    +
    18 // See issue https://github.com/simdjson/simdjson/issues/1965
    +
    19 SIMDJSON_NO_SANITIZE_MEMORY
    +
    20 simdjson_inline int trailing_zeroes(uint64_t input_num) {
    +
    21 #if SIMDJSON_REGULAR_VISUAL_STUDIO
    +
    22  return (int)_tzcnt_u64(input_num);
    +
    23 #else // SIMDJSON_REGULAR_VISUAL_STUDIO
    +
    25  // You might expect the next line to be equivalent to
    +
    26  // return (int)_tzcnt_u64(input_num);
    +
    27  // but the generated code differs and might be less efficient?
    +
    29  return __builtin_ctzll(input_num);
    +
    30 #endif // SIMDJSON_REGULAR_VISUAL_STUDIO
    +
    31 }
    +
    32 
    +
    33 /* result might be undefined when input_num is zero */
    +
    34 simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) {
    +
    35  return _blsr_u64(input_num);
    +
    36 }
    +
    37 
    +
    38 /* result might be undefined when input_num is zero */
    +
    39 simdjson_inline int leading_zeroes(uint64_t input_num) {
    +
    40  return int(_lzcnt_u64(input_num));
    +
    41 }
    +
    42 
    +
    43 #if SIMDJSON_REGULAR_VISUAL_STUDIO
    +
    44 simdjson_inline unsigned __int64 count_ones(uint64_t input_num) {
    +
    45  // note: we do not support legacy 32-bit Windows
    +
    46  return __popcnt64(input_num);// Visual Studio wants two underscores
    47 }
    -
    48 #endif
    -
    49 
    -
    50 simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2,
    -
    51  uint64_t *result) {
    -
    52 #if SIMDJSON_REGULAR_VISUAL_STUDIO
    -
    53  return _addcarry_u64(0, value1, value2,
    -
    54  reinterpret_cast<unsigned __int64 *>(result));
    -
    55 #else
    -
    56  return __builtin_uaddll_overflow(value1, value2,
    -
    57  reinterpret_cast<unsigned long long *>(result));
    -
    58 #endif
    -
    59 }
    -
    60 
    -
    61 } // unnamed namespace
    -
    62 } // namespace SIMDJSON_IMPLEMENTATION
    -
    63 } // namespace simdjson
    +
    48 #else
    +
    49 simdjson_inline long long int count_ones(uint64_t input_num) {
    +
    50  return _popcnt64(input_num);
    +
    51 }
    +
    52 #endif
    +
    53 
    +
    54 simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2,
    +
    55  uint64_t *result) {
    +
    56 #if SIMDJSON_REGULAR_VISUAL_STUDIO
    +
    57  return _addcarry_u64(0, value1, value2,
    +
    58  reinterpret_cast<unsigned __int64 *>(result));
    +
    59 #else
    +
    60  return __builtin_uaddll_overflow(value1, value2,
    +
    61  reinterpret_cast<unsigned long long *>(result));
    +
    62 #endif
    +
    63 }
    64 
    -
    65 #endif // SIMDJSON_HASWELL_BITMANIPULATION_H
    -
    We want to support argument-dependent lookup (ADL).
    +
    65 } // unnamed namespace
    +
    66 } // namespace SIMDJSON_IMPLEMENTATION
    +
    67 } // namespace simdjson
    +
    68 
    +
    69 #endif // SIMDJSON_HASWELL_BITMANIPULATION_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/haswell_2bitmask_8h_source.html b/haswell_2bitmask_8h_source.html index 9f15894e6..eb3aed7df 100644 --- a/haswell_2bitmask_8h_source.html +++ b/haswell_2bitmask_8h_source.html @@ -94,29 +94,32 @@ $(document).ready(function(){initNavTree('haswell_2bitmask_8h_source.html','');
    1 #ifndef SIMDJSON_HASWELL_BITMASK_H
    2 #define SIMDJSON_HASWELL_BITMASK_H
    3 
    -
    4 namespace simdjson {
    -
    5 namespace SIMDJSON_IMPLEMENTATION {
    -
    6 namespace {
    -
    7 
    -
    8 //
    -
    9 // Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered.
    -
    10 //
    -
    11 // For example, prefix_xor(00100100) == 00011100
    -
    12 //
    -
    13 simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) {
    -
    14  // There should be no such thing with a processor supporting avx2
    -
    15  // but not clmul.
    -
    16  __m128i all_ones = _mm_set1_epi8('\xFF');
    -
    17  __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0);
    -
    18  return _mm_cvtsi128_si64(result);
    -
    19 }
    -
    20 
    -
    21 } // unnamed namespace
    -
    22 } // namespace SIMDJSON_IMPLEMENTATION
    -
    23 } // namespace simdjson
    -
    24 
    -
    25 #endif // SIMDJSON_HASWELL_BITMASK_H
    -
    We want to support argument-dependent lookup (ADL).
    +
    4 #include "simdjson/haswell/base.h"
    +
    5 #include "simdjson/haswell/intrinsics.h"
    +
    6 
    +
    7 namespace simdjson {
    +
    8 namespace SIMDJSON_IMPLEMENTATION {
    +
    9 namespace {
    +
    10 
    +
    11 //
    +
    12 // Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered.
    +
    13 //
    +
    14 // For example, prefix_xor(00100100) == 00011100
    +
    15 //
    +
    16 simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) {
    +
    17  // There should be no such thing with a processor supporting avx2
    +
    18  // but not clmul.
    +
    19  __m128i all_ones = _mm_set1_epi8('\xFF');
    +
    20  __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0);
    +
    21  return _mm_cvtsi128_si64(result);
    +
    22 }
    +
    23 
    +
    24 } // unnamed namespace
    +
    25 } // namespace SIMDJSON_IMPLEMENTATION
    +
    26 } // namespace simdjson
    +
    27 
    +
    28 #endif // SIMDJSON_HASWELL_BITMASK_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/haswell_2end_8h_source.html b/haswell_2end_8h_source.html index f921a47f8..caa4ffbd6 100644 --- a/haswell_2end_8h_source.html +++ b/haswell_2end_8h_source.html @@ -91,8 +91,13 @@ $(document).ready(function(){initNavTree('haswell_2end_8h_source.html',''); init
    end.h
    -
    1 SIMDJSON_UNTARGET_HASWELL
    -
    2 #undef SIMDJSON_IMPLEMENTATION
    +
    1 #include "simdjson/haswell/base.h"
    +
    2 
    +
    3 #if !SIMDJSON_CAN_ALWAYS_RUN_HASWELL
    +
    4 SIMDJSON_UNTARGET_REGION
    +
    5 #endif
    +
    6 
    +
    7 #undef SIMDJSON_IMPLEMENTATION
    diff --git a/haswell_2implementation_8h_source.html b/haswell_2implementation_8h_source.html index 757dbd1bd..d44341401 100644 --- a/haswell_2implementation_8h_source.html +++ b/haswell_2implementation_8h_source.html @@ -95,38 +95,37 @@ $(document).ready(function(){initNavTree('haswell_2implementation_8h_source.html
    2 #define SIMDJSON_HASWELL_IMPLEMENTATION_H
    3 
    4 #include "simdjson/implementation.h"
    -
    5 
    -
    6 // The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_HASWELL
    -
    7 namespace simdjson {
    -
    8 namespace haswell {
    -
    9 
    -
    10 using namespace simdjson;
    -
    11 
    -
    15 class implementation final : public simdjson::implementation {
    -
    16 public:
    -
    17  simdjson_inline implementation() : simdjson::implementation(
    -
    18  "haswell",
    -
    19  "Intel/AMD AVX2",
    -
    20  internal::instruction_set::AVX2 | internal::instruction_set::PCLMULQDQ | internal::instruction_set::BMI1 | internal::instruction_set::BMI2
    -
    21  ) {}
    -
    22  simdjson_warn_unused error_code create_dom_parser_implementation(
    -
    23  size_t capacity,
    -
    24  size_t max_length,
    -
    25  std::unique_ptr<internal::dom_parser_implementation>& dst
    -
    26  ) const noexcept final;
    -
    27  simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final;
    -
    28  simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final;
    -
    29 };
    -
    30 
    -
    31 } // namespace haswell
    -
    32 } // namespace simdjson
    -
    33 
    -
    34 #endif // SIMDJSON_HASWELL_IMPLEMENTATION_H
    -
    An implementation of simdjson for a particular CPU architecture.
    -
    virtual simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept=0
    Validate the UTF-8 string.
    -
    We want to support argument-dependent lookup (ADL).
    +
    5 #include "simdjson/internal/instruction_set.h"
    +
    6 
    +
    7 // The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_HASWELL
    +
    8 namespace simdjson {
    +
    9 namespace haswell {
    +
    10 
    +
    14 class implementation final : public simdjson::implementation {
    +
    15 public:
    +
    16  simdjson_inline implementation() : simdjson::implementation(
    +
    17  "haswell",
    +
    18  "Intel/AMD AVX2",
    +
    19  internal::instruction_set::AVX2 | internal::instruction_set::PCLMULQDQ | internal::instruction_set::BMI1 | internal::instruction_set::BMI2
    +
    20  ) {}
    +
    21  simdjson_warn_unused error_code create_dom_parser_implementation(
    +
    22  size_t capacity,
    +
    23  size_t max_length,
    +
    24  std::unique_ptr<internal::dom_parser_implementation>& dst
    +
    25  ) const noexcept final;
    +
    26  simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final;
    +
    27  simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final;
    +
    28 };
    +
    29 
    +
    30 } // namespace haswell
    +
    31 } // namespace simdjson
    +
    32 
    +
    33 #endif // SIMDJSON_HASWELL_IMPLEMENTATION_H
    +
    An implementation of simdjson for a particular CPU architecture.
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) noexcept
    Validate the UTF-8 string.
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    -
    std::string minify(T x)
    Minifies a JSON element or document, printing the smallest possible valid JSON.
    +
    std::string minify(T x)
    Minifies a JSON element or document, printing the smallest possible valid JSON.
    diff --git a/haswell_2intrinsics_8h_source.html b/haswell_2intrinsics_8h_source.html index 305255326..254616255 100644 --- a/haswell_2intrinsics_8h_source.html +++ b/haswell_2intrinsics_8h_source.html @@ -94,7 +94,7 @@ $(document).ready(function(){initNavTree('haswell_2intrinsics_8h_source.html',''
    1 #ifndef SIMDJSON_HASWELL_INTRINSICS_H
    2 #define SIMDJSON_HASWELL_INTRINSICS_H
    3 
    -
    4 #include "simdjson/base.h"
    +
    4 #include "simdjson/haswell/base.h"
    5 
    6 #if SIMDJSON_VISUAL_STUDIO
    7 // under clang within visual studio, this will include <x86intrin.h>
    @@ -123,7 +123,7 @@ $(document).ready(function(){initNavTree('haswell_2intrinsics_8h_source.html',''
    48 static_assert(sizeof(__m256i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for haswell kernel.");
    49 
    50 #endif // SIMDJSON_HASWELL_INTRINSICS_H
    -
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: common_defs.h:45
    +
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: base.h:30
    diff --git a/haswell_2numberparsing__defs_8h_source.html b/haswell_2numberparsing__defs_8h_source.html new file mode 100644 index 000000000..612ab9846 --- /dev/null +++ b/haswell_2numberparsing__defs_8h_source.html @@ -0,0 +1,162 @@ + + + + + + + +simdjson: include/simdjson/haswell/numberparsing_defs.h Source File + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    simdjson +  3.2.1 +
    +
    Ridiculously Fast JSON
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    numberparsing_defs.h
    +
    +
    +
    1 #ifndef SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H
    +
    2 #define SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H
    +
    3 
    +
    4 #include "simdjson/haswell/base.h"
    +
    5 #include "simdjson/haswell/intrinsics.h"
    +
    6 
    +
    7 #ifndef SIMDJSON_AMALGAMATED
    +
    8 #include "simdjson/internal/numberparsing_tables.h"
    +
    9 #endif // SIMDJSON_AMALGAMATED
    +
    10 
    +
    11 namespace simdjson {
    +
    12 namespace SIMDJSON_IMPLEMENTATION {
    +
    13 namespace numberparsing {
    +
    14 
    +
    16 static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) {
    +
    17  // this actually computes *16* values so we are being wasteful.
    +
    18  const __m128i ascii0 = _mm_set1_epi8('0');
    +
    19  const __m128i mul_1_10 =
    +
    20  _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1);
    +
    21  const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1);
    +
    22  const __m128i mul_1_10000 =
    +
    23  _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1);
    +
    24  const __m128i input = _mm_sub_epi8(
    +
    25  _mm_loadu_si128(reinterpret_cast<const __m128i *>(chars)), ascii0);
    +
    26  const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10);
    +
    27  const __m128i t2 = _mm_madd_epi16(t1, mul_1_100);
    +
    28  const __m128i t3 = _mm_packus_epi32(t2, t2);
    +
    29  const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000);
    +
    30  return _mm_cvtsi128_si32(
    +
    31  t4); // only captures the sum of the first 8 digits, drop the rest
    +
    32 }
    +
    33 
    +
    35 simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) {
    +
    36  internal::value128 answer;
    +
    37 #if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
    +
    38 #ifdef _M_ARM64
    +
    39  // ARM64 has native support for 64-bit multiplications, no need to emultate
    +
    40  answer.high = __umulh(value1, value2);
    +
    41  answer.low = value1 * value2;
    +
    42 #else
    +
    43  answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64
    +
    44 #endif // _M_ARM64
    +
    45 #else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
    +
    46  __uint128_t r = (static_cast<__uint128_t>(value1)) * value2;
    +
    47  answer.low = uint64_t(r);
    +
    48  answer.high = uint64_t(r >> 64);
    +
    49 #endif
    +
    50  return answer;
    +
    51 }
    +
    52 
    +
    53 } // namespace numberparsing
    +
    54 } // namespace SIMDJSON_IMPLEMENTATION
    +
    55 } // namespace simdjson
    +
    56 
    +
    57 #define SIMDJSON_SWAR_NUMBER_PARSING 1
    +
    58 
    +
    59 #endif // SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    +
    + + + + diff --git a/haswell_2ondemand_8h_source.html b/haswell_2ondemand_8h_source.html new file mode 100644 index 000000000..433441837 --- /dev/null +++ b/haswell_2ondemand_8h_source.html @@ -0,0 +1,112 @@ + + + + + + + +simdjson: include/simdjson/haswell/ondemand.h Source File + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    simdjson +  3.2.1 +
    +
    Ridiculously Fast JSON
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    ondemand.h
    +
    +
    +
    1 #ifndef SIMDJSON_HASWELL_ONDEMAND_H
    +
    2 #define SIMDJSON_HASWELL_ONDEMAND_H
    +
    3 
    +
    4 #include "simdjson/haswell/begin.h"
    +
    5 #include "simdjson/generic/ondemand/amalgamated.h"
    +
    6 #include "simdjson/haswell/end.h"
    +
    7 
    +
    8 #endif // SIMDJSON_HASWELL_ONDEMAND_H
    +
    +
    + + + + diff --git a/haswell_2simd_8h_source.html b/haswell_2simd_8h_source.html index 588de4a69..207b785c1 100644 --- a/haswell_2simd_8h_source.html +++ b/haswell_2simd_8h_source.html @@ -94,372 +94,377 @@ $(document).ready(function(){initNavTree('haswell_2simd_8h_source.html',''); ini
    1 #ifndef SIMDJSON_HASWELL_SIMD_H
    2 #define SIMDJSON_HASWELL_SIMD_H
    3 
    -
    4 #include "simdjson/internal/simdprune_tables.h"
    -
    5 
    -
    6 namespace simdjson {
    -
    7 namespace SIMDJSON_IMPLEMENTATION {
    -
    8 namespace {
    -
    9 namespace simd {
    +
    4 #include "simdjson/haswell/base.h"
    +
    5 #include "simdjson/haswell/intrinsics.h"
    +
    6 
    +
    7 #ifndef SIMDJSON_AMALGAMATED
    +
    8 #include "simdjson/internal/simdprune_tables.h"
    +
    9 #endif // SIMDJSON_AMALGAMATED
    10 
    -
    11  // Forward-declared so they can be used by splat and friends.
    -
    12  template<typename Child>
    -
    13  struct base {
    -
    14  __m256i value;
    +
    11 namespace simdjson {
    +
    12 namespace SIMDJSON_IMPLEMENTATION {
    +
    13 namespace {
    +
    14 namespace simd {
    15 
    -
    16  // Zero constructor
    -
    17  simdjson_inline base() : value{__m256i()} {}
    -
    18 
    -
    19  // Conversion from SIMD register
    -
    20  simdjson_inline base(const __m256i _value) : value(_value) {}
    -
    21 
    -
    22  // Conversion to SIMD register
    -
    23  simdjson_inline operator const __m256i&() const { return this->value; }
    -
    24  simdjson_inline operator __m256i&() { return this->value; }
    -
    25 
    -
    26  // Bit operations
    -
    27  simdjson_inline Child operator|(const Child other) const { return _mm256_or_si256(*this, other); }
    -
    28  simdjson_inline Child operator&(const Child other) const { return _mm256_and_si256(*this, other); }
    -
    29  simdjson_inline Child operator^(const Child other) const { return _mm256_xor_si256(*this, other); }
    -
    30  simdjson_inline Child bit_andnot(const Child other) const { return _mm256_andnot_si256(other, *this); }
    -
    31  simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast | other; return *this_cast; }
    -
    32  simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast & other; return *this_cast; }
    -
    33  simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast ^ other; return *this_cast; }
    -
    34  };
    -
    35 
    -
    36  // Forward-declared so they can be used by splat and friends.
    -
    37  template<typename T>
    -
    38  struct simd8;
    -
    39 
    -
    40  template<typename T, typename Mask=simd8<bool>>
    -
    41  struct base8: base<simd8<T>> {
    -
    42  typedef uint32_t bitmask_t;
    -
    43  typedef uint64_t bitmask2_t;
    +
    16  // Forward-declared so they can be used by splat and friends.
    +
    17  template<typename Child>
    +
    18  struct base {
    +
    19  __m256i value;
    +
    20 
    +
    21  // Zero constructor
    +
    22  simdjson_inline base() : value{__m256i()} {}
    +
    23 
    +
    24  // Conversion from SIMD register
    +
    25  simdjson_inline base(const __m256i _value) : value(_value) {}
    +
    26 
    +
    27  // Conversion to SIMD register
    +
    28  simdjson_inline operator const __m256i&() const { return this->value; }
    +
    29  simdjson_inline operator __m256i&() { return this->value; }
    +
    30 
    +
    31  // Bit operations
    +
    32  simdjson_inline Child operator|(const Child other) const { return _mm256_or_si256(*this, other); }
    +
    33  simdjson_inline Child operator&(const Child other) const { return _mm256_and_si256(*this, other); }
    +
    34  simdjson_inline Child operator^(const Child other) const { return _mm256_xor_si256(*this, other); }
    +
    35  simdjson_inline Child bit_andnot(const Child other) const { return _mm256_andnot_si256(other, *this); }
    +
    36  simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast | other; return *this_cast; }
    +
    37  simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast & other; return *this_cast; }
    +
    38  simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast ^ other; return *this_cast; }
    +
    39  };
    +
    40 
    +
    41  // Forward-declared so they can be used by splat and friends.
    +
    42  template<typename T>
    +
    43  struct simd8;
    44 
    -
    45  simdjson_inline base8() : base<simd8<T>>() {}
    -
    46  simdjson_inline base8(const __m256i _value) : base<simd8<T>>(_value) {}
    -
    47 
    -
    48  friend simdjson_really_inline Mask operator==(const simd8<T> lhs, const simd8<T> rhs) { return _mm256_cmpeq_epi8(lhs, rhs); }
    +
    45  template<typename T, typename Mask=simd8<bool>>
    +
    46  struct base8: base<simd8<T>> {
    +
    47  typedef uint32_t bitmask_t;
    +
    48  typedef uint64_t bitmask2_t;
    49 
    -
    50  static const int SIZE = sizeof(base<T>::value);
    -
    51 
    -
    52  template<int N=1>
    -
    53  simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
    -
    54  return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N);
    -
    55  }
    -
    56  };
    -
    57 
    -
    58  // SIMD byte mask type (returned by things like eq and gt)
    -
    59  template<>
    -
    60  struct simd8<bool>: base8<bool> {
    -
    61  static simdjson_inline simd8<bool> splat(bool _value) { return _mm256_set1_epi8(uint8_t(-(!!_value))); }
    +
    50  simdjson_inline base8() : base<simd8<T>>() {}
    +
    51  simdjson_inline base8(const __m256i _value) : base<simd8<T>>(_value) {}
    +
    52 
    +
    53  friend simdjson_really_inline Mask operator==(const simd8<T> lhs, const simd8<T> rhs) { return _mm256_cmpeq_epi8(lhs, rhs); }
    +
    54 
    +
    55  static const int SIZE = sizeof(base<T>::value);
    +
    56 
    +
    57  template<int N=1>
    +
    58  simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
    +
    59  return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N);
    +
    60  }
    +
    61  };
    62 
    -
    63  simdjson_inline simd8<bool>() : base8() {}
    -
    64  simdjson_inline simd8<bool>(const __m256i _value) : base8<bool>(_value) {}
    -
    65  // Splat constructor
    -
    66  simdjson_inline simd8<bool>(bool _value) : base8<bool>(splat(_value)) {}
    +
    63  // SIMD byte mask type (returned by things like eq and gt)
    +
    64  template<>
    +
    65  struct simd8<bool>: base8<bool> {
    +
    66  static simdjson_inline simd8<bool> splat(bool _value) { return _mm256_set1_epi8(uint8_t(-(!!_value))); }
    67 
    -
    68  simdjson_inline int to_bitmask() const { return _mm256_movemask_epi8(*this); }
    -
    69  simdjson_inline bool any() const { return !_mm256_testz_si256(*this, *this); }
    -
    70  simdjson_inline simd8<bool> operator~() const { return *this ^ true; }
    -
    71  };
    +
    68  simdjson_inline simd8<bool>() : base8() {}
    +
    69  simdjson_inline simd8<bool>(const __m256i _value) : base8<bool>(_value) {}
    +
    70  // Splat constructor
    +
    71  simdjson_inline simd8<bool>(bool _value) : base8<bool>(splat(_value)) {}
    72 
    -
    73  template<typename T>
    -
    74  struct base8_numeric: base8<T> {
    -
    75  static simdjson_inline simd8<T> splat(T _value) { return _mm256_set1_epi8(_value); }
    -
    76  static simdjson_inline simd8<T> zero() { return _mm256_setzero_si256(); }
    -
    77  static simdjson_inline simd8<T> load(const T values[32]) {
    -
    78  return _mm256_loadu_si256(reinterpret_cast<const __m256i *>(values));
    -
    79  }
    -
    80  // Repeat 16 values as many times as necessary (usually for lookup tables)
    -
    81  static simdjson_inline simd8<T> repeat_16(
    -
    82  T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7,
    -
    83  T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15
    -
    84  ) {
    -
    85  return simd8<T>(
    -
    86  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    87  v8, v9, v10,v11,v12,v13,v14,v15,
    -
    88  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    89  v8, v9, v10,v11,v12,v13,v14,v15
    -
    90  );
    -
    91  }
    -
    92 
    -
    93  simdjson_inline base8_numeric() : base8<T>() {}
    -
    94  simdjson_inline base8_numeric(const __m256i _value) : base8<T>(_value) {}
    -
    95 
    -
    96  // Store to array
    -
    97  simdjson_inline void store(T dst[32]) const { return _mm256_storeu_si256(reinterpret_cast<__m256i *>(dst), *this); }
    -
    98 
    -
    99  // Addition/subtraction are the same for signed and unsigned
    -
    100  simdjson_inline simd8<T> operator+(const simd8<T> other) const { return _mm256_add_epi8(*this, other); }
    -
    101  simdjson_inline simd8<T> operator-(const simd8<T> other) const { return _mm256_sub_epi8(*this, other); }
    -
    102  simdjson_inline simd8<T>& operator+=(const simd8<T> other) { *this = *this + other; return *static_cast<simd8<T>*>(this); }
    -
    103  simdjson_inline simd8<T>& operator-=(const simd8<T> other) { *this = *this - other; return *static_cast<simd8<T>*>(this); }
    -
    104 
    -
    105  // Override to distinguish from bool version
    -
    106  simdjson_inline simd8<T> operator~() const { return *this ^ 0xFFu; }
    -
    107 
    -
    108  // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values)
    -
    109  template<typename L>
    -
    110  simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
    -
    111  return _mm256_shuffle_epi8(lookup_table, *this);
    -
    112  }
    -
    113 
    -
    114  // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset).
    -
    115  // Passing a 0 value for mask would be equivalent to writing out every byte to output.
    -
    116  // Only the first 32 - count_ones(mask) bytes of the result are significant but 32 bytes
    -
    117  // get written.
    -
    118  // Design consideration: it seems like a function with the
    -
    119  // signature simd8<L> compress(uint32_t mask) would be
    -
    120  // sensible, but the AVX ISA makes this kind of approach difficult.
    -
    121  template<typename L>
    -
    122  simdjson_inline void compress(uint32_t mask, L * output) const {
    -
    123  using internal::thintable_epi8;
    -
    124  using internal::BitsSetTable256mul2;
    -
    125  using internal::pshufb_combine_table;
    -
    126  // this particular implementation was inspired by work done by @animetosho
    -
    127  // we do it in four steps, first 8 bytes and then second 8 bytes...
    -
    128  uint8_t mask1 = uint8_t(mask); // least significant 8 bits
    -
    129  uint8_t mask2 = uint8_t(mask >> 8); // second least significant 8 bits
    -
    130  uint8_t mask3 = uint8_t(mask >> 16); // ...
    -
    131  uint8_t mask4 = uint8_t(mask >> 24); // ...
    -
    132  // next line just loads the 64-bit values thintable_epi8[mask1] and
    -
    133  // thintable_epi8[mask2] into a 128-bit register, using only
    -
    134  // two instructions on most compilers.
    -
    135  __m256i shufmask = _mm256_set_epi64x(thintable_epi8[mask4], thintable_epi8[mask3],
    -
    136  thintable_epi8[mask2], thintable_epi8[mask1]);
    -
    137  // we increment by 0x08 the second half of the mask and so forth
    -
    138  shufmask =
    -
    139  _mm256_add_epi8(shufmask, _mm256_set_epi32(0x18181818, 0x18181818,
    -
    140  0x10101010, 0x10101010, 0x08080808, 0x08080808, 0, 0));
    -
    141  // this is the version "nearly pruned"
    -
    142  __m256i pruned = _mm256_shuffle_epi8(*this, shufmask);
    -
    143  // we still need to put the pieces back together.
    -
    144  // we compute the popcount of the first words:
    -
    145  int pop1 = BitsSetTable256mul2[mask1];
    -
    146  int pop3 = BitsSetTable256mul2[mask3];
    -
    147 
    -
    148  // then load the corresponding mask
    -
    149  // could be done with _mm256_loadu2_m128i but many standard libraries omit this intrinsic.
    -
    150  __m256i v256 = _mm256_castsi128_si256(
    -
    151  _mm_loadu_si128(reinterpret_cast<const __m128i *>(pshufb_combine_table + pop1 * 8)));
    -
    152  __m256i compactmask = _mm256_insertf128_si256(v256,
    -
    153  _mm_loadu_si128(reinterpret_cast<const __m128i *>(pshufb_combine_table + pop3 * 8)), 1);
    -
    154  __m256i almostthere = _mm256_shuffle_epi8(pruned, compactmask);
    -
    155  // We just need to write out the result.
    -
    156  // This is the tricky bit that is hard to do
    -
    157  // if we want to return a SIMD register, since there
    -
    158  // is no single-instruction approach to recombine
    -
    159  // the two 128-bit lanes with an offset.
    -
    160  __m128i v128;
    -
    161  v128 = _mm256_castsi256_si128(almostthere);
    -
    162  _mm_storeu_si128( reinterpret_cast<__m128i *>(output), v128);
    -
    163  v128 = _mm256_extractf128_si256(almostthere, 1);
    -
    164  _mm_storeu_si128( reinterpret_cast<__m128i *>(output + 16 - count_ones(mask & 0xFFFF)), v128);
    -
    165  }
    -
    166 
    -
    167  template<typename L>
    -
    168  simdjson_inline simd8<L> lookup_16(
    -
    169  L replace0, L replace1, L replace2, L replace3,
    -
    170  L replace4, L replace5, L replace6, L replace7,
    -
    171  L replace8, L replace9, L replace10, L replace11,
    -
    172  L replace12, L replace13, L replace14, L replace15) const {
    -
    173  return lookup_16(simd8<L>::repeat_16(
    -
    174  replace0, replace1, replace2, replace3,
    -
    175  replace4, replace5, replace6, replace7,
    -
    176  replace8, replace9, replace10, replace11,
    -
    177  replace12, replace13, replace14, replace15
    -
    178  ));
    -
    179  }
    -
    180  };
    -
    181 
    -
    182  // Signed bytes
    -
    183  template<>
    -
    184  struct simd8<int8_t> : base8_numeric<int8_t> {
    -
    185  simdjson_inline simd8() : base8_numeric<int8_t>() {}
    -
    186  simdjson_inline simd8(const __m256i _value) : base8_numeric<int8_t>(_value) {}
    -
    187  // Splat constructor
    -
    188  simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {}
    -
    189  // Array constructor
    -
    190  simdjson_inline simd8(const int8_t values[32]) : simd8(load(values)) {}
    -
    191  // Member-by-member initialization
    -
    192  simdjson_inline simd8(
    -
    193  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
    -
    194  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15,
    -
    195  int8_t v16, int8_t v17, int8_t v18, int8_t v19, int8_t v20, int8_t v21, int8_t v22, int8_t v23,
    -
    196  int8_t v24, int8_t v25, int8_t v26, int8_t v27, int8_t v28, int8_t v29, int8_t v30, int8_t v31
    -
    197  ) : simd8(_mm256_setr_epi8(
    -
    198  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    199  v8, v9, v10,v11,v12,v13,v14,v15,
    -
    200  v16,v17,v18,v19,v20,v21,v22,v23,
    -
    201  v24,v25,v26,v27,v28,v29,v30,v31
    -
    202  )) {}
    -
    203  // Repeat 16 values as many times as necessary (usually for lookup tables)
    -
    204  simdjson_inline static simd8<int8_t> repeat_16(
    -
    205  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
    -
    206  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15
    -
    207  ) {
    -
    208  return simd8<int8_t>(
    -
    209  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    210  v8, v9, v10,v11,v12,v13,v14,v15,
    -
    211  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    212  v8, v9, v10,v11,v12,v13,v14,v15
    -
    213  );
    -
    214  }
    -
    215 
    -
    216  // Order-sensitive comparisons
    -
    217  simdjson_inline simd8<int8_t> max_val(const simd8<int8_t> other) const { return _mm256_max_epi8(*this, other); }
    -
    218  simdjson_inline simd8<int8_t> min_val(const simd8<int8_t> other) const { return _mm256_min_epi8(*this, other); }
    -
    219  simdjson_inline simd8<bool> operator>(const simd8<int8_t> other) const { return _mm256_cmpgt_epi8(*this, other); }
    -
    220  simdjson_inline simd8<bool> operator<(const simd8<int8_t> other) const { return _mm256_cmpgt_epi8(other, *this); }
    -
    221  };
    -
    222 
    -
    223  // Unsigned bytes
    -
    224  template<>
    -
    225  struct simd8<uint8_t>: base8_numeric<uint8_t> {
    -
    226  simdjson_inline simd8() : base8_numeric<uint8_t>() {}
    -
    227  simdjson_inline simd8(const __m256i _value) : base8_numeric<uint8_t>(_value) {}
    -
    228  // Splat constructor
    -
    229  simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
    -
    230  // Array constructor
    -
    231  simdjson_inline simd8(const uint8_t values[32]) : simd8(load(values)) {}
    -
    232  // Member-by-member initialization
    -
    233  simdjson_inline simd8(
    -
    234  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
    -
    235  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15,
    -
    236  uint8_t v16, uint8_t v17, uint8_t v18, uint8_t v19, uint8_t v20, uint8_t v21, uint8_t v22, uint8_t v23,
    -
    237  uint8_t v24, uint8_t v25, uint8_t v26, uint8_t v27, uint8_t v28, uint8_t v29, uint8_t v30, uint8_t v31
    -
    238  ) : simd8(_mm256_setr_epi8(
    -
    239  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    240  v8, v9, v10,v11,v12,v13,v14,v15,
    -
    241  v16,v17,v18,v19,v20,v21,v22,v23,
    -
    242  v24,v25,v26,v27,v28,v29,v30,v31
    -
    243  )) {}
    -
    244  // Repeat 16 values as many times as necessary (usually for lookup tables)
    -
    245  simdjson_inline static simd8<uint8_t> repeat_16(
    -
    246  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
    -
    247  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15
    -
    248  ) {
    -
    249  return simd8<uint8_t>(
    -
    250  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    251  v8, v9, v10,v11,v12,v13,v14,v15,
    -
    252  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    253  v8, v9, v10,v11,v12,v13,v14,v15
    -
    254  );
    -
    255  }
    -
    256 
    -
    257  // Saturated math
    -
    258  simdjson_inline simd8<uint8_t> saturating_add(const simd8<uint8_t> other) const { return _mm256_adds_epu8(*this, other); }
    -
    259  simdjson_inline simd8<uint8_t> saturating_sub(const simd8<uint8_t> other) const { return _mm256_subs_epu8(*this, other); }
    -
    260 
    -
    261  // Order-specific operations
    -
    262  simdjson_inline simd8<uint8_t> max_val(const simd8<uint8_t> other) const { return _mm256_max_epu8(*this, other); }
    -
    263  simdjson_inline simd8<uint8_t> min_val(const simd8<uint8_t> other) const { return _mm256_min_epu8(other, *this); }
    -
    264  // Same as >, but only guarantees true is nonzero (< guarantees true = -1)
    -
    265  simdjson_inline simd8<uint8_t> gt_bits(const simd8<uint8_t> other) const { return this->saturating_sub(other); }
    -
    266  // Same as <, but only guarantees true is nonzero (< guarantees true = -1)
    -
    267  simdjson_inline simd8<uint8_t> lt_bits(const simd8<uint8_t> other) const { return other.saturating_sub(*this); }
    -
    268  simdjson_inline simd8<bool> operator<=(const simd8<uint8_t> other) const { return other.max_val(*this) == other; }
    -
    269  simdjson_inline simd8<bool> operator>=(const simd8<uint8_t> other) const { return other.min_val(*this) == other; }
    -
    270  simdjson_inline simd8<bool> operator>(const simd8<uint8_t> other) const { return this->gt_bits(other).any_bits_set(); }
    -
    271  simdjson_inline simd8<bool> operator<(const simd8<uint8_t> other) const { return this->lt_bits(other).any_bits_set(); }
    -
    272 
    -
    273  // Bit-specific operations
    -
    274  simdjson_inline simd8<bool> bits_not_set() const { return *this == uint8_t(0); }
    -
    275  simdjson_inline simd8<bool> bits_not_set(simd8<uint8_t> bits) const { return (*this & bits).bits_not_set(); }
    -
    276  simdjson_inline simd8<bool> any_bits_set() const { return ~this->bits_not_set(); }
    -
    277  simdjson_inline simd8<bool> any_bits_set(simd8<uint8_t> bits) const { return ~this->bits_not_set(bits); }
    -
    278  simdjson_inline bool is_ascii() const { return _mm256_movemask_epi8(*this) == 0; }
    -
    279  simdjson_inline bool bits_not_set_anywhere() const { return _mm256_testz_si256(*this, *this); }
    -
    280  simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); }
    -
    281  simdjson_inline bool bits_not_set_anywhere(simd8<uint8_t> bits) const { return _mm256_testz_si256(*this, bits); }
    -
    282  simdjson_inline bool any_bits_set_anywhere(simd8<uint8_t> bits) const { return !bits_not_set_anywhere(bits); }
    -
    283  template<int N>
    -
    284  simdjson_inline simd8<uint8_t> shr() const { return simd8<uint8_t>(_mm256_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); }
    -
    285  template<int N>
    -
    286  simdjson_inline simd8<uint8_t> shl() const { return simd8<uint8_t>(_mm256_slli_epi16(*this, N)) & uint8_t(0xFFu << N); }
    -
    287  // Get one of the bits and make a bitmask out of it.
    -
    288  // e.g. value.get_bit<7>() gets the high bit
    -
    289  template<int N>
    -
    290  simdjson_inline int get_bit() const { return _mm256_movemask_epi8(_mm256_slli_epi16(*this, 7-N)); }
    -
    291  };
    -
    292 
    -
    293  template<typename T>
    -
    294  struct simd8x64 {
    -
    295  static constexpr int NUM_CHUNKS = 64 / sizeof(simd8<T>);
    -
    296  static_assert(NUM_CHUNKS == 2, "Haswell kernel should use two registers per 64-byte block.");
    -
    297  const simd8<T> chunks[NUM_CHUNKS];
    -
    298 
    -
    299  simd8x64(const simd8x64<T>& o) = delete; // no copy allowed
    -
    300  simd8x64<T>& operator=(const simd8<T>& other) = delete; // no assignment allowed
    -
    301  simd8x64() = delete; // no default constructor allowed
    -
    302 
    -
    303  simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1) : chunks{chunk0, chunk1} {}
    -
    304  simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8<T>::load(ptr), simd8<T>::load(ptr+32)} {}
    -
    305 
    -
    306  simdjson_inline uint64_t compress(uint64_t mask, T * output) const {
    -
    307  uint32_t mask1 = uint32_t(mask);
    -
    308  uint32_t mask2 = uint32_t(mask >> 32);
    -
    309  this->chunks[0].compress(mask1, output);
    -
    310  this->chunks[1].compress(mask2, output + 32 - count_ones(mask1));
    -
    311  return 64 - count_ones(mask);
    -
    312  }
    -
    313 
    -
    314  simdjson_inline void store(T ptr[64]) const {
    -
    315  this->chunks[0].store(ptr+sizeof(simd8<T>)*0);
    -
    316  this->chunks[1].store(ptr+sizeof(simd8<T>)*1);
    +
    73  simdjson_inline int to_bitmask() const { return _mm256_movemask_epi8(*this); }
    +
    74  simdjson_inline bool any() const { return !_mm256_testz_si256(*this, *this); }
    +
    75  simdjson_inline simd8<bool> operator~() const { return *this ^ true; }
    +
    76  };
    +
    77 
    +
    78  template<typename T>
    +
    79  struct base8_numeric: base8<T> {
    +
    80  static simdjson_inline simd8<T> splat(T _value) { return _mm256_set1_epi8(_value); }
    +
    81  static simdjson_inline simd8<T> zero() { return _mm256_setzero_si256(); }
    +
    82  static simdjson_inline simd8<T> load(const T values[32]) {
    +
    83  return _mm256_loadu_si256(reinterpret_cast<const __m256i *>(values));
    +
    84  }
    +
    85  // Repeat 16 values as many times as necessary (usually for lookup tables)
    +
    86  static simdjson_inline simd8<T> repeat_16(
    +
    87  T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7,
    +
    88  T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15
    +
    89  ) {
    +
    90  return simd8<T>(
    +
    91  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    92  v8, v9, v10,v11,v12,v13,v14,v15,
    +
    93  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    94  v8, v9, v10,v11,v12,v13,v14,v15
    +
    95  );
    +
    96  }
    +
    97 
    +
    98  simdjson_inline base8_numeric() : base8<T>() {}
    +
    99  simdjson_inline base8_numeric(const __m256i _value) : base8<T>(_value) {}
    +
    100 
    +
    101  // Store to array
    +
    102  simdjson_inline void store(T dst[32]) const { return _mm256_storeu_si256(reinterpret_cast<__m256i *>(dst), *this); }
    +
    103 
    +
    104  // Addition/subtraction are the same for signed and unsigned
    +
    105  simdjson_inline simd8<T> operator+(const simd8<T> other) const { return _mm256_add_epi8(*this, other); }
    +
    106  simdjson_inline simd8<T> operator-(const simd8<T> other) const { return _mm256_sub_epi8(*this, other); }
    +
    107  simdjson_inline simd8<T>& operator+=(const simd8<T> other) { *this = *this + other; return *static_cast<simd8<T>*>(this); }
    +
    108  simdjson_inline simd8<T>& operator-=(const simd8<T> other) { *this = *this - other; return *static_cast<simd8<T>*>(this); }
    +
    109 
    +
    110  // Override to distinguish from bool version
    +
    111  simdjson_inline simd8<T> operator~() const { return *this ^ 0xFFu; }
    +
    112 
    +
    113  // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values)
    +
    114  template<typename L>
    +
    115  simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
    +
    116  return _mm256_shuffle_epi8(lookup_table, *this);
    +
    117  }
    +
    118 
    +
    119  // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset).
    +
    120  // Passing a 0 value for mask would be equivalent to writing out every byte to output.
    +
    121  // Only the first 32 - count_ones(mask) bytes of the result are significant but 32 bytes
    +
    122  // get written.
    +
    123  // Design consideration: it seems like a function with the
    +
    124  // signature simd8<L> compress(uint32_t mask) would be
    +
    125  // sensible, but the AVX ISA makes this kind of approach difficult.
    +
    126  template<typename L>
    +
    127  simdjson_inline void compress(uint32_t mask, L * output) const {
    +
    128  using internal::thintable_epi8;
    +
    129  using internal::BitsSetTable256mul2;
    +
    130  using internal::pshufb_combine_table;
    +
    131  // this particular implementation was inspired by work done by @animetosho
    +
    132  // we do it in four steps, first 8 bytes and then second 8 bytes...
    +
    133  uint8_t mask1 = uint8_t(mask); // least significant 8 bits
    +
    134  uint8_t mask2 = uint8_t(mask >> 8); // second least significant 8 bits
    +
    135  uint8_t mask3 = uint8_t(mask >> 16); // ...
    +
    136  uint8_t mask4 = uint8_t(mask >> 24); // ...
    +
    137  // next line just loads the 64-bit values thintable_epi8[mask1] and
    +
    138  // thintable_epi8[mask2] into a 128-bit register, using only
    +
    139  // two instructions on most compilers.
    +
    140  __m256i shufmask = _mm256_set_epi64x(thintable_epi8[mask4], thintable_epi8[mask3],
    +
    141  thintable_epi8[mask2], thintable_epi8[mask1]);
    +
    142  // we increment by 0x08 the second half of the mask and so forth
    +
    143  shufmask =
    +
    144  _mm256_add_epi8(shufmask, _mm256_set_epi32(0x18181818, 0x18181818,
    +
    145  0x10101010, 0x10101010, 0x08080808, 0x08080808, 0, 0));
    +
    146  // this is the version "nearly pruned"
    +
    147  __m256i pruned = _mm256_shuffle_epi8(*this, shufmask);
    +
    148  // we still need to put the pieces back together.
    +
    149  // we compute the popcount of the first words:
    +
    150  int pop1 = BitsSetTable256mul2[mask1];
    +
    151  int pop3 = BitsSetTable256mul2[mask3];
    +
    152 
    +
    153  // then load the corresponding mask
    +
    154  // could be done with _mm256_loadu2_m128i but many standard libraries omit this intrinsic.
    +
    155  __m256i v256 = _mm256_castsi128_si256(
    +
    156  _mm_loadu_si128(reinterpret_cast<const __m128i *>(pshufb_combine_table + pop1 * 8)));
    +
    157  __m256i compactmask = _mm256_insertf128_si256(v256,
    +
    158  _mm_loadu_si128(reinterpret_cast<const __m128i *>(pshufb_combine_table + pop3 * 8)), 1);
    +
    159  __m256i almostthere = _mm256_shuffle_epi8(pruned, compactmask);
    +
    160  // We just need to write out the result.
    +
    161  // This is the tricky bit that is hard to do
    +
    162  // if we want to return a SIMD register, since there
    +
    163  // is no single-instruction approach to recombine
    +
    164  // the two 128-bit lanes with an offset.
    +
    165  __m128i v128;
    +
    166  v128 = _mm256_castsi256_si128(almostthere);
    +
    167  _mm_storeu_si128( reinterpret_cast<__m128i *>(output), v128);
    +
    168  v128 = _mm256_extractf128_si256(almostthere, 1);
    +
    169  _mm_storeu_si128( reinterpret_cast<__m128i *>(output + 16 - count_ones(mask & 0xFFFF)), v128);
    +
    170  }
    +
    171 
    +
    172  template<typename L>
    +
    173  simdjson_inline simd8<L> lookup_16(
    +
    174  L replace0, L replace1, L replace2, L replace3,
    +
    175  L replace4, L replace5, L replace6, L replace7,
    +
    176  L replace8, L replace9, L replace10, L replace11,
    +
    177  L replace12, L replace13, L replace14, L replace15) const {
    +
    178  return lookup_16(simd8<L>::repeat_16(
    +
    179  replace0, replace1, replace2, replace3,
    +
    180  replace4, replace5, replace6, replace7,
    +
    181  replace8, replace9, replace10, replace11,
    +
    182  replace12, replace13, replace14, replace15
    +
    183  ));
    +
    184  }
    +
    185  };
    +
    186 
    +
    187  // Signed bytes
    +
    188  template<>
    +
    189  struct simd8<int8_t> : base8_numeric<int8_t> {
    +
    190  simdjson_inline simd8() : base8_numeric<int8_t>() {}
    +
    191  simdjson_inline simd8(const __m256i _value) : base8_numeric<int8_t>(_value) {}
    +
    192  // Splat constructor
    +
    193  simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {}
    +
    194  // Array constructor
    +
    195  simdjson_inline simd8(const int8_t values[32]) : simd8(load(values)) {}
    +
    196  // Member-by-member initialization
    +
    197  simdjson_inline simd8(
    +
    198  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
    +
    199  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15,
    +
    200  int8_t v16, int8_t v17, int8_t v18, int8_t v19, int8_t v20, int8_t v21, int8_t v22, int8_t v23,
    +
    201  int8_t v24, int8_t v25, int8_t v26, int8_t v27, int8_t v28, int8_t v29, int8_t v30, int8_t v31
    +
    202  ) : simd8(_mm256_setr_epi8(
    +
    203  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    204  v8, v9, v10,v11,v12,v13,v14,v15,
    +
    205  v16,v17,v18,v19,v20,v21,v22,v23,
    +
    206  v24,v25,v26,v27,v28,v29,v30,v31
    +
    207  )) {}
    +
    208  // Repeat 16 values as many times as necessary (usually for lookup tables)
    +
    209  simdjson_inline static simd8<int8_t> repeat_16(
    +
    210  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
    +
    211  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15
    +
    212  ) {
    +
    213  return simd8<int8_t>(
    +
    214  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    215  v8, v9, v10,v11,v12,v13,v14,v15,
    +
    216  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    217  v8, v9, v10,v11,v12,v13,v14,v15
    +
    218  );
    +
    219  }
    +
    220 
    +
    221  // Order-sensitive comparisons
    +
    222  simdjson_inline simd8<int8_t> max_val(const simd8<int8_t> other) const { return _mm256_max_epi8(*this, other); }
    +
    223  simdjson_inline simd8<int8_t> min_val(const simd8<int8_t> other) const { return _mm256_min_epi8(*this, other); }
    +
    224  simdjson_inline simd8<bool> operator>(const simd8<int8_t> other) const { return _mm256_cmpgt_epi8(*this, other); }
    +
    225  simdjson_inline simd8<bool> operator<(const simd8<int8_t> other) const { return _mm256_cmpgt_epi8(other, *this); }
    +
    226  };
    +
    227 
    +
    228  // Unsigned bytes
    +
    229  template<>
    +
    230  struct simd8<uint8_t>: base8_numeric<uint8_t> {
    +
    231  simdjson_inline simd8() : base8_numeric<uint8_t>() {}
    +
    232  simdjson_inline simd8(const __m256i _value) : base8_numeric<uint8_t>(_value) {}
    +
    233  // Splat constructor
    +
    234  simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
    +
    235  // Array constructor
    +
    236  simdjson_inline simd8(const uint8_t values[32]) : simd8(load(values)) {}
    +
    237  // Member-by-member initialization
    +
    238  simdjson_inline simd8(
    +
    239  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
    +
    240  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15,
    +
    241  uint8_t v16, uint8_t v17, uint8_t v18, uint8_t v19, uint8_t v20, uint8_t v21, uint8_t v22, uint8_t v23,
    +
    242  uint8_t v24, uint8_t v25, uint8_t v26, uint8_t v27, uint8_t v28, uint8_t v29, uint8_t v30, uint8_t v31
    +
    243  ) : simd8(_mm256_setr_epi8(
    +
    244  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    245  v8, v9, v10,v11,v12,v13,v14,v15,
    +
    246  v16,v17,v18,v19,v20,v21,v22,v23,
    +
    247  v24,v25,v26,v27,v28,v29,v30,v31
    +
    248  )) {}
    +
    249  // Repeat 16 values as many times as necessary (usually for lookup tables)
    +
    250  simdjson_inline static simd8<uint8_t> repeat_16(
    +
    251  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
    +
    252  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15
    +
    253  ) {
    +
    254  return simd8<uint8_t>(
    +
    255  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    256  v8, v9, v10,v11,v12,v13,v14,v15,
    +
    257  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    258  v8, v9, v10,v11,v12,v13,v14,v15
    +
    259  );
    +
    260  }
    +
    261 
    +
    262  // Saturated math
    +
    263  simdjson_inline simd8<uint8_t> saturating_add(const simd8<uint8_t> other) const { return _mm256_adds_epu8(*this, other); }
    +
    264  simdjson_inline simd8<uint8_t> saturating_sub(const simd8<uint8_t> other) const { return _mm256_subs_epu8(*this, other); }
    +
    265 
    +
    266  // Order-specific operations
    +
    267  simdjson_inline simd8<uint8_t> max_val(const simd8<uint8_t> other) const { return _mm256_max_epu8(*this, other); }
    +
    268  simdjson_inline simd8<uint8_t> min_val(const simd8<uint8_t> other) const { return _mm256_min_epu8(other, *this); }
    +
    269  // Same as >, but only guarantees true is nonzero (< guarantees true = -1)
    +
    270  simdjson_inline simd8<uint8_t> gt_bits(const simd8<uint8_t> other) const { return this->saturating_sub(other); }
    +
    271  // Same as <, but only guarantees true is nonzero (< guarantees true = -1)
    +
    272  simdjson_inline simd8<uint8_t> lt_bits(const simd8<uint8_t> other) const { return other.saturating_sub(*this); }
    +
    273  simdjson_inline simd8<bool> operator<=(const simd8<uint8_t> other) const { return other.max_val(*this) == other; }
    +
    274  simdjson_inline simd8<bool> operator>=(const simd8<uint8_t> other) const { return other.min_val(*this) == other; }
    +
    275  simdjson_inline simd8<bool> operator>(const simd8<uint8_t> other) const { return this->gt_bits(other).any_bits_set(); }
    +
    276  simdjson_inline simd8<bool> operator<(const simd8<uint8_t> other) const { return this->lt_bits(other).any_bits_set(); }
    +
    277 
    +
    278  // Bit-specific operations
    +
    279  simdjson_inline simd8<bool> bits_not_set() const { return *this == uint8_t(0); }
    +
    280  simdjson_inline simd8<bool> bits_not_set(simd8<uint8_t> bits) const { return (*this & bits).bits_not_set(); }
    +
    281  simdjson_inline simd8<bool> any_bits_set() const { return ~this->bits_not_set(); }
    +
    282  simdjson_inline simd8<bool> any_bits_set(simd8<uint8_t> bits) const { return ~this->bits_not_set(bits); }
    +
    283  simdjson_inline bool is_ascii() const { return _mm256_movemask_epi8(*this) == 0; }
    +
    284  simdjson_inline bool bits_not_set_anywhere() const { return _mm256_testz_si256(*this, *this); }
    +
    285  simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); }
    +
    286  simdjson_inline bool bits_not_set_anywhere(simd8<uint8_t> bits) const { return _mm256_testz_si256(*this, bits); }
    +
    287  simdjson_inline bool any_bits_set_anywhere(simd8<uint8_t> bits) const { return !bits_not_set_anywhere(bits); }
    +
    288  template<int N>
    +
    289  simdjson_inline simd8<uint8_t> shr() const { return simd8<uint8_t>(_mm256_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); }
    +
    290  template<int N>
    +
    291  simdjson_inline simd8<uint8_t> shl() const { return simd8<uint8_t>(_mm256_slli_epi16(*this, N)) & uint8_t(0xFFu << N); }
    +
    292  // Get one of the bits and make a bitmask out of it.
    +
    293  // e.g. value.get_bit<7>() gets the high bit
    +
    294  template<int N>
    +
    295  simdjson_inline int get_bit() const { return _mm256_movemask_epi8(_mm256_slli_epi16(*this, 7-N)); }
    +
    296  };
    +
    297 
    +
    298  template<typename T>
    +
    299  struct simd8x64 {
    +
    300  static constexpr int NUM_CHUNKS = 64 / sizeof(simd8<T>);
    +
    301  static_assert(NUM_CHUNKS == 2, "Haswell kernel should use two registers per 64-byte block.");
    +
    302  const simd8<T> chunks[NUM_CHUNKS];
    +
    303 
    +
    304  simd8x64(const simd8x64<T>& o) = delete; // no copy allowed
    +
    305  simd8x64<T>& operator=(const simd8<T>& other) = delete; // no assignment allowed
    +
    306  simd8x64() = delete; // no default constructor allowed
    +
    307 
    +
    308  simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1) : chunks{chunk0, chunk1} {}
    +
    309  simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8<T>::load(ptr), simd8<T>::load(ptr+32)} {}
    +
    310 
    +
    311  simdjson_inline uint64_t compress(uint64_t mask, T * output) const {
    +
    312  uint32_t mask1 = uint32_t(mask);
    +
    313  uint32_t mask2 = uint32_t(mask >> 32);
    +
    314  this->chunks[0].compress(mask1, output);
    +
    315  this->chunks[1].compress(mask2, output + 32 - count_ones(mask1));
    +
    316  return 64 - count_ones(mask);
    317  }
    318 
    -
    319  simdjson_inline uint64_t to_bitmask() const {
    -
    320  uint64_t r_lo = uint32_t(this->chunks[0].to_bitmask());
    -
    321  uint64_t r_hi = this->chunks[1].to_bitmask();
    -
    322  return r_lo | (r_hi << 32);
    -
    323  }
    -
    324 
    -
    325  simdjson_inline simd8<T> reduce_or() const {
    -
    326  return this->chunks[0] | this->chunks[1];
    -
    327  }
    -
    328 
    -
    329  simdjson_inline simd8x64<T> bit_or(const T m) const {
    -
    330  const simd8<T> mask = simd8<T>::splat(m);
    -
    331  return simd8x64<T>(
    -
    332  this->chunks[0] | mask,
    -
    333  this->chunks[1] | mask
    -
    334  );
    -
    335  }
    -
    336 
    -
    337  simdjson_inline uint64_t eq(const T m) const {
    -
    338  const simd8<T> mask = simd8<T>::splat(m);
    -
    339  return simd8x64<bool>(
    -
    340  this->chunks[0] == mask,
    -
    341  this->chunks[1] == mask
    -
    342  ).to_bitmask();
    -
    343  }
    -
    344 
    -
    345  simdjson_inline uint64_t eq(const simd8x64<uint8_t> &other) const {
    -
    346  return simd8x64<bool>(
    -
    347  this->chunks[0] == other.chunks[0],
    -
    348  this->chunks[1] == other.chunks[1]
    -
    349  ).to_bitmask();
    -
    350  }
    -
    351 
    -
    352  simdjson_inline uint64_t lteq(const T m) const {
    -
    353  const simd8<T> mask = simd8<T>::splat(m);
    -
    354  return simd8x64<bool>(
    -
    355  this->chunks[0] <= mask,
    -
    356  this->chunks[1] <= mask
    -
    357  ).to_bitmask();
    -
    358  }
    -
    359  }; // struct simd8x64<T>
    -
    360 
    -
    361 } // namespace simd
    -
    362 
    -
    363 } // unnamed namespace
    -
    364 } // namespace SIMDJSON_IMPLEMENTATION
    -
    365 } // namespace simdjson
    -
    366 
    -
    367 #endif // SIMDJSON_HASWELL_SIMD_H
    -
    simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
    Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
    -
    We want to support argument-dependent lookup (ADL).
    +
    319  simdjson_inline void store(T ptr[64]) const {
    +
    320  this->chunks[0].store(ptr+sizeof(simd8<T>)*0);
    +
    321  this->chunks[1].store(ptr+sizeof(simd8<T>)*1);
    +
    322  }
    +
    323 
    +
    324  simdjson_inline uint64_t to_bitmask() const {
    +
    325  uint64_t r_lo = uint32_t(this->chunks[0].to_bitmask());
    +
    326  uint64_t r_hi = this->chunks[1].to_bitmask();
    +
    327  return r_lo | (r_hi << 32);
    +
    328  }
    +
    329 
    +
    330  simdjson_inline simd8<T> reduce_or() const {
    +
    331  return this->chunks[0] | this->chunks[1];
    +
    332  }
    +
    333 
    +
    334  simdjson_inline simd8x64<T> bit_or(const T m) const {
    +
    335  const simd8<T> mask = simd8<T>::splat(m);
    +
    336  return simd8x64<T>(
    +
    337  this->chunks[0] | mask,
    +
    338  this->chunks[1] | mask
    +
    339  );
    +
    340  }
    +
    341 
    +
    342  simdjson_inline uint64_t eq(const T m) const {
    +
    343  const simd8<T> mask = simd8<T>::splat(m);
    +
    344  return simd8x64<bool>(
    +
    345  this->chunks[0] == mask,
    +
    346  this->chunks[1] == mask
    +
    347  ).to_bitmask();
    +
    348  }
    +
    349 
    +
    350  simdjson_inline uint64_t eq(const simd8x64<uint8_t> &other) const {
    +
    351  return simd8x64<bool>(
    +
    352  this->chunks[0] == other.chunks[0],
    +
    353  this->chunks[1] == other.chunks[1]
    +
    354  ).to_bitmask();
    +
    355  }
    +
    356 
    +
    357  simdjson_inline uint64_t lteq(const T m) const {
    +
    358  const simd8<T> mask = simd8<T>::splat(m);
    +
    359  return simd8x64<bool>(
    +
    360  this->chunks[0] <= mask,
    +
    361  this->chunks[1] <= mask
    +
    362  ).to_bitmask();
    +
    363  }
    +
    364  }; // struct simd8x64<T>
    +
    365 
    +
    366 } // namespace simd
    +
    367 
    +
    368 } // unnamed namespace
    +
    369 } // namespace SIMDJSON_IMPLEMENTATION
    +
    370 } // namespace simdjson
    +
    371 
    +
    372 #endif // SIMDJSON_HASWELL_SIMD_H
    +
    simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
    Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/haswell_2stringparsing_8h_source.html b/haswell_2stringparsing__defs_8h_source.html similarity index 79% rename from haswell_2stringparsing_8h_source.html rename to haswell_2stringparsing__defs_8h_source.html index ef15ec000..4b00e60ac 100644 --- a/haswell_2stringparsing_8h_source.html +++ b/haswell_2stringparsing__defs_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/haswell/stringparsing.h Source File +simdjson: include/simdjson/haswell/stringparsing_defs.h Source File @@ -68,7 +68,7 @@ $(function() {
    @@ -88,63 +88,62 @@ $(document).ready(function(){initNavTree('haswell_2stringparsing_8h_source.html'
    -
    stringparsing.h
    +
    stringparsing_defs.h
    -
    1 #ifndef SIMDJSON_HASWELL_STRINGPARSING_H
    -
    2 #define SIMDJSON_HASWELL_STRINGPARSING_H
    +
    1 #ifndef SIMDJSON_HASWELL_STRINGPARSING_DEFS_H
    +
    2 #define SIMDJSON_HASWELL_STRINGPARSING_DEFS_H
    3 
    -
    4 #include "simdjson/base.h"
    -
    5 #include "simdjson/haswell/simd.h"
    -
    6 #include "simdjson/haswell/bitmanipulation.h"
    -
    7 
    -
    8 namespace simdjson {
    -
    9 namespace SIMDJSON_IMPLEMENTATION {
    -
    10 namespace {
    -
    11 
    -
    12 using namespace simd;
    -
    13 
    -
    14 // Holds backslashes and quotes locations.
    -
    15 struct backslash_and_quote {
    -
    16 public:
    -
    17  static constexpr uint32_t BYTES_PROCESSED = 32;
    -
    18  simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst);
    -
    19 
    -
    20  simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; }
    -
    21  simdjson_inline bool has_backslash() { return ((quote_bits - 1) & bs_bits) != 0; }
    -
    22  simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); }
    -
    23  simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); }
    -
    24 
    -
    25  uint32_t bs_bits;
    -
    26  uint32_t quote_bits;
    -
    27 }; // struct backslash_and_quote
    -
    28 
    -
    29 simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) {
    -
    30  // this can read up to 15 bytes beyond the buffer size, but we require
    -
    31  // SIMDJSON_PADDING of padding
    -
    32  static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes");
    -
    33  simd8<uint8_t> v(src);
    -
    34  // store to dest unconditionally - we can overwrite the bits we don't like later
    -
    35  v.store(dst);
    -
    36  return {
    -
    37  static_cast<uint32_t>((v == '\\').to_bitmask()), // bs_bits
    -
    38  static_cast<uint32_t>((v == '"').to_bitmask()), // quote_bits
    -
    39  };
    -
    40 }
    -
    41 
    -
    42 } // unnamed namespace
    -
    43 } // namespace SIMDJSON_IMPLEMENTATION
    -
    44 } // namespace simdjson
    -
    45 
    -
    46 #endif // SIMDJSON_HASWELL_STRINGPARSING_H
    -
    We want to support argument-dependent lookup (ADL).
    -
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: common_defs.h:45
    +
    4 #include "simdjson/haswell/simd.h"
    +
    5 #include "simdjson/haswell/bitmanipulation.h"
    +
    6 
    +
    7 namespace simdjson {
    +
    8 namespace SIMDJSON_IMPLEMENTATION {
    +
    9 namespace {
    +
    10 
    +
    11 using namespace simd;
    +
    12 
    +
    13 // Holds backslashes and quotes locations.
    +
    14 struct backslash_and_quote {
    +
    15 public:
    +
    16  static constexpr uint32_t BYTES_PROCESSED = 32;
    +
    17  simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst);
    +
    18 
    +
    19  simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; }
    +
    20  simdjson_inline bool has_backslash() { return ((quote_bits - 1) & bs_bits) != 0; }
    +
    21  simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); }
    +
    22  simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); }
    +
    23 
    +
    24  uint32_t bs_bits;
    +
    25  uint32_t quote_bits;
    +
    26 }; // struct backslash_and_quote
    +
    27 
    +
    28 simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) {
    +
    29  // this can read up to 15 bytes beyond the buffer size, but we require
    +
    30  // SIMDJSON_PADDING of padding
    +
    31  static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes");
    +
    32  simd8<uint8_t> v(src);
    +
    33  // store to dest unconditionally - we can overwrite the bits we don't like later
    +
    34  v.store(dst);
    +
    35  return {
    +
    36  static_cast<uint32_t>((v == '\\').to_bitmask()), // bs_bits
    +
    37  static_cast<uint32_t>((v == '"').to_bitmask()), // quote_bits
    +
    38  };
    +
    39 }
    +
    40 
    +
    41 } // unnamed namespace
    +
    42 } // namespace SIMDJSON_IMPLEMENTATION
    +
    43 } // namespace simdjson
    +
    44 
    +
    45 #endif // SIMDJSON_HASWELL_STRINGPARSING_DEFS_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: base.h:30
    diff --git a/haswell_8h_source.html b/haswell_8h_source.html index e54fa3d56..6b0095ea7 100644 --- a/haswell_8h_source.html +++ b/haswell_8h_source.html @@ -94,49 +94,11 @@ $(document).ready(function(){initNavTree('haswell_8h_source.html',''); initResiz
    1 #ifndef SIMDJSON_HASWELL_H
    2 #define SIMDJSON_HASWELL_H
    3 
    - -
    5 
    -
    6 #if SIMDJSON_IMPLEMENTATION_HASWELL
    +
    4 #include "simdjson/haswell/begin.h"
    +
    5 #include "simdjson/generic/amalgamated.h"
    +
    6 #include "simdjson/haswell/end.h"
    7 
    -
    8 #if SIMDJSON_CAN_ALWAYS_RUN_HASWELL
    -
    9 #define SIMDJSON_TARGET_HASWELL
    -
    10 #define SIMDJSON_UNTARGET_HASWELL
    -
    11 #else
    -
    12 #define SIMDJSON_TARGET_HASWELL SIMDJSON_TARGET_REGION("avx2,bmi,pclmul,lzcnt,popcnt")
    -
    13 #define SIMDJSON_UNTARGET_HASWELL SIMDJSON_UNTARGET_REGION
    -
    14 #endif
    -
    15 
    -
    16 namespace simdjson {
    -
    20 namespace haswell {
    -
    21 } // namespace haswell
    -
    22 } // namespace simdjson
    -
    23 
    -
    24 //
    -
    25 // These two need to be included outside SIMDJSON_TARGET_HASWELL
    -
    26 //
    -
    27 #include "simdjson/haswell/implementation.h"
    -
    28 #include "simdjson/haswell/intrinsics.h"
    -
    29 
    -
    30 //
    -
    31 // The rest need to be inside the region
    -
    32 //
    -
    33 #include "simdjson/haswell/begin.h"
    -
    34 
    -
    35 // Declarations
    -
    36 #include "simdjson/generic/dom_parser_implementation.h"
    -
    37 #include "simdjson/haswell/bitmanipulation.h"
    -
    38 #include "simdjson/haswell/bitmask.h"
    -
    39 #include "simdjson/haswell/simd.h"
    -
    40 #include "simdjson/generic/jsoncharutils.h"
    -
    41 #include "simdjson/generic/atomparsing.h"
    -
    42 #include "simdjson/haswell/stringparsing.h"
    -
    43 #include "simdjson/haswell/numberparsing.h"
    -
    44 #include "simdjson/haswell/end.h"
    -
    45 
    -
    46 #endif // SIMDJSON_IMPLEMENTATION_HASWELL
    -
    47 #endif // SIMDJSON_HASWELL_COMMON_H
    -
    Includes common stuff needed for implementations.
    -
    We want to support argument-dependent lookup (ADL).
    +
    8 #endif // SIMDJSON_HASWELL_H
    diff --git a/arm64_2numberparsing_8h_source.html b/icelake_2base_8h_source.html similarity index 71% rename from arm64_2numberparsing_8h_source.html rename to icelake_2base_8h_source.html index e1d9a7db0..ff54d656f 100644 --- a/arm64_2numberparsing_8h_source.html +++ b/icelake_2base_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/arm64/numberparsing.h Source File +simdjson: include/simdjson/icelake/base.h Source File @@ -68,7 +68,7 @@ $(function() {
    @@ -88,42 +88,40 @@ $(document).ready(function(){initNavTree('arm64_2numberparsing_8h_source.html','
    -
    numberparsing.h
    +
    base.h
    -
    1 #ifndef SIMDJSON_ARM64_NUMBERPARSING_H
    -
    2 #define SIMDJSON_ARM64_NUMBERPARSING_H
    +
    1 #ifndef SIMDJSON_ICELAKE_BASE_H
    +
    2 #define SIMDJSON_ICELAKE_BASE_H
    3 
    -
    4 namespace simdjson {
    -
    5 namespace SIMDJSON_IMPLEMENTATION {
    -
    6 namespace numberparsing {
    +
    4 #ifndef SIMDJSON_AMALGAMATED
    +
    5 #include "simdjson/base.h"
    +
    6 #endif // SIMDJSON_AMALGAMATED
    7 
    -
    8 // we don't have SSE, so let us use a scalar function
    -
    9 // credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/
    -
    11 static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) {
    -
    12  uint64_t val;
    -
    13  std::memcpy(&val, chars, sizeof(uint64_t));
    -
    14  val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8;
    -
    15  val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16;
    -
    16  return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32);
    -
    17 }
    -
    18 
    -
    19 } // namespace numberparsing
    -
    20 } // namespace SIMDJSON_IMPLEMENTATION
    -
    21 } // namespace simdjson
    -
    22 
    -
    23 #define SIMDJSON_SWAR_NUMBER_PARSING 1
    -
    24 
    -
    25 #include "simdjson/generic/numberparsing.h"
    +
    8 // The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_ICELAKE
    +
    9 namespace simdjson {
    +
    13 namespace icelake {
    +
    14 
    +
    15 class implementation;
    +
    16 
    +
    17 } // namespace icelake
    +
    18 } // namespace simdjson
    +
    19 
    +
    20 #ifndef SIMDJSON_AMALGAMATED
    +
    21 // If we're editing one of the files in this directory, begin the implementation!
    +
    22 #ifndef SIMDJSON_IMPLEMENTATION
    +
    23 #include "simdjson/icelake/begin.h"
    +
    24 #endif
    +
    25 #endif // SIMDJSON_AMALGAMATED
    26 
    -
    27 #endif // SIMDJSON_ARM64_NUMBERPARSING_H
    -
    We want to support argument-dependent lookup (ADL).
    +
    27 #endif // SIMDJSON_ICELAKE_BASE_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/icelake_2begin_8h_source.html b/icelake_2begin_8h_source.html index 0f2e7ad8f..74a270175 100644 --- a/icelake_2begin_8h_source.html +++ b/icelake_2begin_8h_source.html @@ -92,7 +92,18 @@ $(document).ready(function(){initNavTree('icelake_2begin_8h_source.html',''); in
    1 #define SIMDJSON_IMPLEMENTATION icelake
    -
    2 SIMDJSON_TARGET_ICELAKE
    +
    2 #include "simdjson/icelake/base.h"
    +
    3 #include "simdjson/icelake/intrinsics.h"
    +
    4 
    +
    5 #if !SIMDJSON_CAN_ALWAYS_RUN_ICELAKE
    +
    6 SIMDJSON_TARGET_REGION("avx512f,avx512dq,avx512cd,avx512bw,avx512vbmi,avx512vbmi2,avx512vl,avx2,bmi,pclmul,lzcnt,popcnt")
    +
    7 #endif
    +
    8 
    +
    9 #include "simdjson/icelake/bitmanipulation.h"
    +
    10 #include "simdjson/icelake/bitmask.h"
    +
    11 #include "simdjson/icelake/simd.h"
    +
    12 #include "simdjson/icelake/stringparsing_defs.h"
    +
    13 #include "simdjson/icelake/numberparsing_defs.h"
    diff --git a/icelake_2bitmanipulation_8h_source.html b/icelake_2bitmanipulation_8h_source.html index 3c2a17109..21212d332 100644 --- a/icelake_2bitmanipulation_8h_source.html +++ b/icelake_2bitmanipulation_8h_source.html @@ -94,67 +94,70 @@ $(document).ready(function(){initNavTree('icelake_2bitmanipulation_8h_source.htm
    1 #ifndef SIMDJSON_ICELAKE_BITMANIPULATION_H
    2 #define SIMDJSON_ICELAKE_BITMANIPULATION_H
    3 
    -
    4 namespace simdjson {
    -
    5 namespace SIMDJSON_IMPLEMENTATION {
    -
    6 namespace {
    -
    7 
    -
    8 // We sometimes call trailing_zero on inputs that are zero,
    -
    9 // but the algorithms do not end up using the returned value.
    -
    10 // Sadly, sanitizers are not smart enough to figure it out.
    -
    11 SIMDJSON_NO_SANITIZE_UNDEFINED
    -
    12 // This function can be used safely even if not all bytes have been
    -
    13 // initialized.
    -
    14 // See issue https://github.com/simdjson/simdjson/issues/1965
    -
    15 SIMDJSON_NO_SANITIZE_MEMORY
    -
    16 simdjson_inline int trailing_zeroes(uint64_t input_num) {
    -
    17 #if SIMDJSON_REGULAR_VISUAL_STUDIO
    -
    18  return (int)_tzcnt_u64(input_num);
    -
    19 #else // SIMDJSON_REGULAR_VISUAL_STUDIO
    -
    21  // You might expect the next line to be equivalent to
    -
    22  // return (int)_tzcnt_u64(input_num);
    -
    23  // but the generated code differs and might be less efficient?
    -
    25  return __builtin_ctzll(input_num);
    -
    26 #endif // SIMDJSON_REGULAR_VISUAL_STUDIO
    -
    27 }
    -
    28 
    -
    29 /* result might be undefined when input_num is zero */
    -
    30 simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) {
    -
    31  return _blsr_u64(input_num);
    -
    32 }
    -
    33 
    -
    34 /* result might be undefined when input_num is zero */
    -
    35 simdjson_inline int leading_zeroes(uint64_t input_num) {
    -
    36  return int(_lzcnt_u64(input_num));
    -
    37 }
    -
    38 
    -
    39 #if SIMDJSON_REGULAR_VISUAL_STUDIO
    -
    40 simdjson_inline unsigned __int64 count_ones(uint64_t input_num) {
    -
    41  // note: we do not support legacy 32-bit Windows
    -
    42  return __popcnt64(input_num);// Visual Studio wants two underscores
    -
    43 }
    -
    44 #else
    -
    45 simdjson_inline long long int count_ones(uint64_t input_num) {
    -
    46  return _popcnt64(input_num);
    -
    47 }
    -
    48 #endif
    -
    49 
    -
    50 simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2,
    -
    51  uint64_t *result) {
    -
    52 #if SIMDJSON_REGULAR_VISUAL_STUDIO
    -
    53  return _addcarry_u64(0, value1, value2,
    -
    54  reinterpret_cast<unsigned __int64 *>(result));
    -
    55 #else
    -
    56  return __builtin_uaddll_overflow(value1, value2,
    -
    57  reinterpret_cast<unsigned long long *>(result));
    -
    58 #endif
    -
    59 }
    -
    60 
    -
    61 } // unnamed namespace
    -
    62 } // namespace SIMDJSON_IMPLEMENTATION
    -
    63 } // namespace simdjson
    -
    64 
    -
    65 #endif // SIMDJSON_ICELAKE_BITMANIPULATION_H
    -
    We want to support argument-dependent lookup (ADL).
    +
    4 #include "simdjson/icelake/base.h"
    +
    5 #include "simdjson/icelake/intrinsics.h"
    +
    6 
    +
    7 namespace simdjson {
    +
    8 namespace SIMDJSON_IMPLEMENTATION {
    +
    9 namespace {
    +
    10 
    +
    11 // We sometimes call trailing_zero on inputs that are zero,
    +
    12 // but the algorithms do not end up using the returned value.
    +
    13 // Sadly, sanitizers are not smart enough to figure it out.
    +
    14 SIMDJSON_NO_SANITIZE_UNDEFINED
    +
    15 // This function can be used safely even if not all bytes have been
    +
    16 // initialized.
    +
    17 // See issue https://github.com/simdjson/simdjson/issues/1965
    +
    18 SIMDJSON_NO_SANITIZE_MEMORY
    +
    19 simdjson_inline int trailing_zeroes(uint64_t input_num) {
    +
    20 #if SIMDJSON_REGULAR_VISUAL_STUDIO
    +
    21  return (int)_tzcnt_u64(input_num);
    +
    22 #else // SIMDJSON_REGULAR_VISUAL_STUDIO
    +
    24  // You might expect the next line to be equivalent to
    +
    25  // return (int)_tzcnt_u64(input_num);
    +
    26  // but the generated code differs and might be less efficient?
    +
    28  return __builtin_ctzll(input_num);
    +
    29 #endif // SIMDJSON_REGULAR_VISUAL_STUDIO
    +
    30 }
    +
    31 
    +
    32 /* result might be undefined when input_num is zero */
    +
    33 simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) {
    +
    34  return _blsr_u64(input_num);
    +
    35 }
    +
    36 
    +
    37 /* result might be undefined when input_num is zero */
    +
    38 simdjson_inline int leading_zeroes(uint64_t input_num) {
    +
    39  return int(_lzcnt_u64(input_num));
    +
    40 }
    +
    41 
    +
    42 #if SIMDJSON_REGULAR_VISUAL_STUDIO
    +
    43 simdjson_inline unsigned __int64 count_ones(uint64_t input_num) {
    +
    44  // note: we do not support legacy 32-bit Windows
    +
    45  return __popcnt64(input_num);// Visual Studio wants two underscores
    +
    46 }
    +
    47 #else
    +
    48 simdjson_inline long long int count_ones(uint64_t input_num) {
    +
    49  return _popcnt64(input_num);
    +
    50 }
    +
    51 #endif
    +
    52 
    +
    53 simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2,
    +
    54  uint64_t *result) {
    +
    55 #if SIMDJSON_REGULAR_VISUAL_STUDIO
    +
    56  return _addcarry_u64(0, value1, value2,
    +
    57  reinterpret_cast<unsigned __int64 *>(result));
    +
    58 #else
    +
    59  return __builtin_uaddll_overflow(value1, value2,
    +
    60  reinterpret_cast<unsigned long long *>(result));
    +
    61 #endif
    +
    62 }
    +
    63 
    +
    64 } // unnamed namespace
    +
    65 } // namespace SIMDJSON_IMPLEMENTATION
    +
    66 } // namespace simdjson
    +
    67 
    +
    68 #endif // SIMDJSON_ICELAKE_BITMANIPULATION_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/icelake_2bitmask_8h_source.html b/icelake_2bitmask_8h_source.html index 835a6b5d1..91d114bf3 100644 --- a/icelake_2bitmask_8h_source.html +++ b/icelake_2bitmask_8h_source.html @@ -94,29 +94,31 @@ $(document).ready(function(){initNavTree('icelake_2bitmask_8h_source.html','');
    1 #ifndef SIMDJSON_ICELAKE_BITMASK_H
    2 #define SIMDJSON_ICELAKE_BITMASK_H
    3 
    -
    4 namespace simdjson {
    -
    5 namespace SIMDJSON_IMPLEMENTATION {
    -
    6 namespace {
    -
    7 
    -
    8 //
    -
    9 // Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered.
    +
    4 #include "simdjson/icelake/base.h"
    +
    5 
    +
    6 namespace simdjson {
    +
    7 namespace SIMDJSON_IMPLEMENTATION {
    +
    8 namespace {
    +
    9 
    10 //
    -
    11 // For example, prefix_xor(00100100) == 00011100
    +
    11 // Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered.
    12 //
    -
    13 simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) {
    -
    14  // There should be no such thing with a processor supporting avx2
    -
    15  // but not clmul.
    -
    16  __m128i all_ones = _mm_set1_epi8('\xFF');
    -
    17  __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0);
    -
    18  return _mm_cvtsi128_si64(result);
    -
    19 }
    -
    20 
    -
    21 } // unnamed namespace
    -
    22 } // namespace SIMDJSON_IMPLEMENTATION
    -
    23 } // namespace simdjson
    -
    24 
    -
    25 #endif // SIMDJSON_ICELAKE_BITMASK_H
    -
    We want to support argument-dependent lookup (ADL).
    +
    13 // For example, prefix_xor(00100100) == 00011100
    +
    14 //
    +
    15 simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) {
    +
    16  // There should be no such thing with a processor supporting avx2
    +
    17  // but not clmul.
    +
    18  __m128i all_ones = _mm_set1_epi8('\xFF');
    +
    19  __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0);
    +
    20  return _mm_cvtsi128_si64(result);
    +
    21 }
    +
    22 
    +
    23 } // unnamed namespace
    +
    24 } // namespace SIMDJSON_IMPLEMENTATION
    +
    25 } // namespace simdjson
    +
    26 
    +
    27 #endif // SIMDJSON_ICELAKE_BITMASK_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/icelake_2end_8h_source.html b/icelake_2end_8h_source.html index 0782d3e5b..2a4aff3d4 100644 --- a/icelake_2end_8h_source.html +++ b/icelake_2end_8h_source.html @@ -91,8 +91,13 @@ $(document).ready(function(){initNavTree('icelake_2end_8h_source.html',''); init
    end.h
    -
    1 SIMDJSON_UNTARGET_ICELAKE
    -
    2 #undef SIMDJSON_IMPLEMENTATION
    +
    1 #include "simdjson/icelake/base.h"
    +
    2 
    +
    3 #if !SIMDJSON_CAN_ALWAYS_RUN_ICELAKE
    +
    4 SIMDJSON_UNTARGET_REGION
    +
    5 #endif
    +
    6 
    +
    7 #undef SIMDJSON_IMPLEMENTATION
    diff --git a/icelake_2implementation_8h_source.html b/icelake_2implementation_8h_source.html index e97efff60..d208dd80e 100644 --- a/icelake_2implementation_8h_source.html +++ b/icelake_2implementation_8h_source.html @@ -95,38 +95,37 @@ $(document).ready(function(){initNavTree('icelake_2implementation_8h_source.html
    2 #define SIMDJSON_ICELAKE_IMPLEMENTATION_H
    3 
    4 #include "simdjson/implementation.h"
    -
    5 
    -
    6 // The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_ICELAKE
    -
    7 namespace simdjson {
    -
    8 namespace icelake {
    -
    9 
    -
    10 using namespace simdjson;
    -
    11 
    -
    15 class implementation final : public simdjson::implementation {
    -
    16 public:
    -
    17  simdjson_inline implementation() : simdjson::implementation(
    -
    18  "icelake",
    -
    19  "Intel/AMD AVX512",
    -
    20  internal::instruction_set::AVX2 | internal::instruction_set::PCLMULQDQ | internal::instruction_set::BMI1 | internal::instruction_set::BMI2 | internal::instruction_set::AVX512F | internal::instruction_set::AVX512DQ | internal::instruction_set::AVX512CD | internal::instruction_set::AVX512BW | internal::instruction_set::AVX512VL | internal::instruction_set::AVX512VBMI2
    -
    21  ) {}
    -
    22  simdjson_warn_unused error_code create_dom_parser_implementation(
    -
    23  size_t capacity,
    -
    24  size_t max_length,
    -
    25  std::unique_ptr<internal::dom_parser_implementation>& dst
    -
    26  ) const noexcept final;
    -
    27  simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final;
    -
    28  simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final;
    -
    29 };
    -
    30 
    -
    31 } // namespace icelake
    -
    32 } // namespace simdjson
    -
    33 
    -
    34 #endif // SIMDJSON_ICELAKE_IMPLEMENTATION_H
    -
    An implementation of simdjson for a particular CPU architecture.
    -
    virtual simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept=0
    Validate the UTF-8 string.
    -
    We want to support argument-dependent lookup (ADL).
    +
    5 #include "simdjson/internal/instruction_set.h"
    +
    6 
    +
    7 // The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_ICELAKE
    +
    8 namespace simdjson {
    +
    9 namespace icelake {
    +
    10 
    +
    14 class implementation final : public simdjson::implementation {
    +
    15 public:
    +
    16  simdjson_inline implementation() : simdjson::implementation(
    +
    17  "icelake",
    +
    18  "Intel/AMD AVX512",
    +
    19  internal::instruction_set::AVX2 | internal::instruction_set::PCLMULQDQ | internal::instruction_set::BMI1 | internal::instruction_set::BMI2 | internal::instruction_set::AVX512F | internal::instruction_set::AVX512DQ | internal::instruction_set::AVX512CD | internal::instruction_set::AVX512BW | internal::instruction_set::AVX512VL | internal::instruction_set::AVX512VBMI2
    +
    20  ) {}
    +
    21  simdjson_warn_unused error_code create_dom_parser_implementation(
    +
    22  size_t capacity,
    +
    23  size_t max_length,
    +
    24  std::unique_ptr<internal::dom_parser_implementation>& dst
    +
    25  ) const noexcept final;
    +
    26  simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final;
    +
    27  simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final;
    +
    28 };
    +
    29 
    +
    30 } // namespace icelake
    +
    31 } // namespace simdjson
    +
    32 
    +
    33 #endif // SIMDJSON_ICELAKE_IMPLEMENTATION_H
    +
    An implementation of simdjson for a particular CPU architecture.
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) noexcept
    Validate the UTF-8 string.
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    -
    std::string minify(T x)
    Minifies a JSON element or document, printing the smallest possible valid JSON.
    +
    std::string minify(T x)
    Minifies a JSON element or document, printing the smallest possible valid JSON.
    diff --git a/icelake_2intrinsics_8h_source.html b/icelake_2intrinsics_8h_source.html index c600bb78d..d348c8a0f 100644 --- a/icelake_2intrinsics_8h_source.html +++ b/icelake_2intrinsics_8h_source.html @@ -94,7 +94,7 @@ $(document).ready(function(){initNavTree('icelake_2intrinsics_8h_source.html',''
    1 #ifndef SIMDJSON_ICELAKE_INTRINSICS_H
    2 #define SIMDJSON_ICELAKE_INTRINSICS_H
    3 
    -
    4 #include "simdjson/base.h"
    +
    4 #include "simdjson/icelake/base.h"
    5 
    6 #if SIMDJSON_VISUAL_STUDIO
    7 // under clang within visual studio, this will include <x86intrin.h>
    @@ -131,7 +131,7 @@ $(document).ready(function(){initNavTree('icelake_2intrinsics_8h_source.html',''
    56 static_assert(sizeof(__m512i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for icelake");
    57 
    58 #endif // SIMDJSON_ICELAKE_INTRINSICS_H
    -
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: common_defs.h:45
    +
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: base.h:30
    diff --git a/icelake_2numberparsing__defs_8h_source.html b/icelake_2numberparsing__defs_8h_source.html new file mode 100644 index 000000000..ba81939db --- /dev/null +++ b/icelake_2numberparsing__defs_8h_source.html @@ -0,0 +1,162 @@ + + + + + + + +simdjson: include/simdjson/icelake/numberparsing_defs.h Source File + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    simdjson +  3.2.1 +
    +
    Ridiculously Fast JSON
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    numberparsing_defs.h
    +
    +
    +
    1 #ifndef SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H
    +
    2 #define SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H
    +
    3 
    +
    4 #include "simdjson/icelake/base.h"
    +
    5 #include "simdjson/icelake/intrinsics.h"
    +
    6 
    +
    7 #ifndef SIMDJSON_AMALGAMATED
    +
    8 #include "simdjson/internal/numberparsing_tables.h"
    +
    9 #endif // SIMDJSON_AMALGAMATED
    +
    10 
    +
    11 namespace simdjson {
    +
    12 namespace SIMDJSON_IMPLEMENTATION {
    +
    13 namespace numberparsing {
    +
    14 
    +
    15 static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) {
    +
    16  // this actually computes *16* values so we are being wasteful.
    +
    17  const __m128i ascii0 = _mm_set1_epi8('0');
    +
    18  const __m128i mul_1_10 =
    +
    19  _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1);
    +
    20  const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1);
    +
    21  const __m128i mul_1_10000 =
    +
    22  _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1);
    +
    23  const __m128i input = _mm_sub_epi8(
    +
    24  _mm_loadu_si128(reinterpret_cast<const __m128i *>(chars)), ascii0);
    +
    25  const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10);
    +
    26  const __m128i t2 = _mm_madd_epi16(t1, mul_1_100);
    +
    27  const __m128i t3 = _mm_packus_epi32(t2, t2);
    +
    28  const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000);
    +
    29  return _mm_cvtsi128_si32(
    +
    30  t4); // only captures the sum of the first 8 digits, drop the rest
    +
    31 }
    +
    32 
    +
    34 simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) {
    +
    35  internal::value128 answer;
    +
    36 #if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
    +
    37 #ifdef _M_ARM64
    +
    38  // ARM64 has native support for 64-bit multiplications, no need to emultate
    +
    39  answer.high = __umulh(value1, value2);
    +
    40  answer.low = value1 * value2;
    +
    41 #else
    +
    42  answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64
    +
    43 #endif // _M_ARM64
    +
    44 #else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
    +
    45  __uint128_t r = (static_cast<__uint128_t>(value1)) * value2;
    +
    46  answer.low = uint64_t(r);
    +
    47  answer.high = uint64_t(r >> 64);
    +
    48 #endif
    +
    49  return answer;
    +
    50 }
    +
    51 
    +
    52 } // namespace numberparsing
    +
    53 } // namespace SIMDJSON_IMPLEMENTATION
    +
    54 } // namespace simdjson
    +
    55 
    +
    56 #define SIMDJSON_SWAR_NUMBER_PARSING 1
    +
    57 
    +
    58 #endif // SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    +
    + + + + diff --git a/icelake_2ondemand_8h_source.html b/icelake_2ondemand_8h_source.html new file mode 100644 index 000000000..ebf67d35e --- /dev/null +++ b/icelake_2ondemand_8h_source.html @@ -0,0 +1,112 @@ + + + + + + + +simdjson: include/simdjson/icelake/ondemand.h Source File + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    simdjson +  3.2.1 +
    +
    Ridiculously Fast JSON
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    ondemand.h
    +
    +
    +
    1 #ifndef SIMDJSON_ICELAKE_ONDEMAND_H
    +
    2 #define SIMDJSON_ICELAKE_ONDEMAND_H
    +
    3 
    +
    4 #include "simdjson/icelake/begin.h"
    +
    5 #include "simdjson/generic/ondemand/amalgamated.h"
    +
    6 #include "simdjson/icelake/end.h"
    +
    7 
    +
    8 #endif // SIMDJSON_ICELAKE_ONDEMAND_H
    +
    +
    + + + + diff --git a/icelake_2simd_8h_source.html b/icelake_2simd_8h_source.html index 9b940e1a8..368350b9a 100644 --- a/icelake_2simd_8h_source.html +++ b/icelake_2simd_8h_source.html @@ -94,371 +94,374 @@ $(document).ready(function(){initNavTree('icelake_2simd_8h_source.html',''); ini
    1 #ifndef SIMDJSON_ICELAKE_SIMD_H
    2 #define SIMDJSON_ICELAKE_SIMD_H
    3 
    -
    4 #include "simdjson/internal/simdprune_tables.h"
    -
    5 
    +
    4 #include "simdjson/icelake/base.h"
    +
    5 #include "simdjson/icelake/bitmanipulation.h"
    6 
    -
    7 
    -
    8 #if defined(__GNUC__) && !defined(__clang__)
    -
    9 #if __GNUC__ == 8
    -
    10 #define SIMDJSON_GCC8 1
    -
    11 #endif // __GNUC__ == 8
    -
    12 #endif // defined(__GNUC__) && !defined(__clang__)
    -
    13 
    -
    14 #if SIMDJSON_GCC8
    -
    18 inline __m512i _mm512_set_epi8(uint8_t a0, uint8_t a1, uint8_t a2, uint8_t a3, uint8_t a4, uint8_t a5, uint8_t a6, uint8_t a7, uint8_t a8, uint8_t a9, uint8_t a10, uint8_t a11, uint8_t a12, uint8_t a13, uint8_t a14, uint8_t a15, uint8_t a16, uint8_t a17, uint8_t a18, uint8_t a19, uint8_t a20, uint8_t a21, uint8_t a22, uint8_t a23, uint8_t a24, uint8_t a25, uint8_t a26, uint8_t a27, uint8_t a28, uint8_t a29, uint8_t a30, uint8_t a31, uint8_t a32, uint8_t a33, uint8_t a34, uint8_t a35, uint8_t a36, uint8_t a37, uint8_t a38, uint8_t a39, uint8_t a40, uint8_t a41, uint8_t a42, uint8_t a43, uint8_t a44, uint8_t a45, uint8_t a46, uint8_t a47, uint8_t a48, uint8_t a49, uint8_t a50, uint8_t a51, uint8_t a52, uint8_t a53, uint8_t a54, uint8_t a55, uint8_t a56, uint8_t a57, uint8_t a58, uint8_t a59, uint8_t a60, uint8_t a61, uint8_t a62, uint8_t a63) {
    -
    19  return _mm512_set_epi64(uint64_t(a7) + (uint64_t(a6) << 8) + (uint64_t(a5) << 16) + (uint64_t(a4) << 24) + (uint64_t(a3) << 32) + (uint64_t(a2) << 40) + (uint64_t(a1) << 48) + (uint64_t(a0) << 56),
    -
    20  uint64_t(a15) + (uint64_t(a14) << 8) + (uint64_t(a13) << 16) + (uint64_t(a12) << 24) + (uint64_t(a11) << 32) + (uint64_t(a10) << 40) + (uint64_t(a9) << 48) + (uint64_t(a8) << 56),
    -
    21  uint64_t(a23) + (uint64_t(a22) << 8) + (uint64_t(a21) << 16) + (uint64_t(a20) << 24) + (uint64_t(a19) << 32) + (uint64_t(a18) << 40) + (uint64_t(a17) << 48) + (uint64_t(a16) << 56),
    -
    22  uint64_t(a31) + (uint64_t(a30) << 8) + (uint64_t(a29) << 16) + (uint64_t(a28) << 24) + (uint64_t(a27) << 32) + (uint64_t(a26) << 40) + (uint64_t(a25) << 48) + (uint64_t(a24) << 56),
    -
    23  uint64_t(a39) + (uint64_t(a38) << 8) + (uint64_t(a37) << 16) + (uint64_t(a36) << 24) + (uint64_t(a35) << 32) + (uint64_t(a34) << 40) + (uint64_t(a33) << 48) + (uint64_t(a32) << 56),
    -
    24  uint64_t(a47) + (uint64_t(a46) << 8) + (uint64_t(a45) << 16) + (uint64_t(a44) << 24) + (uint64_t(a43) << 32) + (uint64_t(a42) << 40) + (uint64_t(a41) << 48) + (uint64_t(a40) << 56),
    -
    25  uint64_t(a55) + (uint64_t(a54) << 8) + (uint64_t(a53) << 16) + (uint64_t(a52) << 24) + (uint64_t(a51) << 32) + (uint64_t(a50) << 40) + (uint64_t(a49) << 48) + (uint64_t(a48) << 56),
    -
    26  uint64_t(a63) + (uint64_t(a62) << 8) + (uint64_t(a61) << 16) + (uint64_t(a60) << 24) + (uint64_t(a59) << 32) + (uint64_t(a58) << 40) + (uint64_t(a57) << 48) + (uint64_t(a56) << 56));
    -
    27 }
    -
    28 #endif // SIMDJSON_GCC8
    -
    29 
    -
    30 
    -
    31 
    -
    32 namespace simdjson {
    -
    33 namespace SIMDJSON_IMPLEMENTATION {
    -
    34 namespace {
    -
    35 namespace simd {
    -
    36 
    -
    37  // Forward-declared so they can be used by splat and friends.
    -
    38  template<typename Child>
    -
    39  struct base {
    -
    40  __m512i value;
    -
    41 
    -
    42  // Zero constructor
    -
    43  simdjson_inline base() : value{__m512i()} {}
    +
    7 #ifndef SIMDJSON_AMALGAMATED
    +
    8 #include "simdjson/internal/simdprune_tables.h"
    +
    9 #endif // SIMDJSON_AMALGAMATED
    +
    10 
    +
    11 #if defined(__GNUC__) && !defined(__clang__)
    +
    12 #if __GNUC__ == 8
    +
    13 #define SIMDJSON_GCC8 1
    +
    14 #endif // __GNUC__ == 8
    +
    15 #endif // defined(__GNUC__) && !defined(__clang__)
    +
    16 
    +
    17 #if SIMDJSON_GCC8
    +
    21 inline __m512i _mm512_set_epi8(uint8_t a0, uint8_t a1, uint8_t a2, uint8_t a3, uint8_t a4, uint8_t a5, uint8_t a6, uint8_t a7, uint8_t a8, uint8_t a9, uint8_t a10, uint8_t a11, uint8_t a12, uint8_t a13, uint8_t a14, uint8_t a15, uint8_t a16, uint8_t a17, uint8_t a18, uint8_t a19, uint8_t a20, uint8_t a21, uint8_t a22, uint8_t a23, uint8_t a24, uint8_t a25, uint8_t a26, uint8_t a27, uint8_t a28, uint8_t a29, uint8_t a30, uint8_t a31, uint8_t a32, uint8_t a33, uint8_t a34, uint8_t a35, uint8_t a36, uint8_t a37, uint8_t a38, uint8_t a39, uint8_t a40, uint8_t a41, uint8_t a42, uint8_t a43, uint8_t a44, uint8_t a45, uint8_t a46, uint8_t a47, uint8_t a48, uint8_t a49, uint8_t a50, uint8_t a51, uint8_t a52, uint8_t a53, uint8_t a54, uint8_t a55, uint8_t a56, uint8_t a57, uint8_t a58, uint8_t a59, uint8_t a60, uint8_t a61, uint8_t a62, uint8_t a63) {
    +
    22  return _mm512_set_epi64(uint64_t(a7) + (uint64_t(a6) << 8) + (uint64_t(a5) << 16) + (uint64_t(a4) << 24) + (uint64_t(a3) << 32) + (uint64_t(a2) << 40) + (uint64_t(a1) << 48) + (uint64_t(a0) << 56),
    +
    23  uint64_t(a15) + (uint64_t(a14) << 8) + (uint64_t(a13) << 16) + (uint64_t(a12) << 24) + (uint64_t(a11) << 32) + (uint64_t(a10) << 40) + (uint64_t(a9) << 48) + (uint64_t(a8) << 56),
    +
    24  uint64_t(a23) + (uint64_t(a22) << 8) + (uint64_t(a21) << 16) + (uint64_t(a20) << 24) + (uint64_t(a19) << 32) + (uint64_t(a18) << 40) + (uint64_t(a17) << 48) + (uint64_t(a16) << 56),
    +
    25  uint64_t(a31) + (uint64_t(a30) << 8) + (uint64_t(a29) << 16) + (uint64_t(a28) << 24) + (uint64_t(a27) << 32) + (uint64_t(a26) << 40) + (uint64_t(a25) << 48) + (uint64_t(a24) << 56),
    +
    26  uint64_t(a39) + (uint64_t(a38) << 8) + (uint64_t(a37) << 16) + (uint64_t(a36) << 24) + (uint64_t(a35) << 32) + (uint64_t(a34) << 40) + (uint64_t(a33) << 48) + (uint64_t(a32) << 56),
    +
    27  uint64_t(a47) + (uint64_t(a46) << 8) + (uint64_t(a45) << 16) + (uint64_t(a44) << 24) + (uint64_t(a43) << 32) + (uint64_t(a42) << 40) + (uint64_t(a41) << 48) + (uint64_t(a40) << 56),
    +
    28  uint64_t(a55) + (uint64_t(a54) << 8) + (uint64_t(a53) << 16) + (uint64_t(a52) << 24) + (uint64_t(a51) << 32) + (uint64_t(a50) << 40) + (uint64_t(a49) << 48) + (uint64_t(a48) << 56),
    +
    29  uint64_t(a63) + (uint64_t(a62) << 8) + (uint64_t(a61) << 16) + (uint64_t(a60) << 24) + (uint64_t(a59) << 32) + (uint64_t(a58) << 40) + (uint64_t(a57) << 48) + (uint64_t(a56) << 56));
    +
    30 }
    +
    31 #endif // SIMDJSON_GCC8
    +
    32 
    +
    33 
    +
    34 
    +
    35 namespace simdjson {
    +
    36 namespace SIMDJSON_IMPLEMENTATION {
    +
    37 namespace {
    +
    38 namespace simd {
    +
    39 
    +
    40  // Forward-declared so they can be used by splat and friends.
    +
    41  template<typename Child>
    +
    42  struct base {
    +
    43  __m512i value;
    44 
    -
    45  // Conversion from SIMD register
    -
    46  simdjson_inline base(const __m512i _value) : value(_value) {}
    +
    45  // Zero constructor
    +
    46  simdjson_inline base() : value{__m512i()} {}
    47 
    -
    48  // Conversion to SIMD register
    -
    49  simdjson_inline operator const __m512i&() const { return this->value; }
    -
    50  simdjson_inline operator __m512i&() { return this->value; }
    -
    51 
    -
    52  // Bit operations
    -
    53  simdjson_inline Child operator|(const Child other) const { return _mm512_or_si512(*this, other); }
    -
    54  simdjson_inline Child operator&(const Child other) const { return _mm512_and_si512(*this, other); }
    -
    55  simdjson_inline Child operator^(const Child other) const { return _mm512_xor_si512(*this, other); }
    -
    56  simdjson_inline Child bit_andnot(const Child other) const { return _mm512_andnot_si512(other, *this); }
    -
    57  simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast | other; return *this_cast; }
    -
    58  simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast & other; return *this_cast; }
    -
    59  simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast ^ other; return *this_cast; }
    -
    60  };
    -
    61 
    -
    62  // Forward-declared so they can be used by splat and friends.
    -
    63  template<typename T>
    -
    64  struct simd8;
    -
    65 
    -
    66  template<typename T, typename Mask=simd8<bool>>
    -
    67  struct base8: base<simd8<T>> {
    -
    68  typedef uint32_t bitmask_t;
    -
    69  typedef uint64_t bitmask2_t;
    -
    70 
    -
    71  simdjson_inline base8() : base<simd8<T>>() {}
    -
    72  simdjson_inline base8(const __m512i _value) : base<simd8<T>>(_value) {}
    +
    48  // Conversion from SIMD register
    +
    49  simdjson_inline base(const __m512i _value) : value(_value) {}
    +
    50 
    +
    51  // Conversion to SIMD register
    +
    52  simdjson_inline operator const __m512i&() const { return this->value; }
    +
    53  simdjson_inline operator __m512i&() { return this->value; }
    +
    54 
    +
    55  // Bit operations
    +
    56  simdjson_inline Child operator|(const Child other) const { return _mm512_or_si512(*this, other); }
    +
    57  simdjson_inline Child operator&(const Child other) const { return _mm512_and_si512(*this, other); }
    +
    58  simdjson_inline Child operator^(const Child other) const { return _mm512_xor_si512(*this, other); }
    +
    59  simdjson_inline Child bit_andnot(const Child other) const { return _mm512_andnot_si512(other, *this); }
    +
    60  simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast | other; return *this_cast; }
    +
    61  simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast & other; return *this_cast; }
    +
    62  simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast ^ other; return *this_cast; }
    +
    63  };
    +
    64 
    +
    65  // Forward-declared so they can be used by splat and friends.
    +
    66  template<typename T>
    +
    67  struct simd8;
    +
    68 
    +
    69  template<typename T, typename Mask=simd8<bool>>
    +
    70  struct base8: base<simd8<T>> {
    +
    71  typedef uint32_t bitmask_t;
    +
    72  typedef uint64_t bitmask2_t;
    73 
    -
    74  friend simdjson_really_inline uint64_t operator==(const simd8<T> lhs, const simd8<T> rhs) {
    -
    75  return _mm512_cmpeq_epi8_mask(lhs, rhs);
    -
    76  }
    -
    77 
    -
    78  static const int SIZE = sizeof(base<T>::value);
    -
    79 
    -
    80  template<int N=1>
    -
    81  simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
    -
    82  // workaround for compilers unable to figure out that 16 - N is a constant (GCC 8)
    -
    83  constexpr int shift = 16 - N;
    -
    84  return _mm512_alignr_epi8(*this, _mm512_permutex2var_epi64(prev_chunk, _mm512_set_epi64(13, 12, 11, 10, 9, 8, 7, 6), *this), shift);
    -
    85  }
    -
    86  };
    -
    87 
    -
    88  // SIMD byte mask type (returned by things like eq and gt)
    -
    89  template<>
    -
    90  struct simd8<bool>: base8<bool> {
    -
    91  static simdjson_inline simd8<bool> splat(bool _value) { return _mm512_set1_epi8(uint8_t(-(!!_value))); }
    -
    92 
    -
    93  simdjson_inline simd8<bool>() : base8() {}
    -
    94  simdjson_inline simd8<bool>(const __m512i _value) : base8<bool>(_value) {}
    -
    95  // Splat constructor
    -
    96  simdjson_inline simd8<bool>(bool _value) : base8<bool>(splat(_value)) {}
    -
    97  simdjson_inline bool any() const { return !!_mm512_test_epi8_mask (*this, *this); }
    -
    98  simdjson_inline simd8<bool> operator~() const { return *this ^ true; }
    -
    99  };
    -
    100 
    -
    101  template<typename T>
    -
    102  struct base8_numeric: base8<T> {
    -
    103  static simdjson_inline simd8<T> splat(T _value) { return _mm512_set1_epi8(_value); }
    -
    104  static simdjson_inline simd8<T> zero() { return _mm512_setzero_si512(); }
    -
    105  static simdjson_inline simd8<T> load(const T values[64]) {
    -
    106  return _mm512_loadu_si512(reinterpret_cast<const __m512i *>(values));
    -
    107  }
    -
    108  // Repeat 16 values as many times as necessary (usually for lookup tables)
    -
    109  static simdjson_inline simd8<T> repeat_16(
    -
    110  T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7,
    -
    111  T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15
    -
    112  ) {
    -
    113  return simd8<T>(
    -
    114  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    115  v8, v9, v10,v11,v12,v13,v14,v15,
    -
    116  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    117  v8, v9, v10,v11,v12,v13,v14,v15,
    -
    118  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    119  v8, v9, v10,v11,v12,v13,v14,v15,
    -
    120  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    121  v8, v9, v10,v11,v12,v13,v14,v15
    -
    122  );
    -
    123  }
    -
    124 
    -
    125  simdjson_inline base8_numeric() : base8<T>() {}
    -
    126  simdjson_inline base8_numeric(const __m512i _value) : base8<T>(_value) {}
    +
    74  simdjson_inline base8() : base<simd8<T>>() {}
    +
    75  simdjson_inline base8(const __m512i _value) : base<simd8<T>>(_value) {}
    +
    76 
    +
    77  friend simdjson_really_inline uint64_t operator==(const simd8<T> lhs, const simd8<T> rhs) {
    +
    78  return _mm512_cmpeq_epi8_mask(lhs, rhs);
    +
    79  }
    +
    80 
    +
    81  static const int SIZE = sizeof(base<T>::value);
    +
    82 
    +
    83  template<int N=1>
    +
    84  simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
    +
    85  // workaround for compilers unable to figure out that 16 - N is a constant (GCC 8)
    +
    86  constexpr int shift = 16 - N;
    +
    87  return _mm512_alignr_epi8(*this, _mm512_permutex2var_epi64(prev_chunk, _mm512_set_epi64(13, 12, 11, 10, 9, 8, 7, 6), *this), shift);
    +
    88  }
    +
    89  };
    +
    90 
    +
    91  // SIMD byte mask type (returned by things like eq and gt)
    +
    92  template<>
    +
    93  struct simd8<bool>: base8<bool> {
    +
    94  static simdjson_inline simd8<bool> splat(bool _value) { return _mm512_set1_epi8(uint8_t(-(!!_value))); }
    +
    95 
    +
    96  simdjson_inline simd8<bool>() : base8() {}
    +
    97  simdjson_inline simd8<bool>(const __m512i _value) : base8<bool>(_value) {}
    +
    98  // Splat constructor
    +
    99  simdjson_inline simd8<bool>(bool _value) : base8<bool>(splat(_value)) {}
    +
    100  simdjson_inline bool any() const { return !!_mm512_test_epi8_mask (*this, *this); }
    +
    101  simdjson_inline simd8<bool> operator~() const { return *this ^ true; }
    +
    102  };
    +
    103 
    +
    104  template<typename T>
    +
    105  struct base8_numeric: base8<T> {
    +
    106  static simdjson_inline simd8<T> splat(T _value) { return _mm512_set1_epi8(_value); }
    +
    107  static simdjson_inline simd8<T> zero() { return _mm512_setzero_si512(); }
    +
    108  static simdjson_inline simd8<T> load(const T values[64]) {
    +
    109  return _mm512_loadu_si512(reinterpret_cast<const __m512i *>(values));
    +
    110  }
    +
    111  // Repeat 16 values as many times as necessary (usually for lookup tables)
    +
    112  static simdjson_inline simd8<T> repeat_16(
    +
    113  T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7,
    +
    114  T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15
    +
    115  ) {
    +
    116  return simd8<T>(
    +
    117  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    118  v8, v9, v10,v11,v12,v13,v14,v15,
    +
    119  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    120  v8, v9, v10,v11,v12,v13,v14,v15,
    +
    121  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    122  v8, v9, v10,v11,v12,v13,v14,v15,
    +
    123  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    124  v8, v9, v10,v11,v12,v13,v14,v15
    +
    125  );
    +
    126  }
    127 
    -
    128  // Store to array
    -
    129  simdjson_inline void store(T dst[64]) const { return _mm512_storeu_si512(reinterpret_cast<__m512i *>(dst), *this); }
    +
    128  simdjson_inline base8_numeric() : base8<T>() {}
    +
    129  simdjson_inline base8_numeric(const __m512i _value) : base8<T>(_value) {}
    130 
    -
    131  // Addition/subtraction are the same for signed and unsigned
    -
    132  simdjson_inline simd8<T> operator+(const simd8<T> other) const { return _mm512_add_epi8(*this, other); }
    -
    133  simdjson_inline simd8<T> operator-(const simd8<T> other) const { return _mm512_sub_epi8(*this, other); }
    -
    134  simdjson_inline simd8<T>& operator+=(const simd8<T> other) { *this = *this + other; return *static_cast<simd8<T>*>(this); }
    -
    135  simdjson_inline simd8<T>& operator-=(const simd8<T> other) { *this = *this - other; return *static_cast<simd8<T>*>(this); }
    -
    136 
    -
    137  // Override to distinguish from bool version
    -
    138  simdjson_inline simd8<T> operator~() const { return *this ^ 0xFFu; }
    +
    131  // Store to array
    +
    132  simdjson_inline void store(T dst[64]) const { return _mm512_storeu_si512(reinterpret_cast<__m512i *>(dst), *this); }
    +
    133 
    +
    134  // Addition/subtraction are the same for signed and unsigned
    +
    135  simdjson_inline simd8<T> operator+(const simd8<T> other) const { return _mm512_add_epi8(*this, other); }
    +
    136  simdjson_inline simd8<T> operator-(const simd8<T> other) const { return _mm512_sub_epi8(*this, other); }
    +
    137  simdjson_inline simd8<T>& operator+=(const simd8<T> other) { *this = *this + other; return *static_cast<simd8<T>*>(this); }
    +
    138  simdjson_inline simd8<T>& operator-=(const simd8<T> other) { *this = *this - other; return *static_cast<simd8<T>*>(this); }
    139 
    -
    140  // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values)
    -
    141  template<typename L>
    -
    142  simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
    -
    143  return _mm512_shuffle_epi8(lookup_table, *this);
    -
    144  }
    -
    145 
    -
    146  // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset).
    -
    147  // Passing a 0 value for mask would be equivalent to writing out every byte to output.
    -
    148  // Only the first 32 - count_ones(mask) bytes of the result are significant but 32 bytes
    -
    149  // get written.
    -
    150  // Design consideration: it seems like a function with the
    -
    151  // signature simd8<L> compress(uint32_t mask) would be
    -
    152  // sensible, but the AVX ISA makes this kind of approach difficult.
    -
    153  template<typename L>
    -
    154  simdjson_inline void compress(uint64_t mask, L * output) const {
    -
    155  _mm512_mask_compressstoreu_epi8 (output,~mask,*this);
    -
    156  }
    -
    157 
    -
    158  template<typename L>
    -
    159  simdjson_inline simd8<L> lookup_16(
    -
    160  L replace0, L replace1, L replace2, L replace3,
    -
    161  L replace4, L replace5, L replace6, L replace7,
    -
    162  L replace8, L replace9, L replace10, L replace11,
    -
    163  L replace12, L replace13, L replace14, L replace15) const {
    -
    164  return lookup_16(simd8<L>::repeat_16(
    -
    165  replace0, replace1, replace2, replace3,
    -
    166  replace4, replace5, replace6, replace7,
    -
    167  replace8, replace9, replace10, replace11,
    -
    168  replace12, replace13, replace14, replace15
    -
    169  ));
    -
    170  }
    -
    171  };
    -
    172 
    -
    173  // Signed bytes
    -
    174  template<>
    -
    175  struct simd8<int8_t> : base8_numeric<int8_t> {
    -
    176  simdjson_inline simd8() : base8_numeric<int8_t>() {}
    -
    177  simdjson_inline simd8(const __m512i _value) : base8_numeric<int8_t>(_value) {}
    -
    178  // Splat constructor
    -
    179  simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {}
    -
    180  // Array constructor
    -
    181  simdjson_inline simd8(const int8_t values[64]) : simd8(load(values)) {}
    -
    182  // Member-by-member initialization
    -
    183  simdjson_inline simd8(
    -
    184  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
    -
    185  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15,
    -
    186  int8_t v16, int8_t v17, int8_t v18, int8_t v19, int8_t v20, int8_t v21, int8_t v22, int8_t v23,
    -
    187  int8_t v24, int8_t v25, int8_t v26, int8_t v27, int8_t v28, int8_t v29, int8_t v30, int8_t v31,
    -
    188  int8_t v32, int8_t v33, int8_t v34, int8_t v35, int8_t v36, int8_t v37, int8_t v38, int8_t v39,
    -
    189  int8_t v40, int8_t v41, int8_t v42, int8_t v43, int8_t v44, int8_t v45, int8_t v46, int8_t v47,
    -
    190  int8_t v48, int8_t v49, int8_t v50, int8_t v51, int8_t v52, int8_t v53, int8_t v54, int8_t v55,
    -
    191  int8_t v56, int8_t v57, int8_t v58, int8_t v59, int8_t v60, int8_t v61, int8_t v62, int8_t v63
    -
    192  ) : simd8(_mm512_set_epi8(
    -
    193  v63, v62, v61, v60, v59, v58, v57, v56,
    -
    194  v55, v54, v53, v52, v51, v50, v49, v48,
    -
    195  v47, v46, v45, v44, v43, v42, v41, v40,
    -
    196  v39, v38, v37, v36, v35, v34, v33, v32,
    -
    197  v31, v30, v29, v28, v27, v26, v25, v24,
    -
    198  v23, v22, v21, v20, v19, v18, v17, v16,
    -
    199  v15, v14, v13, v12, v11, v10, v9, v8,
    -
    200  v7, v6, v5, v4, v3, v2, v1, v0
    -
    201  )) {}
    -
    202 
    -
    203  // Repeat 16 values as many times as necessary (usually for lookup tables)
    -
    204  simdjson_inline static simd8<int8_t> repeat_16(
    -
    205  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
    -
    206  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15
    -
    207  ) {
    -
    208  return simd8<int8_t>(
    -
    209  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    210  v8, v9, v10,v11,v12,v13,v14,v15,
    -
    211  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    212  v8, v9, v10,v11,v12,v13,v14,v15,
    -
    213  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    214  v8, v9, v10,v11,v12,v13,v14,v15,
    -
    215  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    216  v8, v9, v10,v11,v12,v13,v14,v15
    -
    217  );
    -
    218  }
    -
    219 
    -
    220  // Order-sensitive comparisons
    -
    221  simdjson_inline simd8<int8_t> max_val(const simd8<int8_t> other) const { return _mm512_max_epi8(*this, other); }
    -
    222  simdjson_inline simd8<int8_t> min_val(const simd8<int8_t> other) const { return _mm512_min_epi8(*this, other); }
    -
    223 
    -
    224  simdjson_inline simd8<bool> operator>(const simd8<int8_t> other) const { return _mm512_maskz_abs_epi8(_mm512_cmpgt_epi8_mask(*this, other),_mm512_set1_epi8(uint8_t(0x80))); }
    -
    225  simdjson_inline simd8<bool> operator<(const simd8<int8_t> other) const { return _mm512_maskz_abs_epi8(_mm512_cmpgt_epi8_mask(other, *this),_mm512_set1_epi8(uint8_t(0x80))); }
    -
    226  };
    -
    227 
    -
    228  // Unsigned bytes
    -
    229  template<>
    -
    230  struct simd8<uint8_t>: base8_numeric<uint8_t> {
    -
    231  simdjson_inline simd8() : base8_numeric<uint8_t>() {}
    -
    232  simdjson_inline simd8(const __m512i _value) : base8_numeric<uint8_t>(_value) {}
    -
    233  // Splat constructor
    -
    234  simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
    -
    235  // Array constructor
    -
    236  simdjson_inline simd8(const uint8_t values[64]) : simd8(load(values)) {}
    -
    237  // Member-by-member initialization
    -
    238  simdjson_inline simd8(
    -
    239  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
    -
    240  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15,
    -
    241  uint8_t v16, uint8_t v17, uint8_t v18, uint8_t v19, uint8_t v20, uint8_t v21, uint8_t v22, uint8_t v23,
    -
    242  uint8_t v24, uint8_t v25, uint8_t v26, uint8_t v27, uint8_t v28, uint8_t v29, uint8_t v30, uint8_t v31,
    -
    243  uint8_t v32, uint8_t v33, uint8_t v34, uint8_t v35, uint8_t v36, uint8_t v37, uint8_t v38, uint8_t v39,
    -
    244  uint8_t v40, uint8_t v41, uint8_t v42, uint8_t v43, uint8_t v44, uint8_t v45, uint8_t v46, uint8_t v47,
    -
    245  uint8_t v48, uint8_t v49, uint8_t v50, uint8_t v51, uint8_t v52, uint8_t v53, uint8_t v54, uint8_t v55,
    -
    246  uint8_t v56, uint8_t v57, uint8_t v58, uint8_t v59, uint8_t v60, uint8_t v61, uint8_t v62, uint8_t v63
    -
    247  ) : simd8(_mm512_set_epi8(
    -
    248  v63, v62, v61, v60, v59, v58, v57, v56,
    -
    249  v55, v54, v53, v52, v51, v50, v49, v48,
    -
    250  v47, v46, v45, v44, v43, v42, v41, v40,
    -
    251  v39, v38, v37, v36, v35, v34, v33, v32,
    -
    252  v31, v30, v29, v28, v27, v26, v25, v24,
    -
    253  v23, v22, v21, v20, v19, v18, v17, v16,
    -
    254  v15, v14, v13, v12, v11, v10, v9, v8,
    -
    255  v7, v6, v5, v4, v3, v2, v1, v0
    -
    256  )) {}
    -
    257 
    -
    258  // Repeat 16 values as many times as necessary (usually for lookup tables)
    -
    259  simdjson_inline static simd8<uint8_t> repeat_16(
    -
    260  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
    -
    261  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15
    -
    262  ) {
    -
    263  return simd8<uint8_t>(
    -
    264  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    265  v8, v9, v10,v11,v12,v13,v14,v15,
    -
    266  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    267  v8, v9, v10,v11,v12,v13,v14,v15,
    -
    268  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    269  v8, v9, v10,v11,v12,v13,v14,v15,
    -
    270  v0, v1, v2, v3, v4, v5, v6, v7,
    -
    271  v8, v9, v10,v11,v12,v13,v14,v15
    -
    272  );
    -
    273  }
    -
    274 
    -
    275  // Saturated math
    -
    276  simdjson_inline simd8<uint8_t> saturating_add(const simd8<uint8_t> other) const { return _mm512_adds_epu8(*this, other); }
    -
    277  simdjson_inline simd8<uint8_t> saturating_sub(const simd8<uint8_t> other) const { return _mm512_subs_epu8(*this, other); }
    -
    278 
    -
    279  // Order-specific operations
    -
    280  simdjson_inline simd8<uint8_t> max_val(const simd8<uint8_t> other) const { return _mm512_max_epu8(*this, other); }
    -
    281  simdjson_inline simd8<uint8_t> min_val(const simd8<uint8_t> other) const { return _mm512_min_epu8(other, *this); }
    -
    282  // Same as >, but only guarantees true is nonzero (< guarantees true = -1)
    -
    283  simdjson_inline simd8<uint8_t> gt_bits(const simd8<uint8_t> other) const { return this->saturating_sub(other); }
    -
    284  // Same as <, but only guarantees true is nonzero (< guarantees true = -1)
    -
    285  simdjson_inline simd8<uint8_t> lt_bits(const simd8<uint8_t> other) const { return other.saturating_sub(*this); }
    -
    286  simdjson_inline uint64_t operator<=(const simd8<uint8_t> other) const { return other.max_val(*this) == other; }
    -
    287  simdjson_inline uint64_t operator>=(const simd8<uint8_t> other) const { return other.min_val(*this) == other; }
    -
    288  simdjson_inline simd8<bool> operator>(const simd8<uint8_t> other) const { return this->gt_bits(other).any_bits_set(); }
    -
    289  simdjson_inline simd8<bool> operator<(const simd8<uint8_t> other) const { return this->lt_bits(other).any_bits_set(); }
    -
    290 
    -
    291  // Bit-specific operations
    -
    292  simdjson_inline simd8<bool> bits_not_set() const { return _mm512_mask_blend_epi8(*this == uint8_t(0), _mm512_set1_epi8(0), _mm512_set1_epi8(-1)); }
    -
    293  simdjson_inline simd8<bool> bits_not_set(simd8<uint8_t> bits) const { return (*this & bits).bits_not_set(); }
    -
    294  simdjson_inline simd8<bool> any_bits_set() const { return ~this->bits_not_set(); }
    -
    295  simdjson_inline simd8<bool> any_bits_set(simd8<uint8_t> bits) const { return ~this->bits_not_set(bits); }
    -
    296 
    -
    297  simdjson_inline bool is_ascii() const { return _mm512_movepi8_mask(*this) == 0; }
    -
    298  simdjson_inline bool bits_not_set_anywhere() const {
    -
    299  return !_mm512_test_epi8_mask(*this, *this);
    -
    300  }
    -
    301  simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); }
    -
    302  simdjson_inline bool bits_not_set_anywhere(simd8<uint8_t> bits) const { return !_mm512_test_epi8_mask(*this, bits); }
    -
    303  simdjson_inline bool any_bits_set_anywhere(simd8<uint8_t> bits) const { return !bits_not_set_anywhere(bits); }
    -
    304  template<int N>
    -
    305  simdjson_inline simd8<uint8_t> shr() const { return simd8<uint8_t>(_mm512_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); }
    -
    306  template<int N>
    -
    307  simdjson_inline simd8<uint8_t> shl() const { return simd8<uint8_t>(_mm512_slli_epi16(*this, N)) & uint8_t(0xFFu << N); }
    -
    308  // Get one of the bits and make a bitmask out of it.
    -
    309  // e.g. value.get_bit<7>() gets the high bit
    -
    310  template<int N>
    -
    311  simdjson_inline uint64_t get_bit() const { return _mm512_movepi8_mask(_mm512_slli_epi16(*this, 7-N)); }
    -
    312  };
    -
    313 
    -
    314  template<typename T>
    -
    315  struct simd8x64 {
    -
    316  static constexpr int NUM_CHUNKS = 64 / sizeof(simd8<T>);
    -
    317  static_assert(NUM_CHUNKS == 1, "Icelake kernel should use one register per 64-byte block.");
    -
    318  const simd8<T> chunks[NUM_CHUNKS];
    -
    319 
    -
    320  simd8x64(const simd8x64<T>& o) = delete; // no copy allowed
    -
    321  simd8x64<T>& operator=(const simd8<T>& other) = delete; // no assignment allowed
    -
    322  simd8x64() = delete; // no default constructor allowed
    -
    323 
    -
    324  simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1) : chunks{chunk0, chunk1} {}
    -
    325  simdjson_inline simd8x64(const simd8<T> chunk0) : chunks{chunk0} {}
    -
    326  simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8<T>::load(ptr)} {}
    -
    327 
    -
    328  simdjson_inline uint64_t compress(uint64_t mask, T * output) const {
    -
    329  this->chunks[0].compress(mask, output);
    -
    330  return 64 - count_ones(mask);
    -
    331  }
    -
    332 
    -
    333  simdjson_inline void store(T ptr[64]) const {
    -
    334  this->chunks[0].store(ptr+sizeof(simd8<T>)*0);
    -
    335  }
    -
    336 
    -
    337  simdjson_inline simd8<T> reduce_or() const {
    -
    338  return this->chunks[0];
    -
    339  }
    -
    340 
    -
    341  simdjson_inline simd8x64<T> bit_or(const T m) const {
    -
    342  const simd8<T> mask = simd8<T>::splat(m);
    -
    343  return simd8x64<T>(
    -
    344  this->chunks[0] | mask
    -
    345  );
    -
    346  }
    -
    347 
    -
    348  simdjson_inline uint64_t eq(const T m) const {
    -
    349  const simd8<T> mask = simd8<T>::splat(m);
    -
    350  return this->chunks[0] == mask;
    -
    351  }
    -
    352 
    -
    353  simdjson_inline uint64_t eq(const simd8x64<uint8_t> &other) const {
    -
    354  return this->chunks[0] == other.chunks[0];
    -
    355  }
    -
    356 
    -
    357  simdjson_inline uint64_t lteq(const T m) const {
    -
    358  const simd8<T> mask = simd8<T>::splat(m);
    -
    359  return this->chunks[0] <= mask;
    -
    360  }
    -
    361  }; // struct simd8x64<T>
    -
    362 
    -
    363 } // namespace simd
    -
    364 
    -
    365 } // unnamed namespace
    -
    366 } // namespace SIMDJSON_IMPLEMENTATION
    -
    367 } // namespace simdjson
    -
    368 
    -
    369 #endif // SIMDJSON_ICELAKE_SIMD_H
    -
    simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
    Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
    -
    We want to support argument-dependent lookup (ADL).
    +
    140  // Override to distinguish from bool version
    +
    141  simdjson_inline simd8<T> operator~() const { return *this ^ 0xFFu; }
    +
    142 
    +
    143  // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values)
    +
    144  template<typename L>
    +
    145  simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
    +
    146  return _mm512_shuffle_epi8(lookup_table, *this);
    +
    147  }
    +
    148 
    +
    149  // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset).
    +
    150  // Passing a 0 value for mask would be equivalent to writing out every byte to output.
    +
    151  // Only the first 32 - count_ones(mask) bytes of the result are significant but 32 bytes
    +
    152  // get written.
    +
    153  // Design consideration: it seems like a function with the
    +
    154  // signature simd8<L> compress(uint32_t mask) would be
    +
    155  // sensible, but the AVX ISA makes this kind of approach difficult.
    +
    156  template<typename L>
    +
    157  simdjson_inline void compress(uint64_t mask, L * output) const {
    +
    158  _mm512_mask_compressstoreu_epi8 (output,~mask,*this);
    +
    159  }
    +
    160 
    +
    161  template<typename L>
    +
    162  simdjson_inline simd8<L> lookup_16(
    +
    163  L replace0, L replace1, L replace2, L replace3,
    +
    164  L replace4, L replace5, L replace6, L replace7,
    +
    165  L replace8, L replace9, L replace10, L replace11,
    +
    166  L replace12, L replace13, L replace14, L replace15) const {
    +
    167  return lookup_16(simd8<L>::repeat_16(
    +
    168  replace0, replace1, replace2, replace3,
    +
    169  replace4, replace5, replace6, replace7,
    +
    170  replace8, replace9, replace10, replace11,
    +
    171  replace12, replace13, replace14, replace15
    +
    172  ));
    +
    173  }
    +
    174  };
    +
    175 
    +
    176  // Signed bytes
    +
    177  template<>
    +
    178  struct simd8<int8_t> : base8_numeric<int8_t> {
    +
    179  simdjson_inline simd8() : base8_numeric<int8_t>() {}
    +
    180  simdjson_inline simd8(const __m512i _value) : base8_numeric<int8_t>(_value) {}
    +
    181  // Splat constructor
    +
    182  simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {}
    +
    183  // Array constructor
    +
    184  simdjson_inline simd8(const int8_t values[64]) : simd8(load(values)) {}
    +
    185  // Member-by-member initialization
    +
    186  simdjson_inline simd8(
    +
    187  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
    +
    188  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15,
    +
    189  int8_t v16, int8_t v17, int8_t v18, int8_t v19, int8_t v20, int8_t v21, int8_t v22, int8_t v23,
    +
    190  int8_t v24, int8_t v25, int8_t v26, int8_t v27, int8_t v28, int8_t v29, int8_t v30, int8_t v31,
    +
    191  int8_t v32, int8_t v33, int8_t v34, int8_t v35, int8_t v36, int8_t v37, int8_t v38, int8_t v39,
    +
    192  int8_t v40, int8_t v41, int8_t v42, int8_t v43, int8_t v44, int8_t v45, int8_t v46, int8_t v47,
    +
    193  int8_t v48, int8_t v49, int8_t v50, int8_t v51, int8_t v52, int8_t v53, int8_t v54, int8_t v55,
    +
    194  int8_t v56, int8_t v57, int8_t v58, int8_t v59, int8_t v60, int8_t v61, int8_t v62, int8_t v63
    +
    195  ) : simd8(_mm512_set_epi8(
    +
    196  v63, v62, v61, v60, v59, v58, v57, v56,
    +
    197  v55, v54, v53, v52, v51, v50, v49, v48,
    +
    198  v47, v46, v45, v44, v43, v42, v41, v40,
    +
    199  v39, v38, v37, v36, v35, v34, v33, v32,
    +
    200  v31, v30, v29, v28, v27, v26, v25, v24,
    +
    201  v23, v22, v21, v20, v19, v18, v17, v16,
    +
    202  v15, v14, v13, v12, v11, v10, v9, v8,
    +
    203  v7, v6, v5, v4, v3, v2, v1, v0
    +
    204  )) {}
    +
    205 
    +
    206  // Repeat 16 values as many times as necessary (usually for lookup tables)
    +
    207  simdjson_inline static simd8<int8_t> repeat_16(
    +
    208  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
    +
    209  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15
    +
    210  ) {
    +
    211  return simd8<int8_t>(
    +
    212  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    213  v8, v9, v10,v11,v12,v13,v14,v15,
    +
    214  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    215  v8, v9, v10,v11,v12,v13,v14,v15,
    +
    216  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    217  v8, v9, v10,v11,v12,v13,v14,v15,
    +
    218  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    219  v8, v9, v10,v11,v12,v13,v14,v15
    +
    220  );
    +
    221  }
    +
    222 
    +
    223  // Order-sensitive comparisons
    +
    224  simdjson_inline simd8<int8_t> max_val(const simd8<int8_t> other) const { return _mm512_max_epi8(*this, other); }
    +
    225  simdjson_inline simd8<int8_t> min_val(const simd8<int8_t> other) const { return _mm512_min_epi8(*this, other); }
    +
    226 
    +
    227  simdjson_inline simd8<bool> operator>(const simd8<int8_t> other) const { return _mm512_maskz_abs_epi8(_mm512_cmpgt_epi8_mask(*this, other),_mm512_set1_epi8(uint8_t(0x80))); }
    +
    228  simdjson_inline simd8<bool> operator<(const simd8<int8_t> other) const { return _mm512_maskz_abs_epi8(_mm512_cmpgt_epi8_mask(other, *this),_mm512_set1_epi8(uint8_t(0x80))); }
    +
    229  };
    +
    230 
    +
    231  // Unsigned bytes
    +
    232  template<>
    +
    233  struct simd8<uint8_t>: base8_numeric<uint8_t> {
    +
    234  simdjson_inline simd8() : base8_numeric<uint8_t>() {}
    +
    235  simdjson_inline simd8(const __m512i _value) : base8_numeric<uint8_t>(_value) {}
    +
    236  // Splat constructor
    +
    237  simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
    +
    238  // Array constructor
    +
    239  simdjson_inline simd8(const uint8_t values[64]) : simd8(load(values)) {}
    +
    240  // Member-by-member initialization
    +
    241  simdjson_inline simd8(
    +
    242  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
    +
    243  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15,
    +
    244  uint8_t v16, uint8_t v17, uint8_t v18, uint8_t v19, uint8_t v20, uint8_t v21, uint8_t v22, uint8_t v23,
    +
    245  uint8_t v24, uint8_t v25, uint8_t v26, uint8_t v27, uint8_t v28, uint8_t v29, uint8_t v30, uint8_t v31,
    +
    246  uint8_t v32, uint8_t v33, uint8_t v34, uint8_t v35, uint8_t v36, uint8_t v37, uint8_t v38, uint8_t v39,
    +
    247  uint8_t v40, uint8_t v41, uint8_t v42, uint8_t v43, uint8_t v44, uint8_t v45, uint8_t v46, uint8_t v47,
    +
    248  uint8_t v48, uint8_t v49, uint8_t v50, uint8_t v51, uint8_t v52, uint8_t v53, uint8_t v54, uint8_t v55,
    +
    249  uint8_t v56, uint8_t v57, uint8_t v58, uint8_t v59, uint8_t v60, uint8_t v61, uint8_t v62, uint8_t v63
    +
    250  ) : simd8(_mm512_set_epi8(
    +
    251  v63, v62, v61, v60, v59, v58, v57, v56,
    +
    252  v55, v54, v53, v52, v51, v50, v49, v48,
    +
    253  v47, v46, v45, v44, v43, v42, v41, v40,
    +
    254  v39, v38, v37, v36, v35, v34, v33, v32,
    +
    255  v31, v30, v29, v28, v27, v26, v25, v24,
    +
    256  v23, v22, v21, v20, v19, v18, v17, v16,
    +
    257  v15, v14, v13, v12, v11, v10, v9, v8,
    +
    258  v7, v6, v5, v4, v3, v2, v1, v0
    +
    259  )) {}
    +
    260 
    +
    261  // Repeat 16 values as many times as necessary (usually for lookup tables)
    +
    262  simdjson_inline static simd8<uint8_t> repeat_16(
    +
    263  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
    +
    264  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15
    +
    265  ) {
    +
    266  return simd8<uint8_t>(
    +
    267  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    268  v8, v9, v10,v11,v12,v13,v14,v15,
    +
    269  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    270  v8, v9, v10,v11,v12,v13,v14,v15,
    +
    271  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    272  v8, v9, v10,v11,v12,v13,v14,v15,
    +
    273  v0, v1, v2, v3, v4, v5, v6, v7,
    +
    274  v8, v9, v10,v11,v12,v13,v14,v15
    +
    275  );
    +
    276  }
    +
    277 
    +
    278  // Saturated math
    +
    279  simdjson_inline simd8<uint8_t> saturating_add(const simd8<uint8_t> other) const { return _mm512_adds_epu8(*this, other); }
    +
    280  simdjson_inline simd8<uint8_t> saturating_sub(const simd8<uint8_t> other) const { return _mm512_subs_epu8(*this, other); }
    +
    281 
    +
    282  // Order-specific operations
    +
    283  simdjson_inline simd8<uint8_t> max_val(const simd8<uint8_t> other) const { return _mm512_max_epu8(*this, other); }
    +
    284  simdjson_inline simd8<uint8_t> min_val(const simd8<uint8_t> other) const { return _mm512_min_epu8(other, *this); }
    +
    285  // Same as >, but only guarantees true is nonzero (< guarantees true = -1)
    +
    286  simdjson_inline simd8<uint8_t> gt_bits(const simd8<uint8_t> other) const { return this->saturating_sub(other); }
    +
    287  // Same as <, but only guarantees true is nonzero (< guarantees true = -1)
    +
    288  simdjson_inline simd8<uint8_t> lt_bits(const simd8<uint8_t> other) const { return other.saturating_sub(*this); }
    +
    289  simdjson_inline uint64_t operator<=(const simd8<uint8_t> other) const { return other.max_val(*this) == other; }
    +
    290  simdjson_inline uint64_t operator>=(const simd8<uint8_t> other) const { return other.min_val(*this) == other; }
    +
    291  simdjson_inline simd8<bool> operator>(const simd8<uint8_t> other) const { return this->gt_bits(other).any_bits_set(); }
    +
    292  simdjson_inline simd8<bool> operator<(const simd8<uint8_t> other) const { return this->lt_bits(other).any_bits_set(); }
    +
    293 
    +
    294  // Bit-specific operations
    +
    295  simdjson_inline simd8<bool> bits_not_set() const { return _mm512_mask_blend_epi8(*this == uint8_t(0), _mm512_set1_epi8(0), _mm512_set1_epi8(-1)); }
    +
    296  simdjson_inline simd8<bool> bits_not_set(simd8<uint8_t> bits) const { return (*this & bits).bits_not_set(); }
    +
    297  simdjson_inline simd8<bool> any_bits_set() const { return ~this->bits_not_set(); }
    +
    298  simdjson_inline simd8<bool> any_bits_set(simd8<uint8_t> bits) const { return ~this->bits_not_set(bits); }
    +
    299 
    +
    300  simdjson_inline bool is_ascii() const { return _mm512_movepi8_mask(*this) == 0; }
    +
    301  simdjson_inline bool bits_not_set_anywhere() const {
    +
    302  return !_mm512_test_epi8_mask(*this, *this);
    +
    303  }
    +
    304  simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); }
    +
    305  simdjson_inline bool bits_not_set_anywhere(simd8<uint8_t> bits) const { return !_mm512_test_epi8_mask(*this, bits); }
    +
    306  simdjson_inline bool any_bits_set_anywhere(simd8<uint8_t> bits) const { return !bits_not_set_anywhere(bits); }
    +
    307  template<int N>
    +
    308  simdjson_inline simd8<uint8_t> shr() const { return simd8<uint8_t>(_mm512_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); }
    +
    309  template<int N>
    +
    310  simdjson_inline simd8<uint8_t> shl() const { return simd8<uint8_t>(_mm512_slli_epi16(*this, N)) & uint8_t(0xFFu << N); }
    +
    311  // Get one of the bits and make a bitmask out of it.
    +
    312  // e.g. value.get_bit<7>() gets the high bit
    +
    313  template<int N>
    +
    314  simdjson_inline uint64_t get_bit() const { return _mm512_movepi8_mask(_mm512_slli_epi16(*this, 7-N)); }
    +
    315  };
    +
    316 
    +
    317  template<typename T>
    +
    318  struct simd8x64 {
    +
    319  static constexpr int NUM_CHUNKS = 64 / sizeof(simd8<T>);
    +
    320  static_assert(NUM_CHUNKS == 1, "Icelake kernel should use one register per 64-byte block.");
    +
    321  const simd8<T> chunks[NUM_CHUNKS];
    +
    322 
    +
    323  simd8x64(const simd8x64<T>& o) = delete; // no copy allowed
    +
    324  simd8x64<T>& operator=(const simd8<T>& other) = delete; // no assignment allowed
    +
    325  simd8x64() = delete; // no default constructor allowed
    +
    326 
    +
    327  simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1) : chunks{chunk0, chunk1} {}
    +
    328  simdjson_inline simd8x64(const simd8<T> chunk0) : chunks{chunk0} {}
    +
    329  simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8<T>::load(ptr)} {}
    +
    330 
    +
    331  simdjson_inline uint64_t compress(uint64_t mask, T * output) const {
    +
    332  this->chunks[0].compress(mask, output);
    +
    333  return 64 - count_ones(mask);
    +
    334  }
    +
    335 
    +
    336  simdjson_inline void store(T ptr[64]) const {
    +
    337  this->chunks[0].store(ptr+sizeof(simd8<T>)*0);
    +
    338  }
    +
    339 
    +
    340  simdjson_inline simd8<T> reduce_or() const {
    +
    341  return this->chunks[0];
    +
    342  }
    +
    343 
    +
    344  simdjson_inline simd8x64<T> bit_or(const T m) const {
    +
    345  const simd8<T> mask = simd8<T>::splat(m);
    +
    346  return simd8x64<T>(
    +
    347  this->chunks[0] | mask
    +
    348  );
    +
    349  }
    +
    350 
    +
    351  simdjson_inline uint64_t eq(const T m) const {
    +
    352  const simd8<T> mask = simd8<T>::splat(m);
    +
    353  return this->chunks[0] == mask;
    +
    354  }
    +
    355 
    +
    356  simdjson_inline uint64_t eq(const simd8x64<uint8_t> &other) const {
    +
    357  return this->chunks[0] == other.chunks[0];
    +
    358  }
    +
    359 
    +
    360  simdjson_inline uint64_t lteq(const T m) const {
    +
    361  const simd8<T> mask = simd8<T>::splat(m);
    +
    362  return this->chunks[0] <= mask;
    +
    363  }
    +
    364  }; // struct simd8x64<T>
    +
    365 
    +
    366 } // namespace simd
    +
    367 
    +
    368 } // unnamed namespace
    +
    369 } // namespace SIMDJSON_IMPLEMENTATION
    +
    370 } // namespace simdjson
    +
    371 
    +
    372 #endif // SIMDJSON_ICELAKE_SIMD_H
    +
    simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
    Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/icelake_2stringparsing_8h_source.html b/icelake_2stringparsing__defs_8h_source.html similarity index 79% rename from icelake_2stringparsing_8h_source.html rename to icelake_2stringparsing__defs_8h_source.html index 79cac9862..50f4c9694 100644 --- a/icelake_2stringparsing_8h_source.html +++ b/icelake_2stringparsing__defs_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/icelake/stringparsing.h Source File +simdjson: include/simdjson/icelake/stringparsing_defs.h Source File @@ -68,7 +68,7 @@ $(function() {
    @@ -88,63 +88,62 @@ $(document).ready(function(){initNavTree('icelake_2stringparsing_8h_source.html'
    -
    stringparsing.h
    +
    stringparsing_defs.h
    -
    1 #ifndef SIMDJSON_ICELAKE_STRINGPARSING_H
    -
    2 #define SIMDJSON_ICELAKE_STRINGPARSING_H
    +
    1 #ifndef SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H
    +
    2 #define SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H
    3 
    -
    4 #include "simdjson/base.h"
    -
    5 #include "simdjson/icelake/simd.h"
    -
    6 #include "simdjson/icelake/bitmanipulation.h"
    -
    7 
    -
    8 namespace simdjson {
    -
    9 namespace SIMDJSON_IMPLEMENTATION {
    -
    10 namespace {
    -
    11 
    -
    12 using namespace simd;
    -
    13 
    -
    14 // Holds backslashes and quotes locations.
    -
    15 struct backslash_and_quote {
    -
    16 public:
    -
    17  static constexpr uint32_t BYTES_PROCESSED = 32;
    -
    18  simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst);
    -
    19 
    -
    20  simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; }
    -
    21  simdjson_inline bool has_backslash() { return ((quote_bits - 1) & bs_bits) != 0; }
    -
    22  simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); }
    -
    23  simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); }
    -
    24 
    -
    25  uint64_t bs_bits;
    -
    26  uint64_t quote_bits;
    -
    27 }; // struct backslash_and_quote
    -
    28 
    -
    29 simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) {
    -
    30  // this can read up to 15 bytes beyond the buffer size, but we require
    -
    31  // SIMDJSON_PADDING of padding
    -
    32  static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes");
    -
    33  simd8<uint8_t> v(src);
    -
    34  // store to dest unconditionally - we can overwrite the bits we don't like later
    -
    35  v.store(dst);
    -
    36  return {
    -
    37  static_cast<uint64_t>(v == '\\'), // bs_bits
    -
    38  static_cast<uint64_t>(v == '"'), // quote_bits
    -
    39  };
    -
    40 }
    -
    41 
    -
    42 } // unnamed namespace
    -
    43 } // namespace SIMDJSON_IMPLEMENTATION
    -
    44 } // namespace simdjson
    -
    45 
    -
    46 #endif // SIMDJSON_ICELAKE_STRINGPARSING_H
    -
    We want to support argument-dependent lookup (ADL).
    -
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: common_defs.h:45
    +
    4 #include "simdjson/icelake/simd.h"
    +
    5 #include "simdjson/icelake/bitmanipulation.h"
    +
    6 
    +
    7 namespace simdjson {
    +
    8 namespace SIMDJSON_IMPLEMENTATION {
    +
    9 namespace {
    +
    10 
    +
    11 using namespace simd;
    +
    12 
    +
    13 // Holds backslashes and quotes locations.
    +
    14 struct backslash_and_quote {
    +
    15 public:
    +
    16  static constexpr uint32_t BYTES_PROCESSED = 32;
    +
    17  simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst);
    +
    18 
    +
    19  simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; }
    +
    20  simdjson_inline bool has_backslash() { return ((quote_bits - 1) & bs_bits) != 0; }
    +
    21  simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); }
    +
    22  simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); }
    +
    23 
    +
    24  uint64_t bs_bits;
    +
    25  uint64_t quote_bits;
    +
    26 }; // struct backslash_and_quote
    +
    27 
    +
    28 simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) {
    +
    29  // this can read up to 15 bytes beyond the buffer size, but we require
    +
    30  // SIMDJSON_PADDING of padding
    +
    31  static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes");
    +
    32  simd8<uint8_t> v(src);
    +
    33  // store to dest unconditionally - we can overwrite the bits we don't like later
    +
    34  v.store(dst);
    +
    35  return {
    +
    36  static_cast<uint64_t>(v == '\\'), // bs_bits
    +
    37  static_cast<uint64_t>(v == '"'), // quote_bits
    +
    38  };
    +
    39 }
    +
    40 
    +
    41 } // unnamed namespace
    +
    42 } // namespace SIMDJSON_IMPLEMENTATION
    +
    43 } // namespace simdjson
    +
    44 
    +
    45 #endif // SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    constexpr size_t SIMDJSON_PADDING
    The amount of padding needed in a buffer to parse JSON.
    Definition: base.h:30
    diff --git a/icelake_8h_source.html b/icelake_8h_source.html index da93e83d6..5e911045c 100644 --- a/icelake_8h_source.html +++ b/icelake_8h_source.html @@ -94,49 +94,11 @@ $(document).ready(function(){initNavTree('icelake_8h_source.html',''); initResiz
    1 #ifndef SIMDJSON_ICELAKE_H
    2 #define SIMDJSON_ICELAKE_H
    3 
    - -
    5 
    -
    6 #if SIMDJSON_IMPLEMENTATION_ICELAKE
    +
    4 #include "simdjson/icelake/begin.h"
    +
    5 #include "simdjson/generic/amalgamated.h"
    +
    6 #include "simdjson/icelake/end.h"
    7 
    -
    8 #if SIMDJSON_CAN_ALWAYS_RUN_ICELAKE
    -
    9 #define SIMDJSON_TARGET_ICELAKE
    -
    10 #define SIMDJSON_UNTARGET_ICELAKE
    -
    11 #else
    -
    12 #define SIMDJSON_TARGET_ICELAKE SIMDJSON_TARGET_REGION("avx512f,avx512dq,avx512cd,avx512bw,avx512vbmi,avx512vbmi2,avx512vl,avx2,bmi,pclmul,lzcnt,popcnt")
    -
    13 #define SIMDJSON_UNTARGET_ICELAKE SIMDJSON_UNTARGET_REGION
    -
    14 #endif
    -
    15 
    -
    16 namespace simdjson {
    -
    20 namespace icelake {
    -
    21 } // namespace icelake
    -
    22 } // namespace simdjson
    -
    23 
    -
    24 //
    -
    25 // These two need to be included outside SIMDJSON_TARGET_ICELAKE
    -
    26 //
    -
    27 #include "simdjson/icelake/implementation.h"
    -
    28 #include "simdjson/icelake/intrinsics.h"
    -
    29 
    -
    30 //
    -
    31 // The rest need to be inside the region
    -
    32 //
    -
    33 #include "simdjson/icelake/begin.h"
    -
    34 
    -
    35 // Declarations
    -
    36 #include "simdjson/generic/dom_parser_implementation.h"
    -
    37 #include "simdjson/icelake/bitmanipulation.h"
    -
    38 #include "simdjson/icelake/bitmask.h"
    -
    39 #include "simdjson/icelake/simd.h"
    -
    40 #include "simdjson/generic/jsoncharutils.h"
    -
    41 #include "simdjson/generic/atomparsing.h"
    -
    42 #include "simdjson/icelake/stringparsing.h"
    -
    43 #include "simdjson/icelake/numberparsing.h"
    -
    44 #include "simdjson/icelake/end.h"
    -
    45 
    -
    46 #endif // SIMDJSON_IMPLEMENTATION_ICELAKE
    -
    47 #endif // SIMDJSON_ICELAKE_H
    -
    Includes common stuff needed for implementations.
    -
    We want to support argument-dependent lookup (ADL).
    +
    8 #endif // SIMDJSON_ICELAKE_H
    diff --git a/implementation_8h_source.html b/implementation_8h_source.html index ec4f8e49a..abfbebf33 100644 --- a/implementation_8h_source.html +++ b/implementation_8h_source.html @@ -94,123 +94,99 @@ $(document).ready(function(){initNavTree('implementation_8h_source.html',''); in
    1 #ifndef SIMDJSON_IMPLEMENTATION_H
    2 #define SIMDJSON_IMPLEMENTATION_H
    3 
    -
    4 #include "simdjson/common_defs.h"
    +
    4 #include "simdjson/internal/atomic_ptr.h"
    5 #include "simdjson/internal/dom_parser_implementation.h"
    -
    6 #include "simdjson/internal/isadetection.h"
    -
    7 #include <string>
    -
    8 #include <atomic>
    -
    9 #include <vector>
    +
    6 
    +
    7 #include <memory>
    +
    8 
    +
    9 namespace simdjson {
    10 
    -
    11 namespace simdjson {
    -
    12 
    -
    20 simdjson_warn_unused bool validate_utf8(const char * buf, size_t len) noexcept;
    -
    27 simdjson_inline simdjson_warn_unused bool validate_utf8(const std::string_view sv) noexcept {
    -
    28  return validate_utf8(sv.data(), sv.size());
    -
    29 }
    -
    30 
    -
    37 simdjson_inline simdjson_warn_unused bool validate_utf8(const std::string& s) noexcept {
    -
    38  return validate_utf8(s.data(), s.size());
    -
    39 }
    -
    40 
    -
    41 namespace dom {
    -
    42  class document;
    -
    43 } // namespace dom
    -
    44 
    - -
    52 public:
    -
    53 
    -
    62  virtual const std::string &name() const { return _name; }
    -
    63 
    -
    72  virtual const std::string &description() const { return _description; }
    -
    73 
    - -
    82 
    -
    90  virtual uint32_t required_instruction_sets() const { return _required_instruction_sets; }
    -
    91 
    -
    103  virtual error_code create_dom_parser_implementation(
    -
    104  size_t capacity,
    -
    105  size_t max_depth,
    -
    106  std::unique_ptr<internal::dom_parser_implementation> &dst
    -
    107  ) const noexcept = 0;
    -
    108 
    -
    122  simdjson_warn_unused virtual error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept = 0;
    -
    123 
    -
    124 
    -
    134  simdjson_warn_unused virtual bool validate_utf8(const char *buf, size_t len) const noexcept = 0;
    -
    135 
    -
    136 protected:
    -
    138  simdjson_inline implementation(
    -
    139  std::string_view name,
    -
    140  std::string_view description,
    -
    141  uint32_t required_instruction_sets
    -
    142  ) :
    -
    143  _name(name),
    -
    144  _description(description),
    -
    145  _required_instruction_sets(required_instruction_sets)
    -
    146  {
    -
    147  }
    -
    148  virtual ~implementation()=default;
    +
    18 simdjson_warn_unused bool validate_utf8(const char * buf, size_t len) noexcept;
    +
    25 simdjson_inline simdjson_warn_unused bool validate_utf8(const std::string_view sv) noexcept {
    +
    26  return validate_utf8(sv.data(), sv.size());
    +
    27 }
    +
    28 
    +
    35 simdjson_inline simdjson_warn_unused bool validate_utf8(const std::string& s) noexcept {
    +
    36  return validate_utf8(s.data(), s.size());
    +
    37 }
    +
    38 
    + +
    46 public:
    +
    47 
    +
    56  virtual const std::string &name() const { return _name; }
    +
    57 
    +
    66  virtual const std::string &description() const { return _description; }
    +
    67 
    + +
    76 
    +
    84  virtual uint32_t required_instruction_sets() const { return _required_instruction_sets; }
    +
    85 
    +
    97  virtual error_code create_dom_parser_implementation(
    +
    98  size_t capacity,
    +
    99  size_t max_depth,
    +
    100  std::unique_ptr<internal::dom_parser_implementation> &dst
    +
    101  ) const noexcept = 0;
    +
    102 
    +
    116  simdjson_warn_unused virtual error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept = 0;
    +
    117 
    +
    118 
    +
    128  simdjson_warn_unused virtual bool validate_utf8(const char *buf, size_t len) const noexcept = 0;
    +
    129 
    +
    130 protected:
    +
    132  simdjson_inline implementation(
    +
    133  std::string_view name,
    +
    134  std::string_view description,
    +
    135  uint32_t required_instruction_sets
    +
    136  ) :
    +
    137  _name(name),
    +
    138  _description(description),
    +
    139  _required_instruction_sets(required_instruction_sets)
    +
    140  {
    +
    141  }
    +
    142  virtual ~implementation()=default;
    +
    143 
    +
    144 private:
    +
    148  const std::string _name;
    149 
    -
    150 private:
    -
    154  const std::string _name;
    -
    155 
    -
    159  const std::string _description;
    +
    153  const std::string _description;
    +
    154 
    +
    158  const uint32_t _required_instruction_sets;
    +
    159 };
    160 
    -
    164  const uint32_t _required_instruction_sets;
    -
    165 };
    -
    166 
    -
    168 namespace internal {
    -
    169 
    -
    173 class available_implementation_list {
    -
    174 public:
    -
    176  simdjson_inline available_implementation_list() {}
    -
    178  size_t size() const noexcept;
    -
    180  const implementation * const *begin() const noexcept;
    -
    182  const implementation * const *end() const noexcept;
    -
    183 
    -
    197  const implementation * operator[](const std::string_view &name) const noexcept {
    -
    198  for (const implementation * impl : *this) {
    -
    199  if (impl->name() == name) { return impl; }
    -
    200  }
    -
    201  return nullptr;
    -
    202  }
    -
    203 
    -
    216  const implementation *detect_best_supported() const noexcept;
    -
    217 };
    -
    218 
    -
    219 template<typename T>
    -
    220 class atomic_ptr {
    -
    221 public:
    -
    222  atomic_ptr(T *_ptr) : ptr{_ptr} {}
    -
    223 
    -
    224  operator const T*() const { return ptr.load(); }
    -
    225  const T& operator*() const { return *ptr; }
    -
    226  const T* operator->() const { return ptr.load(); }
    -
    227 
    -
    228  operator T*() { return ptr.load(); }
    -
    229  T& operator*() { return *ptr; }
    -
    230  T* operator->() { return ptr.load(); }
    -
    231  atomic_ptr& operator=(T *_ptr) { ptr = _ptr; return *this; }
    -
    232 
    -
    233 private:
    -
    234  std::atomic<T*> ptr;
    -
    235 };
    -
    236 
    -
    237 } // namespace internal
    -
    238 
    -
    242 extern SIMDJSON_DLLIMPORTEXPORT const internal::available_implementation_list& get_available_implementations();
    -
    243 
    -
    249 extern SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr<const implementation>& get_active_implementation();
    -
    250 
    -
    251 } // namespace simdjson
    -
    252 
    -
    253 #endif // SIMDJSON_IMPLEMENTATION_H
    -
    An implementation of simdjson for a particular CPU architecture.
    -
    virtual const std::string & name() const
    The name of this implementation.
    -
    virtual const std::string & description() const
    The description of this implementation.
    +
    162 namespace internal {
    +
    163 
    +
    167 class available_implementation_list {
    +
    168 public:
    +
    170  simdjson_inline available_implementation_list() {}
    +
    172  size_t size() const noexcept;
    +
    174  const implementation * const *begin() const noexcept;
    +
    176  const implementation * const *end() const noexcept;
    +
    177 
    +
    191  const implementation * operator[](const std::string_view &name) const noexcept {
    +
    192  for (const implementation * impl : *this) {
    +
    193  if (impl->name() == name) { return impl; }
    +
    194  }
    +
    195  return nullptr;
    +
    196  }
    +
    197 
    +
    210  const implementation *detect_best_supported() const noexcept;
    +
    211 };
    +
    212 
    +
    213 } // namespace internal
    +
    214 
    +
    218 extern SIMDJSON_DLLIMPORTEXPORT const internal::available_implementation_list& get_available_implementations();
    +
    219 
    +
    225 extern SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr<const implementation>& get_active_implementation();
    +
    226 
    +
    227 } // namespace simdjson
    +
    228 
    +
    229 #endif // SIMDJSON_IMPLEMENTATION_H
    +
    An implementation of simdjson for a particular CPU architecture.
    +
    virtual const std::string & name() const
    The name of this implementation.
    +
    virtual const std::string & description() const
    The description of this implementation.
    virtual simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept=0
    Validate the UTF-8 string.
    bool supported_by_runtime_system() const
    The instruction sets this implementation is compiled against and the current CPU match.
    -
    We want to support argument-dependent lookup (ADL).
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) noexcept
    Validate the UTF-8 string.
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    SIMDJSON_DLLIMPORTEXPORT const internal::available_implementation_list & get_available_implementations()
    The list of available implementations compiled into simdjson.
    diff --git a/implementations_8h_source.html b/implementation__detection_8h_source.html similarity index 73% rename from implementations_8h_source.html rename to implementation__detection_8h_source.html index e9edeef28..341c09947 100644 --- a/implementations_8h_source.html +++ b/implementation__detection_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/implementations.h Source File +simdjson: include/simdjson/implementation_detection.h Source File @@ -68,7 +68,7 @@ $(function() {
    @@ -88,128 +88,127 @@ $(document).ready(function(){initNavTree('implementations_8h_source.html',''); i
    -
    implementations.h
    +
    implementation_detection.h
    -
    1 #ifndef SIMDJSON_IMPLEMENTATIONS_H
    -
    2 #define SIMDJSON_IMPLEMENTATIONS_H
    +
    1 #ifndef SIMDJSON_IMPLEMENTATION_DETECTION_H
    +
    2 #define SIMDJSON_IMPLEMENTATION_DETECTION_H
    3 
    - +
    4 #include "simdjson/base.h"
    5 
    -
    6 //
    -
    7 // First, figure out which implementations can be run. Doing it here makes it so we don't have to worry about the order
    -
    8 // in which we include them.
    -
    9 //
    -
    10 
    -
    11 #ifndef SIMDJSON_IMPLEMENTATION_ARM64
    -
    12 #define SIMDJSON_IMPLEMENTATION_ARM64 (SIMDJSON_IS_ARM64)
    -
    13 #endif
    -
    14 #define SIMDJSON_CAN_ALWAYS_RUN_ARM64 SIMDJSON_IMPLEMENTATION_ARM64 && SIMDJSON_IS_ARM64
    -
    15 
    -
    16 #ifdef __has_include
    -
    17 // How do we detect that a compiler supports vbmi2?
    -
    18 // For sure if the following header is found, we are ok?
    -
    19 #if __has_include(<avx512vbmi2intrin.h>)
    -
    20 #define SIMDJSON_COMPILER_SUPPORTS_VBMI2 1
    -
    21 #endif
    -
    22 #endif
    +
    6 // 0 is reserved, because undefined SIMDJSON_IMPLEMENTATION equals 0 in preprocessor macros.
    +
    7 #define SIMDJSON_IMPLEMENTATION_ID_arm64 1
    +
    8 #define SIMDJSON_IMPLEMENTATION_ID_fallback 2
    +
    9 #define SIMDJSON_IMPLEMENTATION_ID_haswell 3
    +
    10 #define SIMDJSON_IMPLEMENTATION_ID_icelake 4
    +
    11 #define SIMDJSON_IMPLEMENTATION_ID_ppc64 5
    +
    12 #define SIMDJSON_IMPLEMENTATION_ID_westmere 6
    +
    13 
    +
    14 #define SIMDJSON_IMPLEMENTATION_ID_FOR(IMPL) SIMDJSON_CAT(SIMDJSON_IMPLEMENTATION_ID_, IMPL)
    +
    15 #define SIMDJSON_IMPLEMENTATION_ID SIMDJSON_IMPLEMENTATION_ID_FOR(SIMDJSON_IMPLEMENTATION)
    +
    16 
    +
    17 #define SIMDJSON_IMPLEMENTATION_IS(IMPL) SIMDJSON_IMPLEMENTATION_ID == SIMDJSON_IMPLEMENTATION_ID_FOR(IMPL)
    +
    18 
    +
    19 //
    +
    20 // First, figure out which implementations can be run. Doing it here makes it so we don't have to worry about the order
    +
    21 // in which we include them.
    +
    22 //
    23 
    -
    24 #ifdef _MSC_VER
    -
    25 #if _MSC_VER >= 1920
    -
    26 // Visual Studio 2019 and up support VBMI2 under x64 even if the header
    -
    27 // avx512vbmi2intrin.h is not found.
    -
    28 #define SIMDJSON_COMPILER_SUPPORTS_VBMI2 1
    -
    29 #endif
    -
    30 #endif
    -
    31 
    -
    32 // By default, we allow AVX512.
    -
    33 #ifndef SIMDJSON_AVX512_ALLOWED
    -
    34 #define SIMDJSON_AVX512_ALLOWED 1
    -
    35 #endif
    -
    36 
    -
    37 // Default Icelake to on if this is x86-64. Even if we're not compiled for it, it could be selected
    -
    38 // at runtime.
    -
    39 #ifndef SIMDJSON_IMPLEMENTATION_ICELAKE
    -
    40 #define SIMDJSON_IMPLEMENTATION_ICELAKE ((SIMDJSON_IS_X86_64) && (SIMDJSON_AVX512_ALLOWED) && (SIMDJSON_COMPILER_SUPPORTS_VBMI2))
    +
    24 #ifndef SIMDJSON_IMPLEMENTATION_ARM64
    +
    25 #define SIMDJSON_IMPLEMENTATION_ARM64 (SIMDJSON_IS_ARM64)
    +
    26 #endif
    +
    27 #define SIMDJSON_CAN_ALWAYS_RUN_ARM64 SIMDJSON_IMPLEMENTATION_ARM64 && SIMDJSON_IS_ARM64
    +
    28 
    +
    29 // Default Icelake to on if this is x86-64. Even if we're not compiled for it, it could be selected
    +
    30 // at runtime.
    +
    31 #ifndef SIMDJSON_IMPLEMENTATION_ICELAKE
    +
    32 #define SIMDJSON_IMPLEMENTATION_ICELAKE ((SIMDJSON_IS_X86_64) && (SIMDJSON_AVX512_ALLOWED) && (SIMDJSON_COMPILER_SUPPORTS_VBMI2))
    +
    33 #endif
    +
    34 
    +
    35 #ifdef _MSC_VER
    +
    36 // To see why (__BMI__) && (__PCLMUL__) && (__LZCNT__) are not part of this next line, see
    +
    37 // https://github.com/simdjson/simdjson/issues/1247
    +
    38 #define SIMDJSON_CAN_ALWAYS_RUN_ICELAKE ((SIMDJSON_IMPLEMENTATION_ICELAKE) && (__AVX2__) && (__AVX512F__) && (__AVX512DQ__) && (__AVX512CD__) && (__AVX512BW__) && (__AVX512VL__) && (__AVX512VBMI2__))
    +
    39 #else
    +
    40 #define SIMDJSON_CAN_ALWAYS_RUN_ICELAKE ((SIMDJSON_IMPLEMENTATION_ICELAKE) && (__AVX2__) && (__BMI__) && (__PCLMUL__) && (__LZCNT__) && (__AVX512F__) && (__AVX512DQ__) && (__AVX512CD__) && (__AVX512BW__) && (__AVX512VL__) && (__AVX512VBMI2__))
    41 #endif
    42 
    -
    43 #ifdef _MSC_VER
    -
    44 // To see why (__BMI__) && (__PCLMUL__) && (__LZCNT__) are not part of this next line, see
    -
    45 // https://github.com/simdjson/simdjson/issues/1247
    -
    46 #define SIMDJSON_CAN_ALWAYS_RUN_ICELAKE ((SIMDJSON_IMPLEMENTATION_ICELAKE) && (__AVX2__) && (__AVX512F__) && (__AVX512DQ__) && (__AVX512CD__) && (__AVX512BW__) && (__AVX512VL__) && (__AVX512VBMI2__))
    -
    47 #else
    -
    48 #define SIMDJSON_CAN_ALWAYS_RUN_ICELAKE ((SIMDJSON_IMPLEMENTATION_ICELAKE) && (__AVX2__) && (__BMI__) && (__PCLMUL__) && (__LZCNT__) && (__AVX512F__) && (__AVX512DQ__) && (__AVX512CD__) && (__AVX512BW__) && (__AVX512VL__) && (__AVX512VBMI2__))
    -
    49 #endif
    -
    50 
    -
    51 // Default Haswell to on if this is x86-64. Even if we're not compiled for it, it could be selected
    -
    52 // at runtime.
    -
    53 #ifndef SIMDJSON_IMPLEMENTATION_HASWELL
    -
    54 #if SIMDJSON_CAN_ALWAYS_RUN_ICELAKE
    -
    55 // if icelake is always available, never enable haswell.
    -
    56 #define SIMDJSON_IMPLEMENTATION_HASWELL 0
    +
    43 // Default Haswell to on if this is x86-64. Even if we're not compiled for it, it could be selected
    +
    44 // at runtime.
    +
    45 #ifndef SIMDJSON_IMPLEMENTATION_HASWELL
    +
    46 #if SIMDJSON_CAN_ALWAYS_RUN_ICELAKE
    +
    47 // if icelake is always available, never enable haswell.
    +
    48 #define SIMDJSON_IMPLEMENTATION_HASWELL 0
    +
    49 #else
    +
    50 #define SIMDJSON_IMPLEMENTATION_HASWELL SIMDJSON_IS_X86_64
    +
    51 #endif
    +
    52 #endif
    +
    53 #ifdef _MSC_VER
    +
    54 // To see why (__BMI__) && (__PCLMUL__) && (__LZCNT__) are not part of this next line, see
    +
    55 // https://github.com/simdjson/simdjson/issues/1247
    +
    56 #define SIMDJSON_CAN_ALWAYS_RUN_HASWELL ((SIMDJSON_IMPLEMENTATION_HASWELL) && (SIMDJSON_IS_X86_64) && (__AVX2__))
    57 #else
    -
    58 #define SIMDJSON_IMPLEMENTATION_HASWELL SIMDJSON_IS_X86_64
    +
    58 #define SIMDJSON_CAN_ALWAYS_RUN_HASWELL ((SIMDJSON_IMPLEMENTATION_HASWELL) && (SIMDJSON_IS_X86_64) && (__AVX2__) && (__BMI__) && (__PCLMUL__) && (__LZCNT__))
    59 #endif
    -
    60 #endif
    -
    61 #ifdef _MSC_VER
    -
    62 // To see why (__BMI__) && (__PCLMUL__) && (__LZCNT__) are not part of this next line, see
    -
    63 // https://github.com/simdjson/simdjson/issues/1247
    -
    64 #define SIMDJSON_CAN_ALWAYS_RUN_HASWELL ((SIMDJSON_IMPLEMENTATION_HASWELL) && (SIMDJSON_IS_X86_64) && (__AVX2__))
    -
    65 #else
    -
    66 #define SIMDJSON_CAN_ALWAYS_RUN_HASWELL ((SIMDJSON_IMPLEMENTATION_HASWELL) && (SIMDJSON_IS_X86_64) && (__AVX2__) && (__BMI__) && (__PCLMUL__) && (__LZCNT__))
    -
    67 #endif
    -
    68 
    -
    69 // Default Westmere to on if this is x86-64.
    -
    70 #ifndef SIMDJSON_IMPLEMENTATION_WESTMERE
    -
    71 #if SIMDJSON_CAN_ALWAYS_RUN_ICELAKE || SIMDJSON_CAN_ALWAYS_RUN_HASWELL
    -
    72 // if icelake or haswell are always available, never enable westmere.
    -
    73 #define SIMDJSON_IMPLEMENTATION_WESTMERE 0
    -
    74 #else
    -
    75 #define SIMDJSON_IMPLEMENTATION_WESTMERE SIMDJSON_IS_X86_64
    -
    76 #endif
    -
    77 #endif
    -
    78 #define SIMDJSON_CAN_ALWAYS_RUN_WESTMERE (SIMDJSON_IMPLEMENTATION_WESTMERE && SIMDJSON_IS_X86_64 && __SSE4_2__ && __PCLMUL__)
    -
    79 
    -
    80 #ifndef SIMDJSON_IMPLEMENTATION_PPC64
    -
    81 #define SIMDJSON_IMPLEMENTATION_PPC64 (SIMDJSON_IS_PPC64 && SIMDJSON_IS_PPC64_VMX)
    -
    82 #endif
    -
    83 #define SIMDJSON_CAN_ALWAYS_RUN_PPC64 SIMDJSON_IMPLEMENTATION_PPC64 && SIMDJSON_IS_PPC64 && SIMDJSON_IS_PPC64_VMX
    -
    84 
    -
    85 // Default Fallback to on unless a builtin implementation has already been selected.
    -
    86 #ifndef SIMDJSON_IMPLEMENTATION_FALLBACK
    -
    87 #if SIMDJSON_CAN_ALWAYS_RUN_ARM64 || SIMDJSON_CAN_ALWAYS_RUN_ICELAKE || SIMDJSON_CAN_ALWAYS_RUN_HASWELL || SIMDJSON_CAN_ALWAYS_RUN_WESTMERE || SIMDJSON_CAN_ALWAYS_RUN_PPC64
    -
    88 // if anything at all except fallback can always run, then disable fallback.
    -
    89 #define SIMDJSON_IMPLEMENTATION_FALLBACK 0
    -
    90 #else
    -
    91 #define SIMDJSON_IMPLEMENTATION_FALLBACK 1
    -
    92 #endif
    -
    93 #endif
    -
    94 #define SIMDJSON_CAN_ALWAYS_RUN_FALLBACK SIMDJSON_IMPLEMENTATION_FALLBACK
    -
    95 
    -
    96 SIMDJSON_PUSH_DISABLE_WARNINGS
    -
    97 SIMDJSON_DISABLE_UNDESIRED_WARNINGS
    -
    98 
    -
    99 // Implementations
    -
    100 #include "simdjson/arm64.h"
    -
    101 #include "simdjson/fallback.h"
    -
    102 #include "simdjson/icelake.h"
    -
    103 #include "simdjson/haswell.h"
    -
    104 #include "simdjson/ppc64.h"
    -
    105 #include "simdjson/westmere.h"
    +
    60 
    +
    61 // Default Westmere to on if this is x86-64.
    +
    62 #ifndef SIMDJSON_IMPLEMENTATION_WESTMERE
    +
    63 #if SIMDJSON_CAN_ALWAYS_RUN_ICELAKE || SIMDJSON_CAN_ALWAYS_RUN_HASWELL
    +
    64 // if icelake or haswell are always available, never enable westmere.
    +
    65 #define SIMDJSON_IMPLEMENTATION_WESTMERE 0
    +
    66 #else
    +
    67 #define SIMDJSON_IMPLEMENTATION_WESTMERE SIMDJSON_IS_X86_64
    +
    68 #endif
    +
    69 #endif
    +
    70 #define SIMDJSON_CAN_ALWAYS_RUN_WESTMERE (SIMDJSON_IMPLEMENTATION_WESTMERE && SIMDJSON_IS_X86_64 && __SSE4_2__ && __PCLMUL__)
    +
    71 
    +
    72 #ifndef SIMDJSON_IMPLEMENTATION_PPC64
    +
    73 #define SIMDJSON_IMPLEMENTATION_PPC64 (SIMDJSON_IS_PPC64 && SIMDJSON_IS_PPC64_VMX)
    +
    74 #endif
    +
    75 #define SIMDJSON_CAN_ALWAYS_RUN_PPC64 SIMDJSON_IMPLEMENTATION_PPC64 && SIMDJSON_IS_PPC64 && SIMDJSON_IS_PPC64_VMX
    +
    76 
    +
    77 // Default Fallback to on unless a builtin implementation has already been selected.
    +
    78 #ifndef SIMDJSON_IMPLEMENTATION_FALLBACK
    +
    79 #if SIMDJSON_CAN_ALWAYS_RUN_ARM64 || SIMDJSON_CAN_ALWAYS_RUN_ICELAKE || SIMDJSON_CAN_ALWAYS_RUN_HASWELL || SIMDJSON_CAN_ALWAYS_RUN_WESTMERE || SIMDJSON_CAN_ALWAYS_RUN_PPC64
    +
    80 // if anything at all except fallback can always run, then disable fallback.
    +
    81 #define SIMDJSON_IMPLEMENTATION_FALLBACK 0
    +
    82 #else
    +
    83 #define SIMDJSON_IMPLEMENTATION_FALLBACK 1
    +
    84 #endif
    +
    85 #endif
    +
    86 #define SIMDJSON_CAN_ALWAYS_RUN_FALLBACK SIMDJSON_IMPLEMENTATION_FALLBACK
    +
    87 
    +
    88 // Determine the best builtin implementation
    +
    89 #ifndef SIMDJSON_BUILTIN_IMPLEMENTATION
    +
    90 
    +
    91 #if SIMDJSON_CAN_ALWAYS_RUN_ICELAKE
    +
    92 #define SIMDJSON_BUILTIN_IMPLEMENTATION icelake
    +
    93 #elif SIMDJSON_CAN_ALWAYS_RUN_HASWELL
    +
    94 #define SIMDJSON_BUILTIN_IMPLEMENTATION haswell
    +
    95 #elif SIMDJSON_CAN_ALWAYS_RUN_WESTMERE
    +
    96 #define SIMDJSON_BUILTIN_IMPLEMENTATION westmere
    +
    97 #elif SIMDJSON_CAN_ALWAYS_RUN_ARM64
    +
    98 #define SIMDJSON_BUILTIN_IMPLEMENTATION arm64
    +
    99 #elif SIMDJSON_CAN_ALWAYS_RUN_PPC64
    +
    100 #define SIMDJSON_BUILTIN_IMPLEMENTATION ppc64
    +
    101 #elif SIMDJSON_CAN_ALWAYS_RUN_FALLBACK
    +
    102 #define SIMDJSON_BUILTIN_IMPLEMENTATION fallback
    +
    103 #else
    +
    104 #error "All possible implementations (including fallback) have been disabled! simdjson will not run."
    +
    105 #endif
    106 
    -
    107 // Builtin implementation
    -
    108 #include "simdjson/builtin.h"
    -
    109 
    -
    110 SIMDJSON_POP_DISABLE_WARNINGS
    +
    107 #endif // SIMDJSON_BUILTIN_IMPLEMENTATION
    +
    108 
    +
    109 #define SIMDJSON_BUILTIN_IMPLEMENTATION_ID SIMDJSON_IMPLEMENTATION_ID_FOR(SIMDJSON_BUILTIN_IMPLEMENTATION)
    +
    110 #define SIMDJSON_BUILTIN_IMPLEMENTATION_IS(IMPL) SIMDJSON_BUILTIN_IMPLEMENTATION_ID == SIMDJSON_IMPLEMENTATION_ID_FOR(IMPL)
    111 
    -
    112 #endif // SIMDJSON_IMPLEMENTATIONS_H
    -
    Includes common stuff needed for implementations.
    +
    112 #endif // SIMDJSON_IMPLEMENTATION_DETECTION_H
    diff --git a/implementation__simdjson__result__base-inl_8h_source.html b/implementation__simdjson__result__base-inl_8h_source.html index fc670e438..c72bea7eb 100644 --- a/implementation__simdjson__result__base-inl_8h_source.html +++ b/implementation__simdjson__result__base-inl_8h_source.html @@ -91,97 +91,107 @@ $(document).ready(function(){initNavTree('implementation__simdjson__result__base
    implementation_simdjson_result_base-inl.h
    -
    1 namespace simdjson {
    -
    2 namespace SIMDJSON_IMPLEMENTATION {
    -
    3 
    -
    4 //
    -
    5 // internal::implementation_simdjson_result_base<T> inline implementation
    -
    6 //
    -
    7 
    -
    8 template<typename T>
    -
    9 simdjson_inline void implementation_simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
    -
    10  error = this->second;
    -
    11  if (!error) {
    -
    12  value = std::forward<implementation_simdjson_result_base<T>>(*this).first;
    -
    13  }
    -
    14 }
    +
    1 #ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H
    +
    5 #include "simdjson/generic/base.h"
    +
    6 #include "simdjson/generic/implementation_simdjson_result_base.h"
    +
    7 #endif // SIMDJSON_AMALGAMATED
    +
    8 
    +
    9 namespace simdjson {
    +
    10 namespace SIMDJSON_IMPLEMENTATION {
    +
    11 
    +
    12 //
    +
    13 // internal::implementation_simdjson_result_base<T> inline implementation
    +
    14 //
    15 
    16 template<typename T>
    -
    17 simdjson_warn_unused simdjson_inline error_code implementation_simdjson_result_base<T>::get(T &value) && noexcept {
    -
    18  error_code error;
    -
    19  std::forward<implementation_simdjson_result_base<T>>(*this).tie(value, error);
    -
    20  return error;
    -
    21 }
    -
    22 
    -
    23 template<typename T>
    - -
    25  return this->second;
    -
    26 }
    -
    27 
    -
    28 #if SIMDJSON_EXCEPTIONS
    -
    29 
    -
    30 template<typename T>
    -
    31 simdjson_inline T& implementation_simdjson_result_base<T>::value() & noexcept(false) {
    -
    32  if (error()) { throw simdjson_error(error()); }
    -
    33  return this->first;
    +
    17 simdjson_inline void implementation_simdjson_result_base<T>::tie(T &value, error_code &error) && noexcept {
    +
    18  error = this->second;
    +
    19  if (!error) {
    +
    20  value = std::forward<implementation_simdjson_result_base<T>>(*this).first;
    +
    21  }
    +
    22 }
    +
    23 
    +
    24 template<typename T>
    +
    25 simdjson_warn_unused simdjson_inline error_code implementation_simdjson_result_base<T>::get(T &value) && noexcept {
    +
    26  error_code error;
    +
    27  std::forward<implementation_simdjson_result_base<T>>(*this).tie(value, error);
    +
    28  return error;
    +
    29 }
    +
    30 
    +
    31 template<typename T>
    + +
    33  return this->second;
    34 }
    35 
    -
    36 template<typename T>
    -
    37 simdjson_inline T&& implementation_simdjson_result_base<T>::value() && noexcept(false) {
    -
    38  return std::forward<implementation_simdjson_result_base<T>>(*this).take_value();
    -
    39 }
    -
    40 
    -
    41 template<typename T>
    -
    42 simdjson_inline T&& implementation_simdjson_result_base<T>::take_value() && noexcept(false) {
    -
    43  if (error()) { throw simdjson_error(error()); }
    -
    44  return std::forward<T>(this->first);
    -
    45 }
    -
    46 
    -
    47 template<typename T>
    -
    48 simdjson_inline implementation_simdjson_result_base<T>::operator T&&() && noexcept(false) {
    -
    49  return std::forward<implementation_simdjson_result_base<T>>(*this).take_value();
    -
    50 }
    -
    51 
    -
    52 #endif // SIMDJSON_EXCEPTIONS
    -
    53 
    -
    54 template<typename T>
    -
    55 simdjson_inline const T& implementation_simdjson_result_base<T>::value_unsafe() const& noexcept {
    -
    56  return this->first;
    -
    57 }
    -
    58 
    -
    59 template<typename T>
    -
    60 simdjson_inline T& implementation_simdjson_result_base<T>::value_unsafe() & noexcept {
    -
    61  return this->first;
    -
    62 }
    -
    63 
    -
    64 template<typename T>
    -
    65 simdjson_inline T&& implementation_simdjson_result_base<T>::value_unsafe() && noexcept {
    -
    66  return std::forward<T>(this->first);
    -
    67 }
    -
    68 
    -
    69 template<typename T>
    - -
    71  : first{std::forward<T>(value)}, second{error} {}
    +
    36 #if SIMDJSON_EXCEPTIONS
    +
    37 
    +
    38 template<typename T>
    +
    39 simdjson_inline T& implementation_simdjson_result_base<T>::value() & noexcept(false) {
    +
    40  if (error()) { throw simdjson_error(error()); }
    +
    41  return this->first;
    +
    42 }
    +
    43 
    +
    44 template<typename T>
    +
    45 simdjson_inline T&& implementation_simdjson_result_base<T>::value() && noexcept(false) {
    +
    46  return std::forward<implementation_simdjson_result_base<T>>(*this).take_value();
    +
    47 }
    +
    48 
    +
    49 template<typename T>
    +
    50 simdjson_inline T&& implementation_simdjson_result_base<T>::take_value() && noexcept(false) {
    +
    51  if (error()) { throw simdjson_error(error()); }
    +
    52  return std::forward<T>(this->first);
    +
    53 }
    +
    54 
    +
    55 template<typename T>
    +
    56 simdjson_inline implementation_simdjson_result_base<T>::operator T&&() && noexcept(false) {
    +
    57  return std::forward<implementation_simdjson_result_base<T>>(*this).take_value();
    +
    58 }
    +
    59 
    +
    60 #endif // SIMDJSON_EXCEPTIONS
    +
    61 
    +
    62 template<typename T>
    +
    63 simdjson_inline const T& implementation_simdjson_result_base<T>::value_unsafe() const& noexcept {
    +
    64  return this->first;
    +
    65 }
    +
    66 
    +
    67 template<typename T>
    +
    68 simdjson_inline T& implementation_simdjson_result_base<T>::value_unsafe() & noexcept {
    +
    69  return this->first;
    +
    70 }
    +
    71 
    72 template<typename T>
    - - -
    75 template<typename T>
    - -
    77  : implementation_simdjson_result_base(std::forward<T>(value), SUCCESS) {}
    -
    78 
    -
    79 } // namespace SIMDJSON_IMPLEMENTATION
    -
    80 } // namespace simdjson
    -
    We want to support argument-dependent lookup (ADL).
    +
    73 simdjson_inline T&& implementation_simdjson_result_base<T>::value_unsafe() && noexcept {
    +
    74  return std::forward<T>(this->first);
    +
    75 }
    +
    76 
    +
    77 template<typename T>
    + +
    79  : first{std::forward<T>(value)}, second{error} {}
    +
    80 template<typename T>
    + + +
    83 template<typename T>
    + +
    85  : implementation_simdjson_result_base(std::forward<T>(value), SUCCESS) {}
    +
    86 
    +
    87 } // namespace SIMDJSON_IMPLEMENTATION
    +
    88 } // namespace simdjson
    +
    89 
    +
    90 #endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ SUCCESS
    No error.
    Definition: error.h:18
    - +
    simdjson_inline implementation_simdjson_result_base() noexcept=default
    Create a new empty result with error = UNINITIALIZED.
    - +
    simdjson_inline T & value() &noexcept(false)
    Get the result value.
    simdjson_inline const T & value_unsafe() const &noexcept
    Get the result value.
    -
    simdjson_inline error_code get(T &value) &&noexcept
    Move the value to the provided variable.
    -
    simdjson_inline void tie(T &value, error_code &error) &&noexcept
    Move the value and the error to the provided variables.
    -
    simdjson_inline T && take_value() &&noexcept(false)
    Take the result value (move it).
    +
    simdjson_inline error_code get(T &value) &&noexcept
    Move the value to the provided variable.
    +
    simdjson_inline void tie(T &value, error_code &error) &&noexcept
    Move the value and the error to the provided variables.
    +
    simdjson_inline T && take_value() &&noexcept(false)
    Take the result value (move it).
    Exception thrown when an exception-supporting simdjson method is called.
    Definition: error.h:72
    diff --git a/implementation__simdjson__result__base_8h_source.html b/implementation__simdjson__result__base_8h_source.html index 1ac62a377..628f8195c 100644 --- a/implementation__simdjson__result__base_8h_source.html +++ b/implementation__simdjson__result__base_8h_source.html @@ -91,66 +91,75 @@ $(document).ready(function(){initNavTree('implementation__simdjson__result__base
    implementation_simdjson_result_base.h
    -
    1 namespace simdjson {
    -
    2 namespace SIMDJSON_IMPLEMENTATION {
    -
    3 
    -
    4 // This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair
    -
    5 // so we can avoid inlining errors
    -
    6 // TODO reconcile these!
    -
    27 template<typename T>
    - -
    29 
    -
    33  simdjson_inline implementation_simdjson_result_base() noexcept = default;
    -
    34 
    -
    38  simdjson_inline implementation_simdjson_result_base(error_code error) noexcept;
    -
    39 
    -
    43  simdjson_inline implementation_simdjson_result_base(T &&value) noexcept;
    -
    44 
    -
    48  simdjson_inline implementation_simdjson_result_base(T &&value, error_code error) noexcept;
    -
    49 
    -
    56  simdjson_inline void tie(T &value, error_code &error) && noexcept;
    -
    57 
    -
    63  simdjson_inline error_code get(T &value) && noexcept;
    +
    1 #ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H
    +
    5 #include "simdjson/generic/base.h"
    +
    6 #endif // SIMDJSON_AMALGAMATED
    +
    7 
    +
    8 namespace simdjson {
    +
    9 namespace SIMDJSON_IMPLEMENTATION {
    +
    10 
    +
    11 // This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair
    +
    12 // so we can avoid inlining errors
    +
    13 // TODO reconcile these!
    +
    34 template<typename T>
    + +
    36 
    +
    40  simdjson_inline implementation_simdjson_result_base() noexcept = default;
    +
    41 
    +
    45  simdjson_inline implementation_simdjson_result_base(error_code error) noexcept;
    +
    46 
    +
    50  simdjson_inline implementation_simdjson_result_base(T &&value) noexcept;
    +
    51 
    +
    55  simdjson_inline implementation_simdjson_result_base(T &&value, error_code error) noexcept;
    +
    56 
    +
    63  simdjson_inline void tie(T &value, error_code &error) && noexcept;
    64 
    -
    68  simdjson_inline error_code error() const noexcept;
    -
    69 
    -
    70 #if SIMDJSON_EXCEPTIONS
    +
    70  simdjson_inline error_code get(T &value) && noexcept;
    71 
    -
    77  simdjson_inline T& value() & noexcept(false);
    +
    75  simdjson_inline error_code error() const noexcept;
    +
    76 
    +
    77 #if SIMDJSON_EXCEPTIONS
    78 
    -
    84  simdjson_inline T&& value() && noexcept(false);
    +
    84  simdjson_inline T& value() & noexcept(false);
    85 
    -
    91  simdjson_inline T&& take_value() && noexcept(false);
    +
    91  simdjson_inline T&& value() && noexcept(false);
    92 
    -
    98  simdjson_inline operator T&&() && noexcept(false);
    +
    98  simdjson_inline T&& take_value() && noexcept(false);
    99 
    -
    100 
    -
    101 #endif // SIMDJSON_EXCEPTIONS
    -
    102 
    -
    107  simdjson_inline const T& value_unsafe() const& noexcept;
    -
    112  simdjson_inline T& value_unsafe() & noexcept;
    -
    117  simdjson_inline T&& value_unsafe() && noexcept;
    -
    118 protected:
    -
    120  T first{};
    - -
    122 }; // struct implementation_simdjson_result_base
    -
    123 
    -
    124 } // namespace SIMDJSON_IMPLEMENTATION
    -
    125 } // namespace simdjson
    -
    We want to support argument-dependent lookup (ADL).
    +
    105  simdjson_inline operator T&&() && noexcept(false);
    +
    106 
    +
    107 
    +
    108 #endif // SIMDJSON_EXCEPTIONS
    +
    109 
    +
    114  simdjson_inline const T& value_unsafe() const& noexcept;
    +
    119  simdjson_inline T& value_unsafe() & noexcept;
    +
    124  simdjson_inline T&& value_unsafe() && noexcept;
    +
    125 protected:
    +
    127  T first{};
    + +
    129 }; // struct implementation_simdjson_result_base
    +
    130 
    +
    131 } // namespace SIMDJSON_IMPLEMENTATION
    +
    132 } // namespace simdjson
    +
    133 
    +
    134 #endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ UNINITIALIZED
    unknown error, or uninitialized document
    Definition: error.h:29
    - +
    simdjson_inline implementation_simdjson_result_base() noexcept=default
    Create a new empty result with error = UNINITIALIZED.
    - - + +
    simdjson_inline T & value() &noexcept(false)
    Get the result value.
    simdjson_inline const T & value_unsafe() const &noexcept
    Get the result value.
    simdjson_inline T && value() &&noexcept(false)
    Take the result value (move it).
    -
    simdjson_inline error_code get(T &value) &&noexcept
    Move the value to the provided variable.
    -
    simdjson_inline void tie(T &value, error_code &error) &&noexcept
    Move the value and the error to the provided variables.
    - -
    simdjson_inline T && take_value() &&noexcept(false)
    Take the result value (move it).
    +
    simdjson_inline error_code get(T &value) &&noexcept
    Move the value to the provided variable.
    +
    simdjson_inline void tie(T &value, error_code &error) &&noexcept
    Move the value and the error to the provided variables.
    + +
    simdjson_inline T && take_value() &&noexcept(false)
    Take the result value (move it).
    diff --git a/instruction__set_8h_source.html b/instruction__set_8h_source.html new file mode 100644 index 000000000..6d854f160 --- /dev/null +++ b/instruction__set_8h_source.html @@ -0,0 +1,180 @@ + + + + + + + +simdjson: include/simdjson/internal/instruction_set.h Source File + + + + + + + + + + + + + + + + +
    +
    + + + + + + + +
    +
    simdjson +  3.2.1 +
    +
    Ridiculously Fast JSON
    +
    +
    + + + + + + + +
    +
    + +
    +
    +
    + +
    + +
    +
    + + +
    + +
    + +
    +
    +
    instruction_set.h
    +
    +
    +
    1 /* From
    +
    2 https://github.com/endorno/pytorch/blob/master/torch/lib/TH/generic/simd/simd.h
    +
    3 Highly modified.
    +
    4 
    +
    5 Copyright (c) 2016- Facebook, Inc (Adam Paszke)
    +
    6 Copyright (c) 2014- Facebook, Inc (Soumith Chintala)
    +
    7 Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert)
    +
    8 Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu)
    +
    9 Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu)
    +
    10 Copyright (c) 2011-2013 NYU (Clement Farabet)
    +
    11 Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou,
    +
    12 Iain Melvin, Jason Weston) Copyright (c) 2006 Idiap Research Institute
    +
    13 (Samy Bengio) Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert,
    +
    14 Samy Bengio, Johnny Mariethoz)
    +
    15 
    +
    16 All rights reserved.
    +
    17 
    +
    18 Redistribution and use in source and binary forms, with or without
    +
    19 modification, are permitted provided that the following conditions are met:
    +
    20 
    +
    21 1. Redistributions of source code must retain the above copyright
    +
    22  notice, this list of conditions and the following disclaimer.
    +
    23 
    +
    24 2. Redistributions in binary form must reproduce the above copyright
    +
    25  notice, this list of conditions and the following disclaimer in the
    +
    26  documentation and/or other materials provided with the distribution.
    +
    27 
    +
    28 3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories
    +
    29 America and IDIAP Research Institute nor the names of its contributors may be
    +
    30  used to endorse or promote products derived from this software without
    +
    31  specific prior written permission.
    +
    32 
    +
    33 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    +
    34 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    +
    35 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    +
    36 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
    +
    37 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
    +
    38 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
    +
    39 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
    +
    40 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
    +
    41 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
    +
    42 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
    +
    43 POSSIBILITY OF SUCH DAMAGE.
    +
    44 */
    +
    45 
    +
    46 #ifndef SIMDJSON_INTERNAL_INSTRUCTION_SET_H
    +
    47 #define SIMDJSON_INTERNAL_INSTRUCTION_SET_H
    +
    48 
    +
    49 namespace simdjson {
    +
    50 namespace internal {
    +
    51 
    +
    52 enum instruction_set {
    +
    53  DEFAULT = 0x0,
    +
    54  NEON = 0x1,
    +
    55  AVX2 = 0x4,
    +
    56  SSE42 = 0x8,
    +
    57  PCLMULQDQ = 0x10,
    +
    58  BMI1 = 0x20,
    +
    59  BMI2 = 0x40,
    +
    60  ALTIVEC = 0x80,
    +
    61  AVX512F = 0x100,
    +
    62  AVX512DQ = 0x200,
    +
    63  AVX512IFMA = 0x400,
    +
    64  AVX512PF = 0x800,
    +
    65  AVX512ER = 0x1000,
    +
    66  AVX512CD = 0x2000,
    +
    67  AVX512BW = 0x4000,
    +
    68  AVX512VL = 0x8000,
    +
    69  AVX512VBMI2 = 0x10000
    +
    70 };
    +
    71 
    +
    72 } // namespace internal
    +
    73 } // namespace simdjson
    +
    74 
    +
    75 #endif // SIMDJSON_INTERNAL_ISADETECTION_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    +
    + + + + diff --git a/internal_2dom__parser__implementation_8h_source.html b/internal_2dom__parser__implementation_8h_source.html index 7a8a65b6a..488c4b795 100644 --- a/internal_2dom__parser__implementation_8h_source.html +++ b/internal_2dom__parser__implementation_8h_source.html @@ -94,7 +94,7 @@ $(document).ready(function(){initNavTree('internal_2dom__parser__implementation_
    1 #ifndef SIMDJSON_INTERNAL_DOM_PARSER_IMPLEMENTATION_H
    2 #define SIMDJSON_INTERNAL_DOM_PARSER_IMPLEMENTATION_H
    3 
    -
    4 #include "simdjson/common_defs.h"
    +
    4 #include "simdjson/base.h"
    5 #include "simdjson/error.h"
    6 #include <memory>
    7 
    @@ -192,7 +192,7 @@ $(document).ready(function(){initNavTree('internal_2dom__parser__implementation_
    250 } // namespace simdjson
    251 
    252 #endif // SIMDJSON_INTERNAL_DOM_PARSER_IMPLEMENTATION_H
    -
    We want to support argument-dependent lookup (ADL).
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    bool is_streaming(stage1_mode mode)
    Returns true if mode == streaming_partial or mode == streaming_final.
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ SUCCESS
    No error.
    Definition: error.h:18
    diff --git a/isadetection_8h_source.html b/isadetection_8h_source.html index f6ef25160..b5c4fbb99 100644 --- a/isadetection_8h_source.html +++ b/isadetection_8h_source.html @@ -139,211 +139,193 @@ $(document).ready(function(){initNavTree('isadetection_8h_source.html',''); init
    46 #ifndef SIMDJSON_INTERNAL_ISADETECTION_H
    47 #define SIMDJSON_INTERNAL_ISADETECTION_H
    48 
    -
    49 #include <cstdint>
    -
    50 #include <cstdlib>
    -
    51 #if defined(_MSC_VER)
    -
    52 #include <intrin.h>
    -
    53 #elif defined(HAVE_GCC_GET_CPUID) && defined(USE_GCC_GET_CPUID)
    -
    54 #include <cpuid.h>
    -
    55 #endif
    -
    56 
    -
    57 namespace simdjson {
    -
    58 namespace internal {
    -
    59 
    -
    60 enum instruction_set {
    -
    61  DEFAULT = 0x0,
    -
    62  NEON = 0x1,
    -
    63  AVX2 = 0x4,
    -
    64  SSE42 = 0x8,
    -
    65  PCLMULQDQ = 0x10,
    -
    66  BMI1 = 0x20,
    -
    67  BMI2 = 0x40,
    -
    68  ALTIVEC = 0x80,
    -
    69  AVX512F = 0x100,
    -
    70  AVX512DQ = 0x200,
    -
    71  AVX512IFMA = 0x400,
    -
    72  AVX512PF = 0x800,
    -
    73  AVX512ER = 0x1000,
    -
    74  AVX512CD = 0x2000,
    -
    75  AVX512BW = 0x4000,
    -
    76  AVX512VL = 0x8000,
    -
    77  AVX512VBMI2 = 0x10000
    -
    78 };
    -
    79 
    -
    80 #if defined(__PPC64__)
    -
    81 
    -
    82 static inline uint32_t detect_supported_architectures() {
    -
    83  return instruction_set::ALTIVEC;
    -
    84 }
    -
    85 
    -
    86 #elif defined(__aarch64__) || defined(_M_ARM64)
    -
    87 
    -
    88 static inline uint32_t detect_supported_architectures() {
    -
    89  return instruction_set::NEON;
    -
    90 }
    -
    91 
    -
    92 #elif defined(__x86_64__) || defined(_M_AMD64) // x64
    -
    93 
    -
    94 
    -
    95 namespace {
    -
    96 // Can be found on Intel ISA Reference for CPUID
    -
    97 constexpr uint32_t cpuid_avx2_bit = 1 << 5;
    -
    98 constexpr uint32_t cpuid_bmi1_bit = 1 << 3;
    -
    99 constexpr uint32_t cpuid_bmi2_bit = 1 << 8;
    -
    100 constexpr uint32_t cpuid_avx512f_bit = 1 << 16;
    -
    101 constexpr uint32_t cpuid_avx512dq_bit = 1 << 17;
    -
    102 constexpr uint32_t cpuid_avx512ifma_bit = 1 << 21;
    -
    103 constexpr uint32_t cpuid_avx512pf_bit = 1 << 26;
    -
    104 constexpr uint32_t cpuid_avx512er_bit = 1 << 27;
    -
    105 constexpr uint32_t cpuid_avx512cd_bit = 1 << 28;
    -
    106 constexpr uint32_t cpuid_avx512bw_bit = 1 << 30;
    -
    107 constexpr uint32_t cpuid_avx512vl_bit = 1U << 31;
    -
    108 constexpr uint32_t cpuid_avx512vbmi2_bit = 1 << 6;
    -
    109 constexpr uint64_t cpuid_avx256_saved = uint64_t(1) << 2;
    -
    110 constexpr uint64_t cpuid_avx512_saved = uint64_t(7) << 5;
    -
    111 constexpr uint32_t cpuid_sse42_bit = 1 << 20;
    -
    112 constexpr uint32_t cpuid_osxsave = (uint32_t(1) << 26) | (uint32_t(1) << 27);
    -
    113 constexpr uint32_t cpuid_pclmulqdq_bit = 1 << 1;
    -
    114 }
    -
    115 
    -
    116 
    -
    117 
    -
    118 static inline void cpuid(uint32_t *eax, uint32_t *ebx, uint32_t *ecx,
    -
    119  uint32_t *edx) {
    -
    120 #if defined(_MSC_VER)
    -
    121  int cpu_info[4];
    -
    122  __cpuidex(cpu_info, *eax, *ecx);
    -
    123  *eax = cpu_info[0];
    -
    124  *ebx = cpu_info[1];
    -
    125  *ecx = cpu_info[2];
    -
    126  *edx = cpu_info[3];
    -
    127 #elif defined(HAVE_GCC_GET_CPUID) && defined(USE_GCC_GET_CPUID)
    -
    128  uint32_t level = *eax;
    -
    129  __get_cpuid(level, eax, ebx, ecx, edx);
    -
    130 #else
    -
    131  uint32_t a = *eax, b, c = *ecx, d;
    -
    132  asm volatile("cpuid\n\t" : "+a"(a), "=b"(b), "+c"(c), "=d"(d));
    -
    133  *eax = a;
    -
    134  *ebx = b;
    -
    135  *ecx = c;
    -
    136  *edx = d;
    -
    137 #endif
    -
    138 }
    -
    139 
    -
    140 
    -
    141 static inline uint64_t xgetbv() {
    -
    142 #if defined(_MSC_VER)
    -
    143  return _xgetbv(0);
    -
    144 #else
    -
    145  uint32_t xcr0_lo, xcr0_hi;
    -
    146  asm volatile("xgetbv\n\t" : "=a" (xcr0_lo), "=d" (xcr0_hi) : "c" (0));
    -
    147  return xcr0_lo | (uint64_t(xcr0_hi) << 32);
    -
    148 #endif
    -
    149 }
    -
    150 
    -
    151 static inline uint32_t detect_supported_architectures() {
    -
    152  uint32_t eax, ebx, ecx, edx;
    -
    153  uint32_t host_isa = 0x0;
    -
    154 
    -
    155  // EBX for EAX=0x1
    -
    156  eax = 0x1;
    -
    157  ecx = 0x0;
    -
    158  cpuid(&eax, &ebx, &ecx, &edx);
    +
    49 #include "simdjson/internal/instruction_set.h"
    +
    50 
    +
    51 #include <cstdint>
    +
    52 #include <cstdlib>
    +
    53 #if defined(_MSC_VER)
    +
    54 #include <intrin.h>
    +
    55 #elif defined(HAVE_GCC_GET_CPUID) && defined(USE_GCC_GET_CPUID)
    +
    56 #include <cpuid.h>
    +
    57 #endif
    +
    58 
    +
    59 namespace simdjson {
    +
    60 namespace internal {
    +
    61 
    +
    62 #if defined(__PPC64__)
    +
    63 
    +
    64 static inline uint32_t detect_supported_architectures() {
    +
    65  return instruction_set::ALTIVEC;
    +
    66 }
    +
    67 
    +
    68 #elif defined(__aarch64__) || defined(_M_ARM64)
    +
    69 
    +
    70 static inline uint32_t detect_supported_architectures() {
    +
    71  return instruction_set::NEON;
    +
    72 }
    +
    73 
    +
    74 #elif defined(__x86_64__) || defined(_M_AMD64) // x64
    +
    75 
    +
    76 
    +
    77 namespace {
    +
    78 // Can be found on Intel ISA Reference for CPUID
    +
    79 constexpr uint32_t cpuid_avx2_bit = 1 << 5;
    +
    80 constexpr uint32_t cpuid_bmi1_bit = 1 << 3;
    +
    81 constexpr uint32_t cpuid_bmi2_bit = 1 << 8;
    +
    82 constexpr uint32_t cpuid_avx512f_bit = 1 << 16;
    +
    83 constexpr uint32_t cpuid_avx512dq_bit = 1 << 17;
    +
    84 constexpr uint32_t cpuid_avx512ifma_bit = 1 << 21;
    +
    85 constexpr uint32_t cpuid_avx512pf_bit = 1 << 26;
    +
    86 constexpr uint32_t cpuid_avx512er_bit = 1 << 27;
    +
    87 constexpr uint32_t cpuid_avx512cd_bit = 1 << 28;
    +
    88 constexpr uint32_t cpuid_avx512bw_bit = 1 << 30;
    +
    89 constexpr uint32_t cpuid_avx512vl_bit = 1U << 31;
    +
    90 constexpr uint32_t cpuid_avx512vbmi2_bit = 1 << 6;
    +
    91 constexpr uint64_t cpuid_avx256_saved = uint64_t(1) << 2;
    +
    92 constexpr uint64_t cpuid_avx512_saved = uint64_t(7) << 5;
    +
    93 constexpr uint32_t cpuid_sse42_bit = 1 << 20;
    +
    94 constexpr uint32_t cpuid_osxsave = (uint32_t(1) << 26) | (uint32_t(1) << 27);
    +
    95 constexpr uint32_t cpuid_pclmulqdq_bit = 1 << 1;
    +
    96 }
    +
    97 
    +
    98 
    +
    99 
    +
    100 static inline void cpuid(uint32_t *eax, uint32_t *ebx, uint32_t *ecx,
    +
    101  uint32_t *edx) {
    +
    102 #if defined(_MSC_VER)
    +
    103  int cpu_info[4];
    +
    104  __cpuidex(cpu_info, *eax, *ecx);
    +
    105  *eax = cpu_info[0];
    +
    106  *ebx = cpu_info[1];
    +
    107  *ecx = cpu_info[2];
    +
    108  *edx = cpu_info[3];
    +
    109 #elif defined(HAVE_GCC_GET_CPUID) && defined(USE_GCC_GET_CPUID)
    +
    110  uint32_t level = *eax;
    +
    111  __get_cpuid(level, eax, ebx, ecx, edx);
    +
    112 #else
    +
    113  uint32_t a = *eax, b, c = *ecx, d;
    +
    114  asm volatile("cpuid\n\t" : "+a"(a), "=b"(b), "+c"(c), "=d"(d));
    +
    115  *eax = a;
    +
    116  *ebx = b;
    +
    117  *ecx = c;
    +
    118  *edx = d;
    +
    119 #endif
    +
    120 }
    +
    121 
    +
    122 
    +
    123 static inline uint64_t xgetbv() {
    +
    124 #if defined(_MSC_VER)
    +
    125  return _xgetbv(0);
    +
    126 #else
    +
    127  uint32_t xcr0_lo, xcr0_hi;
    +
    128  asm volatile("xgetbv\n\t" : "=a" (xcr0_lo), "=d" (xcr0_hi) : "c" (0));
    +
    129  return xcr0_lo | (uint64_t(xcr0_hi) << 32);
    +
    130 #endif
    +
    131 }
    +
    132 
    +
    133 static inline uint32_t detect_supported_architectures() {
    +
    134  uint32_t eax, ebx, ecx, edx;
    +
    135  uint32_t host_isa = 0x0;
    +
    136 
    +
    137  // EBX for EAX=0x1
    +
    138  eax = 0x1;
    +
    139  ecx = 0x0;
    +
    140  cpuid(&eax, &ebx, &ecx, &edx);
    +
    141 
    +
    142  if (ecx & cpuid_sse42_bit) {
    +
    143  host_isa |= instruction_set::SSE42;
    +
    144  } else {
    +
    145  return host_isa; // everything after is redundant
    +
    146  }
    +
    147 
    +
    148  if (ecx & cpuid_pclmulqdq_bit) {
    +
    149  host_isa |= instruction_set::PCLMULQDQ;
    +
    150  }
    +
    151 
    +
    152 
    +
    153  if ((ecx & cpuid_osxsave) != cpuid_osxsave) {
    +
    154  return host_isa;
    +
    155  }
    +
    156 
    +
    157  // xgetbv for checking if the OS saves registers
    +
    158  uint64_t xcr0 = xgetbv();
    159 
    -
    160  if (ecx & cpuid_sse42_bit) {
    -
    161  host_isa |= instruction_set::SSE42;
    -
    162  } else {
    -
    163  return host_isa; // everything after is redundant
    -
    164  }
    -
    165 
    -
    166  if (ecx & cpuid_pclmulqdq_bit) {
    -
    167  host_isa |= instruction_set::PCLMULQDQ;
    -
    168  }
    -
    169 
    -
    170 
    -
    171  if ((ecx & cpuid_osxsave) != cpuid_osxsave) {
    -
    172  return host_isa;
    +
    160  if ((xcr0 & cpuid_avx256_saved) == 0) {
    +
    161  return host_isa;
    +
    162  }
    +
    163 
    +
    164  // ECX for EAX=0x7
    +
    165  eax = 0x7;
    +
    166  ecx = 0x0;
    +
    167  cpuid(&eax, &ebx, &ecx, &edx);
    +
    168  if (ebx & cpuid_avx2_bit) {
    +
    169  host_isa |= instruction_set::AVX2;
    +
    170  }
    +
    171  if (ebx & cpuid_bmi1_bit) {
    +
    172  host_isa |= instruction_set::BMI1;
    173  }
    174 
    -
    175  // xgetbv for checking if the OS saves registers
    -
    176  uint64_t xcr0 = xgetbv();
    -
    177 
    -
    178  if ((xcr0 & cpuid_avx256_saved) == 0) {
    -
    179  return host_isa;
    -
    180  }
    -
    181 
    -
    182  // ECX for EAX=0x7
    -
    183  eax = 0x7;
    -
    184  ecx = 0x0;
    -
    185  cpuid(&eax, &ebx, &ecx, &edx);
    -
    186  if (ebx & cpuid_avx2_bit) {
    -
    187  host_isa |= instruction_set::AVX2;
    -
    188  }
    -
    189  if (ebx & cpuid_bmi1_bit) {
    -
    190  host_isa |= instruction_set::BMI1;
    -
    191  }
    -
    192 
    -
    193  if (ebx & cpuid_bmi2_bit) {
    -
    194  host_isa |= instruction_set::BMI2;
    -
    195  }
    -
    196 
    -
    197  if (!((xcr0 & cpuid_avx512_saved) == cpuid_avx512_saved)) {
    -
    198  return host_isa;
    -
    199  }
    -
    200 
    -
    201  if (ebx & cpuid_avx512f_bit) {
    -
    202  host_isa |= instruction_set::AVX512F;
    -
    203  }
    -
    204 
    -
    205  if (ebx & cpuid_avx512dq_bit) {
    -
    206  host_isa |= instruction_set::AVX512DQ;
    -
    207  }
    -
    208 
    -
    209  if (ebx & cpuid_avx512ifma_bit) {
    -
    210  host_isa |= instruction_set::AVX512IFMA;
    -
    211  }
    -
    212 
    -
    213  if (ebx & cpuid_avx512pf_bit) {
    -
    214  host_isa |= instruction_set::AVX512PF;
    -
    215  }
    -
    216 
    -
    217  if (ebx & cpuid_avx512er_bit) {
    -
    218  host_isa |= instruction_set::AVX512ER;
    -
    219  }
    -
    220 
    -
    221  if (ebx & cpuid_avx512cd_bit) {
    -
    222  host_isa |= instruction_set::AVX512CD;
    -
    223  }
    -
    224 
    -
    225  if (ebx & cpuid_avx512bw_bit) {
    -
    226  host_isa |= instruction_set::AVX512BW;
    -
    227  }
    +
    175  if (ebx & cpuid_bmi2_bit) {
    +
    176  host_isa |= instruction_set::BMI2;
    +
    177  }
    +
    178 
    +
    179  if (!((xcr0 & cpuid_avx512_saved) == cpuid_avx512_saved)) {
    +
    180  return host_isa;
    +
    181  }
    +
    182 
    +
    183  if (ebx & cpuid_avx512f_bit) {
    +
    184  host_isa |= instruction_set::AVX512F;
    +
    185  }
    +
    186 
    +
    187  if (ebx & cpuid_avx512dq_bit) {
    +
    188  host_isa |= instruction_set::AVX512DQ;
    +
    189  }
    +
    190 
    +
    191  if (ebx & cpuid_avx512ifma_bit) {
    +
    192  host_isa |= instruction_set::AVX512IFMA;
    +
    193  }
    +
    194 
    +
    195  if (ebx & cpuid_avx512pf_bit) {
    +
    196  host_isa |= instruction_set::AVX512PF;
    +
    197  }
    +
    198 
    +
    199  if (ebx & cpuid_avx512er_bit) {
    +
    200  host_isa |= instruction_set::AVX512ER;
    +
    201  }
    +
    202 
    +
    203  if (ebx & cpuid_avx512cd_bit) {
    +
    204  host_isa |= instruction_set::AVX512CD;
    +
    205  }
    +
    206 
    +
    207  if (ebx & cpuid_avx512bw_bit) {
    +
    208  host_isa |= instruction_set::AVX512BW;
    +
    209  }
    +
    210 
    +
    211  if (ebx & cpuid_avx512vl_bit) {
    +
    212  host_isa |= instruction_set::AVX512VL;
    +
    213  }
    +
    214 
    +
    215  if (ecx & cpuid_avx512vbmi2_bit) {
    +
    216  host_isa |= instruction_set::AVX512VBMI2;
    +
    217  }
    +
    218 
    +
    219  return host_isa;
    +
    220 }
    +
    221 #else // fallback
    +
    222 
    +
    223 
    +
    224 static inline uint32_t detect_supported_architectures() {
    +
    225  return instruction_set::DEFAULT;
    +
    226 }
    +
    227 
    228 
    -
    229  if (ebx & cpuid_avx512vl_bit) {
    -
    230  host_isa |= instruction_set::AVX512VL;
    -
    231  }
    -
    232 
    -
    233  if (ecx & cpuid_avx512vbmi2_bit) {
    -
    234  host_isa |= instruction_set::AVX512VBMI2;
    -
    235  }
    -
    236 
    -
    237  return host_isa;
    -
    238 }
    -
    239 #else // fallback
    -
    240 
    -
    241 
    -
    242 static inline uint32_t detect_supported_architectures() {
    -
    243  return instruction_set::DEFAULT;
    -
    244 }
    -
    245 
    -
    246 
    -
    247 #endif // end SIMD extension detection code
    -
    248 
    -
    249 } // namespace internal
    -
    250 } // namespace simdjson
    -
    251 
    -
    252 #endif // SIMDJSON_INTERNAL_ISADETECTION_H
    -
    We want to support argument-dependent lookup (ADL).
    +
    229 #endif // end SIMD extension detection code
    +
    230 
    +
    231 } // namespace internal
    +
    232 } // namespace simdjson
    +
    233 
    +
    234 #endif // SIMDJSON_INTERNAL_ISADETECTION_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/json__iterator-inl_8h_source.html b/json__iterator-inl_8h_source.html index ff9f352ba..d5c289080 100644 --- a/json__iterator-inl_8h_source.html +++ b/json__iterator-inl_8h_source.html @@ -91,402 +91,417 @@ $(document).ready(function(){initNavTree('json__iterator-inl_8h_source.html','')
    json_iterator-inl.h
    -
    1 namespace simdjson {
    -
    2 namespace SIMDJSON_IMPLEMENTATION {
    -
    3 namespace ondemand {
    -
    4 
    -
    5 simdjson_inline json_iterator::json_iterator(json_iterator &&other) noexcept
    -
    6  : token(std::forward<token_iterator>(other.token)),
    -
    7  parser{other.parser},
    -
    8  _string_buf_loc{other._string_buf_loc},
    -
    9  error{other.error},
    -
    10  _depth{other._depth},
    -
    11  _root{other._root},
    -
    12  _streaming{other._streaming}
    -
    13 {
    -
    14  other.parser = nullptr;
    -
    15 }
    -
    16 simdjson_inline json_iterator &json_iterator::operator=(json_iterator &&other) noexcept {
    -
    17  token = other.token;
    -
    18  parser = other.parser;
    -
    19  _string_buf_loc = other._string_buf_loc;
    -
    20  error = other.error;
    -
    21  _depth = other._depth;
    -
    22  _root = other._root;
    -
    23  _streaming = other._streaming;
    -
    24  other.parser = nullptr;
    -
    25  return *this;
    -
    26 }
    -
    27 
    -
    28 simdjson_inline json_iterator::json_iterator(const uint8_t *buf, ondemand::parser *_parser) noexcept
    -
    29  : token(buf, &_parser->implementation->structural_indexes[0]),
    -
    30  parser{_parser},
    -
    31  _string_buf_loc{parser->string_buf.get()},
    -
    32  _depth{1},
    -
    33  _root{parser->implementation->structural_indexes.get()},
    -
    34  _streaming{false}
    -
    35 
    -
    36 {
    -
    37  logger::log_headers();
    -
    38 #if SIMDJSON_CHECK_EOF
    -
    39  assert_more_tokens();
    -
    40 #endif
    -
    41 }
    -
    42 
    -
    43 inline void json_iterator::rewind() noexcept {
    -
    44  token.set_position( root_position() );
    -
    45  logger::log_headers(); // We start again
    -
    46  _string_buf_loc = parser->string_buf.get();
    -
    47  _depth = 1;
    -
    48 }
    -
    49 
    -
    50 inline bool json_iterator::balanced() const noexcept {
    -
    51  token_iterator ti(token);
    -
    52  int32_t count{0};
    -
    53  ti.set_position( root_position() );
    -
    54  while(ti.peek() <= peek_last()) {
    -
    55  switch (*ti.return_current_and_advance())
    -
    56  {
    -
    57  case '[': case '{':
    -
    58  count++;
    -
    59  break;
    -
    60  case ']': case '}':
    -
    61  count--;
    -
    62  break;
    -
    63  default:
    -
    64  break;
    -
    65  }
    -
    66  }
    -
    67  return count == 0;
    -
    68 }
    -
    69 
    -
    70 
    -
    71 // GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller
    -
    72 // relating depth and parent_depth, which is a desired effect. The warning does not show up if the
    -
    73 // skip_child() function is not marked inline).
    -
    74 SIMDJSON_PUSH_DISABLE_WARNINGS
    -
    75 SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING
    -
    76 simdjson_warn_unused simdjson_inline error_code json_iterator::skip_child(depth_t parent_depth) noexcept {
    -
    77  if (depth() <= parent_depth) { return SUCCESS; }
    -
    78  switch (*return_current_and_advance()) {
    -
    79  // TODO consider whether matching braces is a requirement: if non-matching braces indicates
    -
    80  // *missing* braces, then future lookups are not in the object/arrays they think they are,
    -
    81  // violating the rule "validate enough structure that the user can be confident they are
    -
    82  // looking at the right values."
    -
    83  // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth
    -
    84 
    -
    85  // For the first open array/object in a value, we've already incremented depth, so keep it the same
    -
    86  // We never stop at colon, but if we did, it wouldn't affect depth
    -
    87  case '[': case '{': case ':':
    -
    88  logger::log_start_value(*this, "skip");
    -
    89  break;
    -
    90  // If there is a comma, we have just finished a value in an array/object, and need to get back in
    -
    91  case ',':
    -
    92  logger::log_value(*this, "skip");
    -
    93  break;
    -
    94  // ] or } means we just finished a value and need to jump out of the array/object
    -
    95  case ']': case '}':
    -
    96  logger::log_end_value(*this, "skip");
    -
    97  _depth--;
    -
    98  if (depth() <= parent_depth) { return SUCCESS; }
    -
    99 #if SIMDJSON_CHECK_EOF
    -
    100  // If there are no more tokens, the parent is incomplete.
    -
    101  if (at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "Missing [ or { at start"); }
    -
    102 #endif // SIMDJSON_CHECK_EOF
    -
    103  break;
    -
    104  case '"':
    -
    105  if(*peek() == ':') {
    -
    106  // We are at a key!!!
    -
    107  // This might happen if you just started an object and you skip it immediately.
    -
    108  // Performance note: it would be nice to get rid of this check as it is somewhat
    -
    109  // expensive.
    -
    110  // https://github.com/simdjson/simdjson/issues/1742
    -
    111  logger::log_value(*this, "key");
    -
    112  return_current_and_advance(); // eat up the ':'
    -
    113  break; // important!!!
    -
    114  }
    -
    115  simdjson_fallthrough;
    -
    116  // Anything else must be a scalar value
    -
    117  default:
    -
    118  // For the first scalar, we will have incremented depth already, so we decrement it here.
    -
    119  logger::log_value(*this, "skip");
    -
    120  _depth--;
    -
    121  if (depth() <= parent_depth) { return SUCCESS; }
    -
    122  break;
    -
    123  }
    -
    124 
    -
    125  // Now that we've considered the first value, we only increment/decrement for arrays/objects
    -
    126  while (position() < end_position()) {
    -
    127  switch (*return_current_and_advance()) {
    -
    128  case '[': case '{':
    -
    129  logger::log_start_value(*this, "skip");
    -
    130  _depth++;
    -
    131  break;
    -
    132  // TODO consider whether matching braces is a requirement: if non-matching braces indicates
    -
    133  // *missing* braces, then future lookups are not in the object/arrays they think they are,
    -
    134  // violating the rule "validate enough structure that the user can be confident they are
    -
    135  // looking at the right values."
    -
    136  // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth
    -
    137  case ']': case '}':
    -
    138  logger::log_end_value(*this, "skip");
    -
    139  _depth--;
    -
    140  if (depth() <= parent_depth) { return SUCCESS; }
    -
    141  break;
    -
    142  default:
    -
    143  logger::log_value(*this, "skip", "");
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/ondemand/json_iterator.h"
    +
    7 #include "simdjson/generic/ondemand/parser.h"
    +
    8 #include "simdjson/generic/ondemand/raw_json_string.h"
    +
    9 #include "simdjson/generic/ondemand/logger-inl.h"
    +
    10 #include "simdjson/generic/ondemand/parser-inl.h"
    +
    11 #include "simdjson/generic/ondemand/token_iterator-inl.h"
    +
    12 #endif // SIMDJSON_AMALGAMATED
    +
    13 
    +
    14 namespace simdjson {
    +
    15 namespace SIMDJSON_IMPLEMENTATION {
    +
    16 namespace ondemand {
    +
    17 
    +
    18 simdjson_inline json_iterator::json_iterator(json_iterator &&other) noexcept
    +
    19  : token(std::forward<token_iterator>(other.token)),
    +
    20  parser{other.parser},
    +
    21  _string_buf_loc{other._string_buf_loc},
    +
    22  error{other.error},
    +
    23  _depth{other._depth},
    +
    24  _root{other._root},
    +
    25  _streaming{other._streaming}
    +
    26 {
    +
    27  other.parser = nullptr;
    +
    28 }
    +
    29 simdjson_inline json_iterator &json_iterator::operator=(json_iterator &&other) noexcept {
    +
    30  token = other.token;
    +
    31  parser = other.parser;
    +
    32  _string_buf_loc = other._string_buf_loc;
    +
    33  error = other.error;
    +
    34  _depth = other._depth;
    +
    35  _root = other._root;
    +
    36  _streaming = other._streaming;
    +
    37  other.parser = nullptr;
    +
    38  return *this;
    +
    39 }
    +
    40 
    +
    41 simdjson_inline json_iterator::json_iterator(const uint8_t *buf, ondemand::parser *_parser) noexcept
    +
    42  : token(buf, &_parser->implementation->structural_indexes[0]),
    +
    43  parser{_parser},
    +
    44  _string_buf_loc{parser->string_buf.get()},
    +
    45  _depth{1},
    +
    46  _root{parser->implementation->structural_indexes.get()},
    +
    47  _streaming{false}
    +
    48 
    +
    49 {
    +
    50  logger::log_headers();
    +
    51 #if SIMDJSON_CHECK_EOF
    +
    52  assert_more_tokens();
    +
    53 #endif
    +
    54 }
    +
    55 
    +
    56 inline void json_iterator::rewind() noexcept {
    +
    57  token.set_position( root_position() );
    +
    58  logger::log_headers(); // We start again
    +
    59  _string_buf_loc = parser->string_buf.get();
    +
    60  _depth = 1;
    +
    61 }
    +
    62 
    +
    63 inline bool json_iterator::balanced() const noexcept {
    +
    64  token_iterator ti(token);
    +
    65  int32_t count{0};
    +
    66  ti.set_position( root_position() );
    +
    67  while(ti.peek() <= peek_last()) {
    +
    68  switch (*ti.return_current_and_advance())
    +
    69  {
    +
    70  case '[': case '{':
    +
    71  count++;
    +
    72  break;
    +
    73  case ']': case '}':
    +
    74  count--;
    +
    75  break;
    +
    76  default:
    +
    77  break;
    +
    78  }
    +
    79  }
    +
    80  return count == 0;
    +
    81 }
    +
    82 
    +
    83 
    +
    84 // GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller
    +
    85 // relating depth and parent_depth, which is a desired effect. The warning does not show up if the
    +
    86 // skip_child() function is not marked inline).
    +
    87 SIMDJSON_PUSH_DISABLE_WARNINGS
    +
    88 SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING
    +
    89 simdjson_warn_unused simdjson_inline error_code json_iterator::skip_child(depth_t parent_depth) noexcept {
    +
    90  if (depth() <= parent_depth) { return SUCCESS; }
    +
    91  switch (*return_current_and_advance()) {
    +
    92  // TODO consider whether matching braces is a requirement: if non-matching braces indicates
    +
    93  // *missing* braces, then future lookups are not in the object/arrays they think they are,
    +
    94  // violating the rule "validate enough structure that the user can be confident they are
    +
    95  // looking at the right values."
    +
    96  // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth
    +
    97 
    +
    98  // For the first open array/object in a value, we've already incremented depth, so keep it the same
    +
    99  // We never stop at colon, but if we did, it wouldn't affect depth
    +
    100  case '[': case '{': case ':':
    +
    101  logger::log_start_value(*this, "skip");
    +
    102  break;
    +
    103  // If there is a comma, we have just finished a value in an array/object, and need to get back in
    +
    104  case ',':
    +
    105  logger::log_value(*this, "skip");
    +
    106  break;
    +
    107  // ] or } means we just finished a value and need to jump out of the array/object
    +
    108  case ']': case '}':
    +
    109  logger::log_end_value(*this, "skip");
    +
    110  _depth--;
    +
    111  if (depth() <= parent_depth) { return SUCCESS; }
    +
    112 #if SIMDJSON_CHECK_EOF
    +
    113  // If there are no more tokens, the parent is incomplete.
    +
    114  if (at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "Missing [ or { at start"); }
    +
    115 #endif // SIMDJSON_CHECK_EOF
    +
    116  break;
    +
    117  case '"':
    +
    118  if(*peek() == ':') {
    +
    119  // We are at a key!!!
    +
    120  // This might happen if you just started an object and you skip it immediately.
    +
    121  // Performance note: it would be nice to get rid of this check as it is somewhat
    +
    122  // expensive.
    +
    123  // https://github.com/simdjson/simdjson/issues/1742
    +
    124  logger::log_value(*this, "key");
    +
    125  return_current_and_advance(); // eat up the ':'
    +
    126  break; // important!!!
    +
    127  }
    +
    128  simdjson_fallthrough;
    +
    129  // Anything else must be a scalar value
    +
    130  default:
    +
    131  // For the first scalar, we will have incremented depth already, so we decrement it here.
    +
    132  logger::log_value(*this, "skip");
    +
    133  _depth--;
    +
    134  if (depth() <= parent_depth) { return SUCCESS; }
    +
    135  break;
    +
    136  }
    +
    137 
    +
    138  // Now that we've considered the first value, we only increment/decrement for arrays/objects
    +
    139  while (position() < end_position()) {
    +
    140  switch (*return_current_and_advance()) {
    +
    141  case '[': case '{':
    +
    142  logger::log_start_value(*this, "skip");
    +
    143  _depth++;
    144  break;
    -
    145  }
    -
    146  }
    -
    147 
    -
    148  return report_error(TAPE_ERROR, "not enough close braces");
    -
    149 }
    -
    150 
    -
    151 SIMDJSON_POP_DISABLE_WARNINGS
    -
    152 
    -
    153 simdjson_inline bool json_iterator::at_root() const noexcept {
    -
    154  return position() == root_position();
    -
    155 }
    -
    156 
    -
    157 simdjson_inline bool json_iterator::is_single_token() const noexcept {
    -
    158  return parser->implementation->n_structural_indexes == 1;
    -
    159 }
    +
    145  // TODO consider whether matching braces is a requirement: if non-matching braces indicates
    +
    146  // *missing* braces, then future lookups are not in the object/arrays they think they are,
    +
    147  // violating the rule "validate enough structure that the user can be confident they are
    +
    148  // looking at the right values."
    +
    149  // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth
    +
    150  case ']': case '}':
    +
    151  logger::log_end_value(*this, "skip");
    +
    152  _depth--;
    +
    153  if (depth() <= parent_depth) { return SUCCESS; }
    +
    154  break;
    +
    155  default:
    +
    156  logger::log_value(*this, "skip", "");
    +
    157  break;
    +
    158  }
    +
    159  }
    160 
    -
    161 simdjson_inline bool json_iterator::streaming() const noexcept {
    -
    162  return _streaming;
    -
    163 }
    -
    164 
    -
    165 simdjson_inline token_position json_iterator::root_position() const noexcept {
    -
    166  return _root;
    -
    167 }
    -
    168 
    -
    169 simdjson_inline void json_iterator::assert_at_document_depth() const noexcept {
    -
    170  SIMDJSON_ASSUME( _depth == 1 );
    -
    171 }
    -
    172 
    -
    173 simdjson_inline void json_iterator::assert_at_root() const noexcept {
    -
    174  SIMDJSON_ASSUME( _depth == 1 );
    -
    175 #ifndef SIMDJSON_CLANG_VISUAL_STUDIO
    -
    176  // Under Visual Studio, the next SIMDJSON_ASSUME fails with: the argument
    -
    177  // has side effects that will be discarded.
    -
    178  SIMDJSON_ASSUME( token.position() == _root );
    -
    179 #endif
    +
    161  return report_error(TAPE_ERROR, "not enough close braces");
    +
    162 }
    +
    163 
    +
    164 SIMDJSON_POP_DISABLE_WARNINGS
    +
    165 
    +
    166 simdjson_inline bool json_iterator::at_root() const noexcept {
    +
    167  return position() == root_position();
    +
    168 }
    +
    169 
    +
    170 simdjson_inline bool json_iterator::is_single_token() const noexcept {
    +
    171  return parser->implementation->n_structural_indexes == 1;
    +
    172 }
    +
    173 
    +
    174 simdjson_inline bool json_iterator::streaming() const noexcept {
    +
    175  return _streaming;
    +
    176 }
    +
    177 
    +
    178 simdjson_inline token_position json_iterator::root_position() const noexcept {
    +
    179  return _root;
    180 }
    181 
    -
    182 simdjson_inline void json_iterator::assert_more_tokens(uint32_t required_tokens) const noexcept {
    -
    183  assert_valid_position(token._position + required_tokens - 1);
    +
    182 simdjson_inline void json_iterator::assert_at_document_depth() const noexcept {
    +
    183  SIMDJSON_ASSUME( _depth == 1 );
    184 }
    185 
    -
    186 simdjson_inline void json_iterator::assert_valid_position(token_position position) const noexcept {
    -
    187 #ifndef SIMDJSON_CLANG_VISUAL_STUDIO
    -
    188  SIMDJSON_ASSUME( position >= &parser->implementation->structural_indexes[0] );
    -
    189  SIMDJSON_ASSUME( position < &parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] );
    -
    190 #endif
    -
    191 }
    -
    192 
    -
    193 simdjson_inline bool json_iterator::at_end() const noexcept {
    -
    194  return position() == end_position();
    -
    195 }
    -
    196 simdjson_inline token_position json_iterator::end_position() const noexcept {
    -
    197  uint32_t n_structural_indexes{parser->implementation->n_structural_indexes};
    -
    198  return &parser->implementation->structural_indexes[n_structural_indexes];
    -
    199 }
    -
    200 
    -
    201 inline std::string json_iterator::to_string() const noexcept {
    -
    202  if( !is_alive() ) { return "dead json_iterator instance"; }
    -
    203  const char * current_structural = reinterpret_cast<const char *>(token.peek());
    -
    204  return std::string("json_iterator [ depth : ") + std::to_string(_depth)
    -
    205  + std::string(", structural : '") + std::string(current_structural,1)
    -
    206  + std::string("', offset : ") + std::to_string(token.current_offset())
    -
    207  + std::string("', error : ") + error_message(error)
    -
    208  + std::string(" ]");
    -
    209 }
    -
    210 
    -
    211 inline simdjson_result<const char *> json_iterator::current_location() const noexcept {
    -
    212  if (!is_alive()) { // Unrecoverable error
    -
    213  if (!at_root()) {
    -
    214  return reinterpret_cast<const char *>(token.peek(-1));
    -
    215  } else {
    -
    216  return reinterpret_cast<const char *>(token.peek());
    -
    217  }
    -
    218  }
    -
    219  if (at_end()) {
    -
    220  return OUT_OF_BOUNDS;
    -
    221  }
    -
    222  return reinterpret_cast<const char *>(token.peek());
    -
    223 }
    -
    224 
    -
    225 simdjson_inline bool json_iterator::is_alive() const noexcept {
    -
    226  return parser;
    -
    227 }
    -
    228 
    -
    229 simdjson_inline void json_iterator::abandon() noexcept {
    -
    230  parser = nullptr;
    -
    231  _depth = 0;
    -
    232 }
    -
    233 
    -
    234 simdjson_inline const uint8_t *json_iterator::return_current_and_advance() noexcept {
    -
    235 #if SIMDJSON_CHECK_EOF
    -
    236  assert_more_tokens();
    -
    237 #endif // SIMDJSON_CHECK_EOF
    -
    238  return token.return_current_and_advance();
    -
    239 }
    -
    240 
    -
    241 simdjson_inline const uint8_t *json_iterator::unsafe_pointer() const noexcept {
    -
    242  // deliberately done without safety guard:
    -
    243  return token.peek(0);
    -
    244 }
    -
    245 
    -
    246 simdjson_inline const uint8_t *json_iterator::peek(int32_t delta) const noexcept {
    -
    247 #if SIMDJSON_CHECK_EOF
    -
    248  assert_more_tokens(delta+1);
    -
    249 #endif // SIMDJSON_CHECK_EOF
    -
    250  return token.peek(delta);
    -
    251 }
    -
    252 
    -
    253 simdjson_inline uint32_t json_iterator::peek_length(int32_t delta) const noexcept {
    -
    254 #if SIMDJSON_CHECK_EOF
    -
    255  assert_more_tokens(delta+1);
    -
    256 #endif // #if SIMDJSON_CHECK_EOF
    -
    257  return token.peek_length(delta);
    -
    258 }
    -
    259 
    -
    260 simdjson_inline const uint8_t *json_iterator::peek(token_position position) const noexcept {
    -
    261  // todo: currently we require end-of-string buffering, but the following
    -
    262  // assert_valid_position should be turned on if/when we lift that condition.
    -
    263  // assert_valid_position(position);
    -
    264  // This is almost surely related to SIMDJSON_CHECK_EOF but given that SIMDJSON_CHECK_EOF
    -
    265  // is ON by default, we have no choice but to disable it for real with a comment.
    -
    266  return token.peek(position);
    -
    267 }
    -
    268 
    -
    269 simdjson_inline uint32_t json_iterator::peek_length(token_position position) const noexcept {
    -
    270 #if SIMDJSON_CHECK_EOF
    -
    271  assert_valid_position(position);
    -
    272 #endif // SIMDJSON_CHECK_EOF
    -
    273  return token.peek_length(position);
    -
    274 }
    -
    275 
    -
    276 simdjson_inline token_position json_iterator::last_position() const noexcept {
    -
    277  // The following line fails under some compilers...
    -
    278  // SIMDJSON_ASSUME(parser->implementation->n_structural_indexes > 0);
    -
    279  // since it has side-effects.
    -
    280  uint32_t n_structural_indexes{parser->implementation->n_structural_indexes};
    -
    281  SIMDJSON_ASSUME(n_structural_indexes > 0);
    -
    282  return &parser->implementation->structural_indexes[n_structural_indexes - 1];
    -
    283 }
    -
    284 simdjson_inline const uint8_t *json_iterator::peek_last() const noexcept {
    -
    285  return token.peek(last_position());
    -
    286 }
    -
    287 
    -
    288 simdjson_inline void json_iterator::ascend_to(depth_t parent_depth) noexcept {
    -
    289  SIMDJSON_ASSUME(parent_depth >= 0 && parent_depth < INT32_MAX - 1);
    -
    290  SIMDJSON_ASSUME(_depth == parent_depth + 1);
    -
    291  _depth = parent_depth;
    -
    292 }
    -
    293 
    -
    294 simdjson_inline void json_iterator::descend_to(depth_t child_depth) noexcept {
    -
    295  SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX);
    -
    296  SIMDJSON_ASSUME(_depth == child_depth - 1);
    -
    297  _depth = child_depth;
    -
    298 }
    -
    299 
    -
    300 simdjson_inline depth_t json_iterator::depth() const noexcept {
    -
    301  return _depth;
    -
    302 }
    -
    303 
    -
    304 simdjson_inline uint8_t *&json_iterator::string_buf_loc() noexcept {
    -
    305  return _string_buf_loc;
    -
    306 }
    -
    307 
    -
    308 simdjson_inline error_code json_iterator::report_error(error_code _error, const char *message) noexcept {
    -
    309  SIMDJSON_ASSUME(_error != SUCCESS && _error != UNINITIALIZED && _error != INCORRECT_TYPE && _error != NO_SUCH_FIELD);
    -
    310  logger::log_error(*this, message);
    -
    311  error = _error;
    -
    312  return error;
    -
    313 }
    -
    314 
    -
    315 simdjson_inline token_position json_iterator::position() const noexcept {
    -
    316  return token.position();
    -
    317 }
    -
    318 
    -
    319 simdjson_inline simdjson_result<std::string_view> json_iterator::unescape(raw_json_string in, bool allow_replacement) noexcept {
    -
    320  return parser->unescape(in, _string_buf_loc, allow_replacement);
    -
    321 }
    -
    322 
    -
    323 simdjson_inline simdjson_result<std::string_view> json_iterator::unescape_wobbly(raw_json_string in) noexcept {
    -
    324  return parser->unescape_wobbly(in, _string_buf_loc);
    -
    325 }
    -
    326 
    -
    327 simdjson_inline void json_iterator::reenter_child(token_position position, depth_t child_depth) noexcept {
    -
    328  SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX);
    -
    329  SIMDJSON_ASSUME(_depth == child_depth - 1);
    -
    330 #if SIMDJSON_DEVELOPMENT_CHECKS
    -
    331 #ifndef SIMDJSON_CLANG_VISUAL_STUDIO
    -
    332  SIMDJSON_ASSUME(size_t(child_depth) < parser->max_depth());
    -
    333  SIMDJSON_ASSUME(position >= parser->start_positions[child_depth]);
    -
    334 #endif
    -
    335 #endif
    -
    336  token.set_position(position);
    -
    337  _depth = child_depth;
    +
    186 simdjson_inline void json_iterator::assert_at_root() const noexcept {
    +
    187  SIMDJSON_ASSUME( _depth == 1 );
    +
    188 #ifndef SIMDJSON_CLANG_VISUAL_STUDIO
    +
    189  // Under Visual Studio, the next SIMDJSON_ASSUME fails with: the argument
    +
    190  // has side effects that will be discarded.
    +
    191  SIMDJSON_ASSUME( token.position() == _root );
    +
    192 #endif
    +
    193 }
    +
    194 
    +
    195 simdjson_inline void json_iterator::assert_more_tokens(uint32_t required_tokens) const noexcept {
    +
    196  assert_valid_position(token._position + required_tokens - 1);
    +
    197 }
    +
    198 
    +
    199 simdjson_inline void json_iterator::assert_valid_position(token_position position) const noexcept {
    +
    200 #ifndef SIMDJSON_CLANG_VISUAL_STUDIO
    +
    201  SIMDJSON_ASSUME( position >= &parser->implementation->structural_indexes[0] );
    +
    202  SIMDJSON_ASSUME( position < &parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] );
    +
    203 #endif
    +
    204 }
    +
    205 
    +
    206 simdjson_inline bool json_iterator::at_end() const noexcept {
    +
    207  return position() == end_position();
    +
    208 }
    +
    209 simdjson_inline token_position json_iterator::end_position() const noexcept {
    +
    210  uint32_t n_structural_indexes{parser->implementation->n_structural_indexes};
    +
    211  return &parser->implementation->structural_indexes[n_structural_indexes];
    +
    212 }
    +
    213 
    +
    214 inline std::string json_iterator::to_string() const noexcept {
    +
    215  if( !is_alive() ) { return "dead json_iterator instance"; }
    +
    216  const char * current_structural = reinterpret_cast<const char *>(token.peek());
    +
    217  return std::string("json_iterator [ depth : ") + std::to_string(_depth)
    +
    218  + std::string(", structural : '") + std::string(current_structural,1)
    +
    219  + std::string("', offset : ") + std::to_string(token.current_offset())
    +
    220  + std::string("', error : ") + error_message(error)
    +
    221  + std::string(" ]");
    +
    222 }
    +
    223 
    +
    224 inline simdjson_result<const char *> json_iterator::current_location() const noexcept {
    +
    225  if (!is_alive()) { // Unrecoverable error
    +
    226  if (!at_root()) {
    +
    227  return reinterpret_cast<const char *>(token.peek(-1));
    +
    228  } else {
    +
    229  return reinterpret_cast<const char *>(token.peek());
    +
    230  }
    +
    231  }
    +
    232  if (at_end()) {
    +
    233  return OUT_OF_BOUNDS;
    +
    234  }
    +
    235  return reinterpret_cast<const char *>(token.peek());
    +
    236 }
    +
    237 
    +
    238 simdjson_inline bool json_iterator::is_alive() const noexcept {
    +
    239  return parser;
    +
    240 }
    +
    241 
    +
    242 simdjson_inline void json_iterator::abandon() noexcept {
    +
    243  parser = nullptr;
    +
    244  _depth = 0;
    +
    245 }
    +
    246 
    +
    247 simdjson_inline const uint8_t *json_iterator::return_current_and_advance() noexcept {
    +
    248 #if SIMDJSON_CHECK_EOF
    +
    249  assert_more_tokens();
    +
    250 #endif // SIMDJSON_CHECK_EOF
    +
    251  return token.return_current_and_advance();
    +
    252 }
    +
    253 
    +
    254 simdjson_inline const uint8_t *json_iterator::unsafe_pointer() const noexcept {
    +
    255  // deliberately done without safety guard:
    +
    256  return token.peek(0);
    +
    257 }
    +
    258 
    +
    259 simdjson_inline const uint8_t *json_iterator::peek(int32_t delta) const noexcept {
    +
    260 #if SIMDJSON_CHECK_EOF
    +
    261  assert_more_tokens(delta+1);
    +
    262 #endif // SIMDJSON_CHECK_EOF
    +
    263  return token.peek(delta);
    +
    264 }
    +
    265 
    +
    266 simdjson_inline uint32_t json_iterator::peek_length(int32_t delta) const noexcept {
    +
    267 #if SIMDJSON_CHECK_EOF
    +
    268  assert_more_tokens(delta+1);
    +
    269 #endif // #if SIMDJSON_CHECK_EOF
    +
    270  return token.peek_length(delta);
    +
    271 }
    +
    272 
    +
    273 simdjson_inline const uint8_t *json_iterator::peek(token_position position) const noexcept {
    +
    274  // todo: currently we require end-of-string buffering, but the following
    +
    275  // assert_valid_position should be turned on if/when we lift that condition.
    +
    276  // assert_valid_position(position);
    +
    277  // This is almost surely related to SIMDJSON_CHECK_EOF but given that SIMDJSON_CHECK_EOF
    +
    278  // is ON by default, we have no choice but to disable it for real with a comment.
    +
    279  return token.peek(position);
    +
    280 }
    +
    281 
    +
    282 simdjson_inline uint32_t json_iterator::peek_length(token_position position) const noexcept {
    +
    283 #if SIMDJSON_CHECK_EOF
    +
    284  assert_valid_position(position);
    +
    285 #endif // SIMDJSON_CHECK_EOF
    +
    286  return token.peek_length(position);
    +
    287 }
    +
    288 
    +
    289 simdjson_inline token_position json_iterator::last_position() const noexcept {
    +
    290  // The following line fails under some compilers...
    +
    291  // SIMDJSON_ASSUME(parser->implementation->n_structural_indexes > 0);
    +
    292  // since it has side-effects.
    +
    293  uint32_t n_structural_indexes{parser->implementation->n_structural_indexes};
    +
    294  SIMDJSON_ASSUME(n_structural_indexes > 0);
    +
    295  return &parser->implementation->structural_indexes[n_structural_indexes - 1];
    +
    296 }
    +
    297 simdjson_inline const uint8_t *json_iterator::peek_last() const noexcept {
    +
    298  return token.peek(last_position());
    +
    299 }
    +
    300 
    +
    301 simdjson_inline void json_iterator::ascend_to(depth_t parent_depth) noexcept {
    +
    302  SIMDJSON_ASSUME(parent_depth >= 0 && parent_depth < INT32_MAX - 1);
    +
    303  SIMDJSON_ASSUME(_depth == parent_depth + 1);
    +
    304  _depth = parent_depth;
    +
    305 }
    +
    306 
    +
    307 simdjson_inline void json_iterator::descend_to(depth_t child_depth) noexcept {
    +
    308  SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX);
    +
    309  SIMDJSON_ASSUME(_depth == child_depth - 1);
    +
    310  _depth = child_depth;
    +
    311 }
    +
    312 
    +
    313 simdjson_inline depth_t json_iterator::depth() const noexcept {
    +
    314  return _depth;
    +
    315 }
    +
    316 
    +
    317 simdjson_inline uint8_t *&json_iterator::string_buf_loc() noexcept {
    +
    318  return _string_buf_loc;
    +
    319 }
    +
    320 
    +
    321 simdjson_inline error_code json_iterator::report_error(error_code _error, const char *message) noexcept {
    +
    322  SIMDJSON_ASSUME(_error != SUCCESS && _error != UNINITIALIZED && _error != INCORRECT_TYPE && _error != NO_SUCH_FIELD);
    +
    323  logger::log_error(*this, message);
    +
    324  error = _error;
    +
    325  return error;
    +
    326 }
    +
    327 
    +
    328 simdjson_inline token_position json_iterator::position() const noexcept {
    +
    329  return token.position();
    +
    330 }
    +
    331 
    +
    332 simdjson_inline simdjson_result<std::string_view> json_iterator::unescape(raw_json_string in, bool allow_replacement) noexcept {
    +
    333  return parser->unescape(in, _string_buf_loc, allow_replacement);
    +
    334 }
    +
    335 
    +
    336 simdjson_inline simdjson_result<std::string_view> json_iterator::unescape_wobbly(raw_json_string in) noexcept {
    +
    337  return parser->unescape_wobbly(in, _string_buf_loc);
    338 }
    339 
    -
    340 simdjson_inline error_code json_iterator::consume_character(char c) noexcept {
    -
    341  if (*peek() == c) {
    -
    342  return_current_and_advance();
    -
    343  return SUCCESS;
    -
    344  }
    -
    345  return TAPE_ERROR;
    -
    346 }
    -
    347 
    -
    348 #if SIMDJSON_DEVELOPMENT_CHECKS
    -
    349 
    -
    350 simdjson_inline token_position json_iterator::start_position(depth_t depth) const noexcept {
    -
    351  SIMDJSON_ASSUME(size_t(depth) < parser->max_depth());
    -
    352  return size_t(depth) < parser->max_depth() ? parser->start_positions[depth] : 0;
    -
    353 }
    -
    354 
    -
    355 simdjson_inline void json_iterator::set_start_position(depth_t depth, token_position position) noexcept {
    -
    356  SIMDJSON_ASSUME(size_t(depth) < parser->max_depth());
    -
    357  if(size_t(depth) < parser->max_depth()) { parser->start_positions[depth] = position; }
    -
    358 }
    -
    359 
    -
    360 #endif
    -
    361 
    +
    340 simdjson_inline void json_iterator::reenter_child(token_position position, depth_t child_depth) noexcept {
    +
    341  SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX);
    +
    342  SIMDJSON_ASSUME(_depth == child_depth - 1);
    +
    343 #if SIMDJSON_DEVELOPMENT_CHECKS
    +
    344 #ifndef SIMDJSON_CLANG_VISUAL_STUDIO
    +
    345  SIMDJSON_ASSUME(size_t(child_depth) < parser->max_depth());
    +
    346  SIMDJSON_ASSUME(position >= parser->start_positions[child_depth]);
    +
    347 #endif
    +
    348 #endif
    +
    349  token.set_position(position);
    +
    350  _depth = child_depth;
    +
    351 }
    +
    352 
    +
    353 simdjson_inline error_code json_iterator::consume_character(char c) noexcept {
    +
    354  if (*peek() == c) {
    +
    355  return_current_and_advance();
    +
    356  return SUCCESS;
    +
    357  }
    +
    358  return TAPE_ERROR;
    +
    359 }
    +
    360 
    +
    361 #if SIMDJSON_DEVELOPMENT_CHECKS
    362 
    -
    363 simdjson_inline error_code json_iterator::optional_error(error_code _error, const char *message) noexcept {
    -
    364  SIMDJSON_ASSUME(_error == INCORRECT_TYPE || _error == NO_SUCH_FIELD);
    -
    365  logger::log_error(*this, message);
    -
    366  return _error;
    -
    367 }
    -
    368 
    -
    369 
    -
    370 simdjson_warn_unused simdjson_inline bool json_iterator::copy_to_buffer(const uint8_t *json, uint32_t max_len, uint8_t *tmpbuf, size_t N) noexcept {
    -
    371  // This function is not expected to be called in performance-sensitive settings.
    -
    372  // Let us guard against silly cases:
    -
    373  if((N < max_len) || (N == 0)) { return false; }
    -
    374  // Copy to the buffer.
    -
    375  std::memcpy(tmpbuf, json, max_len);
    -
    376  if(N > max_len) { // We pad whatever remains with ' '.
    -
    377  std::memset(tmpbuf + max_len, ' ', N - max_len);
    -
    378  }
    -
    379  return true;
    +
    363 simdjson_inline token_position json_iterator::start_position(depth_t depth) const noexcept {
    +
    364  SIMDJSON_ASSUME(size_t(depth) < parser->max_depth());
    +
    365  return size_t(depth) < parser->max_depth() ? parser->start_positions[depth] : 0;
    +
    366 }
    +
    367 
    +
    368 simdjson_inline void json_iterator::set_start_position(depth_t depth, token_position position) noexcept {
    +
    369  SIMDJSON_ASSUME(size_t(depth) < parser->max_depth());
    +
    370  if(size_t(depth) < parser->max_depth()) { parser->start_positions[depth] = position; }
    +
    371 }
    +
    372 
    +
    373 #endif
    +
    374 
    +
    375 
    +
    376 simdjson_inline error_code json_iterator::optional_error(error_code _error, const char *message) noexcept {
    +
    377  SIMDJSON_ASSUME(_error == INCORRECT_TYPE || _error == NO_SUCH_FIELD);
    +
    378  logger::log_error(*this, message);
    +
    379  return _error;
    380 }
    381 
    -
    382 } // namespace ondemand
    -
    383 } // namespace SIMDJSON_IMPLEMENTATION
    -
    384 } // namespace simdjson
    -
    385 
    -
    386 namespace simdjson {
    -
    387 
    -
    388 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_iterator>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &&value) noexcept
    -
    389  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::json_iterator>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::json_iterator>(value)) {}
    -
    390 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_iterator>::simdjson_result(error_code error) noexcept
    -
    391  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::json_iterator>(error) {}
    -
    392 
    -
    393 } // namespace simdjson
    -
    int32_t depth_t
    Represents the depth of a JSON value (number of nested arrays/objects).
    Definition: ondemand.h:11
    -
    We want to support argument-dependent lookup (ADL).
    -
    const char * error_message(error_code error) noexcept
    Get the error message for the given error code.
    Definition: error-inl.h:21
    +
    382 
    +
    383 simdjson_warn_unused simdjson_inline bool json_iterator::copy_to_buffer(const uint8_t *json, uint32_t max_len, uint8_t *tmpbuf, size_t N) noexcept {
    +
    384  // This function is not expected to be called in performance-sensitive settings.
    +
    385  // Let us guard against silly cases:
    +
    386  if((N < max_len) || (N == 0)) { return false; }
    +
    387  // Copy to the buffer.
    +
    388  std::memcpy(tmpbuf, json, max_len);
    +
    389  if(N > max_len) { // We pad whatever remains with ' '.
    +
    390  std::memset(tmpbuf + max_len, ' ', N - max_len);
    +
    391  }
    +
    392  return true;
    +
    393 }
    +
    394 
    +
    395 } // namespace ondemand
    +
    396 } // namespace SIMDJSON_IMPLEMENTATION
    +
    397 } // namespace simdjson
    +
    398 
    +
    399 namespace simdjson {
    +
    400 
    +
    401 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_iterator>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &&value) noexcept
    +
    402  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::json_iterator>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::json_iterator>(value)) {}
    +
    403 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_iterator>::simdjson_result(error_code error) noexcept
    +
    404  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::json_iterator>(error) {}
    +
    405 
    +
    406 } // namespace simdjson
    +
    407 
    +
    408 #endif // SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H
    +
    int32_t depth_t
    Represents the depth of a JSON value (number of nested arrays/objects).
    Definition: base.h:18
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    const char * error_message(error_code error) noexcept
    Get the error message for the given error code.
    Definition: error-inl.h:20
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ INCORRECT_TYPE
    JSON element has a different type than user expected.
    Definition: error.h:34
    @ OUT_OF_BOUNDS
    Attempted to access location outside of document.
    Definition: error.h:47
    diff --git a/json__iterator_8h_source.html b/json__iterator_8h_source.html index 4fe5992a2..0ded7cef1 100644 --- a/json__iterator_8h_source.html +++ b/json__iterator_8h_source.html @@ -91,140 +91,141 @@ $(document).ready(function(){initNavTree('json__iterator_8h_source.html',''); in
    json_iterator.h
    -
    1 namespace simdjson {
    -
    2 namespace SIMDJSON_IMPLEMENTATION {
    -
    3 namespace ondemand {
    -
    4 
    -
    5 class document;
    -
    6 class document_stream;
    -
    7 class object;
    -
    8 class array;
    -
    9 class value;
    -
    10 class raw_json_string;
    -
    11 class parser;
    -
    12 
    -
    18 class json_iterator {
    -
    19 protected:
    -
    20  token_iterator token{};
    -
    21  ondemand::parser *parser{};
    -
    27  uint8_t *_string_buf_loc{};
    -
    38  error_code error{SUCCESS};
    -
    47  depth_t _depth{};
    -
    54  token_position _root{};
    -
    61  bool _streaming{false};
    -
    62 
    -
    63 public:
    -
    64  simdjson_inline json_iterator() noexcept = default;
    -
    65  simdjson_inline json_iterator(json_iterator &&other) noexcept;
    -
    66  simdjson_inline json_iterator &operator=(json_iterator &&other) noexcept;
    -
    67  simdjson_inline explicit json_iterator(const json_iterator &other) noexcept = default;
    -
    68  simdjson_inline json_iterator &operator=(const json_iterator &other) noexcept = default;
    -
    72  simdjson_warn_unused simdjson_inline error_code skip_child(depth_t parent_depth) noexcept;
    -
    73 
    -
    77  simdjson_inline bool at_root() const noexcept;
    -
    78 
    -
    85  simdjson_inline bool streaming() const noexcept;
    -
    86 
    -
    90  simdjson_inline token_position root_position() const noexcept;
    -
    94  simdjson_inline void assert_at_document_depth() const noexcept;
    -
    98  simdjson_inline void assert_at_root() const noexcept;
    -
    99 
    -
    103  simdjson_inline bool at_end() const noexcept;
    -
    104 
    -
    108  simdjson_inline bool is_alive() const noexcept;
    -
    109 
    -
    113  simdjson_inline void abandon() noexcept;
    -
    114 
    -
    118  simdjson_inline const uint8_t *return_current_and_advance() noexcept;
    -
    119 
    -
    126  simdjson_inline bool is_single_token() const noexcept;
    -
    127 
    -
    133  simdjson_inline void assert_more_tokens(uint32_t required_tokens=1) const noexcept;
    -
    139  simdjson_inline void assert_valid_position(token_position position) const noexcept;
    -
    150  simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept;
    -
    158  simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept;
    -
    167  simdjson_inline const uint8_t *unsafe_pointer() const noexcept;
    -
    178  simdjson_inline const uint8_t *peek(token_position position) const noexcept;
    -
    186  simdjson_inline uint32_t peek_length(token_position position) const noexcept;
    -
    195  simdjson_inline const uint8_t *peek_last() const noexcept;
    -
    196 
    -
    204  simdjson_inline void ascend_to(depth_t parent_depth) noexcept;
    -
    205 
    -
    213  simdjson_inline void descend_to(depth_t child_depth) noexcept;
    -
    214  simdjson_inline void descend_to(depth_t child_depth, int32_t delta) noexcept;
    -
    215 
    -
    219  simdjson_inline depth_t depth() const noexcept;
    -
    220 
    -
    224  simdjson_inline uint8_t *&string_buf_loc() noexcept;
    -
    225 
    -
    232  simdjson_inline error_code report_error(error_code error, const char *message) noexcept;
    -
    233 
    -
    239  simdjson_inline error_code optional_error(error_code error, const char *message) noexcept;
    -
    240 
    -
    246  simdjson_warn_unused simdjson_inline bool copy_to_buffer(const uint8_t *json, uint32_t max_len, uint8_t *tmpbuf, size_t N) noexcept;
    -
    247 
    -
    248  simdjson_inline token_position position() const noexcept;
    -
    254  simdjson_inline simdjson_result<std::string_view> unescape(raw_json_string in, bool allow_replacement) noexcept;
    -
    255  simdjson_inline simdjson_result<std::string_view> unescape_wobbly(raw_json_string in) noexcept;
    -
    256  simdjson_inline void reenter_child(token_position position, depth_t child_depth) noexcept;
    -
    257 
    -
    258  simdjson_inline error_code consume_character(char c) noexcept;
    -
    259 #if SIMDJSON_DEVELOPMENT_CHECKS
    -
    260  simdjson_inline token_position start_position(depth_t depth) const noexcept;
    -
    261  simdjson_inline void set_start_position(depth_t depth, token_position position) noexcept;
    -
    262 #endif
    -
    263 
    -
    264  /* Useful for debugging and logging purposes. */
    -
    265  inline std::string to_string() const noexcept;
    -
    266 
    -
    270  inline simdjson_result<const char *> current_location() const noexcept;
    -
    271 
    -
    276  inline void rewind() noexcept;
    -
    283  inline bool balanced() const noexcept;
    -
    284 protected:
    -
    285  simdjson_inline json_iterator(const uint8_t *buf, ondemand::parser *parser) noexcept;
    -
    287  simdjson_inline token_position last_position() const noexcept;
    -
    289  simdjson_inline token_position end_position() const noexcept;
    -
    291  simdjson_inline token_position end() const noexcept;
    -
    292 
    -
    293  friend class document;
    -
    294  friend class document_stream;
    -
    295  friend class object;
    -
    296  friend class array;
    -
    297  friend class value;
    -
    298  friend class raw_json_string;
    -
    299  friend class parser;
    -
    300  friend class value_iterator;
    -
    301  template <typename... Args>
    -
    302  friend simdjson_inline void logger::log_line(const json_iterator &iter, const char *title_prefix, const char *title, std::string_view detail, int delta, int depth_delta, logger::log_level level, Args&&... args) noexcept;
    -
    303  template <typename... Args>
    -
    304  friend simdjson_inline void logger::log_line(const json_iterator &iter, token_position index, depth_t depth, const char *title_prefix, const char *title, std::string_view detail, logger::log_level level, Args&&... args) noexcept;
    -
    305 }; // json_iterator
    -
    306 
    -
    307 } // namespace ondemand
    -
    308 } // namespace SIMDJSON_IMPLEMENTATION
    -
    309 } // namespace simdjson
    -
    310 
    -
    311 namespace simdjson {
    -
    312 
    -
    313 template<>
    -
    314 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_iterator> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::json_iterator> {
    -
    315 public:
    -
    316  simdjson_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &&value) noexcept;
    -
    317  simdjson_inline simdjson_result(error_code error) noexcept;
    -
    318 
    -
    319  simdjson_inline simdjson_result() noexcept = default;
    -
    320 };
    -
    321 
    -
    322 } // namespace simdjson
    -
    @ object
    A JSON object ( { "a": 1, "b" 2, ... } )
    - -
    int32_t depth_t
    Represents the depth of a JSON value (number of nested arrays/objects).
    Definition: ondemand.h:11
    -
    We want to support argument-dependent lookup (ADL).
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/implementation_simdjson_result_base.h"
    +
    7 #include "simdjson/generic/ondemand/token_iterator.h"
    +
    8 #endif // SIMDJSON_AMALGAMATED
    +
    9 
    +
    10 namespace simdjson {
    +
    11 namespace SIMDJSON_IMPLEMENTATION {
    +
    12 namespace ondemand {
    +
    13 
    +
    19 class json_iterator {
    +
    20 protected:
    +
    21  token_iterator token{};
    +
    22  ondemand::parser *parser{};
    +
    28  uint8_t *_string_buf_loc{};
    +
    39  error_code error{SUCCESS};
    +
    48  depth_t _depth{};
    +
    55  token_position _root{};
    +
    62  bool _streaming{false};
    +
    63 
    +
    64 public:
    +
    65  simdjson_inline json_iterator() noexcept = default;
    +
    66  simdjson_inline json_iterator(json_iterator &&other) noexcept;
    +
    67  simdjson_inline json_iterator &operator=(json_iterator &&other) noexcept;
    +
    68  simdjson_inline explicit json_iterator(const json_iterator &other) noexcept = default;
    +
    69  simdjson_inline json_iterator &operator=(const json_iterator &other) noexcept = default;
    +
    73  simdjson_warn_unused simdjson_inline error_code skip_child(depth_t parent_depth) noexcept;
    +
    74 
    +
    78  simdjson_inline bool at_root() const noexcept;
    +
    79 
    +
    86  simdjson_inline bool streaming() const noexcept;
    +
    87 
    +
    91  simdjson_inline token_position root_position() const noexcept;
    +
    95  simdjson_inline void assert_at_document_depth() const noexcept;
    +
    99  simdjson_inline void assert_at_root() const noexcept;
    +
    100 
    +
    104  simdjson_inline bool at_end() const noexcept;
    +
    105 
    +
    109  simdjson_inline bool is_alive() const noexcept;
    +
    110 
    +
    114  simdjson_inline void abandon() noexcept;
    +
    115 
    +
    119  simdjson_inline const uint8_t *return_current_and_advance() noexcept;
    +
    120 
    +
    127  simdjson_inline bool is_single_token() const noexcept;
    +
    128 
    +
    134  simdjson_inline void assert_more_tokens(uint32_t required_tokens=1) const noexcept;
    +
    140  simdjson_inline void assert_valid_position(token_position position) const noexcept;
    +
    151  simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept;
    +
    159  simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept;
    +
    168  simdjson_inline const uint8_t *unsafe_pointer() const noexcept;
    +
    179  simdjson_inline const uint8_t *peek(token_position position) const noexcept;
    +
    187  simdjson_inline uint32_t peek_length(token_position position) const noexcept;
    +
    196  simdjson_inline const uint8_t *peek_last() const noexcept;
    +
    197 
    +
    205  simdjson_inline void ascend_to(depth_t parent_depth) noexcept;
    +
    206 
    +
    214  simdjson_inline void descend_to(depth_t child_depth) noexcept;
    +
    215  simdjson_inline void descend_to(depth_t child_depth, int32_t delta) noexcept;
    +
    216 
    +
    220  simdjson_inline depth_t depth() const noexcept;
    +
    221 
    +
    225  simdjson_inline uint8_t *&string_buf_loc() noexcept;
    +
    226 
    +
    233  simdjson_inline error_code report_error(error_code error, const char *message) noexcept;
    +
    234 
    +
    240  simdjson_inline error_code optional_error(error_code error, const char *message) noexcept;
    +
    241 
    +
    247  simdjson_warn_unused simdjson_inline bool copy_to_buffer(const uint8_t *json, uint32_t max_len, uint8_t *tmpbuf, size_t N) noexcept;
    +
    248 
    +
    249  simdjson_inline token_position position() const noexcept;
    +
    255  simdjson_inline simdjson_result<std::string_view> unescape(raw_json_string in, bool allow_replacement) noexcept;
    +
    256  simdjson_inline simdjson_result<std::string_view> unescape_wobbly(raw_json_string in) noexcept;
    +
    257  simdjson_inline void reenter_child(token_position position, depth_t child_depth) noexcept;
    +
    258 
    +
    259  simdjson_inline error_code consume_character(char c) noexcept;
    +
    260 #if SIMDJSON_DEVELOPMENT_CHECKS
    +
    261  simdjson_inline token_position start_position(depth_t depth) const noexcept;
    +
    262  simdjson_inline void set_start_position(depth_t depth, token_position position) noexcept;
    +
    263 #endif
    +
    264 
    +
    265  /* Useful for debugging and logging purposes. */
    +
    266  inline std::string to_string() const noexcept;
    +
    267 
    +
    271  inline simdjson_result<const char *> current_location() const noexcept;
    +
    272 
    +
    277  inline void rewind() noexcept;
    +
    284  inline bool balanced() const noexcept;
    +
    285 protected:
    +
    286  simdjson_inline json_iterator(const uint8_t *buf, ondemand::parser *parser) noexcept;
    +
    288  simdjson_inline token_position last_position() const noexcept;
    +
    290  simdjson_inline token_position end_position() const noexcept;
    +
    292  simdjson_inline token_position end() const noexcept;
    +
    293 
    +
    294  friend class document;
    +
    295  friend class document_stream;
    +
    296  friend class object;
    +
    297  friend class array;
    +
    298  friend class value;
    +
    299  friend class raw_json_string;
    +
    300  friend class parser;
    +
    301  friend class value_iterator;
    +
    302  template <typename... Args>
    +
    303  friend simdjson_inline void logger::log_line(const json_iterator &iter, const char *title_prefix, const char *title, std::string_view detail, int delta, int depth_delta, logger::log_level level, Args&&... args) noexcept;
    +
    304  template <typename... Args>
    +
    305  friend simdjson_inline void logger::log_line(const json_iterator &iter, token_position index, depth_t depth, const char *title_prefix, const char *title, std::string_view detail, logger::log_level level, Args&&... args) noexcept;
    +
    306 }; // json_iterator
    +
    307 
    +
    308 } // namespace ondemand
    +
    309 } // namespace SIMDJSON_IMPLEMENTATION
    +
    310 } // namespace simdjson
    +
    311 
    +
    312 namespace simdjson {
    +
    313 
    +
    314 template<>
    +
    315 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_iterator> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::json_iterator> {
    +
    316 public:
    +
    317  simdjson_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &&value) noexcept;
    +
    318  simdjson_inline simdjson_result(error_code error) noexcept;
    +
    319 
    +
    320  simdjson_inline simdjson_result() noexcept = default;
    +
    321 };
    +
    322 
    +
    323 } // namespace simdjson
    +
    324 
    +
    325 #endif // SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H
    +
    int32_t depth_t
    Represents the depth of a JSON value (number of nested arrays/objects).
    Definition: base.h:18
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ SUCCESS
    No error.
    Definition: error.h:18
    -
    std::string to_string(T x)
    Converts JSON to a string.
    - +
    std::string to_string(T x)
    Converts JSON to a string.
    +
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    diff --git a/json__type-inl_8h_source.html b/json__type-inl_8h_source.html index b24ff396c..67f4c28be 100644 --- a/json__type-inl_8h_source.html +++ b/json__type-inl_8h_source.html @@ -91,137 +91,148 @@ $(document).ready(function(){initNavTree('json__type-inl_8h_source.html',''); in
    json_type-inl.h
    -
    1 namespace simdjson {
    -
    2 namespace SIMDJSON_IMPLEMENTATION {
    -
    3 namespace ondemand {
    -
    4 
    -
    5 inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept {
    -
    6  switch (type) {
    -
    7  case json_type::array: out << "array"; break;
    -
    8  case json_type::object: out << "object"; break;
    -
    9  case json_type::number: out << "number"; break;
    -
    10  case json_type::string: out << "string"; break;
    -
    11  case json_type::boolean: out << "boolean"; break;
    -
    12  case json_type::null: out << "null"; break;
    -
    13  default: SIMDJSON_UNREACHABLE();
    -
    14  }
    -
    15  return out;
    -
    16 }
    -
    17 
    -
    18 #if SIMDJSON_EXCEPTIONS
    -
    19 inline std::ostream& operator<<(std::ostream& out, simdjson_result<json_type> &type) noexcept(false) {
    -
    20  return out << type.value();
    -
    21 }
    -
    22 #endif
    -
    23 
    -
    24 
    -
    25 
    -
    26 simdjson_inline number_type number::get_number_type() const noexcept {
    -
    27  return type;
    -
    28 }
    -
    29 
    -
    30 simdjson_inline bool number::is_uint64() const noexcept {
    -
    31  return get_number_type() == number_type::unsigned_integer;
    -
    32 }
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/ondemand/json_type.h"
    +
    7 #include "simdjson/generic/implementation_simdjson_result_base-inl.h"
    +
    8 #endif // SIMDJSON_AMALGAMATED
    +
    9 
    +
    10 namespace simdjson {
    +
    11 namespace SIMDJSON_IMPLEMENTATION {
    +
    12 namespace ondemand {
    +
    13 
    +
    14 inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept {
    +
    15  switch (type) {
    +
    16  case json_type::array: out << "array"; break;
    +
    17  case json_type::object: out << "object"; break;
    +
    18  case json_type::number: out << "number"; break;
    +
    19  case json_type::string: out << "string"; break;
    +
    20  case json_type::boolean: out << "boolean"; break;
    +
    21  case json_type::null: out << "null"; break;
    +
    22  default: SIMDJSON_UNREACHABLE();
    +
    23  }
    +
    24  return out;
    +
    25 }
    +
    26 
    +
    27 #if SIMDJSON_EXCEPTIONS
    +
    28 inline std::ostream& operator<<(std::ostream& out, simdjson_result<json_type> &type) noexcept(false) {
    +
    29  return out << type.value();
    +
    30 }
    +
    31 #endif
    +
    32 
    33 
    -
    34 simdjson_inline uint64_t number::get_uint64() const noexcept {
    -
    35  return payload.unsigned_integer;
    -
    36 }
    -
    37 
    -
    38 simdjson_inline number::operator uint64_t() const noexcept {
    -
    39  return get_uint64();
    -
    40 }
    -
    41 
    +
    34 
    +
    35 simdjson_inline number_type number::get_number_type() const noexcept {
    +
    36  return type;
    +
    37 }
    +
    38 
    +
    39 simdjson_inline bool number::is_uint64() const noexcept {
    +
    40  return get_number_type() == number_type::unsigned_integer;
    +
    41 }
    42 
    -
    43 simdjson_inline bool number::is_int64() const noexcept {
    -
    44  return get_number_type() == number_type::signed_integer;
    +
    43 simdjson_inline uint64_t number::get_uint64() const noexcept {
    +
    44  return payload.unsigned_integer;
    45 }
    46 
    -
    47 simdjson_inline int64_t number::get_int64() const noexcept {
    -
    48  return payload.signed_integer;
    +
    47 simdjson_inline number::operator uint64_t() const noexcept {
    +
    48  return get_uint64();
    49 }
    50 
    -
    51 simdjson_inline number::operator int64_t() const noexcept {
    -
    52  return get_int64();
    -
    53 }
    -
    54 
    -
    55 simdjson_inline bool number::is_double() const noexcept {
    -
    56  return get_number_type() == number_type::floating_point_number;
    -
    57 }
    -
    58 
    -
    59 simdjson_inline double number::get_double() const noexcept {
    -
    60  return payload.floating_point_number;
    -
    61 }
    -
    62 
    -
    63 simdjson_inline number::operator double() const noexcept {
    -
    64  return get_double();
    -
    65 }
    -
    66 
    -
    67 simdjson_inline double number::as_double() const noexcept {
    -
    68  if(is_double()) {
    -
    69  return payload.floating_point_number;
    -
    70  }
    -
    71  if(is_int64()) {
    -
    72  return double(payload.signed_integer);
    -
    73  }
    -
    74  return double(payload.unsigned_integer);
    -
    75 }
    -
    76 
    -
    77 simdjson_inline void number::append_s64(int64_t value) noexcept {
    -
    78  payload.signed_integer = value;
    -
    79  type = number_type::signed_integer;
    -
    80 }
    -
    81 
    -
    82 simdjson_inline void number::append_u64(uint64_t value) noexcept {
    -
    83  payload.unsigned_integer = value;
    -
    84  type = number_type::unsigned_integer;
    -
    85 }
    -
    86 
    -
    87 simdjson_inline void number::append_double(double value) noexcept {
    -
    88  payload.floating_point_number = value;
    -
    89  type = number_type::floating_point_number;
    -
    90 }
    -
    91 
    -
    92 simdjson_inline void number::skip_double() noexcept {
    -
    93  type = number_type::floating_point_number;
    +
    51 
    +
    52 simdjson_inline bool number::is_int64() const noexcept {
    +
    53  return get_number_type() == number_type::signed_integer;
    +
    54 }
    +
    55 
    +
    56 simdjson_inline int64_t number::get_int64() const noexcept {
    +
    57  return payload.signed_integer;
    +
    58 }
    +
    59 
    +
    60 simdjson_inline number::operator int64_t() const noexcept {
    +
    61  return get_int64();
    +
    62 }
    +
    63 
    +
    64 simdjson_inline bool number::is_double() const noexcept {
    +
    65  return get_number_type() == number_type::floating_point_number;
    +
    66 }
    +
    67 
    +
    68 simdjson_inline double number::get_double() const noexcept {
    +
    69  return payload.floating_point_number;
    +
    70 }
    +
    71 
    +
    72 simdjson_inline number::operator double() const noexcept {
    +
    73  return get_double();
    +
    74 }
    +
    75 
    +
    76 simdjson_inline double number::as_double() const noexcept {
    +
    77  if(is_double()) {
    +
    78  return payload.floating_point_number;
    +
    79  }
    +
    80  if(is_int64()) {
    +
    81  return double(payload.signed_integer);
    +
    82  }
    +
    83  return double(payload.unsigned_integer);
    +
    84 }
    +
    85 
    +
    86 simdjson_inline void number::append_s64(int64_t value) noexcept {
    +
    87  payload.signed_integer = value;
    +
    88  type = number_type::signed_integer;
    +
    89 }
    +
    90 
    +
    91 simdjson_inline void number::append_u64(uint64_t value) noexcept {
    +
    92  payload.unsigned_integer = value;
    +
    93  type = number_type::unsigned_integer;
    94 }
    95 
    -
    96 } // namespace ondemand
    -
    97 } // namespace SIMDJSON_IMPLEMENTATION
    -
    98 } // namespace simdjson
    -
    99 
    -
    100 namespace simdjson {
    -
    101 
    -
    102 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_type>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::json_type &&value) noexcept
    -
    103  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::json_type>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::json_type>(value)) {}
    -
    104 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_type>::simdjson_result(error_code error) noexcept
    -
    105  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::json_type>(error) {}
    -
    106 
    +
    96 simdjson_inline void number::append_double(double value) noexcept {
    +
    97  payload.floating_point_number = value;
    +
    98  type = number_type::floating_point_number;
    +
    99 }
    +
    100 
    +
    101 simdjson_inline void number::skip_double() noexcept {
    +
    102  type = number_type::floating_point_number;
    +
    103 }
    +
    104 
    +
    105 } // namespace ondemand
    +
    106 } // namespace SIMDJSON_IMPLEMENTATION
    107 } // namespace simdjson
    -
    An ephemeral JSON value returned during iteration.
    Definition: value.h:17
    -
    std::ostream & operator<<(std::ostream &out, json_type type) noexcept
    Write the JSON type to the output stream.
    Definition: json_type-inl.h:5
    -
    json_type
    The type of a JSON value.
    Definition: json_type.h:7
    +
    108 
    +
    109 namespace simdjson {
    +
    110 
    +
    111 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_type>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::json_type &&value) noexcept
    +
    112  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::json_type>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::json_type>(value)) {}
    +
    113 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_type>::simdjson_result(error_code error) noexcept
    +
    114  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::json_type>(error) {}
    +
    115 
    +
    116 } // namespace simdjson
    +
    117 
    +
    118 #endif // SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H
    +
    An ephemeral JSON value returned during iteration.
    Definition: value.h:18
    +
    std::ostream & operator<<(std::ostream &out, json_type type) noexcept
    Write the JSON type to the output stream.
    Definition: json_type-inl.h:14
    +
    json_type
    The type of a JSON value.
    Definition: json_type.h:17
    @ object
    A JSON object ( { "a": 1, "b" 2, ... } )
    @ number
    A JSON number ( 1 or -2.3 or 4.5e6 ...)
    @ string
    A JSON string ( "a" or "hello world\n" ...)
    -
    We want to support argument-dependent lookup (ADL).
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    -
    simdjson_inline bool is_int64() const noexcept
    return true if the automatically determined type of the number is number_type::signed_integer.
    Definition: json_type-inl.h:43
    -
    simdjson_inline double as_double() const noexcept
    Convert the number to a double.
    Definition: json_type-inl.h:67
    -
    simdjson_inline bool is_double() const noexcept
    return true if the automatically determined type of the number is number_type::floating_point_number.
    Definition: json_type-inl.h:55
    -
    simdjson_inline number_type get_number_type() const noexcept
    return the automatically determined type of the number: number_type::floating_point_number,...
    Definition: json_type-inl.h:26
    -
    simdjson_inline int64_t get_int64() const noexcept
    return the value as a int64_t, only valid if is_int64() is true.
    Definition: json_type-inl.h:47
    +
    simdjson_inline bool is_int64() const noexcept
    return true if the automatically determined type of the number is number_type::signed_integer.
    Definition: json_type-inl.h:52
    +
    simdjson_inline double as_double() const noexcept
    Convert the number to a double.
    Definition: json_type-inl.h:76
    +
    simdjson_inline bool is_double() const noexcept
    return true if the automatically determined type of the number is number_type::floating_point_number.
    Definition: json_type-inl.h:64
    +
    simdjson_inline ondemand::number_type get_number_type() const noexcept
    return the automatically determined type of the number: number_type::floating_point_number,...
    Definition: json_type-inl.h:35
    +
    simdjson_inline int64_t get_int64() const noexcept
    return the value as a int64_t, only valid if is_int64() is true.
    Definition: json_type-inl.h:56
    union simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::@0 payload
    End of friend declarations.
    -
    simdjson_inline void append_u64(uint64_t value) noexcept
    Store an unsigned 64-bit value to the number.
    Definition: json_type-inl.h:82
    -
    simdjson_inline double get_double() const noexcept
    return the value as a double, only valid if is_double() is true.
    Definition: json_type-inl.h:59
    -
    simdjson_inline void skip_double() noexcept
    Specifies that the value is a double, but leave it undefined.
    Definition: json_type-inl.h:92
    -
    simdjson_inline void append_s64(int64_t value) noexcept
    Store a signed 64-bit value to the number.
    Definition: json_type-inl.h:77
    -
    simdjson_inline void append_double(double value) noexcept
    Store a double value to the number.
    Definition: json_type-inl.h:87
    -
    simdjson_inline bool is_uint64() const noexcept
    return true if the automatically determined type of the number is number_type::unsigned_integer.
    Definition: json_type-inl.h:30
    -
    simdjson_inline uint64_t get_uint64() const noexcept
    return the value as a uint64_t, only valid if is_uint64() is true.
    Definition: json_type-inl.h:34
    +
    simdjson_inline void append_u64(uint64_t value) noexcept
    Store an unsigned 64-bit value to the number.
    Definition: json_type-inl.h:91
    +
    simdjson_inline double get_double() const noexcept
    return the value as a double, only valid if is_double() is true.
    Definition: json_type-inl.h:68
    +
    simdjson_inline void skip_double() noexcept
    Specifies that the value is a double, but leave it undefined.
    +
    simdjson_inline void append_s64(int64_t value) noexcept
    Store a signed 64-bit value to the number.
    Definition: json_type-inl.h:86
    +
    simdjson_inline void append_double(double value) noexcept
    Store a double value to the number.
    Definition: json_type-inl.h:96
    +
    simdjson_inline bool is_uint64() const noexcept
    return true if the automatically determined type of the number is number_type::unsigned_integer.
    Definition: json_type-inl.h:39
    +
    simdjson_inline uint64_t get_uint64() const noexcept
    return the value as a uint64_t, only valid if is_uint64() is true.
    Definition: json_type-inl.h:43
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    diff --git a/json__type_8h_source.html b/json__type_8h_source.html index ddfe1b0ce..a0fb9830e 100644 --- a/json__type_8h_source.html +++ b/json__type_8h_source.html @@ -91,111 +91,121 @@ $(document).ready(function(){initNavTree('json__type_8h_source.html',''); initRe
    json_type.h
    -
    1 namespace simdjson {
    -
    2 namespace SIMDJSON_IMPLEMENTATION {
    -
    3 namespace ondemand {
    -
    7 enum class json_type {
    -
    8  // Start at 1 to catch uninitialized / default values more easily
    -
    9  array=1,
    -
    10  object,
    -
    11  number,
    -
    12  string,
    -
    13  boolean,
    -
    14  null
    -
    15 };
    -
    16 
    -
    17 class value_iterator;
    -
    18 
    -
    24 struct number {
    -
    25 
    -
    37  simdjson_inline number_type get_number_type() const noexcept;
    -
    42  simdjson_inline bool is_uint64() const noexcept;
    -
    46  simdjson_inline uint64_t get_uint64() const noexcept;
    -
    47  simdjson_inline operator uint64_t() const noexcept;
    -
    48 
    -
    53  simdjson_inline bool is_int64() const noexcept;
    -
    57  simdjson_inline int64_t get_int64() const noexcept;
    -
    58  simdjson_inline operator int64_t() const noexcept;
    -
    59 
    -
    60 
    -
    65  simdjson_inline bool is_double() const noexcept;
    -
    69  simdjson_inline double get_double() const noexcept;
    -
    70  simdjson_inline operator double() const noexcept;
    -
    71 
    -
    76  simdjson_inline double as_double() const noexcept;
    -
    77 
    -
    78 
    -
    79 protected:
    -
    85  friend class value_iterator;
    -
    86  template<typename W>
    -
    87  friend error_code numberparsing::slow_float_parsing(simdjson_unused const uint8_t * src, W writer);
    -
    88  template<typename W>
    -
    89  friend error_code numberparsing::write_float(const uint8_t *const src, bool negative, uint64_t i, const uint8_t * start_digits, size_t digit_count, int64_t exponent, W &writer);
    -
    90  template<typename W>
    -
    91  friend error_code numberparsing::parse_number(const uint8_t *const src, W &writer);
    -
    93  simdjson_inline void append_s64(int64_t value) noexcept;
    -
    95  simdjson_inline void append_u64(uint64_t value) noexcept;
    -
    97  simdjson_inline void append_double(double value) noexcept;
    -
    99  simdjson_inline void skip_double() noexcept;
    -
    108  union {
    -
    109  double floating_point_number;
    -
    110  int64_t signed_integer;
    -
    111  uint64_t unsigned_integer;
    -
    112  } payload{0};
    -
    113  number_type type{number_type::signed_integer};
    -
    114 };
    -
    115 
    -
    122 inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept;
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/implementation_simdjson_result_base.h"
    +
    7 #include "simdjson/generic/numberparsing.h"
    +
    8 #endif // SIMDJSON_AMALGAMATED
    +
    9 
    +
    10 namespace simdjson {
    +
    11 namespace SIMDJSON_IMPLEMENTATION {
    +
    12 namespace ondemand {
    +
    13 
    +
    17 enum class json_type {
    +
    18  // Start at 1 to catch uninitialized / default values more easily
    +
    19  array=1,
    +
    20  object,
    +
    21  number,
    +
    22  string,
    +
    23  boolean,
    +
    24  null
    +
    25 };
    +
    26 
    +
    32 struct number {
    +
    33 
    +
    45  simdjson_inline ondemand::number_type get_number_type() const noexcept;
    +
    50  simdjson_inline bool is_uint64() const noexcept;
    +
    54  simdjson_inline uint64_t get_uint64() const noexcept;
    +
    55  simdjson_inline operator uint64_t() const noexcept;
    +
    56 
    +
    61  simdjson_inline bool is_int64() const noexcept;
    +
    65  simdjson_inline int64_t get_int64() const noexcept;
    +
    66  simdjson_inline operator int64_t() const noexcept;
    +
    67 
    +
    68 
    +
    73  simdjson_inline bool is_double() const noexcept;
    +
    77  simdjson_inline double get_double() const noexcept;
    +
    78  simdjson_inline operator double() const noexcept;
    +
    79 
    +
    84  simdjson_inline double as_double() const noexcept;
    +
    85 
    +
    86 
    +
    87 protected:
    +
    93  friend class value_iterator;
    +
    94  template<typename W>
    +
    95  friend error_code numberparsing::slow_float_parsing(simdjson_unused const uint8_t * src, W writer);
    +
    96  template<typename W>
    +
    97  friend error_code numberparsing::write_float(const uint8_t *const src, bool negative, uint64_t i, const uint8_t * start_digits, size_t digit_count, int64_t exponent, W &writer);
    +
    98  template<typename W>
    +
    99  friend error_code numberparsing::parse_number(const uint8_t *const src, W &writer);
    +
    101  simdjson_inline void append_s64(int64_t value) noexcept;
    +
    103  simdjson_inline void append_u64(uint64_t value) noexcept;
    +
    105  simdjson_inline void append_double(double value) noexcept;
    +
    107  simdjson_inline void skip_double() noexcept;
    +
    116  union {
    +
    117  double floating_point_number;
    +
    118  int64_t signed_integer;
    +
    119  uint64_t unsigned_integer;
    +
    120  } payload{0};
    +
    121  number_type type{number_type::signed_integer};
    +
    122 };
    123 
    -
    124 #if SIMDJSON_EXCEPTIONS
    -
    134 inline std::ostream& operator<<(std::ostream& out, simdjson_result<json_type> &type) noexcept(false);
    -
    135 #endif
    -
    136 
    -
    137 } // namespace ondemand
    -
    138 } // namespace SIMDJSON_IMPLEMENTATION
    -
    139 } // namespace simdjson
    -
    140 
    -
    141 namespace simdjson {
    -
    142 
    -
    143 template<>
    -
    144 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_type> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::json_type> {
    -
    145 public:
    - -
    147  simdjson_inline simdjson_result(error_code error) noexcept;
    -
    148  simdjson_inline simdjson_result() noexcept = default;
    -
    149  simdjson_inline ~simdjson_result() noexcept = default;
    -
    150 };
    -
    151 
    -
    152 } // namespace simdjson
    - -
    An ephemeral JSON value returned during iteration.
    Definition: value.h:17
    -
    std::ostream & operator<<(std::ostream &out, json_type type) noexcept
    Write the JSON type to the output stream.
    Definition: json_type-inl.h:5
    -
    json_type
    The type of a JSON value.
    Definition: json_type.h:7
    +
    130 inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept;
    +
    131 
    +
    132 #if SIMDJSON_EXCEPTIONS
    +
    142 inline std::ostream& operator<<(std::ostream& out, simdjson_result<json_type> &type) noexcept(false);
    +
    143 #endif
    +
    144 
    +
    145 } // namespace ondemand
    +
    146 } // namespace SIMDJSON_IMPLEMENTATION
    +
    147 } // namespace simdjson
    +
    148 
    +
    149 namespace simdjson {
    +
    150 
    +
    151 template<>
    +
    152 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::json_type> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::json_type> {
    +
    153 public:
    + +
    155  simdjson_inline simdjson_result(error_code error) noexcept;
    +
    156  simdjson_inline simdjson_result() noexcept = default;
    +
    157  simdjson_inline ~simdjson_result() noexcept = default;
    +
    158 };
    +
    159 
    +
    160 } // namespace simdjson
    +
    161 
    +
    162 #endif // SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H
    + +
    An ephemeral JSON value returned during iteration.
    Definition: value.h:18
    +
    simdjson::SIMDJSON_IMPLEMENTATION::number_type number_type
    Definition: base.h:21
    +
    std::ostream & operator<<(std::ostream &out, json_type type) noexcept
    Write the JSON type to the output stream.
    Definition: json_type-inl.h:14
    +
    json_type
    The type of a JSON value.
    Definition: json_type.h:17
    @ object
    A JSON object ( { "a": 1, "b" 2, ... } )
    @ number
    A JSON number ( 1 or -2.3 or 4.5e6 ...)
    @ string
    A JSON string ( "a" or "hello world\n" ...)
    -
    simdjson::SIMDJSON_IMPLEMENTATION::numberparsing::number_type number_type
    Definition: ondemand.h:14
    -
    We want to support argument-dependent lookup (ADL).
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    - -
    A type representing a JSON number.
    Definition: json_type.h:24
    -
    friend class value_iterator
    The next block of declaration is designed so that we can call the number parsing functions on a numbe...
    Definition: json_type.h:85
    -
    simdjson_inline bool is_int64() const noexcept
    return true if the automatically determined type of the number is number_type::signed_integer.
    Definition: json_type-inl.h:43
    -
    simdjson_inline double as_double() const noexcept
    Convert the number to a double.
    Definition: json_type-inl.h:67
    -
    simdjson_inline bool is_double() const noexcept
    return true if the automatically determined type of the number is number_type::floating_point_number.
    Definition: json_type-inl.h:55
    -
    simdjson_inline number_type get_number_type() const noexcept
    return the automatically determined type of the number: number_type::floating_point_number,...
    Definition: json_type-inl.h:26
    -
    simdjson_inline int64_t get_int64() const noexcept
    return the value as a int64_t, only valid if is_int64() is true.
    Definition: json_type-inl.h:47
    + +
    A type representing a JSON number.
    Definition: json_type.h:32
    +
    friend class value_iterator
    The next block of declaration is designed so that we can call the number parsing functions on a numbe...
    Definition: json_type.h:93
    +
    simdjson_inline bool is_int64() const noexcept
    return true if the automatically determined type of the number is number_type::signed_integer.
    Definition: json_type-inl.h:52
    +
    simdjson_inline double as_double() const noexcept
    Convert the number to a double.
    Definition: json_type-inl.h:76
    +
    simdjson_inline bool is_double() const noexcept
    return true if the automatically determined type of the number is number_type::floating_point_number.
    Definition: json_type-inl.h:64
    +
    simdjson_inline ondemand::number_type get_number_type() const noexcept
    return the automatically determined type of the number: number_type::floating_point_number,...
    Definition: json_type-inl.h:35
    +
    simdjson_inline int64_t get_int64() const noexcept
    return the value as a int64_t, only valid if is_int64() is true.
    Definition: json_type-inl.h:56
    union simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::@0 payload
    End of friend declarations.
    -
    simdjson_inline void append_u64(uint64_t value) noexcept
    Store an unsigned 64-bit value to the number.
    Definition: json_type-inl.h:82
    -
    simdjson_inline double get_double() const noexcept
    return the value as a double, only valid if is_double() is true.
    Definition: json_type-inl.h:59
    -
    simdjson_inline void skip_double() noexcept
    Specifies that the value is a double, but leave it undefined.
    Definition: json_type-inl.h:92
    -
    simdjson_inline void append_s64(int64_t value) noexcept
    Store a signed 64-bit value to the number.
    Definition: json_type-inl.h:77
    -
    simdjson_inline void append_double(double value) noexcept
    Store a double value to the number.
    Definition: json_type-inl.h:87
    -
    simdjson_inline bool is_uint64() const noexcept
    return true if the automatically determined type of the number is number_type::unsigned_integer.
    Definition: json_type-inl.h:30
    -
    simdjson_inline uint64_t get_uint64() const noexcept
    return the value as a uint64_t, only valid if is_uint64() is true.
    Definition: json_type-inl.h:34
    +
    simdjson_inline void append_u64(uint64_t value) noexcept
    Store an unsigned 64-bit value to the number.
    Definition: json_type-inl.h:91
    +
    simdjson_inline double get_double() const noexcept
    return the value as a double, only valid if is_double() is true.
    Definition: json_type-inl.h:68
    +
    simdjson_inline void skip_double() noexcept
    Specifies that the value is a double, but leave it undefined.
    +
    simdjson_inline void append_s64(int64_t value) noexcept
    Store a signed 64-bit value to the number.
    Definition: json_type-inl.h:86
    +
    simdjson_inline void append_double(double value) noexcept
    Store a double value to the number.
    Definition: json_type-inl.h:96
    +
    simdjson_inline bool is_uint64() const noexcept
    return true if the automatically determined type of the number is number_type::unsigned_integer.
    Definition: json_type-inl.h:39
    +
    simdjson_inline uint64_t get_uint64() const noexcept
    return the value as a uint64_t, only valid if is_uint64() is true.
    Definition: json_type-inl.h:43
    The result of a simdjson operation that could fail.
    Definition: error.h:205
    -
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:132
    +
    simdjson_inline error_code error() const noexcept
    The error.
    Definition: error-inl.h:131
    simdjson_inline T & value() &noexcept(false)
    Get the result value.
    diff --git a/jsoncharutils_8h_source.html b/jsoncharutils_8h_source.html index 6d8cf54e1..5f79837d4 100644 --- a/jsoncharutils_8h_source.html +++ b/jsoncharutils_8h_source.html @@ -91,123 +91,111 @@ $(document).ready(function(){initNavTree('jsoncharutils_8h_source.html',''); ini
    jsoncharutils.h
    -
    1 #include "simdjson/internal/jsoncharutils_tables.h"
    -
    2 #include "simdjson/internal/numberparsing_tables.h"
    -
    3 
    -
    4 namespace simdjson {
    -
    5 namespace SIMDJSON_IMPLEMENTATION {
    -
    6 namespace {
    -
    7 namespace jsoncharutils {
    -
    8 
    -
    9 // return non-zero if not a structural or whitespace char
    -
    10 // zero otherwise
    -
    11 simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) {
    -
    12  return internal::structural_or_whitespace_negated[c];
    -
    13 }
    +
    1 #ifndef SIMDJSON_GENERIC_JSONCHARUTILS_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_JSONCHARUTILS_H
    +
    5 #include "simdjson/generic/base.h"
    +
    6 #include "simdjson/internal/jsoncharutils_tables.h"
    +
    7 #include "simdjson/internal/numberparsing_tables.h"
    +
    8 #endif // SIMDJSON_AMALGAMATED
    +
    9 
    +
    10 namespace simdjson {
    +
    11 namespace SIMDJSON_IMPLEMENTATION {
    +
    12 namespace {
    +
    13 namespace jsoncharutils {
    14 
    -
    15 simdjson_inline uint32_t is_structural_or_whitespace(uint8_t c) {
    -
    16  return internal::structural_or_whitespace[c];
    -
    17 }
    -
    18 
    -
    19 // returns a value with the high 16 bits set if not valid
    -
    20 // otherwise returns the conversion of the 4 hex digits at src into the bottom
    -
    21 // 16 bits of the 32-bit return register
    -
    22 //
    -
    23 // see
    -
    24 // https://lemire.me/blog/2019/04/17/parsing-short-hexadecimal-strings-efficiently/
    -
    25 static inline uint32_t hex_to_u32_nocheck(
    -
    26  const uint8_t *src) { // strictly speaking, static inline is a C-ism
    -
    27  uint32_t v1 = internal::digit_to_val32[630 + src[0]];
    -
    28  uint32_t v2 = internal::digit_to_val32[420 + src[1]];
    -
    29  uint32_t v3 = internal::digit_to_val32[210 + src[2]];
    -
    30  uint32_t v4 = internal::digit_to_val32[0 + src[3]];
    -
    31  return v1 | v2 | v3 | v4;
    -
    32 }
    -
    33 
    -
    34 // given a code point cp, writes to c
    -
    35 // the utf-8 code, outputting the length in
    -
    36 // bytes, if the length is zero, the code point
    -
    37 // is invalid
    -
    38 //
    -
    39 // This can possibly be made faster using pdep
    -
    40 // and clz and table lookups, but JSON documents
    -
    41 // have few escaped code points, and the following
    -
    42 // function looks cheap.
    -
    43 //
    -
    44 // Note: we assume that surrogates are treated separately
    -
    45 //
    -
    46 simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) {
    -
    47  if (cp <= 0x7F) {
    -
    48  c[0] = uint8_t(cp);
    -
    49  return 1; // ascii
    -
    50  }
    -
    51  if (cp <= 0x7FF) {
    -
    52  c[0] = uint8_t((cp >> 6) + 192);
    -
    53  c[1] = uint8_t((cp & 63) + 128);
    -
    54  return 2; // universal plane
    -
    55  // Surrogates are treated elsewhere...
    -
    56  //} //else if (0xd800 <= cp && cp <= 0xdfff) {
    -
    57  // return 0; // surrogates // could put assert here
    -
    58  } else if (cp <= 0xFFFF) {
    -
    59  c[0] = uint8_t((cp >> 12) + 224);
    -
    60  c[1] = uint8_t(((cp >> 6) & 63) + 128);
    -
    61  c[2] = uint8_t((cp & 63) + 128);
    -
    62  return 3;
    -
    63  } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this
    -
    64  // is not needed
    -
    65  c[0] = uint8_t((cp >> 18) + 240);
    -
    66  c[1] = uint8_t(((cp >> 12) & 63) + 128);
    -
    67  c[2] = uint8_t(((cp >> 6) & 63) + 128);
    -
    68  c[3] = uint8_t((cp & 63) + 128);
    -
    69  return 4;
    -
    70  }
    -
    71  // will return 0 when the code point was too large.
    -
    72  return 0; // bad r
    -
    73 }
    -
    74 
    -
    75 #if SIMDJSON_IS_32BITS // _umul128 for x86, arm
    -
    76 // this is a slow emulation routine for 32-bit
    -
    77 //
    -
    78 static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) {
    -
    79  return x * (uint64_t)y;
    -
    80 }
    -
    81 static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) {
    -
    82  uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd);
    -
    83  uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd);
    -
    84  uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32));
    -
    85  uint64_t adbc_carry = !!(adbc < ad);
    -
    86  uint64_t lo = bd + (adbc << 32);
    -
    87  *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) +
    -
    88  (adbc_carry << 32) + !!(lo < bd);
    -
    89  return lo;
    -
    90 }
    -
    91 #endif
    -
    92 
    -
    93 using internal::value128;
    -
    94 
    -
    95 simdjson_inline value128 full_multiplication(uint64_t value1, uint64_t value2) {
    -
    96  value128 answer;
    -
    97 #if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
    -
    98 #ifdef _M_ARM64
    -
    99  // ARM64 has native support for 64-bit multiplications, no need to emultate
    -
    100  answer.high = __umulh(value1, value2);
    -
    101  answer.low = value1 * value2;
    -
    102 #else
    -
    103  answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64
    -
    104 #endif // _M_ARM64
    -
    105 #else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
    -
    106  __uint128_t r = (static_cast<__uint128_t>(value1)) * value2;
    -
    107  answer.low = uint64_t(r);
    -
    108  answer.high = uint64_t(r >> 64);
    -
    109 #endif
    -
    110  return answer;
    -
    111 }
    -
    112 
    -
    113 } // namespace jsoncharutils
    -
    114 } // unnamed namespace
    -
    115 } // namespace SIMDJSON_IMPLEMENTATION
    -
    116 } // namespace simdjson
    -
    We want to support argument-dependent lookup (ADL).
    +
    15 // return non-zero if not a structural or whitespace char
    +
    16 // zero otherwise
    +
    17 simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) {
    +
    18  return internal::structural_or_whitespace_negated[c];
    +
    19 }
    +
    20 
    +
    21 simdjson_inline uint32_t is_structural_or_whitespace(uint8_t c) {
    +
    22  return internal::structural_or_whitespace[c];
    +
    23 }
    +
    24 
    +
    25 // returns a value with the high 16 bits set if not valid
    +
    26 // otherwise returns the conversion of the 4 hex digits at src into the bottom
    +
    27 // 16 bits of the 32-bit return register
    +
    28 //
    +
    29 // see
    +
    30 // https://lemire.me/blog/2019/04/17/parsing-short-hexadecimal-strings-efficiently/
    +
    31 static inline uint32_t hex_to_u32_nocheck(
    +
    32  const uint8_t *src) { // strictly speaking, static inline is a C-ism
    +
    33  uint32_t v1 = internal::digit_to_val32[630 + src[0]];
    +
    34  uint32_t v2 = internal::digit_to_val32[420 + src[1]];
    +
    35  uint32_t v3 = internal::digit_to_val32[210 + src[2]];
    +
    36  uint32_t v4 = internal::digit_to_val32[0 + src[3]];
    +
    37  return v1 | v2 | v3 | v4;
    +
    38 }
    +
    39 
    +
    40 // given a code point cp, writes to c
    +
    41 // the utf-8 code, outputting the length in
    +
    42 // bytes, if the length is zero, the code point
    +
    43 // is invalid
    +
    44 //
    +
    45 // This can possibly be made faster using pdep
    +
    46 // and clz and table lookups, but JSON documents
    +
    47 // have few escaped code points, and the following
    +
    48 // function looks cheap.
    +
    49 //
    +
    50 // Note: we assume that surrogates are treated separately
    +
    51 //
    +
    52 simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) {
    +
    53  if (cp <= 0x7F) {
    +
    54  c[0] = uint8_t(cp);
    +
    55  return 1; // ascii
    +
    56  }
    +
    57  if (cp <= 0x7FF) {
    +
    58  c[0] = uint8_t((cp >> 6) + 192);
    +
    59  c[1] = uint8_t((cp & 63) + 128);
    +
    60  return 2; // universal plane
    +
    61  // Surrogates are treated elsewhere...
    +
    62  //} //else if (0xd800 <= cp && cp <= 0xdfff) {
    +
    63  // return 0; // surrogates // could put assert here
    +
    64  } else if (cp <= 0xFFFF) {
    +
    65  c[0] = uint8_t((cp >> 12) + 224);
    +
    66  c[1] = uint8_t(((cp >> 6) & 63) + 128);
    +
    67  c[2] = uint8_t((cp & 63) + 128);
    +
    68  return 3;
    +
    69  } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this
    +
    70  // is not needed
    +
    71  c[0] = uint8_t((cp >> 18) + 240);
    +
    72  c[1] = uint8_t(((cp >> 12) & 63) + 128);
    +
    73  c[2] = uint8_t(((cp >> 6) & 63) + 128);
    +
    74  c[3] = uint8_t((cp & 63) + 128);
    +
    75  return 4;
    +
    76  }
    +
    77  // will return 0 when the code point was too large.
    +
    78  return 0; // bad r
    +
    79 }
    +
    80 
    +
    81 #if SIMDJSON_IS_32BITS // _umul128 for x86, arm
    +
    82 // this is a slow emulation routine for 32-bit
    +
    83 //
    +
    84 static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) {
    +
    85  return x * (uint64_t)y;
    +
    86 }
    +
    87 static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) {
    +
    88  uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd);
    +
    89  uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd);
    +
    90  uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32));
    +
    91  uint64_t adbc_carry = !!(adbc < ad);
    +
    92  uint64_t lo = bd + (adbc << 32);
    +
    93  *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) +
    +
    94  (adbc_carry << 32) + !!(lo < bd);
    +
    95  return lo;
    +
    96 }
    +
    97 #endif
    +
    98 
    +
    99 } // namespace jsoncharutils
    +
    100 } // unnamed namespace
    +
    101 } // namespace SIMDJSON_IMPLEMENTATION
    +
    102 } // namespace simdjson
    +
    103 
    +
    104 #endif // SIMDJSON_GENERIC_JSONCHARUTILS_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/jsoncharutils__tables_8h_source.html b/jsoncharutils__tables_8h_source.html index 560b837e4..8450a86c8 100644 --- a/jsoncharutils__tables_8h_source.html +++ b/jsoncharutils__tables_8h_source.html @@ -94,7 +94,7 @@ $(document).ready(function(){initNavTree('jsoncharutils__tables_8h_source.html',
    1 #ifndef SIMDJSON_INTERNAL_JSONCHARUTILS_TABLES_H
    2 #define SIMDJSON_INTERNAL_JSONCHARUTILS_TABLES_H
    3 
    -
    4 #include "simdjson/common_defs.h"
    +
    4 #include "simdjson/base.h"
    5 
    6 #ifdef JSON_TEST_STRINGS
    7 void found_string(const uint8_t *buf, const uint8_t *parsed_begin,
    @@ -117,7 +117,7 @@ $(document).ready(function(){initNavTree('jsoncharutils__tables_8h_source.html',
    24 } // namespace simdjson
    25 
    26 #endif // SIMDJSON_INTERNAL_JSONCHARUTILS_TABLES_H
    -
    We want to support argument-dependent lookup (ADL).
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/jsonformatutils_8h_source.html b/jsonformatutils_8h_source.html index fbe31c7d1..2b5eed7d9 100644 --- a/jsonformatutils_8h_source.html +++ b/jsonformatutils_8h_source.html @@ -94,70 +94,69 @@ $(document).ready(function(){initNavTree('jsonformatutils_8h_source.html',''); i
    1 #ifndef SIMDJSON_INTERNAL_JSONFORMATUTILS_H
    2 #define SIMDJSON_INTERNAL_JSONFORMATUTILS_H
    3 
    -
    4 #include <iomanip>
    -
    5 #include <ostream>
    -
    6 #include <sstream>
    -
    7 
    -
    8 namespace simdjson {
    -
    9 namespace internal {
    -
    10 
    -
    11 class escape_json_string;
    -
    12 
    -
    13 inline std::ostream& operator<<(std::ostream& out, const escape_json_string &str);
    -
    14 
    -
    15 class escape_json_string {
    -
    16 public:
    -
    17  escape_json_string(std::string_view _str) noexcept : str{_str} {}
    -
    18  operator std::string() const noexcept { std::stringstream s; s << *this; return s.str(); }
    -
    19 private:
    -
    20  std::string_view str;
    -
    21  friend std::ostream& operator<<(std::ostream& out, const escape_json_string &unescaped);
    -
    22 };
    -
    23 
    -
    24 inline std::ostream& operator<<(std::ostream& out, const escape_json_string &unescaped) {
    -
    25  for (size_t i=0; i<unescaped.str.length(); i++) {
    -
    26  switch (unescaped.str[i]) {
    -
    27  case '\b':
    -
    28  out << "\\b";
    -
    29  break;
    -
    30  case '\f':
    -
    31  out << "\\f";
    -
    32  break;
    -
    33  case '\n':
    -
    34  out << "\\n";
    -
    35  break;
    -
    36  case '\r':
    -
    37  out << "\\r";
    -
    38  break;
    -
    39  case '\"':
    -
    40  out << "\\\"";
    -
    41  break;
    -
    42  case '\t':
    -
    43  out << "\\t";
    -
    44  break;
    -
    45  case '\\':
    -
    46  out << "\\\\";
    -
    47  break;
    -
    48  default:
    -
    49  if (static_cast<unsigned char>(unescaped.str[i]) <= 0x1F) {
    -
    50  // TODO can this be done once at the beginning, or will it mess up << char?
    -
    51  std::ios::fmtflags f(out.flags());
    -
    52  out << "\\u" << std::hex << std::setw(4) << std::setfill('0') << int(unescaped.str[i]);
    -
    53  out.flags(f);
    -
    54  } else {
    -
    55  out << unescaped.str[i];
    -
    56  }
    -
    57  }
    -
    58  }
    -
    59  return out;
    -
    60 }
    -
    61 
    -
    62 } // namespace internal
    -
    63 } // namespace simdjson
    -
    64 
    -
    65 #endif // SIMDJSON_INTERNAL_JSONFORMATUTILS_H
    -
    We want to support argument-dependent lookup (ADL).
    -
    std::ostream & operator<<(std::ostream &out, error_code error) noexcept
    Write the error message to the output stream.
    Definition: error-inl.h:36
    +
    4 #include "simdjson/base.h"
    +
    5 #include <iomanip>
    +
    6 #include <ostream>
    +
    7 #include <sstream>
    +
    8 
    +
    9 namespace simdjson {
    +
    10 namespace internal {
    +
    11 
    +
    12 inline std::ostream& operator<<(std::ostream& out, const escape_json_string &str);
    +
    13 
    +
    14 class escape_json_string {
    +
    15 public:
    +
    16  escape_json_string(std::string_view _str) noexcept : str{_str} {}
    +
    17  operator std::string() const noexcept { std::stringstream s; s << *this; return s.str(); }
    +
    18 private:
    +
    19  std::string_view str;
    +
    20  friend std::ostream& operator<<(std::ostream& out, const escape_json_string &unescaped);
    +
    21 };
    +
    22 
    +
    23 inline std::ostream& operator<<(std::ostream& out, const escape_json_string &unescaped) {
    +
    24  for (size_t i=0; i<unescaped.str.length(); i++) {
    +
    25  switch (unescaped.str[i]) {
    +
    26  case '\b':
    +
    27  out << "\\b";
    +
    28  break;
    +
    29  case '\f':
    +
    30  out << "\\f";
    +
    31  break;
    +
    32  case '\n':
    +
    33  out << "\\n";
    +
    34  break;
    +
    35  case '\r':
    +
    36  out << "\\r";
    +
    37  break;
    +
    38  case '\"':
    +
    39  out << "\\\"";
    +
    40  break;
    +
    41  case '\t':
    +
    42  out << "\\t";
    +
    43  break;
    +
    44  case '\\':
    +
    45  out << "\\\\";
    +
    46  break;
    +
    47  default:
    +
    48  if (static_cast<unsigned char>(unescaped.str[i]) <= 0x1F) {
    +
    49  // TODO can this be done once at the beginning, or will it mess up << char?
    +
    50  std::ios::fmtflags f(out.flags());
    +
    51  out << "\\u" << std::hex << std::setw(4) << std::setfill('0') << int(unescaped.str[i]);
    +
    52  out.flags(f);
    +
    53  } else {
    +
    54  out << unescaped.str[i];
    +
    55  }
    +
    56  }
    +
    57  }
    +
    58  return out;
    +
    59 }
    +
    60 
    +
    61 } // namespace internal
    +
    62 } // namespace simdjson
    +
    63 
    +
    64 #endif // SIMDJSON_INTERNAL_JSONFORMATUTILS_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    std::ostream & operator<<(std::ostream &out, error_code error) noexcept
    Write the error message to the output stream.
    Definition: error-inl.h:35
    diff --git a/jsonioutil_8h_source.html b/jsonioutil_8h_source.html index 92732042d..c42a71fe8 100644 --- a/jsonioutil_8h_source.html +++ b/jsonioutil_8h_source.html @@ -94,7 +94,7 @@ $(document).ready(function(){initNavTree('jsonioutil_8h_source.html',''); initRe
    1 #ifndef SIMDJSON_JSONIOUTIL_H
    2 #define SIMDJSON_JSONIOUTIL_H
    3 
    -
    4 #include "simdjson/common_defs.h"
    +
    4 #include "simdjson/base.h"
    5 #include "simdjson/padded_string.h"
    6 
    7 namespace simdjson {
    @@ -111,8 +111,8 @@ $(document).ready(function(){initNavTree('jsonioutil_8h_source.html',''); initRe
    18 } // namespace simdjson
    19 
    20 #endif // SIMDJSON_JSONIOUTIL_H
    -
    We want to support argument-dependent lookup (ADL).
    -
    static simdjson_result< padded_string > load(std::string_view path) noexcept
    Load this padded string from a file.
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    +
    static simdjson_result< padded_string > load(std::string_view path) noexcept
    Load this padded string from a file.
    diff --git a/jsonparser_8h_source.html b/jsonparser_8h_source.html index 3db96230a..8cea745a3 100644 --- a/jsonparser_8h_source.html +++ b/jsonparser_8h_source.html @@ -96,9 +96,9 @@ $(document).ready(function(){initNavTree('jsonparser_8h_source.html',''); initRe
    3 #ifndef SIMDJSON_DOM_JSONPARSER_H
    4 #define SIMDJSON_DOM_JSONPARSER_H
    5 
    -
    6 #include "simdjson/dom/document.h"
    -
    7 #include "simdjson/dom/parsedjson.h"
    -
    8 #include "simdjson/jsonioutil.h"
    +
    6 #include "simdjson/dom/base.h"
    +
    7 #include "simdjson/dom/parser.h"
    +
    8 #include "simdjson/dom/element.h"
    9 
    10 namespace simdjson {
    11 
    @@ -208,7 +208,7 @@ $(document).ready(function(){initNavTree('jsonparser_8h_source.html',''); initRe
    117 } // namespace simdjson
    118 
    119 #endif // SIMDJSON_DOM_JSONPARSER_H
    -
    We want to support argument-dependent lookup (ADL).
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    @ SUCCESS
    No error.
    Definition: error.h:18
    diff --git a/logger-inl_8h_source.html b/logger-inl_8h_source.html index 633626936..abb9395f9 100644 --- a/logger-inl_8h_source.html +++ b/logger-inl_8h_source.html @@ -91,218 +91,230 @@ $(document).ready(function(){initNavTree('logger-inl_8h_source.html',''); initRe
    logger-inl.h
    -
    1 namespace simdjson {
    -
    2 namespace SIMDJSON_IMPLEMENTATION {
    -
    3 namespace ondemand {
    -
    4 namespace logger {
    -
    5 
    -
    6 static constexpr const char * DASHES = "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------";
    -
    7 static constexpr const int LOG_EVENT_LEN = 20;
    -
    8 static constexpr const int LOG_BUFFER_LEN = 30;
    -
    9 static constexpr const int LOG_SMALL_BUFFER_LEN = 10;
    -
    10 static int log_depth = 0; // Not threadsafe. Log only.
    -
    11 
    -
    12 // Helper to turn unprintable or newline characters into spaces
    -
    13 static inline char printable_char(char c) {
    -
    14  if (c >= 0x20) {
    -
    15  return c;
    -
    16  } else {
    -
    17  return ' ';
    -
    18  }
    -
    19 }
    -
    20 
    -
    21 template<typename... Args>
    -
    22 static inline std::string string_format(const std::string& format, const Args&... args)
    -
    23 {
    -
    24  SIMDJSON_PUSH_DISABLE_ALL_WARNINGS
    -
    25  int size_s = std::snprintf(nullptr, 0, format.c_str(), args...) + 1;
    -
    26  auto size = static_cast<size_t>(size_s);
    -
    27  if (size <= 0) return std::string();
    -
    28  std::unique_ptr<char[]> buf(new char[size]);
    -
    29  std::snprintf(buf.get(), size, format.c_str(), args...);
    -
    30  SIMDJSON_POP_DISABLE_WARNINGS
    -
    31  return std::string(buf.get(), buf.get() + size - 1);
    -
    32 }
    -
    33 
    -
    34 static inline log_level get_log_level_from_env()
    -
    35 {
    -
    36  SIMDJSON_PUSH_DISABLE_WARNINGS
    -
    37  SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe
    -
    38  char *lvl = getenv("SIMDJSON_LOG_LEVEL");
    -
    39  SIMDJSON_POP_DISABLE_WARNINGS
    -
    40  if (lvl && simdjson_strcasecmp(lvl, "ERROR") == 0) { return log_level::error; }
    -
    41  return log_level::info;
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #include "simdjson/generic/ondemand/logger.h"
    +
    7 #include "simdjson/generic/ondemand/json_iterator.h"
    +
    8 #include "simdjson/generic/ondemand/value_iterator.h"
    +
    9 #endif // SIMDJSON_AMALGAMATED
    +
    10 
    +
    11 namespace simdjson {
    +
    12 namespace SIMDJSON_IMPLEMENTATION {
    +
    13 namespace ondemand {
    +
    14 namespace logger {
    +
    15 
    +
    16 static constexpr const char * DASHES = "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------";
    +
    17 static constexpr const int LOG_EVENT_LEN = 20;
    +
    18 static constexpr const int LOG_BUFFER_LEN = 30;
    +
    19 static constexpr const int LOG_SMALL_BUFFER_LEN = 10;
    +
    20 static int log_depth = 0; // Not threadsafe. Log only.
    +
    21 
    +
    22 // Helper to turn unprintable or newline characters into spaces
    +
    23 static inline char printable_char(char c) {
    +
    24  if (c >= 0x20) {
    +
    25  return c;
    +
    26  } else {
    +
    27  return ' ';
    +
    28  }
    +
    29 }
    +
    30 
    +
    31 template<typename... Args>
    +
    32 static inline std::string string_format(const std::string& format, const Args&... args)
    +
    33 {
    +
    34  SIMDJSON_PUSH_DISABLE_ALL_WARNINGS
    +
    35  int size_s = std::snprintf(nullptr, 0, format.c_str(), args...) + 1;
    +
    36  auto size = static_cast<size_t>(size_s);
    +
    37  if (size <= 0) return std::string();
    +
    38  std::unique_ptr<char[]> buf(new char[size]);
    +
    39  std::snprintf(buf.get(), size, format.c_str(), args...);
    +
    40  SIMDJSON_POP_DISABLE_WARNINGS
    +
    41  return std::string(buf.get(), buf.get() + size - 1);
    42 }
    43 
    -
    44 static inline log_level log_threshold()
    +
    44 static inline log_level get_log_level_from_env()
    45 {
    -
    46  static log_level threshold = get_log_level_from_env();
    -
    47  return threshold;
    -
    48 }
    -
    49 
    -
    50 static inline bool should_log(log_level level)
    -
    51 {
    -
    52  return level >= log_threshold();
    -
    53 }
    -
    54 
    -
    55 inline void log_event(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept {
    -
    56  log_line(iter, "", type, detail, delta, depth_delta, log_level::info);
    -
    57 }
    -
    58 
    -
    59 inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept {
    -
    60  log_line(iter, index, depth, "", type, detail, log_level::info);
    -
    61 }
    -
    62 inline void log_value(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept {
    -
    63  log_line(iter, "", type, detail, delta, depth_delta, log_level::info);
    -
    64 }
    -
    65 
    -
    66 inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept {
    -
    67  log_line(iter, index, depth, "+", type, detail, log_level::info);
    -
    68  if (LOG_ENABLED) { log_depth++; }
    -
    69 }
    -
    70 inline void log_start_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept {
    -
    71  log_line(iter, "+", type, "", delta, depth_delta, log_level::info);
    -
    72  if (LOG_ENABLED) { log_depth++; }
    -
    73 }
    -
    74 
    -
    75 inline void log_end_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept {
    -
    76  if (LOG_ENABLED) { log_depth--; }
    -
    77  log_line(iter, "-", type, "", delta, depth_delta, log_level::info);
    -
    78 }
    -
    79 
    -
    80 inline void log_error(const json_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept {
    -
    81  log_line(iter, "ERROR: ", error, detail, delta, depth_delta, log_level::error);
    -
    82 }
    -
    83 inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail) noexcept {
    -
    84  log_line(iter, index, depth, "ERROR: ", error, detail, log_level::error);
    -
    85 }
    -
    86 
    -
    87 inline void log_event(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept {
    -
    88  log_event(iter.json_iter(), type, detail, delta, depth_delta);
    -
    89 }
    -
    90 
    -
    91 inline void log_value(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept {
    -
    92  log_value(iter.json_iter(), type, detail, delta, depth_delta);
    -
    93 }
    -
    94 
    -
    95 inline void log_start_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept {
    -
    96  log_start_value(iter.json_iter(), type, delta, depth_delta);
    -
    97 }
    -
    98 
    -
    99 inline void log_end_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept {
    -
    100  log_end_value(iter.json_iter(), type, delta, depth_delta);
    -
    101 }
    -
    102 
    -
    103 inline void log_error(const value_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept {
    -
    104  log_error(iter.json_iter(), error, detail, delta, depth_delta);
    -
    105 }
    -
    106 
    -
    107 inline void log_headers() noexcept {
    -
    108  if (LOG_ENABLED) {
    -
    109  if (simdjson_unlikely(should_log(log_level::info))) {
    -
    110  // Technically a static variable is not thread-safe, but if you are using threads and logging... well...
    -
    111  static bool displayed_hint{false};
    -
    112  log_depth = 0;
    -
    113  printf("\n");
    -
    114  if (!displayed_hint) {
    -
    115  // We only print this helpful header once.
    -
    116  printf("# Logging provides the depth and position of the iterator user-visible steps:\n");
    -
    117  printf("# +array says 'this is where we were when we discovered the start array'\n");
    -
    118  printf(
    -
    119  "# -array says 'this is where we were when we ended the array'\n");
    -
    120  printf("# skip says 'this is a structural or value I am skipping'\n");
    -
    121  printf("# +/-skip says 'this is a start/end array or object I am skipping'\n");
    -
    122  printf("#\n");
    -
    123  printf("# The indentation of the terms (array, string,...) indicates the depth,\n");
    -
    124  printf("# in addition to the depth being displayed.\n");
    -
    125  printf("#\n");
    -
    126  printf("# Every token in the document has a single depth determined by the tokens before it,\n");
    -
    127  printf("# and is not affected by what the token actually is.\n");
    -
    128  printf("#\n");
    -
    129  printf("# Not all structural elements are presented as tokens in the logs.\n");
    -
    130  printf("#\n");
    -
    131  printf("# We never give control to the user within an empty array or an empty object.\n");
    +
    46  SIMDJSON_PUSH_DISABLE_WARNINGS
    +
    47  SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe
    +
    48  char *lvl = getenv("SIMDJSON_LOG_LEVEL");
    +
    49  SIMDJSON_POP_DISABLE_WARNINGS
    +
    50  if (lvl && simdjson_strcasecmp(lvl, "ERROR") == 0) { return log_level::error; }
    +
    51  return log_level::info;
    +
    52 }
    +
    53 
    +
    54 static inline log_level log_threshold()
    +
    55 {
    +
    56  static log_level threshold = get_log_level_from_env();
    +
    57  return threshold;
    +
    58 }
    +
    59 
    +
    60 static inline bool should_log(log_level level)
    +
    61 {
    +
    62  return level >= log_threshold();
    +
    63 }
    +
    64 
    +
    65 inline void log_event(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept {
    +
    66  log_line(iter, "", type, detail, delta, depth_delta, log_level::info);
    +
    67 }
    +
    68 
    +
    69 inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept {
    +
    70  log_line(iter, index, depth, "", type, detail, log_level::info);
    +
    71 }
    +
    72 inline void log_value(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept {
    +
    73  log_line(iter, "", type, detail, delta, depth_delta, log_level::info);
    +
    74 }
    +
    75 
    +
    76 inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept {
    +
    77  log_line(iter, index, depth, "+", type, detail, log_level::info);
    +
    78  if (LOG_ENABLED) { log_depth++; }
    +
    79 }
    +
    80 inline void log_start_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept {
    +
    81  log_line(iter, "+", type, "", delta, depth_delta, log_level::info);
    +
    82  if (LOG_ENABLED) { log_depth++; }
    +
    83 }
    +
    84 
    +
    85 inline void log_end_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept {
    +
    86  if (LOG_ENABLED) { log_depth--; }
    +
    87  log_line(iter, "-", type, "", delta, depth_delta, log_level::info);
    +
    88 }
    +
    89 
    +
    90 inline void log_error(const json_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept {
    +
    91  log_line(iter, "ERROR: ", error, detail, delta, depth_delta, log_level::error);
    +
    92 }
    +
    93 inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail) noexcept {
    +
    94  log_line(iter, index, depth, "ERROR: ", error, detail, log_level::error);
    +
    95 }
    +
    96 
    +
    97 inline void log_event(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept {
    +
    98  log_event(iter.json_iter(), type, detail, delta, depth_delta);
    +
    99 }
    +
    100 
    +
    101 inline void log_value(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept {
    +
    102  log_value(iter.json_iter(), type, detail, delta, depth_delta);
    +
    103 }
    +
    104 
    +
    105 inline void log_start_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept {
    +
    106  log_start_value(iter.json_iter(), type, delta, depth_delta);
    +
    107 }
    +
    108 
    +
    109 inline void log_end_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept {
    +
    110  log_end_value(iter.json_iter(), type, delta, depth_delta);
    +
    111 }
    +
    112 
    +
    113 inline void log_error(const value_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept {
    +
    114  log_error(iter.json_iter(), error, detail, delta, depth_delta);
    +
    115 }
    +
    116 
    +
    117 inline void log_headers() noexcept {
    +
    118  if (LOG_ENABLED) {
    +
    119  if (simdjson_unlikely(should_log(log_level::info))) {
    +
    120  // Technically a static variable is not thread-safe, but if you are using threads and logging... well...
    +
    121  static bool displayed_hint{false};
    +
    122  log_depth = 0;
    +
    123  printf("\n");
    +
    124  if (!displayed_hint) {
    +
    125  // We only print this helpful header once.
    +
    126  printf("# Logging provides the depth and position of the iterator user-visible steps:\n");
    +
    127  printf("# +array says 'this is where we were when we discovered the start array'\n");
    +
    128  printf(
    +
    129  "# -array says 'this is where we were when we ended the array'\n");
    +
    130  printf("# skip says 'this is a structural or value I am skipping'\n");
    +
    131  printf("# +/-skip says 'this is a start/end array or object I am skipping'\n");
    132  printf("#\n");
    -
    133  printf("# Inside an array, having a depth greater than the array's depth means that\n");
    -
    134  printf("# we are pointing inside a value.\n");
    -
    135  printf("# Having a depth equal to the array means that we are pointing right before a value.\n");
    -
    136  printf("# Having a depth smaller than the array means that we have moved beyond the array.\n");
    -
    137  displayed_hint = true;
    -
    138  }
    -
    139  printf("\n");
    -
    140  printf("| %-*s ", LOG_EVENT_LEN, "Event");
    -
    141  printf("| %-*s ", LOG_BUFFER_LEN, "Buffer");
    -
    142  printf("| %-*s ", LOG_SMALL_BUFFER_LEN, "Next");
    -
    143  // printf("| %-*s ", 5, "Next#");
    -
    144  printf("| %-*s ", 5, "Depth");
    -
    145  printf("| Detail ");
    -
    146  printf("|\n");
    -
    147 
    -
    148  printf("|%.*s", LOG_EVENT_LEN + 2, DASHES);
    -
    149  printf("|%.*s", LOG_BUFFER_LEN + 2, DASHES);
    -
    150  printf("|%.*s", LOG_SMALL_BUFFER_LEN + 2, DASHES);
    -
    151  // printf("|%.*s", 5+2, DASHES);
    -
    152  printf("|%.*s", 5 + 2, DASHES);
    -
    153  printf("|--------");
    -
    154  printf("|\n");
    -
    155  fflush(stdout);
    -
    156  }
    -
    157  }
    -
    158 }
    -
    159 
    -
    160 template <typename... Args>
    -
    161 inline void log_line(const json_iterator &iter, const char *title_prefix, const char *title, std::string_view detail, int delta, int depth_delta, log_level level, Args&&... args) noexcept {
    -
    162  log_line(iter, iter.position()+delta, depth_t(iter.depth()+depth_delta), title_prefix, title, detail, level, std::forward<Args>(args)...);
    -
    163 }
    -
    164 
    -
    165 template <typename... Args>
    -
    166 inline void log_line(const json_iterator &iter, token_position index, depth_t depth, const char *title_prefix, const char *title, std::string_view detail, log_level level, Args&&... args) noexcept {
    -
    167  if (LOG_ENABLED) {
    -
    168  if (simdjson_unlikely(should_log(level))) {
    -
    169  const int indent = depth * 2;
    -
    170  const auto buf = iter.token.buf;
    -
    171  auto msg = string_format(title, std::forward<Args>(args)...);
    -
    172  printf("| %*s%s%-*s ", indent, "", title_prefix,
    -
    173  LOG_EVENT_LEN - indent - int(strlen(title_prefix)), msg.c_str());
    -
    174  {
    -
    175  // Print the current structural.
    -
    176  printf("| ");
    -
    177  // Before we begin, the index might point right before the document.
    -
    178  // This could be unsafe, see https://github.com/simdjson/simdjson/discussions/1938
    -
    179  if (index < iter._root) {
    -
    180  printf("%*s", LOG_BUFFER_LEN, "");
    -
    181  } else {
    -
    182  auto current_structural = &buf[*index];
    -
    183  for (int i = 0; i < LOG_BUFFER_LEN; i++) {
    -
    184  printf("%c", printable_char(current_structural[i]));
    -
    185  }
    -
    186  }
    -
    187  printf(" ");
    -
    188  }
    -
    189  {
    -
    190  // Print the next structural.
    -
    191  printf("| ");
    -
    192  auto next_structural = &buf[*(index + 1)];
    -
    193  for (int i = 0; i < LOG_SMALL_BUFFER_LEN; i++) {
    -
    194  printf("%c", printable_char(next_structural[i]));
    -
    195  }
    -
    196  printf(" ");
    -
    197  }
    -
    198  // printf("| %5u ", *(index+1));
    -
    199  printf("| %5i ", depth);
    -
    200  printf("| %6.*s ", int(detail.size()), detail.data());
    -
    201  printf("|\n");
    -
    202  fflush(stdout);
    -
    203  }
    -
    204  }
    -
    205 }
    -
    206 
    -
    207 } // namespace logger
    -
    208 } // namespace ondemand
    -
    209 } // namespace SIMDJSON_IMPLEMENTATION
    -
    210 } // namespace simdjson
    -
    int32_t depth_t
    Represents the depth of a JSON value (number of nested arrays/objects).
    Definition: ondemand.h:11
    -
    We want to support argument-dependent lookup (ADL).
    +
    133  printf("# The indentation of the terms (array, string,...) indicates the depth,\n");
    +
    134  printf("# in addition to the depth being displayed.\n");
    +
    135  printf("#\n");
    +
    136  printf("# Every token in the document has a single depth determined by the tokens before it,\n");
    +
    137  printf("# and is not affected by what the token actually is.\n");
    +
    138  printf("#\n");
    +
    139  printf("# Not all structural elements are presented as tokens in the logs.\n");
    +
    140  printf("#\n");
    +
    141  printf("# We never give control to the user within an empty array or an empty object.\n");
    +
    142  printf("#\n");
    +
    143  printf("# Inside an array, having a depth greater than the array's depth means that\n");
    +
    144  printf("# we are pointing inside a value.\n");
    +
    145  printf("# Having a depth equal to the array means that we are pointing right before a value.\n");
    +
    146  printf("# Having a depth smaller than the array means that we have moved beyond the array.\n");
    +
    147  displayed_hint = true;
    +
    148  }
    +
    149  printf("\n");
    +
    150  printf("| %-*s ", LOG_EVENT_LEN, "Event");
    +
    151  printf("| %-*s ", LOG_BUFFER_LEN, "Buffer");
    +
    152  printf("| %-*s ", LOG_SMALL_BUFFER_LEN, "Next");
    +
    153  // printf("| %-*s ", 5, "Next#");
    +
    154  printf("| %-*s ", 5, "Depth");
    +
    155  printf("| Detail ");
    +
    156  printf("|\n");
    +
    157 
    +
    158  printf("|%.*s", LOG_EVENT_LEN + 2, DASHES);
    +
    159  printf("|%.*s", LOG_BUFFER_LEN + 2, DASHES);
    +
    160  printf("|%.*s", LOG_SMALL_BUFFER_LEN + 2, DASHES);
    +
    161  // printf("|%.*s", 5+2, DASHES);
    +
    162  printf("|%.*s", 5 + 2, DASHES);
    +
    163  printf("|--------");
    +
    164  printf("|\n");
    +
    165  fflush(stdout);
    +
    166  }
    +
    167  }
    +
    168 }
    +
    169 
    +
    170 template <typename... Args>
    +
    171 inline void log_line(const json_iterator &iter, const char *title_prefix, const char *title, std::string_view detail, int delta, int depth_delta, log_level level, Args&&... args) noexcept {
    +
    172  log_line(iter, iter.position()+delta, depth_t(iter.depth()+depth_delta), title_prefix, title, detail, level, std::forward<Args>(args)...);
    +
    173 }
    +
    174 
    +
    175 template <typename... Args>
    +
    176 inline void log_line(const json_iterator &iter, token_position index, depth_t depth, const char *title_prefix, const char *title, std::string_view detail, log_level level, Args&&... args) noexcept {
    +
    177  if (LOG_ENABLED) {
    +
    178  if (simdjson_unlikely(should_log(level))) {
    +
    179  const int indent = depth * 2;
    +
    180  const auto buf = iter.token.buf;
    +
    181  auto msg = string_format(title, std::forward<Args>(args)...);
    +
    182  printf("| %*s%s%-*s ", indent, "", title_prefix,
    +
    183  LOG_EVENT_LEN - indent - int(strlen(title_prefix)), msg.c_str());
    +
    184  {
    +
    185  // Print the current structural.
    +
    186  printf("| ");
    +
    187  // Before we begin, the index might point right before the document.
    +
    188  // This could be unsafe, see https://github.com/simdjson/simdjson/discussions/1938
    +
    189  if (index < iter._root) {
    +
    190  printf("%*s", LOG_BUFFER_LEN, "");
    +
    191  } else {
    +
    192  auto current_structural = &buf[*index];
    +
    193  for (int i = 0; i < LOG_BUFFER_LEN; i++) {
    +
    194  printf("%c", printable_char(current_structural[i]));
    +
    195  }
    +
    196  }
    +
    197  printf(" ");
    +
    198  }
    +
    199  {
    +
    200  // Print the next structural.
    +
    201  printf("| ");
    +
    202  auto next_structural = &buf[*(index + 1)];
    +
    203  for (int i = 0; i < LOG_SMALL_BUFFER_LEN; i++) {
    +
    204  printf("%c", printable_char(next_structural[i]));
    +
    205  }
    +
    206  printf(" ");
    +
    207  }
    +
    208  // printf("| %5u ", *(index+1));
    +
    209  printf("| %5i ", depth);
    +
    210  printf("| %6.*s ", int(detail.size()), detail.data());
    +
    211  printf("|\n");
    +
    212  fflush(stdout);
    +
    213  }
    +
    214  }
    +
    215 }
    +
    216 
    +
    217 } // namespace logger
    +
    218 } // namespace ondemand
    +
    219 } // namespace SIMDJSON_IMPLEMENTATION
    +
    220 } // namespace simdjson
    +
    221 
    +
    222 #endif // SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H
    +
    int32_t depth_t
    Represents the depth of a JSON value (number of nested arrays/objects).
    Definition: base.h:18
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/logger_8h_source.html b/logger_8h_source.html index 6ee46cd0f..7fbfe8e51 100644 --- a/logger_8h_source.html +++ b/logger_8h_source.html @@ -91,60 +91,66 @@ $(document).ready(function(){initNavTree('logger_8h_source.html',''); initResiza
    logger.h
    -
    1 namespace simdjson {
    -
    2 namespace SIMDJSON_IMPLEMENTATION {
    -
    3 namespace ondemand {
    -
    4 
    -
    5 class json_iterator;
    -
    6 class value_iterator;
    +
    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_H
    +
    2 
    +
    3 #ifndef SIMDJSON_AMALGAMATED
    +
    4 #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_H
    +
    5 #include "simdjson/generic/ondemand/base.h"
    +
    6 #endif // SIMDJSON_AMALGAMATED
    7 
    -
    8 // Logging should be free unless SIMDJSON_VERBOSE_LOGGING is set. Importantly, it is critical
    -
    9 // that the call to the log functions be side-effect free. Thus, for example, you should not
    -
    10 // create temporary std::string instances.
    -
    11 namespace logger {
    -
    12 
    -
    13 enum class log_level : int32_t {
    -
    14  info = 0,
    -
    15  error = 1
    -
    16 };
    -
    17 
    -
    18 #if SIMDJSON_VERBOSE_LOGGING
    -
    19  static constexpr const bool LOG_ENABLED = true;
    -
    20 #else
    -
    21  static constexpr const bool LOG_ENABLED = false;
    -
    22 #endif
    -
    23 
    -
    24 // We do not want these functions to be 'really inlined' since real inlining is
    -
    25 // for performance purposes and if you are using the loggers, you do not care about
    -
    26 // performance (or should not).
    -
    27 static inline void log_headers() noexcept;
    -
    28 // If args are provided, title will be treated as format string
    -
    29 template <typename... Args>
    -
    30 static inline void log_line(const json_iterator &iter, token_position index, depth_t depth, const char *title_prefix, const char *title, std::string_view detail, logger::log_level level, Args&&... args) noexcept;
    -
    31 template <typename... Args>
    -
    32 static inline void log_line(const json_iterator &iter, const char *title_prefix, const char *title, std::string_view detail, int delta, int depth_delta, logger::log_level level, Args&&... args) noexcept;
    -
    33 static inline void log_event(const json_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept;
    -
    34 static inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept;
    -
    35 static inline void log_value(const json_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept;
    -
    36 static inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept;
    -
    37 static inline void log_start_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept;
    -
    38 static inline void log_end_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept;
    -
    39 
    -
    40 static inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail="") noexcept;
    -
    41 static inline void log_error(const json_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept;
    -
    42 
    -
    43 static inline void log_event(const value_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept;
    -
    44 static inline void log_value(const value_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept;
    -
    45 static inline void log_start_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept;
    -
    46 static inline void log_end_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept;
    -
    47 static inline void log_error(const value_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept;
    -
    48 
    -
    49 } // namespace logger
    -
    50 } // namespace ondemand
    -
    51 } // namespace SIMDJSON_IMPLEMENTATION
    -
    52 } // namespace simdjson
    -
    int32_t depth_t
    Represents the depth of a JSON value (number of nested arrays/objects).
    Definition: ondemand.h:11
    -
    We want to support argument-dependent lookup (ADL).
    +
    8 namespace simdjson {
    +
    9 namespace SIMDJSON_IMPLEMENTATION {
    +
    10 namespace ondemand {
    +
    11 
    +
    12 // Logging should be free unless SIMDJSON_VERBOSE_LOGGING is set. Importantly, it is critical
    +
    13 // that the call to the log functions be side-effect free. Thus, for example, you should not
    +
    14 // create temporary std::string instances.
    +
    15 namespace logger {
    +
    16 
    +
    17 enum class log_level : int32_t {
    +
    18  info = 0,
    +
    19  error = 1
    +
    20 };
    +
    21 
    +
    22 #if SIMDJSON_VERBOSE_LOGGING
    +
    23  static constexpr const bool LOG_ENABLED = true;
    +
    24 #else
    +
    25  static constexpr const bool LOG_ENABLED = false;
    +
    26 #endif
    +
    27 
    +
    28 // We do not want these functions to be 'really inlined' since real inlining is
    +
    29 // for performance purposes and if you are using the loggers, you do not care about
    +
    30 // performance (or should not).
    +
    31 static inline void log_headers() noexcept;
    +
    32 // If args are provided, title will be treated as format string
    +
    33 template <typename... Args>
    +
    34 static inline void log_line(const json_iterator &iter, token_position index, depth_t depth, const char *title_prefix, const char *title, std::string_view detail, logger::log_level level, Args&&... args) noexcept;
    +
    35 template <typename... Args>
    +
    36 static inline void log_line(const json_iterator &iter, const char *title_prefix, const char *title, std::string_view detail, int delta, int depth_delta, logger::log_level level, Args&&... args) noexcept;
    +
    37 static inline void log_event(const json_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept;
    +
    38 static inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept;
    +
    39 static inline void log_value(const json_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept;
    +
    40 static inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept;
    +
    41 static inline void log_start_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept;
    +
    42 static inline void log_end_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept;
    +
    43 
    +
    44 static inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail="") noexcept;
    +
    45 static inline void log_error(const json_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept;
    +
    46 
    +
    47 static inline void log_event(const value_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept;
    +
    48 static inline void log_value(const value_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept;
    +
    49 static inline void log_start_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept;
    +
    50 static inline void log_end_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept;
    +
    51 static inline void log_error(const value_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept;
    +
    52 
    +
    53 } // namespace logger
    +
    54 } // namespace ondemand
    +
    55 } // namespace SIMDJSON_IMPLEMENTATION
    +
    56 } // namespace simdjson
    +
    57 
    +
    58 #endif // SIMDJSON_GENERIC_ONDEMAND_LOGGER_H
    +
    int32_t depth_t
    Represents the depth of a JSON value (number of nested arrays/objects).
    Definition: base.h:18
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    diff --git a/md_doc_dom.html b/md_doc_dom.html index 2caa1981f..37450b6fe 100644 --- a/md_doc_dom.html +++ b/md_doc_dom.html @@ -157,7 +157,7 @@ Using the Parsed JSON

    Note that array[0] does not compile, because implementing [] gives the impression indexing is a O(1) operation, which it is not presently in simdjson. Instead, you should iterate over the elements using a for-loop, as in our examples.

    * Array and Object size Given an array or an object, you can get its size (number of elements or keys) with the size() method. -
  • Checking an Element Type: You can check an element's type with element.type(). It returns an element_type with values such as simdjson::dom::element_type::ARRAY, simdjson::dom::element_type::OBJECT, simdjson::dom::element_type::INT64, simdjson::dom::element_type::UINT64,simdjson::dom::element_type::DOUBLE, simdjson::dom::element_type::STRING, simdjson::dom::element_type::BOOL or, simdjson::dom::element_type::NULL_VALUE.
  • +
  • Checking an Element Type: You can check an element's type with element.type(). It returns an element_type with values such as simdjson::dom::element_type::ARRAY, simdjson::dom::element_type::OBJECT, simdjson::dom::element_type::INT64, simdjson::dom::element_type::UINT64,simdjson::dom::element_type::DOUBLE, simdjson::dom::element_type::STRING, simdjson::dom::element_type::BOOL or, simdjson::dom::element_type::NULL_VALUE.
  • Output to streams and strings: Given a document or an element (or node) out of a JSON document, you can output a minified string version using the C++ stream idiom (out << element). You can also request the construction of a minified string version (simdjson::minify(element)) or a prettified string version (simdjson::prettify(element)). Numbers are serialized as 64-bit floating-point numbers (double).
  • diff --git a/md_doc_ondemand_design.html b/md_doc_ondemand_design.html index 5fcc4e338..0887ef572 100644 --- a/md_doc_ondemand_design.html +++ b/md_doc_ondemand_design.html @@ -575,7 +575,7 @@ Checking Your CPU Selection (x64 systems)

    Given that the On Demand API offer limited runtime dispatching, it matters that your code is compiled against a specific CPU target. You should verify that the code is compiled against the target you expect. Thankfully, the simdjson library will tell you exactly what it detects as an implementation: icelake (AVX512 x64 processors), haswell (AVX2 x64 processors), westmere (SSE4 x64 processors), arm64 (64-bit ARM), ppc64 (64-bit POWER), fallback (others). Under x64 processors, many programmers will want to target haswell whereas under ARM, most programmers will want to target arm64 (and it should do so automatically). The fallback is probably only good for testing purposes, not for deployment.

    {C++}
    std::cout << simdjson::builtin_implementation()->name() << std::endl;
    -

    If the simdjson::builtin_implementation()->name() call does not return the architecture you wish to target, you may need to pass flags to your compiler.

    +

    If the simdjson::builtin_implementation()->name() call does not return the architecture you wish to target, you may need to pass flags to your compiler.

    If you are using CMake for your C++ project, then you can pass compilation flags to your compiler by using the CMAKE_CXX_FLAGS variable:

    cmake -DCMAKE_CXX_FLAGS="-march=haswell" -B build_haswell
    cmake --build build_haswell
    diff --git a/menudata.js b/menudata.js index a2652c31e..3d5343e73 100644 --- a/menudata.js +++ b/menudata.js @@ -46,7 +46,16 @@ var menudata={children:[ {text:"t",url:"namespacemembers.html#index_t"}, {text:"u",url:"namespacemembers.html#index_u"}, {text:"v",url:"namespacemembers.html#index_v"}]}, -{text:"Functions",url:"namespacemembers_func.html"}, +{text:"Functions",url:"namespacemembers_func.html",children:[ +{text:"b",url:"namespacemembers_func.html#index_b"}, +{text:"e",url:"namespacemembers_func.html#index_e"}, +{text:"g",url:"namespacemembers_func.html#index_g"}, +{text:"i",url:"namespacemembers_func.html#index_i"}, +{text:"m",url:"namespacemembers_func.html#index_m"}, +{text:"o",url:"namespacemembers_func.html#index_o"}, +{text:"p",url:"namespacemembers_func.html#index_p"}, +{text:"t",url:"namespacemembers_func.html#index_t"}, +{text:"v",url:"namespacemembers_func.html#index_v"}]}, {text:"Variables",url:"namespacemembers_vars.html"}, {text:"Typedefs",url:"namespacemembers_type.html"}, {text:"Enumerations",url:"namespacemembers_enum.html"}, diff --git a/minify_8h_source.html b/minify_8h_source.html index d333b79d8..4c663e4c3 100644 --- a/minify_8h_source.html +++ b/minify_8h_source.html @@ -94,7 +94,7 @@ $(document).ready(function(){initNavTree('minify_8h_source.html',''); initResiza
    1 #ifndef SIMDJSON_MINIFY_H
    2 #define SIMDJSON_MINIFY_H
    3 
    -
    4 #include "simdjson/common_defs.h"
    +
    4 #include "simdjson/base.h"
    5 #include "simdjson/padded_string.h"
    6 #include <string>
    7 #include <ostream>
    @@ -102,16 +102,14 @@ $(document).ready(function(){initNavTree('minify_8h_source.html',''); initResiza
    9 
    10 namespace simdjson {
    11 
    -
    12 
    -
    13 
    -
    28 simdjson_warn_unused error_code minify(const char *buf, size_t len, char *dst, size_t &dst_len) noexcept;
    +
    26 simdjson_warn_unused error_code minify(const char *buf, size_t len, char *dst, size_t &dst_len) noexcept;
    +
    27 
    +
    28 } // namespace simdjson
    29 
    -
    30 } // namespace simdjson
    -
    31 
    -
    32 #endif // SIMDJSON_MINIFY_H
    -
    We want to support argument-dependent lookup (ADL).
    +
    30 #endif // SIMDJSON_MINIFY_H
    +
    The top level simdjson namespace, containing everything the library provides.
    Definition: base.h:8
    error_code
    All possible errors returned by simdjson.
    Definition: error.h:17
    -
    std::string minify(T x)
    Minifies a JSON element or document, printing the smallest possible valid JSON.
    +
    std::string minify(T x)
    Minifies a JSON element or document, printing the smallest possible valid JSON.
    diff --git a/namespacemembers.html b/namespacemembers.html index 18802bd6d..41529fc35 100644 --- a/namespacemembers.html +++ b/namespacemembers.html @@ -117,6 +117,9 @@ $(document).ready(function(){initNavTree('namespacemembers.html',''); initResiza

    - e -

    - o -

    • operator<<() -: simdjson +: simdjson::dom +, simdjson , simdjson::SIMDJSON_IMPLEMENTATION::ondemand
    • operator==() @@ -248,7 +252,7 @@ $(document).ready(function(){initNavTree('namespacemembers.html',''); initResiza : simdjson
    • SIMDJSON_MAXSIZE_BYTES -: simdjson +: simdjson
    • SIMDJSON_PADDING : simdjson diff --git a/namespacemembers_enum.html b/namespacemembers_enum.html index b4b1c652e..5ee53860d 100644 --- a/namespacemembers_enum.html +++ b/namespacemembers_enum.html @@ -88,6 +88,9 @@ $(document).ready(function(){initNavTree('namespacemembers_enum.html',''); initR
       
        +
      • element_type +: simdjson::dom +
      • error_code : simdjson
      • diff --git a/namespacemembers_func.html b/namespacemembers_func.html index c21f0d2c1..1bb2b118e 100644 --- a/namespacemembers_func.html +++ b/namespacemembers_func.html @@ -87,41 +87,76 @@ $(document).ready(function(){initNavTree('namespacemembers_func.html',''); initR
      @@ -732,7 +757,7 @@ template<class T >

      Minifies a JSON element or document, printing the smallest possible valid JSON.

      dom::parser parser; element doc = parser.parse(" [ 1 , 2 , 3 ] "_padded); cout << minify(doc) << endl; // prints [1,2,3]

      -

      Definition at line 236 of file serialization.h.

      +

      Definition at line 233 of file serialization.h.

      @@ -917,7 +942,7 @@ template<class T >

      dom::parser parser; element doc = parser.parse(" [ 1 , 2 , 3 ] "_padded);

      // Prints: // { // [ // 1, // 2, // 3 // ] // } cout << prettify(doc) << endl;

      -

      Definition at line 266 of file serialization.h.

      +

      Definition at line 263 of file serialization.h.

      @@ -948,7 +973,7 @@ template<class T >

      Create a string-view instance out of an array instance.

      The string-view instance contains JSON text that is suitable to be parsed as JSON again. It does not validate the content.

      -

      Definition at line 69 of file serialization-inl.h.

      +

      Definition at line 80 of file serialization-inl.h.

      @@ -979,7 +1004,7 @@ template<class T >

      Create a string-view instance out of a document instance.

      The string-view instance contains JSON text that is suitable to be parsed as JSON again. It does not validate the content.

      -

      Definition at line 16 of file serialization-inl.h.

      +

      Definition at line 27 of file serialization-inl.h.

      @@ -1010,7 +1035,7 @@ template<class T >

      Create a string-view instance out of an object instance.

      The string-view instance contains JSON text that is suitable to be parsed as JSON again. It does not validate the content.

      -

      Definition at line 62 of file serialization-inl.h.

      +

      Definition at line 73 of file serialization-inl.h.

      @@ -1042,7 +1067,7 @@ template<class T >

      The string-view instance contains JSON text that is suitable to be parsed as JSON again. The value must not have been accessed previously. It does not validate the content.

      If we somehow receive a value that has already been consumed, then the following code could be in trouble. E.g., we create an array as needed, but if an array was already created, then it could be bad.

      -

      Definition at line 30 of file serialization-inl.h.

      +

      Definition at line 41 of file serialization-inl.h.

      @@ -1067,7 +1092,7 @@ template<class T >

      Converts JSON to a string.

      dom::parser parser; element doc = parser.parse(" [ 1 , 2 , 3 ] "_padded); cout << to_string(doc) << endl; // prints [1,2,3]

      -

      Definition at line 210 of file serialization.h.

      +

      Definition at line 207 of file serialization.h.

      @@ -1150,7 +1175,7 @@ template<class T >
      Returns
      true if the string is valid UTF-8.
      -

      Definition at line 37 of file implementation.h.

      +

      Definition at line 35 of file implementation.h.

      @@ -1187,7 +1212,7 @@ template<class T >
      Returns
      true if the string is valid UTF-8.
      -

      Definition at line 27 of file implementation.h.

      +

      Definition at line 25 of file implementation.h.

      @@ -1215,7 +1240,7 @@ template<class T >

      By default, simdjson supports this many nested objects and arrays.

      This is the default for parser::max_depth().

      -

      Definition at line 52 of file common_defs.h.

      +

      Definition at line 37 of file base.h.

      @@ -1242,7 +1267,7 @@ template<class T >

      The amount of padding needed in a buffer to parse JSON.

      The input buf should be readable up to buf + SIMDJSON_PADDING this is a stopgap; there should be a better description of the main loop and its behavior that abstracts over this See https://github.com/simdjson/simdjson/issues/174

      -

      Definition at line 45 of file common_defs.h.

      +

      Definition at line 30 of file base.h.

      diff --git a/namespacesimdjson.js b/namespacesimdjson.js index 2885a562f..ea699caaa 100644 --- a/namespacesimdjson.js +++ b/namespacesimdjson.js @@ -1,49 +1,30 @@ var namespacesimdjson = [ - [ "dom", null, [ - [ "array", "classsimdjson_1_1dom_1_1array.html", "classsimdjson_1_1dom_1_1array" ], - [ "document", "classsimdjson_1_1dom_1_1document.html", "classsimdjson_1_1dom_1_1document" ], - [ "document_stream", "classsimdjson_1_1dom_1_1document__stream.html", "classsimdjson_1_1dom_1_1document__stream" ], - [ "element", "classsimdjson_1_1dom_1_1element.html", "classsimdjson_1_1dom_1_1element" ], - [ "object", "classsimdjson_1_1dom_1_1object.html", "classsimdjson_1_1dom_1_1object" ], - [ "key_value_pair", "classsimdjson_1_1dom_1_1key__value__pair.html", "classsimdjson_1_1dom_1_1key__value__pair" ], - [ "parser", "classsimdjson_1_1dom_1_1parser.html", "classsimdjson_1_1dom_1_1parser" ], - [ "element_type", "element_8h.html#a6e1dee3a823ecfee91086d3478bbab3a", [ - [ "ARRAY", "element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aacb4fb1757fb37c43cded35d3eb857c43", null ], - [ "OBJECT", "element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aa8eee8e217391199668cbac89472ace53", null ], - [ "INT64", "element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aa4e866b275c85fbb439f6484251cfb31c", null ], - [ "UINT64", "element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aa6de7acf711860176ba606e9aa2b85d5f", null ], - [ "DOUBLE", "element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aafd3e4ece78a7d422280d5ed379482229", null ], - [ "STRING", "element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aa63b588d5559f64f89a416e656880b949", null ], - [ "BOOL", "element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aaa97b2c144243b2b9d2c593ec268b62f5", null ], - [ "NULL_VALUE", "element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aaa9f0aff2067f91437e50e4872b229e6a", null ] - ] ], - [ "element::get< std::string_view >", "element-inl_8h.html#ab61244b704aac73f80987733dae1ff26", null ], - [ "operator<<", "element-inl_8h.html#a2201b306b0efa80269faf05e1ba2879b", null ], - [ "operator<<", "dom_2serialization_8h.html#a43347827393e037c8027ddccd6ec994b", null ], - [ "operator<<", "dom_2serialization_8h.html#aa5dbd189409df6b2672310006c92463f", null ], - [ "operator<<", "dom_2serialization_8h.html#a9b9af1992350587324412b3ee5b3347a", null ], - [ "operator<<", "dom_2serialization_8h.html#a66cf0dca50cbaa17e59c1349ae6d7c1d", null ], - [ "operator<<", "dom_2serialization_8h.html#a50a1f5a28bb3b74e3c97b728c1ea8245", null ], - [ "operator<<", "dom_2serialization_8h.html#a3f7b959b3ebe04634ab0e22a48426786", null ] - ] ], + [ "arm64", "namespacesimdjson_1_1arm64.html", null ], + [ "dom", "namespacesimdjson_1_1dom.html", "namespacesimdjson_1_1dom" ], + [ "fallback", "namespacesimdjson_1_1fallback.html", null ], + [ "haswell", "namespacesimdjson_1_1haswell.html", null ], + [ "icelake", "namespacesimdjson_1_1icelake.html", null ], + [ "ppc64", "namespacesimdjson_1_1ppc64.html", null ], [ "SIMDJSON_IMPLEMENTATION", null, [ [ "numberparsing", null, [ - [ "number_type", "generic_2numberparsing_8h.html#af20cab742280522e87964b52ad8ead6f", [ - [ "floating_point_number", "generic_2numberparsing_8h.html#af20cab742280522e87964b52ad8ead6fac5695c1a5026a1e5bec81b77096c1e9f", null ], - [ "signed_integer", "generic_2numberparsing_8h.html#af20cab742280522e87964b52ad8ead6faa14b6141855cd58c670ca6559c75c941", null ], - [ "unsigned_integer", "generic_2numberparsing_8h.html#af20cab742280522e87964b52ad8ead6fa7383104b83254a99f5991d0ac77a6666", null ] - ] ], - [ "operator<<", "generic_2numberparsing_8h.html#a8c6dcd4ba9542aa68fca2f740053bdbf", null ], - [ "parse_number", "generic_2numberparsing_8h.html#abfab4a11a66cf3429d4b584165a0d47e", null ], - [ "slow_float_parsing", "generic_2numberparsing_8h.html#a8a19d7f5fc0e7495a136073daee8df78", null ], - [ "write_float", "generic_2numberparsing_8h.html#a4c645a86ea19178e55e6ceaa96ad29ae", null ] + [ "full_multiplication", "arm64_2numberparsing__defs_8h.html#ae2f7c9103f5e8c993f915094150c2d99", null ], + [ "parse_number", "numberparsing_8h.html#abfab4a11a66cf3429d4b584165a0d47e", null ], + [ "slow_float_parsing", "numberparsing_8h.html#a8a19d7f5fc0e7495a136073daee8df78", null ], + [ "write_float", "numberparsing_8h.html#a4c645a86ea19178e55e6ceaa96ad29ae", null ] ] ], [ "ondemand", "namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html", "namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand" ], [ "open_container", "structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1open__container.html", "structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1open__container" ], [ "dom_parser_implementation", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation" ], - [ "implementation_simdjson_result_base", "structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html", "structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base" ] + [ "implementation_simdjson_result_base", "structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html", "structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base" ], + [ "number_type", "generic_2base_8h.html#a6ce99de87fa73b924822cd28045c97c0", [ + [ "floating_point_number", "generic_2base_8h.html#a6ce99de87fa73b924822cd28045c97c0ac5695c1a5026a1e5bec81b77096c1e9f", null ], + [ "signed_integer", "generic_2base_8h.html#a6ce99de87fa73b924822cd28045c97c0aa14b6141855cd58c670ca6559c75c941", null ], + [ "unsigned_integer", "generic_2base_8h.html#a6ce99de87fa73b924822cd28045c97c0a7383104b83254a99f5991d0ac77a6666", null ] + ] ], + [ "operator<<", "numberparsing_8h.html#ade2dc27fe18a87c9fb48782885fc76a3", null ] ] ], + [ "westmere", "namespacesimdjson_1_1westmere.html", null ], [ "simdjson_result< dom::array >", "structsimdjson_1_1simdjson__result_3_01dom_1_1array_01_4.html", "structsimdjson_1_1simdjson__result_3_01dom_1_1array_01_4" ], [ "simdjson_result< dom::document_stream >", "structsimdjson_1_1simdjson__result_3_01dom_1_1document__stream_01_4.html", "structsimdjson_1_1simdjson__result_3_01dom_1_1document__stream_01_4" ], [ "simdjson_result< dom::element >", "structsimdjson_1_1simdjson__result_3_01dom_1_1element_01_4.html", "structsimdjson_1_1simdjson__result_3_01dom_1_1element_01_4" ], @@ -153,6 +134,6 @@ var namespacesimdjson = [ "validate_utf8", "namespacesimdjson.html#a04edabca6d128b8b31592e1e2e331ae0", null ], [ "validate_utf8", "namespacesimdjson.html#a28a847c4b31fc804bec2987b171dbd07", null ], [ "DEFAULT_MAX_DEPTH", "namespacesimdjson.html#a6df2598eb1d4e1ea669c41831cc7325d", null ], - [ "SIMDJSON_MAXSIZE_BYTES", "namespacesimdjson.html#ac66973a7111dc4aa96ba7b3434344347", null ], + [ "SIMDJSON_MAXSIZE_BYTES", "namespacesimdjson.html#a32d36effa0943f5006e9d4151f5de0e4", null ], [ "SIMDJSON_PADDING", "namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf", null ] ]; \ No newline at end of file diff --git a/namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html b/namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html index 7294a5a76..c207fe3f5 100644 --- a/namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html +++ b/namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html @@ -144,8 +144,8 @@ Typedefs using depth_t = int32_t  Represents the depth of a JSON value (number of nested arrays/objects).
        -using number_type = simdjson::SIMDJSON_IMPLEMENTATION::numberparsing::number_type -  +using number_type = simdjson::SIMDJSON_IMPLEMENTATION::number_type +  @@ -220,21 +220,21 @@ std::ostream & 

      Enumerations

      operato

      A fast, simple, DOM-like interface that parses JSON as you use it.

      Designed for maximum speed and a lower memory profile.

      Typedef Documentation

      - -

      ◆ number_type

      + +

      ◆ number_type

      - +
      using simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number_type = typedef simdjson::SIMDJSON_IMPLEMENTATION::numberparsing::number_typeusing simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number_type = typedef simdjson::SIMDJSON_IMPLEMENTATION::number_type

      -

      Definition at line 14 of file ondemand.h.

      +

      Definition at line 21 of file base.h.

      @@ -275,7 +275,7 @@ std::ostream & 
      operato
      -

      Definition at line 7 of file json_type.h.

      +

      Definition at line 17 of file json_type.h.

      @@ -323,7 +323,7 @@ std::ostream & operato -

      Definition at line 5 of file json_type-inl.h.

      +

      Definition at line 14 of file json_type-inl.h.

      @@ -377,7 +377,7 @@ std::ostream & operato -

      Definition at line 131 of file serialization-inl.h.

      +

      Definition at line 142 of file serialization-inl.h.

      @@ -431,7 +431,7 @@ std::ostream & operato -

      Definition at line 157 of file serialization-inl.h.

      +

      Definition at line 168 of file serialization-inl.h.

      @@ -485,7 +485,7 @@ std::ostream & operato -

      Definition at line 196 of file serialization-inl.h.

      +

      Definition at line 207 of file serialization-inl.h.

      @@ -539,7 +539,7 @@ std::ostream & operato -

      Definition at line 105 of file serialization-inl.h.

      +

      Definition at line 116 of file serialization-inl.h.

      @@ -592,7 +592,7 @@ std::ostream & operato -

      Definition at line 19 of file json_type-inl.h.

      +

      Definition at line 28 of file json_type-inl.h.

      @@ -633,7 +633,7 @@ std::ostream & operato

      Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user is responsible for providing a string with no unescaped quote.

      Note that unescaped quotes cannot be present in valid JSON strings.

      -

      Definition at line 129 of file raw_json_string-inl.h.

      +

      Definition at line 139 of file raw_json_string-inl.h.

      diff --git a/namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.js b/namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.js index b8ef0cfff..8d21bcfe7 100644 --- a/namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.js +++ b/namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.js @@ -35,7 +35,7 @@ var namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondem [ "raw_json_string", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string" ], [ "value", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html", "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value" ], [ "depth_t", "namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#af941be7ff0cfaeb30d15d2fb52e76dd1", null ], - [ "number_type", "namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ad1157b391ebf205df7e747d753746f93", null ], + [ "number_type", "namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a6a2b39df6a1ac51d9fbb7b39a1fcf89c", null ], [ "token_position", "namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a14f218243d548a5e5410e6fadc3a53dd", null ], [ "json_type", "namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330", [ [ "array", "namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330af1f713c9e000f5d3f280adbd124df4f5", null ], diff --git a/namespacesimdjson_1_1arm64.html b/namespacesimdjson_1_1arm64.html new file mode 100644 index 000000000..274fd5a14 --- /dev/null +++ b/namespacesimdjson_1_1arm64.html @@ -0,0 +1,111 @@ + + + + + + + +simdjson: simdjson::arm64 Namespace Reference + + + + + + + + + + + + + + + + +
      +
      + + + + + + + +
      +
      simdjson +  3.2.1 +
      +
      Ridiculously Fast JSON
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      + +
      +
      simdjson::arm64 Namespace Reference
      +
      +
      + +

      Implementation for NEON (ARMv8). +More...

      +

      Detailed Description

      +

      Implementation for NEON (ARMv8).

      +
      +
      + + + + diff --git a/namespacesimdjson_1_1dom.html b/namespacesimdjson_1_1dom.html new file mode 100644 index 000000000..66f763b7b --- /dev/null +++ b/namespacesimdjson_1_1dom.html @@ -0,0 +1,388 @@ + + + + + + + +simdjson: simdjson::dom Namespace Reference + + + + + + + + + + + + + + + + +
      +
      + + + + + + + +
      +
      simdjson +  3.2.1 +
      +
      Ridiculously Fast JSON
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      + +
      +
      simdjson::dom Namespace Reference
      +
      +
      + +

      A DOM API on top of the simdjson parser. +More...

      + + + + + + + + + + + + + + + + + + + + + + + +

      +Classes

      class  array
       JSON array. More...
       
      class  document
       A parsed JSON document. More...
       
      class  document_stream
       A forward-only stream of documents. More...
       
      class  element
       A JSON element. More...
       
      class  object
       JSON object. More...
       
      class  key_value_pair
       Key/value pair in an object. More...
       
      class  parser
       A persistent document parser. More...
       
      + + + + +

      +Enumerations

      enum class  element_type {
      +  ARRAY = '[' +, OBJECT = '{' +, INT64 = 'l' +, UINT64 = 'u' +,
      +  DOUBLE = 'd' +, STRING = '"' +, BOOL = 't' +, NULL_VALUE = 'n' +
      + }
       The actual concrete type of a JSON element This is the type it is most easily cast to with get<>. More...
       
      + + + + + + + + + + + + + + + + + + + + + +

      +Functions

      +template<>
      simdjson_result< std::string_view > element::get< std::string_view > () const noexcept
       
      +std::ostream & operator<< (std::ostream &out, element_type type)
       
      std::ostream & operator<< (std::ostream &out, simdjson::dom::element value)
       Print JSON to an output stream. More...
       
      +std::ostream & operator<< (std::ostream &out, simdjson::simdjson_result< simdjson::dom::element > x)
       
      std::ostream & operator<< (std::ostream &out, simdjson::dom::array value)
       Print JSON to an output stream. More...
       
      +std::ostream & operator<< (std::ostream &out, simdjson::simdjson_result< simdjson::dom::array > x)
       
      std::ostream & operator<< (std::ostream &out, simdjson::dom::object value)
       Print JSON to an output stream. More...
       
      +std::ostream & operator<< (std::ostream &out, simdjson::simdjson_result< simdjson::dom::object > x)
       
      +

      Detailed Description

      +

      A DOM API on top of the simdjson parser.

      +

      Enumeration Type Documentation

      + +

      ◆ element_type

      + +
      +
      + + + + + +
      + + + + +
      enum simdjson::dom::element_type
      +
      +strong
      +
      + +

      The actual concrete type of a JSON element This is the type it is most easily cast to with get<>.

      + + + + + + + + + +
      Enumerator
      ARRAY 

      dom::array

      +
      OBJECT 

      dom::object

      +
      INT64 

      int64_t

      +
      UINT64 

      uint64_t: any integer that fits in uint64_t but not int64_t

      +
      DOUBLE 

      double: Any number with a "." or "e" that fits in double.

      +
      STRING 

      std::string_view

      +
      BOOL 

      bool

      +
      NULL_VALUE 

      null

      +
      + +

      Definition at line 14 of file element.h.

      + +
      +
      +

      Function Documentation

      + +

      ◆ operator<<() [1/3]

      + +
      +
      + + + + + +
      + + + + + + + + + + + + + + + + + + +
      std::ostream& simdjson::dom::operator<< (std::ostream & out,
      simdjson::dom::array value 
      )
      +
      +inline
      +
      + +

      Print JSON to an output stream.

      +
      Parameters
      + + + +
      outThe output stream.
      valueThe array.
      +
      +
      +
      Exceptions
      + + +
      ifthere is an error with the underlying output stream. simdjson itself will not throw.
      +
      +
      + +

      Definition at line 167 of file serialization.h.

      + +
      +
      + +

      ◆ operator<<() [2/3]

      + +
      +
      + + + + + +
      + + + + + + + + + + + + + + + + + + +
      std::ostream& simdjson::dom::operator<< (std::ostream & out,
      simdjson::dom::element value 
      )
      +
      +inline
      +
      + +

      Print JSON to an output stream.

      +
      Parameters
      + + + +
      outThe output stream.
      valueThe element.
      +
      +
      +
      Exceptions
      + + +
      ifthere is an error with the underlying output stream. simdjson itself will not throw.
      +
      +
      + +

      Definition at line 149 of file serialization.h.

      + +
      +
      + +

      ◆ operator<<() [3/3]

      + +
      +
      + + + + + +
      + + + + + + + + + + + + + + + + + + +
      std::ostream& simdjson::dom::operator<< (std::ostream & out,
      simdjson::dom::object value 
      )
      +
      +inline
      +
      + +

      Print JSON to an output stream.

      +
      Parameters
      + + + +
      outThe output stream.
      valueThe object.
      +
      +
      +
      Exceptions
      + + +
      ifthere is an error with the underlying output stream. simdjson itself will not throw.
      +
      +
      + +

      Definition at line 185 of file serialization.h.

      + +
      +
      +
      +
      + + + + diff --git a/namespacesimdjson_1_1dom.js b/namespacesimdjson_1_1dom.js new file mode 100644 index 000000000..dd1532f24 --- /dev/null +++ b/namespacesimdjson_1_1dom.js @@ -0,0 +1,28 @@ +var namespacesimdjson_1_1dom = +[ + [ "array", "classsimdjson_1_1dom_1_1array.html", "classsimdjson_1_1dom_1_1array" ], + [ "document", "classsimdjson_1_1dom_1_1document.html", "classsimdjson_1_1dom_1_1document" ], + [ "document_stream", "classsimdjson_1_1dom_1_1document__stream.html", "classsimdjson_1_1dom_1_1document__stream" ], + [ "element", "classsimdjson_1_1dom_1_1element.html", "classsimdjson_1_1dom_1_1element" ], + [ "object", "classsimdjson_1_1dom_1_1object.html", "classsimdjson_1_1dom_1_1object" ], + [ "key_value_pair", "classsimdjson_1_1dom_1_1key__value__pair.html", "classsimdjson_1_1dom_1_1key__value__pair" ], + [ "parser", "classsimdjson_1_1dom_1_1parser.html", "classsimdjson_1_1dom_1_1parser" ], + [ "element_type", "namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3a", [ + [ "ARRAY", "namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aacb4fb1757fb37c43cded35d3eb857c43", null ], + [ "OBJECT", "namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa8eee8e217391199668cbac89472ace53", null ], + [ "INT64", "namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa4e866b275c85fbb439f6484251cfb31c", null ], + [ "UINT64", "namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa6de7acf711860176ba606e9aa2b85d5f", null ], + [ "DOUBLE", "namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aafd3e4ece78a7d422280d5ed379482229", null ], + [ "STRING", "namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa63b588d5559f64f89a416e656880b949", null ], + [ "BOOL", "namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aaa97b2c144243b2b9d2c593ec268b62f5", null ], + [ "NULL_VALUE", "namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aaa9f0aff2067f91437e50e4872b229e6a", null ] + ] ], + [ "element::get< std::string_view >", "namespacesimdjson_1_1dom.html#ab61244b704aac73f80987733dae1ff26", null ], + [ "operator<<", "namespacesimdjson_1_1dom.html#a2201b306b0efa80269faf05e1ba2879b", null ], + [ "operator<<", "namespacesimdjson_1_1dom.html#a43347827393e037c8027ddccd6ec994b", null ], + [ "operator<<", "namespacesimdjson_1_1dom.html#aa5dbd189409df6b2672310006c92463f", null ], + [ "operator<<", "namespacesimdjson_1_1dom.html#a9b9af1992350587324412b3ee5b3347a", null ], + [ "operator<<", "namespacesimdjson_1_1dom.html#a66cf0dca50cbaa17e59c1349ae6d7c1d", null ], + [ "operator<<", "namespacesimdjson_1_1dom.html#a50a1f5a28bb3b74e3c97b728c1ea8245", null ], + [ "operator<<", "namespacesimdjson_1_1dom.html#a3f7b959b3ebe04634ab0e22a48426786", null ] +]; \ No newline at end of file diff --git a/namespacesimdjson_1_1fallback.html b/namespacesimdjson_1_1fallback.html new file mode 100644 index 000000000..98a3e9bbb --- /dev/null +++ b/namespacesimdjson_1_1fallback.html @@ -0,0 +1,111 @@ + + + + + + + +simdjson: simdjson::fallback Namespace Reference + + + + + + + + + + + + + + + + +
      +
      + + + + + + + +
      +
      simdjson +  3.2.1 +
      +
      Ridiculously Fast JSON
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      + +
      +
      simdjson::fallback Namespace Reference
      +
      +
      + +

      Fallback implementation (runs on any machine). +More...

      +

      Detailed Description

      +

      Fallback implementation (runs on any machine).

      +
      +
      + + + + diff --git a/namespacesimdjson_1_1haswell.html b/namespacesimdjson_1_1haswell.html new file mode 100644 index 000000000..47700698c --- /dev/null +++ b/namespacesimdjson_1_1haswell.html @@ -0,0 +1,111 @@ + + + + + + + +simdjson: simdjson::haswell Namespace Reference + + + + + + + + + + + + + + + + +
      +
      + + + + + + + +
      +
      simdjson +  3.2.1 +
      +
      Ridiculously Fast JSON
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      + +
      +
      simdjson::haswell Namespace Reference
      +
      +
      + +

      Implementation for Haswell (Intel AVX2). +More...

      +

      Detailed Description

      +

      Implementation for Haswell (Intel AVX2).

      +
      +
      + + + + diff --git a/namespacesimdjson_1_1icelake.html b/namespacesimdjson_1_1icelake.html new file mode 100644 index 000000000..e5c5ffb5a --- /dev/null +++ b/namespacesimdjson_1_1icelake.html @@ -0,0 +1,111 @@ + + + + + + + +simdjson: simdjson::icelake Namespace Reference + + + + + + + + + + + + + + + + +
      +
      + + + + + + + +
      +
      simdjson +  3.2.1 +
      +
      Ridiculously Fast JSON
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      + +
      +
      simdjson::icelake Namespace Reference
      +
      +
      + +

      Implementation for Icelake (Intel AVX512). +More...

      +

      Detailed Description

      +

      Implementation for Icelake (Intel AVX512).

      +
      +
      + + + + diff --git a/namespacesimdjson_1_1ppc64.html b/namespacesimdjson_1_1ppc64.html new file mode 100644 index 000000000..bd68ff0fb --- /dev/null +++ b/namespacesimdjson_1_1ppc64.html @@ -0,0 +1,111 @@ + + + + + + + +simdjson: simdjson::ppc64 Namespace Reference + + + + + + + + + + + + + + + + +
      +
      + + + + + + + +
      +
      simdjson +  3.2.1 +
      +
      Ridiculously Fast JSON
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      + +
      +
      simdjson::ppc64 Namespace Reference
      +
      +
      + +

      Implementation for ALTIVEC (PPC64). +More...

      +

      Detailed Description

      +

      Implementation for ALTIVEC (PPC64).

      +
      +
      + + + + diff --git a/namespacesimdjson_1_1westmere.html b/namespacesimdjson_1_1westmere.html new file mode 100644 index 000000000..1e5e53110 --- /dev/null +++ b/namespacesimdjson_1_1westmere.html @@ -0,0 +1,111 @@ + + + + + + + +simdjson: simdjson::westmere Namespace Reference + + + + + + + + + + + + + + + + +
      +
      + + + + + + + +
      +
      simdjson +  3.2.1 +
      +
      Ridiculously Fast JSON
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      + +
      +
      simdjson::westmere Namespace Reference
      +
      +
      + +

      Implementation for Westmere (Intel SSE4.2). +More...

      +

      Detailed Description

      +

      Implementation for Westmere (Intel SSE4.2).

      +
      +
      + + + + diff --git a/navtreedata.js b/navtreedata.js index fae6af96f..48b6e6b38 100644 --- a/navtreedata.js +++ b/navtreedata.js @@ -188,12 +188,12 @@ var NAVTREE = var NAVTREEINDEX = [ -"annotated.html", -"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aef6872e07743217fe2e2abe790a21d4c", -"classsimdjson_1_1dom_1_1object_1_1iterator.html#a83b3c467632c017400f95ff05d2367b3", +"", +"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a9f1cd920980a8bc0330d2c7f1f0be74b", +"classsimdjson_1_1dom_1_1object_1_1iterator.html#a1da5ce328cc2609432be961736c6e810", "logger-inl_8h.html#a12f4fdff59099b28730ba4288877437f", -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330ab1bc248a7ff2b2e95569f56de68615df", -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html#a2246c3beb618a9aec6249a236fa33d17" +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330aa8cfde6331bd59eb2ac96f8911c4b666", +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#aa6ef30cb4fec233a33a0e0a8caf90e0b" ]; var SYNCONMSG = 'click to disable panel synchronisation'; diff --git a/navtreeindex0.js b/navtreeindex0.js index ad8d2cb71..87a5452ba 100644 --- a/navtreeindex0.js +++ b/navtreeindex0.js @@ -1,21 +1,33 @@ var NAVTREEINDEX0 = { +"":[10,0,0,6], +"":[10,0,0,6,0], +"":[10,0,1], +"":[10,0,0,6,1,0], +"amalgamated_8h_source.html":[12,0,0,0,4,1], "annotated.html":[11,0], -"arm64_2begin_8h_source.html":[12,0,0,0,0,0], -"arm64_2bitmanipulation_8h_source.html":[12,0,0,0,0,1], -"arm64_2bitmask_8h_source.html":[12,0,0,0,0,2], -"arm64_2end_8h_source.html":[12,0,0,0,0,3], -"arm64_2implementation_8h_source.html":[12,0,0,0,0,4], -"arm64_2intrinsics_8h_source.html":[12,0,0,0,0,5], -"arm64_2numberparsing_8h_source.html":[12,0,0,0,0,6], -"arm64_2simd_8h_source.html":[12,0,0,0,0,7], -"arm64_2stringparsing_8h_source.html":[12,0,0,0,0,8], -"arm64_8h_source.html":[12,0,0,0,10], -"array__iterator-inl_8h_source.html":[12,0,0,0,3,0,2], -"array__iterator_8h_source.html":[12,0,0,0,3,0,3], -"atomparsing_8h_source.html":[12,0,0,0,3,1], -"base_8h_source.html":[12,0,0,0,11], -"builtin_8h_source.html":[12,0,0,0,12], +"arm64_2base_8h_source.html":[12,0,0,0,0,0], +"arm64_2begin_8h_source.html":[12,0,0,0,0,1], +"arm64_2bitmanipulation_8h_source.html":[12,0,0,0,0,2], +"arm64_2bitmask_8h_source.html":[12,0,0,0,0,3], +"arm64_2end_8h_source.html":[12,0,0,0,0,4], +"arm64_2implementation_8h_source.html":[12,0,0,0,0,5], +"arm64_2intrinsics_8h_source.html":[12,0,0,0,0,6], +"arm64_2numberparsing__defs_8h.html#ae2f7c9103f5e8c993f915094150c2d99":[10,0,0,6,0,0], +"arm64_2numberparsing__defs_8h_source.html":[12,0,0,0,0,7], +"arm64_2ondemand_8h_source.html":[12,0,0,0,0,8], +"arm64_2simd_8h_source.html":[12,0,0,0,0,9], +"arm64_2stringparsing__defs_8h_source.html":[12,0,0,0,0,10], +"arm64_8h_source.html":[12,0,0,0,11], +"array__iterator-inl_8h_source.html":[12,0,0,0,4,0,3], +"array__iterator_8h_source.html":[12,0,0,0,4,0,4], +"atomic__ptr_8h_source.html":[12,0,0,0,7,0], +"atomparsing_8h_source.html":[12,0,0,0,4,2], +"base_8h_source.html":[12,0,0,0,12], +"builtin_2base_8h_source.html":[12,0,0,0,1,0], +"builtin_2implementation_8h_source.html":[12,0,0,0,1,1], +"builtin_2ondemand_8h_source.html":[12,0,0,0,1,2], +"builtin_8h_source.html":[12,0,0,0,13], "classes.html":[11,1], "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html":[11,0,0,1,2], "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a016ecd16f2dc440d6e9bb5642c5c9a03":[11,0,0,1,2,11], @@ -237,17 +249,5 @@ var NAVTREEINDEX0 = "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a62b96abab9d1338d5f5e513f90f8d7d0":[11,0,0,1,0,7,20], "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a6724eb440d3fb40018a9a47c715352ed":[11,0,0,1,0,7,1], "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a71600033791f9c6bbc9f40fb2f82fdc8":[11,0,0,1,0,7,15], -"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a7c20332b4481f29ace969e40cfce5f5f":[11,0,0,1,0,7,17], -"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a9f1cd920980a8bc0330d2c7f1f0be74b":[11,0,0,1,0,7,14], -"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aa14649f261616070b04829c9ba6b28da":[11,0,0,1,0,7,18], -"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aa25020165cc5a191026a243a10da6558":[11,0,0,1,0,7,8], -"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ab6b2e9769ce75fc625aa91504f26d82b":[11,0,0,1,0,7,7], -"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ad210f9115679a625ada433add55eff51":[11,0,0,1,0,7,12], -"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ad742392a9223e096f1be16b7bbf20ca8":[11,0,0,1,0,7,6], -"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#adbe7322f665109b9816c5bcb9c10a9cb":[11,0,0,1,0,7,10], -"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#add102ee85423a75e22e4d7ca9a3eaacd":[11,0,0,1,0,7,4], -"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ae0bc6b9803e0c989e9defaf3edcaaae4":[11,0,0,1,0,7,16], -"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ae3d80f8e7f31c319fe6ee09c0860df83":[11,0,0,1,0,7,2], -"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ae5cda98fa74051d037c0c444c67efb15":[11,0,0,1,0,7,19], -"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aeb4a70edd1808f36210460ed410e8dae":[11,0,0,1,0,7,3] +"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a7c20332b4481f29ace969e40cfce5f5f":[11,0,0,1,0,7,17] }; diff --git a/navtreeindex1.js b/navtreeindex1.js index 7d2489ac5..e0e20154e 100644 --- a/navtreeindex1.js +++ b/navtreeindex1.js @@ -1,5 +1,17 @@ var NAVTREEINDEX1 = { +"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a9f1cd920980a8bc0330d2c7f1f0be74b":[11,0,0,1,0,7,14], +"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aa14649f261616070b04829c9ba6b28da":[11,0,0,1,0,7,18], +"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aa25020165cc5a191026a243a10da6558":[11,0,0,1,0,7,8], +"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ab6b2e9769ce75fc625aa91504f26d82b":[11,0,0,1,0,7,7], +"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ad210f9115679a625ada433add55eff51":[11,0,0,1,0,7,12], +"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ad742392a9223e096f1be16b7bbf20ca8":[11,0,0,1,0,7,6], +"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#adbe7322f665109b9816c5bcb9c10a9cb":[11,0,0,1,0,7,10], +"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#add102ee85423a75e22e4d7ca9a3eaacd":[11,0,0,1,0,7,4], +"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ae0bc6b9803e0c989e9defaf3edcaaae4":[11,0,0,1,0,7,16], +"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ae3d80f8e7f31c319fe6ee09c0860df83":[11,0,0,1,0,7,2], +"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ae5cda98fa74051d037c0c444c67efb15":[11,0,0,1,0,7,19], +"classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aeb4a70edd1808f36210460ed410e8dae":[11,0,0,1,0,7,3], "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aef6872e07743217fe2e2abe790a21d4c":[11,0,0,1,0,7,5], "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#affa38e7fd0778672e7dd02916a97ad21":[11,0,0,1,0,7,9], "classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html":[11,0,0,1,0,8], @@ -237,17 +249,5 @@ var NAVTREEINDEX1 = "classsimdjson_1_1dom_1_1object.html#ae2e1a8cbaab9d352495d1dc993407be3":[11,0,0,0,4,1], "classsimdjson_1_1dom_1_1object.html#afe127a7e9ec8dab9ec76160525a68a83":[11,0,0,0,4,5], "classsimdjson_1_1dom_1_1object_1_1iterator.html":[11,0,0,0,4,0], -"classsimdjson_1_1dom_1_1object_1_1iterator.html#a05f201b94ff4852a1f41bca76595280d":[11,0,0,0,4,0,17], -"classsimdjson_1_1dom_1_1object_1_1iterator.html#a1da5ce328cc2609432be961736c6e810":[11,0,0,0,4,0,9], -"classsimdjson_1_1dom_1_1object_1_1iterator.html#a2049ae539dca6999cc33300d212a5014":[11,0,0,0,4,0,19], -"classsimdjson_1_1dom_1_1object_1_1iterator.html#a238b57daf0b007591b767b268639473e":[11,0,0,0,4,0,15], -"classsimdjson_1_1dom_1_1object_1_1iterator.html#a3d4dcacb8171b99f783396bb6a337c65":[11,0,0,0,4,0,20], -"classsimdjson_1_1dom_1_1object_1_1iterator.html#a4807eeb1ed5f596b587d0b61dfb550e7":[11,0,0,0,4,0,6], -"classsimdjson_1_1dom_1_1object_1_1iterator.html#a498ffa7fca4164634f87ff2ef0905f8b":[11,0,0,0,4,0,14], -"classsimdjson_1_1dom_1_1object_1_1iterator.html#a54a99dcf9c422d5c24f3c570b6d9b6e4":[11,0,0,0,4,0,5], -"classsimdjson_1_1dom_1_1object_1_1iterator.html#a5ad1b60fd5df56d9fdb8bce1e08de88f":[11,0,0,0,4,0,8], -"classsimdjson_1_1dom_1_1object_1_1iterator.html#a5c80355d967cce16eab942a8d8351c7b":[11,0,0,0,4,0,2], -"classsimdjson_1_1dom_1_1object_1_1iterator.html#a688f6c7f451602bb3385a93252c0828a":[11,0,0,0,4,0,10], -"classsimdjson_1_1dom_1_1object_1_1iterator.html#a6d335de77b8c5b731566e48f6cacd95d":[11,0,0,0,4,0,7], -"classsimdjson_1_1dom_1_1object_1_1iterator.html#a7b4a7d3017744fec3aa4252967f73204":[11,0,0,0,4,0,16] +"classsimdjson_1_1dom_1_1object_1_1iterator.html#a05f201b94ff4852a1f41bca76595280d":[11,0,0,0,4,0,17] }; diff --git a/navtreeindex2.js b/navtreeindex2.js index 17b27c536..780eb6318 100644 --- a/navtreeindex2.js +++ b/navtreeindex2.js @@ -1,5 +1,17 @@ var NAVTREEINDEX2 = { +"classsimdjson_1_1dom_1_1object_1_1iterator.html#a1da5ce328cc2609432be961736c6e810":[11,0,0,0,4,0,9], +"classsimdjson_1_1dom_1_1object_1_1iterator.html#a2049ae539dca6999cc33300d212a5014":[11,0,0,0,4,0,19], +"classsimdjson_1_1dom_1_1object_1_1iterator.html#a238b57daf0b007591b767b268639473e":[11,0,0,0,4,0,15], +"classsimdjson_1_1dom_1_1object_1_1iterator.html#a3d4dcacb8171b99f783396bb6a337c65":[11,0,0,0,4,0,20], +"classsimdjson_1_1dom_1_1object_1_1iterator.html#a4807eeb1ed5f596b587d0b61dfb550e7":[11,0,0,0,4,0,6], +"classsimdjson_1_1dom_1_1object_1_1iterator.html#a498ffa7fca4164634f87ff2ef0905f8b":[11,0,0,0,4,0,14], +"classsimdjson_1_1dom_1_1object_1_1iterator.html#a54a99dcf9c422d5c24f3c570b6d9b6e4":[11,0,0,0,4,0,5], +"classsimdjson_1_1dom_1_1object_1_1iterator.html#a5ad1b60fd5df56d9fdb8bce1e08de88f":[11,0,0,0,4,0,8], +"classsimdjson_1_1dom_1_1object_1_1iterator.html#a5c80355d967cce16eab942a8d8351c7b":[11,0,0,0,4,0,2], +"classsimdjson_1_1dom_1_1object_1_1iterator.html#a688f6c7f451602bb3385a93252c0828a":[11,0,0,0,4,0,10], +"classsimdjson_1_1dom_1_1object_1_1iterator.html#a6d335de77b8c5b731566e48f6cacd95d":[11,0,0,0,4,0,7], +"classsimdjson_1_1dom_1_1object_1_1iterator.html#a7b4a7d3017744fec3aa4252967f73204":[11,0,0,0,4,0,16], "classsimdjson_1_1dom_1_1object_1_1iterator.html#a83b3c467632c017400f95ff05d2367b3":[11,0,0,0,4,0,12], "classsimdjson_1_1dom_1_1object_1_1iterator.html#a951609ca7a164b499ff19adbe2de7983":[11,0,0,0,4,0,4], "classsimdjson_1_1dom_1_1object_1_1iterator.html#a9f49fe89534f63d3d2543d5d4bad3180":[11,0,0,0,4,0,1], @@ -62,65 +74,53 @@ var NAVTREEINDEX2 = "classsimdjson_1_1padded__string__view.html#aa338ad56304bc79e6ca1fab64af41de0":[11,0,0,25,0], "classsimdjson_1_1padded__string__view.html#aae57856a217294ac218b6372a5e37d9a":[11,0,0,25,3], "common__defs_8h.html#aa4a130ec97b5c7e2b248ecf0c0476d4c":[10,0,1,0], -"common__defs_8h_source.html":[12,0,0,0,13], -"compiler__check_8h_source.html":[12,0,0,0,14], +"common__defs_8h_source.html":[12,0,0,0,14], +"compiler__check_8h_source.html":[12,0,0,0,15], +"dependencies_8h_source.html":[12,0,0,0,4,4], "deprecated.html":[8], -"dir_0d145e48adcb2584d6aad0aa1d711d9e.html":[12,0,0,0,9], -"dir_0fee190c3bc9a7d22e6d44901a62fa54.html":[12,0,0,0,6], -"dir_438095d7beafc60159803dc5832a82bd.html":[12,0,0,0,1], +"dir_0d145e48adcb2584d6aad0aa1d711d9e.html":[12,0,0,0,10], +"dir_0fee190c3bc9a7d22e6d44901a62fa54.html":[12,0,0,0,7], +"dir_438095d7beafc60159803dc5832a82bd.html":[12,0,0,0,2], "dir_49a0b2767ded4a45005c5d6720a18cd1.html":[12,0,0,0], -"dir_53368a02099cf3699f2996a5d88d70b6.html":[12,0,0,0,3], +"dir_53368a02099cf3699f2996a5d88d70b6.html":[12,0,0,0,4], "dir_76d8247d4498211a7d04a3794a38eb71.html":[12,0,0,0,0], -"dir_7796bb4b727f918c96faee1bdd50e49a.html":[12,0,0,0,3,0], -"dir_9b01d0736ef91c92ca1a5074971144b1.html":[12,0,0,0,8], -"dir_aff943445258981e0d80c1f13c0bf97f.html":[12,0,0,0,7], -"dir_b35ffb90479583e132afc246e9b6e77a.html":[12,0,0,0,4], -"dir_ba336e6e255a3bf0b1427b51513cdc60.html":[12,0,0,0,5], -"dir_bdd5d78d80e110a51a7313218161f5b4.html":[12,0,0,0,2], +"dir_7796bb4b727f918c96faee1bdd50e49a.html":[12,0,0,0,4,0], +"dir_9b01d0736ef91c92ca1a5074971144b1.html":[12,0,0,0,9], +"dir_aff943445258981e0d80c1f13c0bf97f.html":[12,0,0,0,8], +"dir_b35ffb90479583e132afc246e9b6e77a.html":[12,0,0,0,5], +"dir_ba336e6e255a3bf0b1427b51513cdc60.html":[12,0,0,0,6], +"dir_bdd5d78d80e110a51a7313218161f5b4.html":[12,0,0,0,3], +"dir_cae07bd9608c9724f8cbc862866fc74a.html":[12,0,0,0,1], "dir_d44c64559bbebec7f509842c48db8b23.html":[12,0,0], -"dom_2array-inl_8h_source.html":[12,0,0,0,1,0], -"dom_2array_8h_source.html":[12,0,0,0,1,1], -"dom_2document-inl_8h_source.html":[12,0,0,0,1,2], -"dom_2document_8h_source.html":[12,0,0,0,1,3], -"dom_2document__stream-inl_8h_source.html":[12,0,0,0,1,4], -"dom_2document__stream_8h_source.html":[12,0,0,0,1,5], -"dom_2object-inl_8h_source.html":[12,0,0,0,1,9], -"dom_2object_8h_source.html":[12,0,0,0,1,10], -"dom_2parser-inl_8h_source.html":[12,0,0,0,1,14], -"dom_2parser_8h_source.html":[12,0,0,0,1,15], -"dom_2serialization-inl_8h_source.html":[12,0,0,0,1,16], -"dom_2serialization_8h.html#a3f7b959b3ebe04634ab0e22a48426786":[10,0,0,0,15], -"dom_2serialization_8h.html#a43347827393e037c8027ddccd6ec994b":[10,0,0,0,10], -"dom_2serialization_8h.html#a50a1f5a28bb3b74e3c97b728c1ea8245":[10,0,0,0,14], -"dom_2serialization_8h.html#a66cf0dca50cbaa17e59c1349ae6d7c1d":[10,0,0,0,13], -"dom_2serialization_8h.html#a9b9af1992350587324412b3ee5b3347a":[10,0,0,0,12], -"dom_2serialization_8h.html#aa5dbd189409df6b2672310006c92463f":[10,0,0,0,11], -"dom_2serialization_8h_source.html":[12,0,0,0,1,17], -"dom_8h_source.html":[12,0,0,0,15], -"element-inl_8h.html#a2201b306b0efa80269faf05e1ba2879b":[10,0,0,0,9], -"element-inl_8h.html#ab61244b704aac73f80987733dae1ff26":[10,0,0,0,8], -"element-inl_8h_source.html":[12,0,0,0,1,6], -"element_8h.html#a6e1dee3a823ecfee91086d3478bbab3a":[10,0,0,0,7], -"element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aa4e866b275c85fbb439f6484251cfb31c":[10,0,0,0,7,2], -"element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aa63b588d5559f64f89a416e656880b949":[10,0,0,0,7,5], -"element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aa6de7acf711860176ba606e9aa2b85d5f":[10,0,0,0,7,3], -"element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aa8eee8e217391199668cbac89472ace53":[10,0,0,0,7,1], -"element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aaa97b2c144243b2b9d2c593ec268b62f5":[10,0,0,0,7,6], -"element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aaa9f0aff2067f91437e50e4872b229e6a":[10,0,0,0,7,7], -"element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aacb4fb1757fb37c43cded35d3eb857c43":[10,0,0,0,7,0], -"element_8h.html#a6e1dee3a823ecfee91086d3478bbab3aafd3e4ece78a7d422280d5ed379482229":[10,0,0,0,7,4], -"element_8h_source.html":[12,0,0,0,1,7], -"error-inl_8h_source.html":[12,0,0,0,16], -"error_8h_source.html":[12,0,0,0,17], -"fallback_2begin_8h_source.html":[12,0,0,0,2,0], -"fallback_2bitmanipulation_8h_source.html":[12,0,0,0,2,1], -"fallback_2end_8h_source.html":[12,0,0,0,2,2], -"fallback_2implementation_8h_source.html":[12,0,0,0,2,3], -"fallback_2numberparsing_8h_source.html":[12,0,0,0,2,4], -"fallback_2stringparsing_8h_source.html":[12,0,0,0,2,5], -"fallback_8h_source.html":[12,0,0,0,18], -"field-inl_8h_source.html":[12,0,0,0,3,0,8], -"field_8h_source.html":[12,0,0,0,3,0,9], +"dom_2array-inl_8h_source.html":[12,0,0,0,2,0], +"dom_2array_8h_source.html":[12,0,0,0,2,1], +"dom_2base_8h_source.html":[12,0,0,0,2,2], +"dom_2document-inl_8h_source.html":[12,0,0,0,2,3], +"dom_2document_8h_source.html":[12,0,0,0,2,4], +"dom_2document__stream-inl_8h_source.html":[12,0,0,0,2,5], +"dom_2document__stream_8h_source.html":[12,0,0,0,2,6], +"dom_2object-inl_8h_source.html":[12,0,0,0,2,10], +"dom_2object_8h_source.html":[12,0,0,0,2,11], +"dom_2parser-inl_8h_source.html":[12,0,0,0,2,15], +"dom_2parser_8h_source.html":[12,0,0,0,2,16], +"dom_2serialization-inl_8h_source.html":[12,0,0,0,2,17], +"dom_2serialization_8h_source.html":[12,0,0,0,2,18], +"dom_8h_source.html":[12,0,0,0,16], +"element-inl_8h_source.html":[12,0,0,0,2,7], +"element_8h_source.html":[12,0,0,0,2,8], +"error-inl_8h_source.html":[12,0,0,0,17], +"error_8h_source.html":[12,0,0,0,18], +"fallback_2base_8h_source.html":[12,0,0,0,3,0], +"fallback_2begin_8h_source.html":[12,0,0,0,3,1], +"fallback_2bitmanipulation_8h_source.html":[12,0,0,0,3,2], +"fallback_2end_8h_source.html":[12,0,0,0,3,3], +"fallback_2implementation_8h_source.html":[12,0,0,0,3,4], +"fallback_2numberparsing__defs_8h_source.html":[12,0,0,0,3,5], +"fallback_2ondemand_8h_source.html":[12,0,0,0,3,6], +"fallback_2stringparsing__defs_8h_source.html":[12,0,0,0,3,7], +"fallback_8h_source.html":[12,0,0,0,19], +"field-inl_8h_source.html":[12,0,0,0,4,0,11], +"field_8h_source.html":[12,0,0,0,4,0,12], "files.html":[12,0], "functions.html":[11,3,0], "functions.html":[11,3,0,0], @@ -167,28 +167,25 @@ var NAVTREEINDEX2 = "functions_vars.html":[11,3,2], "functions_w.html":[11,3,0,19], "functions_~.html":[11,3,0,20], -"generic_2dom__parser__implementation_8h_source.html":[12,0,0,0,3,2], -"generic_2numberparsing_8h.html#a4c645a86ea19178e55e6ceaa96ad29ae":[10,0,0,1,0,4], -"generic_2numberparsing_8h.html#a8a19d7f5fc0e7495a136073daee8df78":[10,0,0,1,0,3], -"generic_2numberparsing_8h.html#a8c6dcd4ba9542aa68fca2f740053bdbf":[10,0,0,1,0,1], -"generic_2numberparsing_8h.html#abfab4a11a66cf3429d4b584165a0d47e":[10,0,0,1,0,2], -"generic_2numberparsing_8h.html#af20cab742280522e87964b52ad8ead6f":[10,0,0,1,0,0], -"generic_2numberparsing_8h.html#af20cab742280522e87964b52ad8ead6fa7383104b83254a99f5991d0ac77a6666":[10,0,0,1,0,0,2], -"generic_2numberparsing_8h.html#af20cab742280522e87964b52ad8ead6faa14b6141855cd58c670ca6559c75c941":[10,0,0,1,0,0,1], -"generic_2numberparsing_8h.html#af20cab742280522e87964b52ad8ead6fac5695c1a5026a1e5bec81b77096c1e9f":[10,0,0,1,0,0,0], -"generic_2numberparsing_8h_source.html":[12,0,0,0,3,6], -"generic_2ondemand_2array-inl_8h_source.html":[12,0,0,0,3,0,0], -"generic_2ondemand_2array_8h_source.html":[12,0,0,0,3,0,1], -"generic_2ondemand_2document-inl_8h_source.html":[12,0,0,0,3,0,4], -"generic_2ondemand_2document_8h_source.html":[12,0,0,0,3,0,5], -"generic_2ondemand_2document__stream-inl_8h_source.html":[12,0,0,0,3,0,6], -"generic_2ondemand_2document__stream_8h_source.html":[12,0,0,0,3,0,7], -"generic_2ondemand_2object-inl_8h_source.html":[12,0,0,0,3,0,16], -"generic_2ondemand_2object_8h_source.html":[12,0,0,0,3,0,17], -"generic_2ondemand_2parser-inl_8h_source.html":[12,0,0,0,3,0,20], -"generic_2ondemand_2parser_8h_source.html":[12,0,0,0,3,0,21], -"generic_2ondemand_2serialization-inl_8h_source.html":[12,0,0,0,3,0,24], -"generic_2ondemand_2serialization_8h_source.html":[12,0,0,0,3,0,25], +"generic_2base_8h.html#a6ce99de87fa73b924822cd28045c97c0":[10,0,0,6,5], +"generic_2base_8h.html#a6ce99de87fa73b924822cd28045c97c0a7383104b83254a99f5991d0ac77a6666":[10,0,0,6,5,2], +"generic_2base_8h.html#a6ce99de87fa73b924822cd28045c97c0aa14b6141855cd58c670ca6559c75c941":[10,0,0,6,5,1], +"generic_2base_8h.html#a6ce99de87fa73b924822cd28045c97c0ac5695c1a5026a1e5bec81b77096c1e9f":[10,0,0,6,5,0], +"generic_2base_8h_source.html":[12,0,0,0,4,3], +"generic_2dom__parser__implementation_8h_source.html":[12,0,0,0,4,5], +"generic_2ondemand_2array-inl_8h_source.html":[12,0,0,0,4,0,1], +"generic_2ondemand_2array_8h_source.html":[12,0,0,0,4,0,2], +"generic_2ondemand_2base_8h_source.html":[12,0,0,0,4,0,5], +"generic_2ondemand_2document-inl_8h_source.html":[12,0,0,0,4,0,7], +"generic_2ondemand_2document_8h_source.html":[12,0,0,0,4,0,8], +"generic_2ondemand_2document__stream-inl_8h_source.html":[12,0,0,0,4,0,9], +"generic_2ondemand_2document__stream_8h_source.html":[12,0,0,0,4,0,10], +"generic_2ondemand_2object-inl_8h_source.html":[12,0,0,0,4,0,19], +"generic_2ondemand_2object_8h_source.html":[12,0,0,0,4,0,20], +"generic_2ondemand_2parser-inl_8h_source.html":[12,0,0,0,4,0,23], +"generic_2ondemand_2parser_8h_source.html":[12,0,0,0,4,0,24], +"generic_2ondemand_2serialization-inl_8h_source.html":[12,0,0,0,4,0,27], +"generic_2ondemand_2serialization_8h_source.html":[12,0,0,0,4,0,28], "group__array.html":[9,1], "group__array.html#ga136e508ce46622b86cc901490c807578":[9,1,5], "group__array.html#ga14e69f9c4949805695e30a576bd9c964":[9,1,3], @@ -210,44 +207,47 @@ var NAVTREEINDEX2 = "group__object.html#gab9563a58e164e9f5f75805cffb3582ec":[9,0,8], "group__object.html#gacefcaf06811426a241ed97a6948a94ee":[9,0,3], "group__scalar.html":[9,2], -"haswell_2begin_8h_source.html":[12,0,0,0,4,0], -"haswell_2bitmanipulation_8h_source.html":[12,0,0,0,4,1], -"haswell_2bitmask_8h_source.html":[12,0,0,0,4,2], -"haswell_2end_8h_source.html":[12,0,0,0,4,3], -"haswell_2implementation_8h_source.html":[12,0,0,0,4,4], -"haswell_2intrinsics_8h_source.html":[12,0,0,0,4,5], -"haswell_2numberparsing_8h_source.html":[12,0,0,0,4,6], -"haswell_2simd_8h_source.html":[12,0,0,0,4,7], -"haswell_2stringparsing_8h_source.html":[12,0,0,0,4,8], -"haswell_8h_source.html":[12,0,0,0,19], +"haswell_2base_8h_source.html":[12,0,0,0,5,0], +"haswell_2begin_8h_source.html":[12,0,0,0,5,1], +"haswell_2bitmanipulation_8h_source.html":[12,0,0,0,5,2], +"haswell_2bitmask_8h_source.html":[12,0,0,0,5,3], +"haswell_2end_8h_source.html":[12,0,0,0,5,4], +"haswell_2implementation_8h_source.html":[12,0,0,0,5,5], +"haswell_2intrinsics_8h_source.html":[12,0,0,0,5,6], +"haswell_2numberparsing__defs_8h_source.html":[12,0,0,0,5,7], +"haswell_2ondemand_8h_source.html":[12,0,0,0,5,8], +"haswell_2simd_8h_source.html":[12,0,0,0,5,9], +"haswell_2stringparsing__defs_8h_source.html":[12,0,0,0,5,10], +"haswell_8h_source.html":[12,0,0,0,20], "hierarchy.html":[11,2], -"icelake_2begin_8h_source.html":[12,0,0,0,5,0], -"icelake_2bitmanipulation_8h_source.html":[12,0,0,0,5,1], -"icelake_2bitmask_8h_source.html":[12,0,0,0,5,2], -"icelake_2end_8h_source.html":[12,0,0,0,5,3], -"icelake_2implementation_8h_source.html":[12,0,0,0,5,4], -"icelake_2intrinsics_8h_source.html":[12,0,0,0,5,5], -"icelake_2numberparsing_8h_source.html":[12,0,0,0,5,6], -"icelake_2simd_8h_source.html":[12,0,0,0,5,7], -"icelake_2stringparsing_8h_source.html":[12,0,0,0,5,8], -"icelake_8h_source.html":[12,0,0,0,20], -"implementation-base_8h.html":[12,0,0,0,21], -"implementation-base_8h_source.html":[12,0,0,0,21], +"icelake_2base_8h_source.html":[12,0,0,0,6,0], +"icelake_2begin_8h_source.html":[12,0,0,0,6,1], +"icelake_2bitmanipulation_8h_source.html":[12,0,0,0,6,2], +"icelake_2bitmask_8h_source.html":[12,0,0,0,6,3], +"icelake_2end_8h_source.html":[12,0,0,0,6,4], +"icelake_2implementation_8h_source.html":[12,0,0,0,6,5], +"icelake_2intrinsics_8h_source.html":[12,0,0,0,6,6], +"icelake_2numberparsing__defs_8h_source.html":[12,0,0,0,6,7], +"icelake_2ondemand_8h_source.html":[12,0,0,0,6,8], +"icelake_2simd_8h_source.html":[12,0,0,0,6,9], +"icelake_2stringparsing__defs_8h_source.html":[12,0,0,0,6,10], +"icelake_8h_source.html":[12,0,0,0,21], "implementation_8h_source.html":[12,0,0,0,22], -"implementation__simdjson__result__base-inl_8h_source.html":[12,0,0,0,3,3], -"implementation__simdjson__result__base_8h_source.html":[12,0,0,0,3,4], -"implementations_8h_source.html":[12,0,0,0,23], +"implementation__detection_8h_source.html":[12,0,0,0,23], +"implementation__simdjson__result__base-inl_8h_source.html":[12,0,0,0,4,6], +"implementation__simdjson__result__base_8h_source.html":[12,0,0,0,4,7], "index.html":[], -"internal_2dom__parser__implementation_8h_source.html":[12,0,0,0,6,0], -"isadetection_8h_source.html":[12,0,0,0,6,1], -"json__iterator-inl_8h_source.html":[12,0,0,0,3,0,10], -"json__iterator_8h_source.html":[12,0,0,0,3,0,11], -"json__type-inl_8h_source.html":[12,0,0,0,3,0,12], -"json__type_8h_source.html":[12,0,0,0,3,0,13], -"jsoncharutils_8h_source.html":[12,0,0,0,3,5], -"jsoncharutils__tables_8h_source.html":[12,0,0,0,6,2], -"jsonformatutils_8h_source.html":[12,0,0,0,6,3], +"instruction__set_8h_source.html":[12,0,0,0,7,2], +"internal_2dom__parser__implementation_8h_source.html":[12,0,0,0,7,1], +"isadetection_8h_source.html":[12,0,0,0,7,3], +"json__iterator-inl_8h_source.html":[12,0,0,0,4,0,13], +"json__iterator_8h_source.html":[12,0,0,0,4,0,14], +"json__type-inl_8h_source.html":[12,0,0,0,4,0,15], +"json__type_8h_source.html":[12,0,0,0,4,0,16], +"jsoncharutils_8h_source.html":[12,0,0,0,4,8], +"jsoncharutils__tables_8h_source.html":[12,0,0,0,7,4], +"jsonformatutils_8h_source.html":[12,0,0,0,7,5], "jsonioutil_8h_source.html":[12,0,0,0,24], -"jsonparser_8h_source.html":[12,0,0,0,1,8], -"logger-inl_8h.html#a0176c136680aa97eb8bd8f57033f41be":[10,0,0,1,1,0,9] +"jsonparser_8h_source.html":[12,0,0,0,2,9], +"logger-inl_8h.html#a0176c136680aa97eb8bd8f57033f41be":[10,0,0,6,1,0,9] }; diff --git a/navtreeindex3.js b/navtreeindex3.js index b2c1b43a5..597d89d3e 100644 --- a/navtreeindex3.js +++ b/navtreeindex3.js @@ -1,25 +1,25 @@ var NAVTREEINDEX3 = { -"logger-inl_8h.html#a12f4fdff59099b28730ba4288877437f":[10,0,0,1,1,0,16], -"logger-inl_8h.html#a1b9952154ae0172530a16854ff005d92":[10,0,0,1,1,0,15], -"logger-inl_8h.html#a273e5f25cfdef1064a5225a47d85eb4f":[10,0,0,1,1,0,3], -"logger-inl_8h.html#a4427c475cf7d49b372c768201b4d92cb":[10,0,0,1,1,0,7], -"logger-inl_8h.html#a66e3122a7ae01bfe5f81ecb1bf1814cc":[10,0,0,1,1,0,5], -"logger-inl_8h.html#a6ca1434e6fe03e97dbc88360cc6ea5db":[10,0,0,1,1,0,2], -"logger-inl_8h.html#a720bb462b108c1f9bcaa02cdcdfe6546":[10,0,0,1,1,0,13], -"logger-inl_8h.html#a8cd7cf74fd4b1c9386ac006febabeebd":[10,0,0,1,1,0,10], -"logger-inl_8h.html#a92b499d3d191a02e913f90de4f641e2e":[10,0,0,1,1,0,11], -"logger-inl_8h.html#aa220611a86e2a544368f650b7f7315fb":[10,0,0,1,1,0,4], -"logger-inl_8h.html#aaa4c1a2ef6eb08bb02a8ea6e49d2a786":[10,0,0,1,1,0,12], -"logger-inl_8h.html#ab8082fd58a3d7e115016a3fc52ee8936":[10,0,0,1,1,0,1], -"logger-inl_8h.html#ab8b9add577d4aba4fc244fa5a5bcb219":[10,0,0,1,1,0,8], -"logger-inl_8h.html#abaf0200be757924fd5a89834e3b758f0":[10,0,0,1,1,0,14], -"logger-inl_8h.html#aee467b07dcf64f1282096914a1214053":[10,0,0,1,1,0,6], -"logger-inl_8h_source.html":[12,0,0,0,3,0,14], -"logger_8h.html#a10405079edbfa28899ad2d9e7a69245f":[10,0,0,1,1,0,0], -"logger_8h.html#a10405079edbfa28899ad2d9e7a69245facaf9b6b99962bf5c2264824231d7a40c":[10,0,0,1,1,0,0,0], -"logger_8h.html#a10405079edbfa28899ad2d9e7a69245facb5e100e5a9a3e7f6d1fd97512215282":[10,0,0,1,1,0,0,1], -"logger_8h_source.html":[12,0,0,0,3,0,15], +"logger-inl_8h.html#a12f4fdff59099b28730ba4288877437f":[10,0,0,6,1,0,16], +"logger-inl_8h.html#a1b9952154ae0172530a16854ff005d92":[10,0,0,6,1,0,15], +"logger-inl_8h.html#a273e5f25cfdef1064a5225a47d85eb4f":[10,0,0,6,1,0,3], +"logger-inl_8h.html#a4427c475cf7d49b372c768201b4d92cb":[10,0,0,6,1,0,7], +"logger-inl_8h.html#a66e3122a7ae01bfe5f81ecb1bf1814cc":[10,0,0,6,1,0,5], +"logger-inl_8h.html#a6ca1434e6fe03e97dbc88360cc6ea5db":[10,0,0,6,1,0,2], +"logger-inl_8h.html#a720bb462b108c1f9bcaa02cdcdfe6546":[10,0,0,6,1,0,13], +"logger-inl_8h.html#a8cd7cf74fd4b1c9386ac006febabeebd":[10,0,0,6,1,0,10], +"logger-inl_8h.html#a92b499d3d191a02e913f90de4f641e2e":[10,0,0,6,1,0,11], +"logger-inl_8h.html#aa220611a86e2a544368f650b7f7315fb":[10,0,0,6,1,0,4], +"logger-inl_8h.html#aaa4c1a2ef6eb08bb02a8ea6e49d2a786":[10,0,0,6,1,0,12], +"logger-inl_8h.html#ab8082fd58a3d7e115016a3fc52ee8936":[10,0,0,6,1,0,1], +"logger-inl_8h.html#ab8b9add577d4aba4fc244fa5a5bcb219":[10,0,0,6,1,0,8], +"logger-inl_8h.html#abaf0200be757924fd5a89834e3b758f0":[10,0,0,6,1,0,14], +"logger-inl_8h.html#aee467b07dcf64f1282096914a1214053":[10,0,0,6,1,0,6], +"logger-inl_8h_source.html":[12,0,0,0,4,0,17], +"logger_8h.html#a10405079edbfa28899ad2d9e7a69245f":[10,0,0,6,1,0,0], +"logger_8h.html#a10405079edbfa28899ad2d9e7a69245facaf9b6b99962bf5c2264824231d7a40c":[10,0,0,6,1,0,0,0], +"logger_8h.html#a10405079edbfa28899ad2d9e7a69245facb5e100e5a9a3e7f6d1fd97512215282":[10,0,0,6,1,0,0,1], +"logger_8h_source.html":[12,0,0,0,4,0,18], "md_doc_basics.html":[0], "md_doc_basics.html#autotoc_md0":[0,0], "md_doc_basics.html#autotoc_md1":[0,1], @@ -144,110 +144,110 @@ var NAVTREEINDEX3 = "namespacemembers_vars.html":[10,1,2], "namespaces.html":[10,0], "namespacesimdjson.html":[10,0,0], -"namespacesimdjson.html#a04edabca6d128b8b31592e1e2e331ae0":[10,0,0,71], -"namespacesimdjson.html#a055b1230968101c76d7379da72cf3be1":[10,0,0,34], -"namespacesimdjson.html#a083a32b06fd32b6cd5e747abe3db6172":[10,0,0,48], -"namespacesimdjson.html#a202587a9e2cdd1c3d88b8640f9bc3a18":[10,0,0,65], -"namespacesimdjson.html#a28a847c4b31fc804bec2987b171dbd07":[10,0,0,72], -"namespacesimdjson.html#a2cda17221b852e5c398bad5bf350d270":[10,0,0,58], -"namespacesimdjson.html#a2ec7825eb81d38a4a101dd89031ad86c":[10,0,0,44], -"namespacesimdjson.html#a32b88c95630f78ed1115379735bbbf34":[10,0,0,67], -"namespacesimdjson.html#a39bbbf605c0068e4a65c2d8885727fc9":[10,0,0,52], -"namespacesimdjson.html#a3dfa142328d096b51f85e13fe96fd25e":[10,0,0,42], -"namespacesimdjson.html#a43514fe76c3095e45f30a050a9551d27":[10,0,0,51], -"namespacesimdjson.html#a4447c2af37e8fa57daa0cedd948a810d":[10,0,0,54], -"namespacesimdjson.html#a44db29a59fd9f65464171bb1caeb0914":[10,0,0,59], -"namespacesimdjson.html#a4c998fcc6bf2bca2196b45a5c3e1967a":[10,0,0,61], -"namespacesimdjson.html#a4ee1eccef6fb8cdcdaf794e3e3d9ee66":[10,0,0,69], -"namespacesimdjson.html#a53546f3af0ed6840ffbeefcbefd305a1":[10,0,0,70], -"namespacesimdjson.html#a537445bb236ae76d2b5559b1851b7108":[10,0,0,50], -"namespacesimdjson.html#a56e8e2fa6798b9e0da80bc51ae4a5f29":[10,0,0,37], -"namespacesimdjson.html#a598dd79ec46726de8a6d409ba1bae034":[10,0,0,57], -"namespacesimdjson.html#a61a74357c3e9313ad84c5f1243fdf581":[10,0,0,53], -"namespacesimdjson.html#a630111c8201eafec9b4c44fe0456a475":[10,0,0,43], -"namespacesimdjson.html#a63b494af834917af13120dcd57719bdb":[10,0,0,26], -"namespacesimdjson.html#a65b00a7a7a9c8fafe9eb3b9b413a36fa":[10,0,0,36], -"namespacesimdjson.html#a688157fcec0f7a073ebcbaa277df1647":[10,0,0,45], -"namespacesimdjson.html#a6a670913a79379b38ac49a0599b437e8":[10,0,0,62], -"namespacesimdjson.html#a6df2598eb1d4e1ea669c41831cc7325d":[10,0,0,73], -"namespacesimdjson.html#a6f306690d6d088d80b0cc2717040b2d0":[10,0,0,41], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9":[10,0,0,28], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a00d7c038f551d9527ba8897f3cee907d":[10,0,0,28,28], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a0c6b4af181d3d5f40a09182522c88681":[10,0,0,28,4], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a0f9ce97e85e7607e0f4d3811b818a013":[10,0,0,28,14], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a1de02af1d67e8350f612eee0dcf634b4":[10,0,0,28,16], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a2d50048bbe409023df4e88f6ffe3bc71":[10,0,0,28,1], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a351bcafefbbc80a6dadc1ea6c27a35e6":[10,0,0,28,25], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a398a5389d6e20c39e8880b0101b66f56":[10,0,0,28,10], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a3f94172e04ae52a978ea62157140b0de":[10,0,0,28,29], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4005fbda56edc47e077e5cfd4e68cda9":[10,0,0,28,3], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4a2c71f8eca438b3f0553a2811bdab9a":[10,0,0,28,19], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4d768ac107473bceb91f8a0d1a824bc2":[10,0,0,28,15], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4e161f7bd0b3ca10f41a220a75de8cde":[10,0,0,28,8], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a69f1b9e7b9970fbb60416ebce2f894c3":[10,0,0,28,31], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a7aed571b420dcdfe59742e0df97b415a":[10,0,0,28,12], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a7b0467451dc0cecb41d3ea46c4a0005b":[10,0,0,28,22], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a80bcf6820da38abe1a2e9abeaa0f0c49":[10,0,0,28,18], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a8c779dcc8fb73a4eb8891af3ef65eebb":[10,0,0,28,17], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a8ef9cfdd78dd92d2b304249917638d12":[10,0,0,28,5], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aa0e71422c8ae80ebaa11d8d74d64737f":[10,0,0,28,2], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aa4ffc800804829a88c5b52ac3c4c6681":[10,0,0,28,0], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab6e8bfc242f7bea38657eaf61400077f":[10,0,0,28,6], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab70f5a6f0ac798d482e95a0fcc528676":[10,0,0,28,30], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab8a4df583110f900741d0b3f229f349a":[10,0,0,28,27], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9abdd3905c91a152a01637a2946066db6b":[10,0,0,28,23], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ac2aef8f0fc33187cc118c95fade925d2":[10,0,0,28,11], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aca57917fc85c421aab3f2dd451519fa5":[10,0,0,28,13], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9acaec8ffce84b1acf9e6833b0f930878e":[10,0,0,28,20], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9adfcabbbd1ddb0843a0f320e062866ae8":[10,0,0,28,9], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ae726a74b8a99e4bf802f3078436a2394":[10,0,0,28,7], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ae9067bb5cb6283141b1c66466005ac0d":[10,0,0,28,24], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aee3335b961f2d0f732e95b359c16a69a":[10,0,0,28,26], -"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aeeaf930969566f76840224d64ee3a9a1":[10,0,0,28,21], -"namespacesimdjson.html#a7e4483a8ae684fdb5b2f1e7d4a8acc69":[10,0,0,39], -"namespacesimdjson.html#a84c2adfbebe2cf2c11fb30f93aadbd40":[10,0,0,63], -"namespacesimdjson.html#a8acc50c61e4e3ea1aaa7aa8afd42c2b3":[10,0,0,33], -"namespacesimdjson.html#a913aabdb29fe97e1b8246f1e210f1c40":[10,0,0,46], -"namespacesimdjson.html#a9245ff68919610377256bb9b21070e2a":[10,0,0,27], -"namespacesimdjson.html#a92b75b21ee064a73722c18abc40d039b":[10,0,0,66], -"namespacesimdjson.html#a94bb4244756d764cf0ed7de180ae6520":[10,0,0,47], -"namespacesimdjson.html#a971a402db39c41031e4d905fe3614585":[10,0,0,30], -"namespacesimdjson.html#aa17af188e477e08db53a67ab6ceeacf4":[10,0,0,32], -"namespacesimdjson.html#aae4b3d2ed9b9af63d22b2fc404fdd3b5":[10,0,0,64], -"namespacesimdjson.html#abd8b8fd009878125822fca9a2624f6a6":[10,0,0,38], -"namespacesimdjson.html#ac66973a7111dc4aa96ba7b3434344347":[10,0,0,74], -"namespacesimdjson.html#ace2a91673313643def02966826e3920b":[10,0,0,31], -"namespacesimdjson.html#ad394176adf22f9151f92d9cd541d0aee":[10,0,0,40], -"namespacesimdjson.html#ade4516933f53705eacfaed65ed14962d":[10,0,0,68], -"namespacesimdjson.html#adf3293e0e757f2db0f279347c3b57914":[10,0,0,55], -"namespacesimdjson.html#ae6ec9f0ce23fc51d87116b64fdbeb811":[10,0,0,29], -"namespacesimdjson.html#ae6ec9f0ce23fc51d87116b64fdbeb811a929eb14f376ff68fc0ddd3d682e00d4c":[10,0,0,29,1], -"namespacesimdjson.html#ae6ec9f0ce23fc51d87116b64fdbeb811aaf37d08ae228a87dc6b265fd1019c97d":[10,0,0,29,0], -"namespacesimdjson.html#ae6ec9f0ce23fc51d87116b64fdbeb811ac059cc555f4992b3eb481f03b70df100":[10,0,0,29,2], -"namespacesimdjson.html#aeb4ef5cab43d52da3fdd99cb689aff2c":[10,0,0,49], -"namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf":[10,0,0,75], -"namespacesimdjson.html#aed443864cc94c09c3f88eea39f8ce645":[10,0,0,56], -"namespacesimdjson.html#af63210cc51d5c99ad84958daf9812e63":[10,0,0,35], -"namespacesimdjson.html#afc529e3bcacb5b3c747b525fb443771f":[10,0,0,60], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html":[10,0,0,1,1], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a11766eb5c6314cae0fec704440e288dd":[10,0,0,1,1,18], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a14f218243d548a5e5410e6fadc3a53dd":[10,0,0,1,1,15], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a24f9bbfe8b5a3017b4dd4b72dbccec4d":[10,0,0,1,1,21], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a35ef40082a33ee8bb04e9e1b351a468c":[10,0,0,1,1,19], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a386f80798c223c5fdbfc4dd9066a6b99":[10,0,0,1,1,31], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a3c28892b66d1e93564113684711b30c7":[10,0,0,1,1,33], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a515a1f0d410cea5515d9aa9041be53e3":[10,0,0,1,1,29], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a521fa418355665952d548dc3ef682503":[10,0,0,1,1,26], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a6f753d5e1bc479321c51b54392a96a65":[10,0,0,1,1,22], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a7cd33d336f2ede5302be79ada9e7bffe":[10,0,0,1,1,30], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a8dcb00bbb408a0f4ed45601b6de755a6":[10,0,0,1,1,17], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a997747305f387c28e46394c0955d2937":[10,0,0,1,1,28], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#aa3354f8230db6df962b47633591fa232":[10,0,0,1,1,23], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#aab771b17058b0c93bdd0a8679c2c4d84":[10,0,0,1,1,32], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ab10943c6107de5337f376a6939f817af":[10,0,0,1,1,20], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac3a4f6af474f2b5f6d749f7452bb5477":[10,0,0,1,1,25], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330":[10,0,0,1,1,16], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330a37a6259cc0c1dae299a7866489dff0bd":[10,0,0,1,1,16,5], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330a84e2c64f38f78ba3ea5c905ab5a2da27":[10,0,0,1,1,16,4], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330aa8cfde6331bd59eb2ac96f8911c4b666":[10,0,0,1,1,16,1] +"namespacesimdjson.html#a04edabca6d128b8b31592e1e2e331ae0":[10,0,0,77], +"namespacesimdjson.html#a055b1230968101c76d7379da72cf3be1":[10,0,0,40], +"namespacesimdjson.html#a083a32b06fd32b6cd5e747abe3db6172":[10,0,0,54], +"namespacesimdjson.html#a202587a9e2cdd1c3d88b8640f9bc3a18":[10,0,0,71], +"namespacesimdjson.html#a28a847c4b31fc804bec2987b171dbd07":[10,0,0,78], +"namespacesimdjson.html#a2cda17221b852e5c398bad5bf350d270":[10,0,0,64], +"namespacesimdjson.html#a2ec7825eb81d38a4a101dd89031ad86c":[10,0,0,50], +"namespacesimdjson.html#a32b88c95630f78ed1115379735bbbf34":[10,0,0,73], +"namespacesimdjson.html#a32d36effa0943f5006e9d4151f5de0e4":[10,0,0,80], +"namespacesimdjson.html#a39bbbf605c0068e4a65c2d8885727fc9":[10,0,0,58], +"namespacesimdjson.html#a3dfa142328d096b51f85e13fe96fd25e":[10,0,0,48], +"namespacesimdjson.html#a43514fe76c3095e45f30a050a9551d27":[10,0,0,57], +"namespacesimdjson.html#a4447c2af37e8fa57daa0cedd948a810d":[10,0,0,60], +"namespacesimdjson.html#a44db29a59fd9f65464171bb1caeb0914":[10,0,0,65], +"namespacesimdjson.html#a4c998fcc6bf2bca2196b45a5c3e1967a":[10,0,0,67], +"namespacesimdjson.html#a4ee1eccef6fb8cdcdaf794e3e3d9ee66":[10,0,0,75], +"namespacesimdjson.html#a53546f3af0ed6840ffbeefcbefd305a1":[10,0,0,76], +"namespacesimdjson.html#a537445bb236ae76d2b5559b1851b7108":[10,0,0,56], +"namespacesimdjson.html#a56e8e2fa6798b9e0da80bc51ae4a5f29":[10,0,0,43], +"namespacesimdjson.html#a598dd79ec46726de8a6d409ba1bae034":[10,0,0,63], +"namespacesimdjson.html#a61a74357c3e9313ad84c5f1243fdf581":[10,0,0,59], +"namespacesimdjson.html#a630111c8201eafec9b4c44fe0456a475":[10,0,0,49], +"namespacesimdjson.html#a63b494af834917af13120dcd57719bdb":[10,0,0,32], +"namespacesimdjson.html#a65b00a7a7a9c8fafe9eb3b9b413a36fa":[10,0,0,42], +"namespacesimdjson.html#a688157fcec0f7a073ebcbaa277df1647":[10,0,0,51], +"namespacesimdjson.html#a6a670913a79379b38ac49a0599b437e8":[10,0,0,68], +"namespacesimdjson.html#a6df2598eb1d4e1ea669c41831cc7325d":[10,0,0,79], +"namespacesimdjson.html#a6f306690d6d088d80b0cc2717040b2d0":[10,0,0,47], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9":[10,0,0,34], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a00d7c038f551d9527ba8897f3cee907d":[10,0,0,34,28], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a0c6b4af181d3d5f40a09182522c88681":[10,0,0,34,4], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a0f9ce97e85e7607e0f4d3811b818a013":[10,0,0,34,14], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a1de02af1d67e8350f612eee0dcf634b4":[10,0,0,34,16], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a2d50048bbe409023df4e88f6ffe3bc71":[10,0,0,34,1], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a351bcafefbbc80a6dadc1ea6c27a35e6":[10,0,0,34,25], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a398a5389d6e20c39e8880b0101b66f56":[10,0,0,34,10], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a3f94172e04ae52a978ea62157140b0de":[10,0,0,34,29], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4005fbda56edc47e077e5cfd4e68cda9":[10,0,0,34,3], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4a2c71f8eca438b3f0553a2811bdab9a":[10,0,0,34,19], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4d768ac107473bceb91f8a0d1a824bc2":[10,0,0,34,15], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4e161f7bd0b3ca10f41a220a75de8cde":[10,0,0,34,8], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a69f1b9e7b9970fbb60416ebce2f894c3":[10,0,0,34,31], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a7aed571b420dcdfe59742e0df97b415a":[10,0,0,34,12], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a7b0467451dc0cecb41d3ea46c4a0005b":[10,0,0,34,22], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a80bcf6820da38abe1a2e9abeaa0f0c49":[10,0,0,34,18], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a8c779dcc8fb73a4eb8891af3ef65eebb":[10,0,0,34,17], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a8ef9cfdd78dd92d2b304249917638d12":[10,0,0,34,5], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aa0e71422c8ae80ebaa11d8d74d64737f":[10,0,0,34,2], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aa4ffc800804829a88c5b52ac3c4c6681":[10,0,0,34,0], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab6e8bfc242f7bea38657eaf61400077f":[10,0,0,34,6], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab70f5a6f0ac798d482e95a0fcc528676":[10,0,0,34,30], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab8a4df583110f900741d0b3f229f349a":[10,0,0,34,27], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9abdd3905c91a152a01637a2946066db6b":[10,0,0,34,23], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ac2aef8f0fc33187cc118c95fade925d2":[10,0,0,34,11], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aca57917fc85c421aab3f2dd451519fa5":[10,0,0,34,13], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9acaec8ffce84b1acf9e6833b0f930878e":[10,0,0,34,20], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9adfcabbbd1ddb0843a0f320e062866ae8":[10,0,0,34,9], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ae726a74b8a99e4bf802f3078436a2394":[10,0,0,34,7], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ae9067bb5cb6283141b1c66466005ac0d":[10,0,0,34,24], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aee3335b961f2d0f732e95b359c16a69a":[10,0,0,34,26], +"namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aeeaf930969566f76840224d64ee3a9a1":[10,0,0,34,21], +"namespacesimdjson.html#a7e4483a8ae684fdb5b2f1e7d4a8acc69":[10,0,0,45], +"namespacesimdjson.html#a84c2adfbebe2cf2c11fb30f93aadbd40":[10,0,0,69], +"namespacesimdjson.html#a8acc50c61e4e3ea1aaa7aa8afd42c2b3":[10,0,0,39], +"namespacesimdjson.html#a913aabdb29fe97e1b8246f1e210f1c40":[10,0,0,52], +"namespacesimdjson.html#a9245ff68919610377256bb9b21070e2a":[10,0,0,33], +"namespacesimdjson.html#a92b75b21ee064a73722c18abc40d039b":[10,0,0,72], +"namespacesimdjson.html#a94bb4244756d764cf0ed7de180ae6520":[10,0,0,53], +"namespacesimdjson.html#a971a402db39c41031e4d905fe3614585":[10,0,0,36], +"namespacesimdjson.html#aa17af188e477e08db53a67ab6ceeacf4":[10,0,0,38], +"namespacesimdjson.html#aae4b3d2ed9b9af63d22b2fc404fdd3b5":[10,0,0,70], +"namespacesimdjson.html#abd8b8fd009878125822fca9a2624f6a6":[10,0,0,44], +"namespacesimdjson.html#ace2a91673313643def02966826e3920b":[10,0,0,37], +"namespacesimdjson.html#ad394176adf22f9151f92d9cd541d0aee":[10,0,0,46], +"namespacesimdjson.html#ade4516933f53705eacfaed65ed14962d":[10,0,0,74], +"namespacesimdjson.html#adf3293e0e757f2db0f279347c3b57914":[10,0,0,61], +"namespacesimdjson.html#ae6ec9f0ce23fc51d87116b64fdbeb811":[10,0,0,35], +"namespacesimdjson.html#ae6ec9f0ce23fc51d87116b64fdbeb811a929eb14f376ff68fc0ddd3d682e00d4c":[10,0,0,35,1], +"namespacesimdjson.html#ae6ec9f0ce23fc51d87116b64fdbeb811aaf37d08ae228a87dc6b265fd1019c97d":[10,0,0,35,0], +"namespacesimdjson.html#ae6ec9f0ce23fc51d87116b64fdbeb811ac059cc555f4992b3eb481f03b70df100":[10,0,0,35,2], +"namespacesimdjson.html#aeb4ef5cab43d52da3fdd99cb689aff2c":[10,0,0,55], +"namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf":[10,0,0,81], +"namespacesimdjson.html#aed443864cc94c09c3f88eea39f8ce645":[10,0,0,62], +"namespacesimdjson.html#af63210cc51d5c99ad84958daf9812e63":[10,0,0,41], +"namespacesimdjson.html#afc529e3bcacb5b3c747b525fb443771f":[10,0,0,66], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html":[10,0,0,6,1], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a11766eb5c6314cae0fec704440e288dd":[10,0,0,6,1,18], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a14f218243d548a5e5410e6fadc3a53dd":[10,0,0,6,1,15], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a24f9bbfe8b5a3017b4dd4b72dbccec4d":[10,0,0,6,1,21], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a35ef40082a33ee8bb04e9e1b351a468c":[10,0,0,6,1,19], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a386f80798c223c5fdbfc4dd9066a6b99":[10,0,0,6,1,31], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a3c28892b66d1e93564113684711b30c7":[10,0,0,6,1,33], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a515a1f0d410cea5515d9aa9041be53e3":[10,0,0,6,1,29], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a521fa418355665952d548dc3ef682503":[10,0,0,6,1,26], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a6a2b39df6a1ac51d9fbb7b39a1fcf89c":[10,0,0,6,1,14], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a6f753d5e1bc479321c51b54392a96a65":[10,0,0,6,1,22], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a7cd33d336f2ede5302be79ada9e7bffe":[10,0,0,6,1,30], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a8dcb00bbb408a0f4ed45601b6de755a6":[10,0,0,6,1,17], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a997747305f387c28e46394c0955d2937":[10,0,0,6,1,28], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#aa3354f8230db6df962b47633591fa232":[10,0,0,6,1,23], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#aab771b17058b0c93bdd0a8679c2c4d84":[10,0,0,6,1,32], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ab10943c6107de5337f376a6939f817af":[10,0,0,6,1,20], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac3a4f6af474f2b5f6d749f7452bb5477":[10,0,0,6,1,25], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330":[10,0,0,6,1,16], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330a37a6259cc0c1dae299a7866489dff0bd":[10,0,0,6,1,16,5], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330a84e2c64f38f78ba3ea5c905ab5a2da27":[10,0,0,6,1,16,4] }; diff --git a/navtreeindex4.js b/navtreeindex4.js index d9cfdbcff..d48d9fb21 100644 --- a/navtreeindex4.js +++ b/navtreeindex4.js @@ -1,43 +1,75 @@ var NAVTREEINDEX4 = { -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330ab1bc248a7ff2b2e95569f56de68615df":[10,0,0,1,1,16,2], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330ab45cffe084dd3d20d928bee85e7b0f21":[10,0,0,1,1,16,3], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330af1f713c9e000f5d3f280adbd124df4f5":[10,0,0,1,1,16,0], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ad1157b391ebf205df7e747d753746f93":[10,0,0,1,1,14], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#adab1063af10b90a1f45f87b307225995":[10,0,0,1,1,27], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ae52a82c2f754a47eb9dac12223b3311d":[10,0,0,1,1,24], -"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#af941be7ff0cfaeb30d15d2fb52e76dd1":[10,0,0,1,1,13], -"numberparsing__tables_8h_source.html":[12,0,0,0,6,4], -"object__iterator-inl_8h_source.html":[12,0,0,0,3,0,18], -"object__iterator_8h_source.html":[12,0,0,0,3,0,19], -"ondemand-inl_8h_source.html":[12,0,0,0,3,7], -"ondemand_8h_source.html":[12,0,0,0,3,8], -"padded__string-inl_8h_source.html":[12,0,0,0,26], -"padded__string_8h_source.html":[12,0,0,0,27], -"padded__string__view-inl_8h_source.html":[12,0,0,0,28], -"padded__string__view_8h_source.html":[12,0,0,0,29], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330aa8cfde6331bd59eb2ac96f8911c4b666":[10,0,0,6,1,16,1], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330ab1bc248a7ff2b2e95569f56de68615df":[10,0,0,6,1,16,2], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330ab45cffe084dd3d20d928bee85e7b0f21":[10,0,0,6,1,16,3], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330af1f713c9e000f5d3f280adbd124df4f5":[10,0,0,6,1,16,0], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#adab1063af10b90a1f45f87b307225995":[10,0,0,6,1,27], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ae52a82c2f754a47eb9dac12223b3311d":[10,0,0,6,1,24], +"namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#af941be7ff0cfaeb30d15d2fb52e76dd1":[10,0,0,6,1,13], +"namespacesimdjson_1_1arm64.html":[10,0,0,0], +"namespacesimdjson_1_1dom.html":[10,0,0,1], +"namespacesimdjson_1_1dom.html#a2201b306b0efa80269faf05e1ba2879b":[10,0,0,1,9], +"namespacesimdjson_1_1dom.html#a3f7b959b3ebe04634ab0e22a48426786":[10,0,0,1,15], +"namespacesimdjson_1_1dom.html#a43347827393e037c8027ddccd6ec994b":[10,0,0,1,10], +"namespacesimdjson_1_1dom.html#a50a1f5a28bb3b74e3c97b728c1ea8245":[10,0,0,1,14], +"namespacesimdjson_1_1dom.html#a66cf0dca50cbaa17e59c1349ae6d7c1d":[10,0,0,1,13], +"namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3a":[10,0,0,1,7], +"namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa4e866b275c85fbb439f6484251cfb31c":[10,0,0,1,7,2], +"namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa63b588d5559f64f89a416e656880b949":[10,0,0,1,7,5], +"namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa6de7acf711860176ba606e9aa2b85d5f":[10,0,0,1,7,3], +"namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa8eee8e217391199668cbac89472ace53":[10,0,0,1,7,1], +"namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aaa97b2c144243b2b9d2c593ec268b62f5":[10,0,0,1,7,6], +"namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aaa9f0aff2067f91437e50e4872b229e6a":[10,0,0,1,7,7], +"namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aacb4fb1757fb37c43cded35d3eb857c43":[10,0,0,1,7,0], +"namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aafd3e4ece78a7d422280d5ed379482229":[10,0,0,1,7,4], +"namespacesimdjson_1_1dom.html#a9b9af1992350587324412b3ee5b3347a":[10,0,0,1,12], +"namespacesimdjson_1_1dom.html#aa5dbd189409df6b2672310006c92463f":[10,0,0,1,11], +"namespacesimdjson_1_1dom.html#ab61244b704aac73f80987733dae1ff26":[10,0,0,1,8], +"namespacesimdjson_1_1fallback.html":[10,0,0,2], +"namespacesimdjson_1_1haswell.html":[10,0,0,3], +"namespacesimdjson_1_1icelake.html":[10,0,0,4], +"namespacesimdjson_1_1ppc64.html":[10,0,0,5], +"namespacesimdjson_1_1westmere.html":[10,0,0,7], +"numberparsing_8h.html#a4c645a86ea19178e55e6ceaa96ad29ae":[10,0,0,6,0,3], +"numberparsing_8h.html#a8a19d7f5fc0e7495a136073daee8df78":[10,0,0,6,0,2], +"numberparsing_8h.html#abfab4a11a66cf3429d4b584165a0d47e":[10,0,0,6,0,1], +"numberparsing_8h.html#ade2dc27fe18a87c9fb48782885fc76a3":[10,0,0,6,6], +"numberparsing_8h_source.html":[12,0,0,0,4,9], +"numberparsing__tables_8h_source.html":[12,0,0,0,7,6], +"object__iterator-inl_8h_source.html":[12,0,0,0,4,0,21], +"object__iterator_8h_source.html":[12,0,0,0,4,0,22], +"ondemand_2amalgamated_8h_source.html":[12,0,0,0,4,0,0], +"ondemand_2dependencies_8h_source.html":[12,0,0,0,4,0,6], +"ondemand_8h_source.html":[12,0,0,0,26], +"padded__string-inl_8h_source.html":[12,0,0,0,27], +"padded__string_8h_source.html":[12,0,0,0,28], +"padded__string__view-inl_8h_source.html":[12,0,0,0,29], +"padded__string__view_8h_source.html":[12,0,0,0,30], "pages.html":[], -"parsedjson_8h_source.html":[12,0,0,0,1,11], -"parsedjson__iterator-inl_8h_source.html":[12,0,0,0,1,12], -"parsedjson__iterator_8h_source.html":[12,0,0,0,1,13], -"portability_8h_source.html":[12,0,0,0,30], -"ppc64_2begin_8h_source.html":[12,0,0,0,8,0], -"ppc64_2bitmanipulation_8h_source.html":[12,0,0,0,8,1], -"ppc64_2bitmask_8h_source.html":[12,0,0,0,8,2], -"ppc64_2end_8h_source.html":[12,0,0,0,8,3], -"ppc64_2implementation_8h_source.html":[12,0,0,0,8,4], -"ppc64_2intrinsics_8h_source.html":[12,0,0,0,8,5], -"ppc64_2numberparsing_8h_source.html":[12,0,0,0,8,6], -"ppc64_2simd_8h_source.html":[12,0,0,0,8,7], -"ppc64_2stringparsing_8h_source.html":[12,0,0,0,8,8], -"ppc64_8h_source.html":[12,0,0,0,31], -"raw__json__string-inl_8h_source.html":[12,0,0,0,3,0,22], -"raw__json__string_8h_source.html":[12,0,0,0,3,0,23], -"simdjson_8h.html":[12,0,0,0,32], -"simdjson_8h_source.html":[12,0,0,0,32], -"simdjson__version_8h_source.html":[12,0,0,0,33], -"simdprune__tables_8h_source.html":[12,0,0,0,6,5], -"string__view_8hpp_source.html":[12,0,0,0,7,0], +"parsedjson_8h_source.html":[12,0,0,0,2,12], +"parsedjson__iterator-inl_8h_source.html":[12,0,0,0,2,13], +"parsedjson__iterator_8h_source.html":[12,0,0,0,2,14], +"portability_8h_source.html":[12,0,0,0,31], +"ppc64_2base_8h_source.html":[12,0,0,0,9,0], +"ppc64_2begin_8h_source.html":[12,0,0,0,9,1], +"ppc64_2bitmanipulation_8h_source.html":[12,0,0,0,9,2], +"ppc64_2bitmask_8h_source.html":[12,0,0,0,9,3], +"ppc64_2end_8h_source.html":[12,0,0,0,9,4], +"ppc64_2implementation_8h_source.html":[12,0,0,0,9,5], +"ppc64_2intrinsics_8h_source.html":[12,0,0,0,9,6], +"ppc64_2numberparsing__defs_8h_source.html":[12,0,0,0,9,7], +"ppc64_2ondemand_8h_source.html":[12,0,0,0,9,8], +"ppc64_2simd_8h_source.html":[12,0,0,0,9,9], +"ppc64_2stringparsing__defs_8h_source.html":[12,0,0,0,9,10], +"ppc64_8h_source.html":[12,0,0,0,32], +"raw__json__string-inl_8h_source.html":[12,0,0,0,4,0,25], +"raw__json__string_8h_source.html":[12,0,0,0,4,0,26], +"simdjson_8h.html":[12,0,0,0,33], +"simdjson_8h_source.html":[12,0,0,0,33], +"simdjson__version_8h_source.html":[12,0,0,0,34], +"simdprune__tables_8h_source.html":[12,0,0,0,7,7], +"string__view_8hpp_source.html":[12,0,0,0,8,0], "structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html":[11,0,0,1,3], "structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a108dd35fd49314820106a21afa0fb2ea":[11,0,0,1,3,0], "structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a11133790f4386ea4d11567a3a0806096":[11,0,0,1,3,6], @@ -143,7 +175,6 @@ var NAVTREEINDEX4 = "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a371fb9d9879782009c11e547ff79e869":[11,0,0,10,45], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a429242515e1139a04142c3f1aa5cbe68":[11,0,0,10,17], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a429242515e1139a04142c3f1aa5cbe68":[11,0,0,10,18], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a453fe08b006f752013c80158594971ba":[11,0,0,10,33], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a458029a37b519f4594dc78812fee8657":[11,0,0,10,35], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a4762f6c497ac46d5c7a130b2f389156d":[11,0,0,10,47], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a50bddd1e9bc10caaabff8ff4d7eb903d":[11,0,0,10,49], @@ -163,6 +194,7 @@ var NAVTREEINDEX4 = "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a87b78dd9ad9dd5fc8f5f1368ef004928":[11,0,0,10,21], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a88d370115d7ac1708b0127fc64ce9b2d":[11,0,0,10,12], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a89e365ab71c3c1e6c52c2bbc914069ef":[11,0,0,10,26], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a97cf6c1bf360c6570649afdb97b9c25d":[11,0,0,10,33], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a9a751f7a061bc6e8d3159556466edbf0":[11,0,0,10,4], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a9fbe143e7d0e23f9c62cbae279c30790":[11,0,0,10,29], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#aad912138afff908ddd2f1ceacc51fb86":[11,0,0,10,6], @@ -217,37 +249,5 @@ var NAVTREEINDEX4 = "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#a9d15caa939a40325a3dabbe3224ddbbf":[11,0,0,11,40], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#a9e474f04cbd9cf41a1e698ba6bfbf701":[11,0,0,11,45], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#aa2873ff8fc330dd1138bba61e7487287":[11,0,0,11,42], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#aa53af9357f3c3aa144ccda80ed709d4c":[11,0,0,11,0], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#aa6ef30cb4fec233a33a0e0a8caf90e0b":[11,0,0,11,14], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#aa924317778c6f7d8e3941c7aadf1854d":[11,0,0,11,12], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ab10a7c98d14d3a40aef1a8b1e9cd29d2":[11,0,0,11,41], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ab68d719e9d7079f61481d13d37fc615a":[11,0,0,11,9], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ac191bf126c9e388b902a67cfbdd30013":[11,0,0,11,21], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ac1bcd8afb10742d6f18b8f2f07ba0392":[11,0,0,11,44], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ac2d22c558afdcbac2d66e2d333526202":[11,0,0,11,27], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#aca433867baaffeff86367c88bf192572":[11,0,0,11,20], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#acc2ab79d219fc8cd814c8cf656ca00c0":[11,0,0,11,38], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ace03cdf56314cb0b5cbe2a7d45e0cf2f":[11,0,0,11,13], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ace8e77df3989649fdeb84110a37521db":[11,0,0,11,26], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ad30a48ed641b349206b8fdb6b400ac36":[11,0,0,11,10], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ad65311d0d524203aeb76a4ecb25e8a71":[11,0,0,11,25], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ad8d508768cb4c8bdf6c169395e888c34":[11,0,0,11,46], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ad99c6aa33f3728d6a3163b56db1ea969":[11,0,0,11,43], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ae13d3f823d9ac6a763cc3c5beae1c4e3":[11,0,0,11,35], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ae1557f700923c9f18b75f2d320e434c7":[11,0,0,11,2], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ae34bac01f275a64170b1e9773a8723d0":[11,0,0,11,17], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#af76e3ed42262a4fa24d0452c81e6fcc7":[11,0,0,11,8], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#af95dc38aa04430734b691ff4ba1326f7":[11,0,0,11,29], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_01_4.html":[11,0,0,12], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_01_4.html#af4e7bdd41efefaaa285662fd9393c8dc":[11,0,0,12,0], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html":[11,0,0,13], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html#a6695a8029809bfab31032f0be7844ac7":[11,0,0,13,0], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html#a9f89064d5c15ade4c610381264844ae1":[11,0,0,13,3], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html#aa22a43982b32aec089b0f53164597aa4":[11,0,0,13,2], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html#aac77e0603e92469678c4df491bbfdfb0":[11,0,0,13,1], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__iterator_01_4.html":[11,0,0,14], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__iterator_01_4.html#a4dcd331b3571160d5bcca3a61ef6437b":[11,0,0,14,0], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__type_01_4.html":[11,0,0,15], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__type_01_4.html#a27b28956d82c082e23efdf9f2977fa12":[11,0,0,15,0], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html":[11,0,0,16] +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#aa53af9357f3c3aa144ccda80ed709d4c":[11,0,0,11,0] }; diff --git a/navtreeindex5.js b/navtreeindex5.js index f07a6c977..ea473d897 100644 --- a/navtreeindex5.js +++ b/navtreeindex5.js @@ -1,5 +1,37 @@ var NAVTREEINDEX5 = { +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#aa6ef30cb4fec233a33a0e0a8caf90e0b":[11,0,0,11,14], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#aa924317778c6f7d8e3941c7aadf1854d":[11,0,0,11,12], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ab10a7c98d14d3a40aef1a8b1e9cd29d2":[11,0,0,11,41], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ab68d719e9d7079f61481d13d37fc615a":[11,0,0,11,9], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ac1bcd8afb10742d6f18b8f2f07ba0392":[11,0,0,11,44], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ac2d22c558afdcbac2d66e2d333526202":[11,0,0,11,27], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#aca433867baaffeff86367c88bf192572":[11,0,0,11,20], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#acb01db7785909e8040f9c4425c0bd42a":[11,0,0,11,21], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#acc2ab79d219fc8cd814c8cf656ca00c0":[11,0,0,11,38], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ace03cdf56314cb0b5cbe2a7d45e0cf2f":[11,0,0,11,13], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ace8e77df3989649fdeb84110a37521db":[11,0,0,11,26], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ad30a48ed641b349206b8fdb6b400ac36":[11,0,0,11,10], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ad65311d0d524203aeb76a4ecb25e8a71":[11,0,0,11,25], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ad8d508768cb4c8bdf6c169395e888c34":[11,0,0,11,46], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ad99c6aa33f3728d6a3163b56db1ea969":[11,0,0,11,43], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ae13d3f823d9ac6a763cc3c5beae1c4e3":[11,0,0,11,35], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ae1557f700923c9f18b75f2d320e434c7":[11,0,0,11,2], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ae34bac01f275a64170b1e9773a8723d0":[11,0,0,11,17], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#af76e3ed42262a4fa24d0452c81e6fcc7":[11,0,0,11,8], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#af95dc38aa04430734b691ff4ba1326f7":[11,0,0,11,29], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_01_4.html":[11,0,0,12], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_01_4.html#af4e7bdd41efefaaa285662fd9393c8dc":[11,0,0,12,0], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html":[11,0,0,13], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html#a6695a8029809bfab31032f0be7844ac7":[11,0,0,13,0], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html#a9f89064d5c15ade4c610381264844ae1":[11,0,0,13,3], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html#aa22a43982b32aec089b0f53164597aa4":[11,0,0,13,2], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html#aac77e0603e92469678c4df491bbfdfb0":[11,0,0,13,1], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__iterator_01_4.html":[11,0,0,14], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__iterator_01_4.html#a4dcd331b3571160d5bcca3a61ef6437b":[11,0,0,14,0], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__type_01_4.html":[11,0,0,15], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__type_01_4.html#a27b28956d82c082e23efdf9f2977fa12":[11,0,0,15,0], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html":[11,0,0,16], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html#a2246c3beb618a9aec6249a236fa33d17":[11,0,0,16,9], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html#a287ec91d743b302c6112f8036ca293c3":[11,0,0,16,12], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html#a47262b644851a75f6079f8be740d9974":[11,0,0,16,1], @@ -40,7 +72,6 @@ var NAVTREEINDEX5 = "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a284506fefda0c9a4d7cc0907ff5d542c":[11,0,0,21,18], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a2a0f2a56381fce725bbf19f292d36e5b":[11,0,0,21,38], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a2ff162e268f5b778aec7547a653a76f9":[11,0,0,21,5], -"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a395b30558e63186017bea5f42091c14c":[11,0,0,21,24], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a3a5998868865b8d9767c462281631d5e":[11,0,0,21,40], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a3bfd36dafc82c212f165b434ab5378b3":[11,0,0,21,6], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a3d5eaab352993f6e864956e5c2b82fe3":[11,0,0,21,22], @@ -53,6 +84,7 @@ var NAVTREEINDEX5 = "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a55e9130ee895592cdcf7a2fe6767d95c":[11,0,0,21,33], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a578f245708437fd332e5bc24a7e12ca8":[11,0,0,21,28], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a5d54ff87e39ccbf114061605f6d81c28":[11,0,0,21,15], +"structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a62daeccca10fae7551156ce3dfbfbcda":[11,0,0,21,24], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a6424c3b72245f414d3e5a979c5433cf3":[11,0,0,21,35], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a66eb505dd50314b206960b9ab4ea0a65":[11,0,0,21,37], "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a6775bf7c2da1da154677ec3b54272ccc":[11,0,0,21,9], @@ -137,29 +169,25 @@ var NAVTREEINDEX5 = "structsimdjson_1_1simdjson__result_3_01dom_1_1object_01_4.html#a53309d2504209b1d4b00df48f1c074d3":[11,0,0,5,7], "structsimdjson_1_1simdjson__result_3_01dom_1_1object_01_4.html#a660ae79c537b7347b2b934870aac680a":[11,0,0,5,3], "structsimdjson_1_1simdjson__result_3_01dom_1_1object_01_4.html#ae7aaa4b623ae007a33b0faa37374cc33":[11,0,0,5,6], -"tape__ref-inl_8h_source.html":[12,0,0,0,6,6], -"tape__ref_8h_source.html":[12,0,0,0,6,7], -"tape__type_8h_source.html":[12,0,0,0,6,8], -"token__iterator-inl_8h_source.html":[12,0,0,0,3,0,26], -"token__iterator_8h_source.html":[12,0,0,0,3,0,27], -"token__position_8h_source.html":[12,0,0,0,3,0,28], -"value-inl_8h_source.html":[12,0,0,0,3,0,29], -"value_8h_source.html":[12,0,0,0,3,0,30], -"value__iterator-inl_8h_source.html":[12,0,0,0,3,0,31], -"value__iterator_8h_source.html":[12,0,0,0,3,0,32], -"westmere_2begin_8h_source.html":[12,0,0,0,9,0], -"westmere_2bitmanipulation_8h_source.html":[12,0,0,0,9,1], -"westmere_2bitmask_8h_source.html":[12,0,0,0,9,2], -"westmere_2end_8h_source.html":[12,0,0,0,9,3], -"westmere_2implementation_8h_source.html":[12,0,0,0,9,4], -"westmere_2intrinsics_8h_source.html":[12,0,0,0,9,5], -"westmere_2numberparsing_8h_source.html":[12,0,0,0,9,6], -"westmere_2simd_8h_source.html":[12,0,0,0,9,7], -"westmere_2stringparsing_8h_source.html":[12,0,0,0,9,8], -"westmere_8h_source.html":[12,0,0,0,34], -"":[10,0,0,1], -"":[10,0,1], -"":[10,0,0,1,1,0], -"":[10,0,0,0], -"":[10,0,0,1,0] +"tape__ref-inl_8h_source.html":[12,0,0,0,7,8], +"tape__ref_8h_source.html":[12,0,0,0,7,9], +"tape__type_8h_source.html":[12,0,0,0,7,10], +"token__iterator-inl_8h_source.html":[12,0,0,0,4,0,29], +"token__iterator_8h_source.html":[12,0,0,0,4,0,30], +"value-inl_8h_source.html":[12,0,0,0,4,0,31], +"value_8h_source.html":[12,0,0,0,4,0,32], +"value__iterator-inl_8h_source.html":[12,0,0,0,4,0,33], +"value__iterator_8h_source.html":[12,0,0,0,4,0,34], +"westmere_2base_8h_source.html":[12,0,0,0,10,0], +"westmere_2begin_8h_source.html":[12,0,0,0,10,1], +"westmere_2bitmanipulation_8h_source.html":[12,0,0,0,10,2], +"westmere_2bitmask_8h_source.html":[12,0,0,0,10,3], +"westmere_2end_8h_source.html":[12,0,0,0,10,4], +"westmere_2implementation_8h_source.html":[12,0,0,0,10,5], +"westmere_2intrinsics_8h_source.html":[12,0,0,0,10,6], +"westmere_2numberparsing__defs_8h_source.html":[12,0,0,0,10,7], +"westmere_2ondemand_8h_source.html":[12,0,0,0,10,8], +"westmere_2simd_8h_source.html":[12,0,0,0,10,9], +"westmere_2stringparsing__defs_8h_source.html":[12,0,0,0,10,10], +"westmere_8h_source.html":[12,0,0,0,35] }; diff --git a/generic_2numberparsing_8h_source.html b/numberparsing_8h_source.html similarity index 79% rename from generic_2numberparsing_8h_source.html rename to numberparsing_8h_source.html index ee857623d..1026ba5ac 100644 --- a/generic_2numberparsing_8h_source.html +++ b/numberparsing_8h_source.html @@ -68,7 +68,7 @@ $(function() {
      @@ -91,666 +91,670 @@ $(document).ready(function(){initNavTree('generic_2numberparsing_8h_source.html'
      numberparsing.h
      -
      1 #include "simdjson/internal/numberparsing_tables.h"
      -
      2 #include <limits>
      -
      3 
      -
      4 namespace simdjson {
      -
      5 namespace SIMDJSON_IMPLEMENTATION {
      -
      7 namespace numberparsing {
      -
      8 
      -
      12 enum class number_type {
      -
      13  floating_point_number=1,
      -
      14  signed_integer,
      -
      15  unsigned_integer
      -
      16 };
      -
      17 
      -
      18 #ifdef JSON_TEST_NUMBERS
      -
      19 #define INVALID_NUMBER(SRC) (found_invalid_number((SRC)), NUMBER_ERROR)
      -
      20 #define WRITE_INTEGER(VALUE, SRC, WRITER) (found_integer((VALUE), (SRC)), (WRITER).append_s64((VALUE)))
      -
      21 #define WRITE_UNSIGNED(VALUE, SRC, WRITER) (found_unsigned_integer((VALUE), (SRC)), (WRITER).append_u64((VALUE)))
      -
      22 #define WRITE_DOUBLE(VALUE, SRC, WRITER) (found_float((VALUE), (SRC)), (WRITER).append_double((VALUE)))
      -
      23 #else
      -
      24 #define INVALID_NUMBER(SRC) (NUMBER_ERROR)
      -
      25 #define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE))
      -
      26 #define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE))
      -
      27 #define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE))
      -
      28 #endif
      -
      29 
      -
      30 namespace {
      -
      31 
      -
      32 // Convert a mantissa, an exponent and a sign bit into an ieee64 double.
      -
      33 // The real_exponent needs to be in [0, 2046] (technically real_exponent = 2047 would be acceptable).
      -
      34 // The mantissa should be in [0,1<<53). The bit at index (1ULL << 52) while be zeroed.
      -
      35 simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) {
      -
      36  double d;
      -
      37  mantissa &= ~(1ULL << 52);
      -
      38  mantissa |= real_exponent << 52;
      -
      39  mantissa |= ((static_cast<uint64_t>(negative)) << 63);
      -
      40  std::memcpy(&d, &mantissa, sizeof(d));
      -
      41  return d;
      -
      42 }
      -
      43 
      -
      44 // Attempts to compute i * 10^(power) exactly; and if "negative" is
      -
      45 // true, negate the result.
      -
      46 // This function will only work in some cases, when it does not work, success is
      -
      47 // set to false. This should work *most of the time* (like 99% of the time).
      -
      48 // We assume that power is in the [smallest_power,
      -
      49 // largest_power] interval: the caller is responsible for this check.
      -
      50 simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) {
      -
      51  // we start with a fast path
      -
      52  // It was described in
      -
      53  // Clinger WD. How to read floating point numbers accurately.
      -
      54  // ACM SIGPLAN Notices. 1990
      -
      55 #ifndef FLT_EVAL_METHOD
      -
      56 #error "FLT_EVAL_METHOD should be defined, please include cfloat."
      -
      57 #endif
      -
      58 #if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0)
      -
      59  // We cannot be certain that x/y is rounded to nearest.
      -
      60  if (0 <= power && power <= 22 && i <= 9007199254740991)
      -
      61 #else
      -
      62  if (-22 <= power && power <= 22 && i <= 9007199254740991)
      -
      63 #endif
      -
      64  {
      -
      65  // convert the integer into a double. This is lossless since
      -
      66  // 0 <= i <= 2^53 - 1.
      -
      67  d = double(i);
      -
      68  //
      -
      69  // The general idea is as follows.
      -
      70  // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then
      -
      71  // 1) Both s and p can be represented exactly as 64-bit floating-point
      -
      72  // values
      -
      73  // (binary64).
      -
      74  // 2) Because s and p can be represented exactly as floating-point values,
      -
      75  // then s * p
      -
      76  // and s / p will produce correctly rounded values.
      -
      77  //
      -
      78  if (power < 0) {
      -
      79  d = d / simdjson::internal::power_of_ten[-power];
      -
      80  } else {
      -
      81  d = d * simdjson::internal::power_of_ten[power];
      -
      82  }
      -
      83  if (negative) {
      -
      84  d = -d;
      -
      85  }
      -
      86  return true;
      -
      87  }
      -
      88  // When 22 < power && power < 22 + 16, we could
      -
      89  // hope for another, secondary fast path. It was
      -
      90  // described by David M. Gay in "Correctly rounded
      -
      91  // binary-decimal and decimal-binary conversions." (1990)
      -
      92  // If you need to compute i * 10^(22 + x) for x < 16,
      -
      93  // first compute i * 10^x, if you know that result is exact
      -
      94  // (e.g., when i * 10^x < 2^53),
      -
      95  // then you can still proceed and do (i * 10^x) * 10^22.
      -
      96  // Is this worth your time?
      -
      97  // You need 22 < power *and* power < 22 + 16 *and* (i * 10^(x-22) < 2^53)
      -
      98  // for this second fast path to work.
      -
      99  // If you you have 22 < power *and* power < 22 + 16, and then you
      -
      100  // optimistically compute "i * 10^(x-22)", there is still a chance that you
      -
      101  // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of
      -
      102  // this optimization maybe less common than we would like. Source:
      -
      103  // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/
      -
      104  // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html
      -
      105 
      -
      106  // The fast path has now failed, so we are failing back on the slower path.
      -
      107 
      -
      108  // In the slow path, we need to adjust i so that it is > 1<<63 which is always
      -
      109  // possible, except if i == 0, so we handle i == 0 separately.
      -
      110  if(i == 0) {
      -
      111  d = negative ? -0.0 : 0.0;
      -
      112  return true;
      -
      113  }
      +
      1 #ifndef SIMDJSON_GENERIC_NUMBERPARSING_H
      +
      2 
      +
      3 #ifndef SIMDJSON_AMALGAMATED
      +
      4 #define SIMDJSON_GENERIC_NUMBERPARSING_H
      +
      5 #include "simdjson/generic/base.h"
      +
      6 #include "simdjson/generic/jsoncharutils.h"
      +
      7 #include "simdjson/internal/numberparsing_tables.h"
      +
      8 #endif // SIMDJSON_AMALGAMATED
      +
      9 
      +
      10 #include <limits>
      +
      11 #include <ostream>
      +
      12 
      +
      13 namespace simdjson {
      +
      14 namespace SIMDJSON_IMPLEMENTATION {
      +
      15 namespace numberparsing {
      +
      16 
      +
      17 #ifdef JSON_TEST_NUMBERS
      +
      18 #define INVALID_NUMBER(SRC) (found_invalid_number((SRC)), NUMBER_ERROR)
      +
      19 #define WRITE_INTEGER(VALUE, SRC, WRITER) (found_integer((VALUE), (SRC)), (WRITER).append_s64((VALUE)))
      +
      20 #define WRITE_UNSIGNED(VALUE, SRC, WRITER) (found_unsigned_integer((VALUE), (SRC)), (WRITER).append_u64((VALUE)))
      +
      21 #define WRITE_DOUBLE(VALUE, SRC, WRITER) (found_float((VALUE), (SRC)), (WRITER).append_double((VALUE)))
      +
      22 #else
      +
      23 #define INVALID_NUMBER(SRC) (NUMBER_ERROR)
      +
      24 #define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE))
      +
      25 #define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE))
      +
      26 #define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE))
      +
      27 #endif
      +
      28 
      +
      29 namespace {
      +
      30 
      +
      31 // Convert a mantissa, an exponent and a sign bit into an ieee64 double.
      +
      32 // The real_exponent needs to be in [0, 2046] (technically real_exponent = 2047 would be acceptable).
      +
      33 // The mantissa should be in [0,1<<53). The bit at index (1ULL << 52) while be zeroed.
      +
      34 simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) {
      +
      35  double d;
      +
      36  mantissa &= ~(1ULL << 52);
      +
      37  mantissa |= real_exponent << 52;
      +
      38  mantissa |= ((static_cast<uint64_t>(negative)) << 63);
      +
      39  std::memcpy(&d, &mantissa, sizeof(d));
      +
      40  return d;
      +
      41 }
      +
      42 
      +
      43 // Attempts to compute i * 10^(power) exactly; and if "negative" is
      +
      44 // true, negate the result.
      +
      45 // This function will only work in some cases, when it does not work, success is
      +
      46 // set to false. This should work *most of the time* (like 99% of the time).
      +
      47 // We assume that power is in the [smallest_power,
      +
      48 // largest_power] interval: the caller is responsible for this check.
      +
      49 simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) {
      +
      50  // we start with a fast path
      +
      51  // It was described in
      +
      52  // Clinger WD. How to read floating point numbers accurately.
      +
      53  // ACM SIGPLAN Notices. 1990
      +
      54 #ifndef FLT_EVAL_METHOD
      +
      55 #error "FLT_EVAL_METHOD should be defined, please include cfloat."
      +
      56 #endif
      +
      57 #if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0)
      +
      58  // We cannot be certain that x/y is rounded to nearest.
      +
      59  if (0 <= power && power <= 22 && i <= 9007199254740991)
      +
      60 #else
      +
      61  if (-22 <= power && power <= 22 && i <= 9007199254740991)
      +
      62 #endif
      +
      63  {
      +
      64  // convert the integer into a double. This is lossless since
      +
      65  // 0 <= i <= 2^53 - 1.
      +
      66  d = double(i);
      +
      67  //
      +
      68  // The general idea is as follows.
      +
      69  // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then
      +
      70  // 1) Both s and p can be represented exactly as 64-bit floating-point
      +
      71  // values
      +
      72  // (binary64).
      +
      73  // 2) Because s and p can be represented exactly as floating-point values,
      +
      74  // then s * p
      +
      75  // and s / p will produce correctly rounded values.
      +
      76  //
      +
      77  if (power < 0) {
      +
      78  d = d / simdjson::internal::power_of_ten[-power];
      +
      79  } else {
      +
      80  d = d * simdjson::internal::power_of_ten[power];
      +
      81  }
      +
      82  if (negative) {
      +
      83  d = -d;
      +
      84  }
      +
      85  return true;
      +
      86  }
      +
      87  // When 22 < power && power < 22 + 16, we could
      +
      88  // hope for another, secondary fast path. It was
      +
      89  // described by David M. Gay in "Correctly rounded
      +
      90  // binary-decimal and decimal-binary conversions." (1990)
      +
      91  // If you need to compute i * 10^(22 + x) for x < 16,
      +
      92  // first compute i * 10^x, if you know that result is exact
      +
      93  // (e.g., when i * 10^x < 2^53),
      +
      94  // then you can still proceed and do (i * 10^x) * 10^22.
      +
      95  // Is this worth your time?
      +
      96  // You need 22 < power *and* power < 22 + 16 *and* (i * 10^(x-22) < 2^53)
      +
      97  // for this second fast path to work.
      +
      98  // If you you have 22 < power *and* power < 22 + 16, and then you
      +
      99  // optimistically compute "i * 10^(x-22)", there is still a chance that you
      +
      100  // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of
      +
      101  // this optimization maybe less common than we would like. Source:
      +
      102  // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/
      +
      103  // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html
      +
      104 
      +
      105  // The fast path has now failed, so we are failing back on the slower path.
      +
      106 
      +
      107  // In the slow path, we need to adjust i so that it is > 1<<63 which is always
      +
      108  // possible, except if i == 0, so we handle i == 0 separately.
      +
      109  if(i == 0) {
      +
      110  d = negative ? -0.0 : 0.0;
      +
      111  return true;
      +
      112  }
      +
      113 
      114 
      -
      115 
      -
      116  // The exponent is 1024 + 63 + power
      -
      117  // + floor(log(5**power)/log(2)).
      -
      118  // The 1024 comes from the ieee64 standard.
      -
      119  // The 63 comes from the fact that we use a 64-bit word.
      -
      120  //
      -
      121  // Computing floor(log(5**power)/log(2)) could be
      -
      122  // slow. Instead we use a fast function.
      -
      123  //
      -
      124  // For power in (-400,350), we have that
      -
      125  // (((152170 + 65536) * power ) >> 16);
      -
      126  // is equal to
      -
      127  // floor(log(5**power)/log(2)) + power when power >= 0
      -
      128  // and it is equal to
      -
      129  // ceil(log(5**-power)/log(2)) + power when power < 0
      -
      130  //
      -
      131  // The 65536 is (1<<16) and corresponds to
      -
      132  // (65536 * power) >> 16 ---> power
      -
      133  //
      -
      134  // ((152170 * power ) >> 16) is equal to
      -
      135  // floor(log(5**power)/log(2))
      -
      136  //
      -
      137  // Note that this is not magic: 152170/(1<<16) is
      -
      138  // approximatively equal to log(5)/log(2).
      -
      139  // The 1<<16 value is a power of two; we could use a
      -
      140  // larger power of 2 if we wanted to.
      -
      141  //
      -
      142  int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63;
      +
      115  // The exponent is 1024 + 63 + power
      +
      116  // + floor(log(5**power)/log(2)).
      +
      117  // The 1024 comes from the ieee64 standard.
      +
      118  // The 63 comes from the fact that we use a 64-bit word.
      +
      119  //
      +
      120  // Computing floor(log(5**power)/log(2)) could be
      +
      121  // slow. Instead we use a fast function.
      +
      122  //
      +
      123  // For power in (-400,350), we have that
      +
      124  // (((152170 + 65536) * power ) >> 16);
      +
      125  // is equal to
      +
      126  // floor(log(5**power)/log(2)) + power when power >= 0
      +
      127  // and it is equal to
      +
      128  // ceil(log(5**-power)/log(2)) + power when power < 0
      +
      129  //
      +
      130  // The 65536 is (1<<16) and corresponds to
      +
      131  // (65536 * power) >> 16 ---> power
      +
      132  //
      +
      133  // ((152170 * power ) >> 16) is equal to
      +
      134  // floor(log(5**power)/log(2))
      +
      135  //
      +
      136  // Note that this is not magic: 152170/(1<<16) is
      +
      137  // approximatively equal to log(5)/log(2).
      +
      138  // The 1<<16 value is a power of two; we could use a
      +
      139  // larger power of 2 if we wanted to.
      +
      140  //
      +
      141  int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63;
      +
      142 
      143 
      -
      144 
      -
      145  // We want the most significant bit of i to be 1. Shift if needed.
      -
      146  int lz = leading_zeroes(i);
      -
      147  i <<= lz;
      +
      144  // We want the most significant bit of i to be 1. Shift if needed.
      +
      145  int lz = leading_zeroes(i);
      +
      146  i <<= lz;
      +
      147 
      148 
      -
      149 
      -
      150  // We are going to need to do some 64-bit arithmetic to get a precise product.
      -
      151  // We use a table lookup approach.
      -
      152  // It is safe because
      -
      153  // power >= smallest_power
      -
      154  // and power <= largest_power
      -
      155  // We recover the mantissa of the power, it has a leading 1. It is always
      -
      156  // rounded down.
      -
      157  //
      -
      158  // We want the most significant 64 bits of the product. We know
      -
      159  // this will be non-zero because the most significant bit of i is
      -
      160  // 1.
      -
      161  const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power);
      -
      162  // Optimization: It may be that materializing the index as a variable might confuse some compilers and prevent effective complex-addressing loads. (Done for code clarity.)
      -
      163  //
      -
      164  // The full_multiplication function computes the 128-bit product of two 64-bit words
      -
      165  // with a returned value of type value128 with a "low component" corresponding to the
      -
      166  // 64-bit least significant bits of the product and with a "high component" corresponding
      -
      167  // to the 64-bit most significant bits of the product.
      -
      168  simdjson::internal::value128 firstproduct = jsoncharutils::full_multiplication(i, simdjson::internal::power_of_five_128[index]);
      -
      169  // Both i and power_of_five_128[index] have their most significant bit set to 1 which
      -
      170  // implies that the either the most or the second most significant bit of the product
      -
      171  // is 1. We pack values in this manner for efficiency reasons: it maximizes the use
      -
      172  // we make of the product. It also makes it easy to reason about the product: there
      -
      173  // is 0 or 1 leading zero in the product.
      -
      174 
      -
      175  // Unless the least significant 9 bits of the high (64-bit) part of the full
      -
      176  // product are all 1s, then we know that the most significant 55 bits are
      -
      177  // exact and no further work is needed. Having 55 bits is necessary because
      -
      178  // we need 53 bits for the mantissa but we have to have one rounding bit and
      -
      179  // we can waste a bit if the most significant bit of the product is zero.
      -
      180  if((firstproduct.high & 0x1FF) == 0x1FF) {
      -
      181  // We want to compute i * 5^q, but only care about the top 55 bits at most.
      -
      182  // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing
      -
      183  // the full computation is wasteful. So we do what is called a "truncated
      -
      184  // multiplication".
      -
      185  // We take the most significant 64-bits, and we put them in
      -
      186  // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q
      -
      187  // to the desired approximation using one multiplication. Sometimes it does not suffice.
      -
      188  // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and
      -
      189  // then we get a better approximation to i * 5^q. In very rare cases, even that
      -
      190  // will not suffice, though it is seemingly very hard to find such a scenario.
      -
      191  //
      -
      192  // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat
      -
      193  // more complicated.
      -
      194  //
      -
      195  // There is an extra layer of complexity in that we need more than 55 bits of
      -
      196  // accuracy in the round-to-even scenario.
      -
      197  //
      -
      198  // The full_multiplication function computes the 128-bit product of two 64-bit words
      -
      199  // with a returned value of type value128 with a "low component" corresponding to the
      -
      200  // 64-bit least significant bits of the product and with a "high component" corresponding
      -
      201  // to the 64-bit most significant bits of the product.
      -
      202  simdjson::internal::value128 secondproduct = jsoncharutils::full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]);
      -
      203  firstproduct.low += secondproduct.high;
      -
      204  if(secondproduct.high > firstproduct.low) { firstproduct.high++; }
      -
      205  // At this point, we might need to add at most one to firstproduct, but this
      -
      206  // can only change the value of firstproduct.high if firstproduct.low is maximal.
      -
      207  if(simdjson_unlikely(firstproduct.low == 0xFFFFFFFFFFFFFFFF)) {
      -
      208  // This is very unlikely, but if so, we need to do much more work!
      -
      209  return false;
      -
      210  }
      -
      211  }
      -
      212  uint64_t lower = firstproduct.low;
      -
      213  uint64_t upper = firstproduct.high;
      -
      214  // The final mantissa should be 53 bits with a leading 1.
      -
      215  // We shift it so that it occupies 54 bits with a leading 1.
      -
      217  uint64_t upperbit = upper >> 63;
      -
      218  uint64_t mantissa = upper >> (upperbit + 9);
      -
      219  lz += int(1 ^ upperbit);
      -
      220 
      -
      221  // Here we have mantissa < (1<<54).
      -
      222  int64_t real_exponent = exponent - lz;
      -
      223  if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal?
      -
      224  // Here have that real_exponent <= 0 so -real_exponent >= 0
      -
      225  if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure.
      -
      226  d = negative ? -0.0 : 0.0;
      -
      227  return true;
      -
      228  }
      -
      229  // next line is safe because -real_exponent + 1 < 0
      -
      230  mantissa >>= -real_exponent + 1;
      -
      231  // Thankfully, we can't have both "round-to-even" and subnormals because
      -
      232  // "round-to-even" only occurs for powers close to 0.
      -
      233  mantissa += (mantissa & 1); // round up
      -
      234  mantissa >>= 1;
      -
      235  // There is a weird scenario where we don't have a subnormal but just.
      -
      236  // Suppose we start with 2.2250738585072013e-308, we end up
      -
      237  // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal
      -
      238  // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round
      -
      239  // up 0x3fffffffffffff x 2^-1023-53 and once we do, we are no longer
      -
      240  // subnormal, but we can only know this after rounding.
      -
      241  // So we only declare a subnormal if we are smaller than the threshold.
      -
      242  real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1;
      -
      243  d = to_double(mantissa, real_exponent, negative);
      -
      244  return true;
      -
      245  }
      -
      246  // We have to round to even. The "to even" part
      -
      247  // is only a problem when we are right in between two floats
      -
      248  // which we guard against.
      -
      249  // If we have lots of trailing zeros, we may fall right between two
      -
      250  // floating-point values.
      -
      251  //
      -
      252  // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54]
      -
      253  // times a power of two. That is, it is right between a number with binary significand
      -
      254  // m and another number with binary significand m+1; and it must be the case
      -
      255  // that it cannot be represented by a float itself.
      -
      256  //
      -
      257  // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p.
      -
      258  // Recall that 10^q = 5^q * 2^q.
      -
      259  // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that
      -
      260  // 5^23 <= 2^54 and it is the last power of five to qualify, so q <= 23.
      -
      261  // When q<0, we have w >= (2m+1) x 5^{-q}. We must have that w<2^{64} so
      -
      262  // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have
      -
      263  // 2^{53} x 5^{-q} < 2^{64}.
      -
      264  // Hence we have 5^{-q} < 2^{11}$ or q>= -4.
      -
      265  //
      -
      266  // We require lower <= 1 and not lower == 0 because we could not prove that
      -
      267  // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test.
      -
      268  if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) {
      -
      269  if((mantissa << (upperbit + 64 - 53 - 2)) == upper) {
      -
      270  mantissa &= ~1; // flip it so that we do not round up
      -
      271  }
      -
      272  }
      -
      273 
      -
      274  mantissa += mantissa & 1;
      -
      275  mantissa >>= 1;
      -
      276 
      -
      277  // Here we have mantissa < (1<<53), unless there was an overflow
      -
      278  if (mantissa >= (1ULL << 53)) {
      -
      280  // This will happen when parsing values such as 7.2057594037927933e+16
      -
      282  mantissa = (1ULL << 52);
      -
      283  real_exponent++;
      -
      284  }
      -
      285  mantissa &= ~(1ULL << 52);
      -
      286  // we have to check that real_exponent is in range, otherwise we bail out
      -
      287  if (simdjson_unlikely(real_exponent > 2046)) {
      -
      288  // We have an infinite value!!! We could actually throw an error here if we could.
      -
      289  return false;
      -
      290  }
      -
      291  d = to_double(mantissa, real_exponent, negative);
      -
      292  return true;
      -
      293 }
      -
      294 
      -
      295 // We call a fallback floating-point parser that might be slow. Note
      -
      296 // it will accept JSON numbers, but the JSON spec. is more restrictive so
      -
      297 // before you call parse_float_fallback, you need to have validated the input
      -
      298 // string with the JSON grammar.
      -
      299 // It will return an error (false) if the parsed number is infinite.
      -
      300 // The string parsing itself always succeeds. We know that there is at least
      -
      301 // one digit.
      -
      302 static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) {
      -
      303  *outDouble = simdjson::internal::from_chars(reinterpret_cast<const char *>(ptr));
      -
      304  // We do not accept infinite values.
      -
      305 
      -
      306  // Detecting finite values in a portable manner is ridiculously hard, ideally
      -
      307  // we would want to do:
      -
      308  // return !std::isfinite(*outDouble);
      -
      309  // but that mysteriously fails under legacy/old libc++ libraries, see
      -
      310  // https://github.com/simdjson/simdjson/issues/1286
      -
      311  //
      -
      312  // Therefore, fall back to this solution (the extra parens are there
      -
      313  // to handle that max may be a macro on windows).
      -
      314  return !(*outDouble > (std::numeric_limits<double>::max)() || *outDouble < std::numeric_limits<double>::lowest());
      -
      315 }
      -
      316 
      -
      317 static bool parse_float_fallback(const uint8_t *ptr, const uint8_t *end_ptr, double *outDouble) {
      -
      318  *outDouble = simdjson::internal::from_chars(reinterpret_cast<const char *>(ptr), reinterpret_cast<const char *>(end_ptr));
      -
      319  // We do not accept infinite values.
      -
      320 
      -
      321  // Detecting finite values in a portable manner is ridiculously hard, ideally
      -
      322  // we would want to do:
      -
      323  // return !std::isfinite(*outDouble);
      -
      324  // but that mysteriously fails under legacy/old libc++ libraries, see
      -
      325  // https://github.com/simdjson/simdjson/issues/1286
      -
      326  //
      -
      327  // Therefore, fall back to this solution (the extra parens are there
      -
      328  // to handle that max may be a macro on windows).
      -
      329  return !(*outDouble > (std::numeric_limits<double>::max)() || *outDouble < std::numeric_limits<double>::lowest());
      -
      330 }
      -
      331 
      -
      332 // check quickly whether the next 8 chars are made of digits
      -
      333 // at a glance, it looks better than Mula's
      -
      334 // http://0x80.pl/articles/swar-digits-validate.html
      -
      335 simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) {
      -
      336  uint64_t val;
      -
      337  // this can read up to 7 bytes beyond the buffer size, but we require
      -
      338  // SIMDJSON_PADDING of padding
      -
      339  static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7");
      -
      340  std::memcpy(&val, chars, 8);
      -
      341  // a branchy method might be faster:
      -
      342  // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030)
      -
      343  // && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) ==
      -
      344  // 0x3030303030303030);
      -
      345  return (((val & 0xF0F0F0F0F0F0F0F0) |
      -
      346  (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) ==
      -
      347  0x3333333333333333);
      -
      348 }
      -
      349 
      -
      350 template<typename I>
      -
      351 SIMDJSON_NO_SANITIZE_UNDEFINED // We deliberately allow overflow here and check later
      -
      352 simdjson_inline bool parse_digit(const uint8_t c, I &i) {
      -
      353  const uint8_t digit = static_cast<uint8_t>(c - '0');
      -
      354  if (digit > 9) {
      -
      355  return false;
      -
      356  }
      -
      357  // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication
      -
      358  i = 10 * i + digit; // might overflow, we will handle the overflow later
      -
      359  return true;
      -
      360 }
      -
      361 
      -
      362 simdjson_inline error_code parse_decimal_after_separator(simdjson_unused const uint8_t *const src, const uint8_t *&p, uint64_t &i, int64_t &exponent) {
      -
      363  // we continue with the fiction that we have an integer. If the
      -
      364  // floating point number is representable as x * 10^z for some integer
      -
      365  // z that fits in 53 bits, then we will be able to convert back the
      -
      366  // the integer into a float in a lossless manner.
      -
      367  const uint8_t *const first_after_period = p;
      -
      368 
      -
      369 #ifdef SIMDJSON_SWAR_NUMBER_PARSING
      -
      370 #if SIMDJSON_SWAR_NUMBER_PARSING
      -
      371  // this helps if we have lots of decimals!
      -
      372  // this turns out to be frequent enough.
      -
      373  if (is_made_of_eight_digits_fast(p)) {
      -
      374  i = i * 100000000 + parse_eight_digits_unrolled(p);
      -
      375  p += 8;
      -
      376  }
      -
      377 #endif // SIMDJSON_SWAR_NUMBER_PARSING
      -
      378 #endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING
      -
      379  // Unrolling the first digit makes a small difference on some implementations (e.g. westmere)
      -
      380  if (parse_digit(*p, i)) { ++p; }
      -
      381  while (parse_digit(*p, i)) { p++; }
      -
      382  exponent = first_after_period - p;
      -
      383  // Decimal without digits (123.) is illegal
      -
      384  if (exponent == 0) {
      -
      385  return INVALID_NUMBER(src);
      -
      386  }
      -
      387  return SUCCESS;
      -
      388 }
      -
      389 
      -
      390 simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) {
      -
      391  // Exp Sign: -123.456e[-]78
      -
      392  bool neg_exp = ('-' == *p);
      -
      393  if (neg_exp || '+' == *p) { p++; } // Skip + as well
      -
      394 
      -
      395  // Exponent: -123.456e-[78]
      -
      396  auto start_exp = p;
      -
      397  int64_t exp_number = 0;
      -
      398  while (parse_digit(*p, exp_number)) { ++p; }
      -
      399  // It is possible for parse_digit to overflow.
      -
      400  // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN.
      -
      401  // Thus we *must* check for possible overflow before we negate exp_number.
      -
      402 
      -
      403  // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into
      -
      404  // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may
      -
      405  // not oblige and may, in fact, generate two distinct paths in any case. It might be
      -
      406  // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off
      -
      407  // instructions for a simdjson_likely branch, an unconclusive gain.
      -
      408 
      -
      409  // If there were no digits, it's an error.
      -
      410  if (simdjson_unlikely(p == start_exp)) {
      -
      411  return INVALID_NUMBER(src);
      -
      412  }
      -
      413  // We have a valid positive exponent in exp_number at this point, except that
      -
      414  // it may have overflowed.
      -
      415 
      -
      416  // If there were more than 18 digits, we may have overflowed the integer. We have to do
      -
      417  // something!!!!
      -
      418  if (simdjson_unlikely(p > start_exp+18)) {
      -
      419  // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow
      -
      420  while (*start_exp == '0') { start_exp++; }
      -
      421  // 19 digits could overflow int64_t and is kind of absurd anyway. We don't
      -
      422  // support exponents smaller than -999,999,999,999,999,999 and bigger
      -
      423  // than 999,999,999,999,999,999.
      -
      424  // We can truncate.
      -
      425  // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before
      -
      426  // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could
      -
      427  // truncate at 324.
      -
      428  // Note that there is no reason to fail per se at this point in time.
      -
      429  // E.g., 0e999999999999999999999 is a fine number.
      -
      430  if (p > start_exp+18) { exp_number = 999999999999999999; }
      -
      431  }
      -
      432  // At this point, we know that exp_number is a sane, positive, signed integer.
      -
      433  // It is <= 999,999,999,999,999,999. As long as 'exponent' is in
      -
      434  // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent'
      -
      435  // is bounded in magnitude by the size of the JSON input, we are fine in this universe.
      -
      436  // To sum it up: the next line should never overflow.
      -
      437  exponent += (neg_exp ? -exp_number : exp_number);
      -
      438  return SUCCESS;
      -
      439 }
      -
      440 
      -
      441 simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) {
      -
      442  // It is possible that the integer had an overflow.
      -
      443  // We have to handle the case where we have 0.0000somenumber.
      -
      444  const uint8_t *start = start_digits;
      -
      445  while ((*start == '0') || (*start == '.')) { ++start; }
      -
      446  // we over-decrement by one when there is a '.'
      -
      447  return digit_count - size_t(start - start_digits);
      -
      448 }
      -
      449 
      -
      450 } // unnamed namespace
      -
      451 
      -
      453 template<typename W>
      -
      454 error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) {
      -
      455  double d;
      -
      456  if (parse_float_fallback(src, &d)) {
      -
      457  writer.append_double(d);
      -
      458  return SUCCESS;
      -
      459  }
      -
      460  return INVALID_NUMBER(src);
      -
      461 }
      -
      462 
      -
      464 template<typename W>
      -
      465 simdjson_inline error_code write_float(const uint8_t *const src, bool negative, uint64_t i, const uint8_t * start_digits, size_t digit_count, int64_t exponent, W &writer) {
      -
      466  // If we frequently had to deal with long strings of digits,
      -
      467  // we could extend our code by using a 128-bit integer instead
      -
      468  // of a 64-bit integer. However, this is uncommon in practice.
      -
      469  //
      -
      470  // 9999999999999999999 < 2**64 so we can accommodate 19 digits.
      -
      471  // If we have a decimal separator, then digit_count - 1 is the number of digits, but we
      -
      472  // may not have a decimal separator!
      -
      473  if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) {
      -
      474  // Ok, chances are good that we had an overflow!
      -
      475  // this is almost never going to get called!!!
      -
      476  // we start anew, going slowly!!!
      -
      477  // This will happen in the following examples:
      -
      478  // 10000000000000000000000000000000000000000000e+308
      -
      479  // 3.1415926535897932384626433832795028841971693993751
      -
      480  //
      -
      481  // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens
      -
      482  // because slow_float_parsing is a non-inlined function. If we passed our writer reference to
      -
      483  // it, it would force it to be stored in memory, preventing the compiler from picking it apart
      -
      484  // and putting into registers. i.e. if we pass it as reference, it gets slow.
      -
      485  // This is what forces the skip_double, as well.
      -
      486  error_code error = slow_float_parsing(src, writer);
      -
      487  writer.skip_double();
      -
      488  return error;
      -
      489  }
      -
      490  // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other
      -
      491  // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331
      -
      492  // To future reader: we'd love if someone found a better way, or at least could explain this result!
      -
      493  if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) {
      -
      494  //
      -
      495  // Important: smallest_power is such that it leads to a zero value.
      -
      496  // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero
      -
      497  // so something x 10^-343 goes to zero, but not so with something x 10^-342.
      -
      498  static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough");
      -
      499  //
      -
      500  if((exponent < simdjson::internal::smallest_power) || (i == 0)) {
      -
      501  // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero
      -
      502  WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer);
      -
      503  return SUCCESS;
      -
      504  } else { // (exponent > largest_power) and (i != 0)
      -
      505  // We have, for sure, an infinite value and simdjson refuses to parse infinite values.
      -
      506  return INVALID_NUMBER(src);
      -
      507  }
      -
      508  }
      -
      509  double d;
      -
      510  if (!compute_float_64(exponent, i, negative, d)) {
      -
      511  // we are almost never going to get here.
      -
      512  if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); }
      -
      513  }
      -
      514  WRITE_DOUBLE(d, src, writer);
      -
      515  return SUCCESS;
      -
      516 }
      -
      517 
      -
      518 // for performance analysis, it is sometimes useful to skip parsing
      -
      519 #ifdef SIMDJSON_SKIPNUMBERPARSING
      -
      520 
      -
      521 template<typename W>
      -
      522 simdjson_inline error_code parse_number(const uint8_t *const, W &writer) {
      -
      523  writer.append_s64(0); // always write zero
      -
      524  return SUCCESS; // always succeeds
      -
      525 }
      -
      526 
      -
      527 simdjson_unused simdjson_inline simdjson_result<uint64_t> parse_unsigned(const uint8_t * const src) noexcept { return 0; }
      -
      528 simdjson_unused simdjson_inline simdjson_result<int64_t> parse_integer(const uint8_t * const src) noexcept { return 0; }
      -
      529 simdjson_unused simdjson_inline simdjson_result<double> parse_double(const uint8_t * const src) noexcept { return 0; }
      -
      530 simdjson_unused simdjson_inline simdjson_result<uint64_t> parse_unsigned_in_string(const uint8_t * const src) noexcept { return 0; }
      -
      531 simdjson_unused simdjson_inline simdjson_result<int64_t> parse_integer_in_string(const uint8_t * const src) noexcept { return 0; }
      -
      532 simdjson_unused simdjson_inline simdjson_result<double> parse_double_in_string(const uint8_t * const src) noexcept { return 0; }
      -
      533 simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { return false; }
      -
      534 simdjson_unused simdjson_inline simdjson_result<bool> is_integer(const uint8_t * src) noexcept { return false; }
      -
      535 simdjson_unused simdjson_inline simdjson_result<number_type> get_number_type(const uint8_t * src) noexcept { return number_type::signed_integer; }
      -
      536 #else
      -
      537 
      -
      538 // parse the number at src
      -
      539 // define JSON_TEST_NUMBERS for unit testing
      -
      540 //
      -
      541 // It is assumed that the number is followed by a structural ({,},],[) character
      -
      542 // or a white space character. If that is not the case (e.g., when the JSON
      -
      543 // document is made of a single number), then it is necessary to copy the
      -
      544 // content and append a space before calling this function.
      -
      545 //
      -
      546 // Our objective is accurate parsing (ULP of 0) at high speed.
      -
      547 template<typename W>
      -
      548 simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) {
      -
      549 
      -
      550  //
      -
      551  // Check for minus sign
      -
      552  //
      -
      553  bool negative = (*src == '-');
      -
      554  const uint8_t *p = src + uint8_t(negative);
      -
      555 
      -
      556  //
      -
      557  // Parse the integer part.
      -
      558  //
      -
      559  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
      -
      560  const uint8_t *const start_digits = p;
      -
      561  uint64_t i = 0;
      -
      562  while (parse_digit(*p, i)) { p++; }
      -
      563 
      -
      564  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
      -
      565  // Optimization note: size_t is expected to be unsigned.
      -
      566  size_t digit_count = size_t(p - start_digits);
      -
      567  if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); }
      -
      568 
      -
      569  //
      -
      570  // Handle floats if there is a . or e (or both)
      -
      571  //
      -
      572  int64_t exponent = 0;
      -
      573  bool is_float = false;
      -
      574  if ('.' == *p) {
      -
      575  is_float = true;
      -
      576  ++p;
      -
      577  SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) );
      -
      578  digit_count = int(p - start_digits); // used later to guard against overflows
      -
      579  }
      -
      580  if (('e' == *p) || ('E' == *p)) {
      -
      581  is_float = true;
      -
      582  ++p;
      -
      583  SIMDJSON_TRY( parse_exponent(src, p, exponent) );
      -
      584  }
      -
      585  if (is_float) {
      -
      586  const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p);
      -
      587  SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) );
      -
      588  if (dirty_end) { return INVALID_NUMBER(src); }
      -
      589  return SUCCESS;
      -
      590  }
      -
      591 
      -
      592  // The longest negative 64-bit number is 19 digits.
      -
      593  // The longest positive 64-bit number is 20 digits.
      -
      594  // We do it this way so we don't trigger this branch unless we must.
      -
      595  size_t longest_digit_count = negative ? 19 : 20;
      -
      596  if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); }
      -
      597  if (digit_count == longest_digit_count) {
      -
      598  if (negative) {
      -
      599  // Anything negative above INT64_MAX+1 is invalid
      -
      600  if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src); }
      -
      601  WRITE_INTEGER(~i+1, src, writer);
      -
      602  if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); }
      -
      603  return SUCCESS;
      -
      604  // Positive overflow check:
      -
      605  // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the
      -
      606  // biggest uint64_t.
      -
      607  // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX.
      -
      608  // If we got here, it's a 20 digit number starting with the digit "1".
      -
      609  // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller
      -
      610  // than 1,553,255,926,290,448,384.
      -
      611  // - That is smaller than the smallest possible 20-digit number the user could write:
      -
      612  // 10,000,000,000,000,000,000.
      -
      613  // - Therefore, if the number is positive and lower than that, it's overflow.
      -
      614  // - The value we are looking at is less than or equal to INT64_MAX.
      -
      615  //
      -
      616  } else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); }
      -
      617  }
      -
      618 
      -
      619  // Write unsigned if it doesn't fit in a signed integer.
      -
      620  if (i > uint64_t(INT64_MAX)) {
      -
      621  WRITE_UNSIGNED(i, src, writer);
      -
      622  } else {
      -
      623  WRITE_INTEGER(negative ? (~i+1) : i, src, writer);
      -
      624  }
      -
      625  if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); }
      -
      626  return SUCCESS;
      -
      627 }
      -
      628 
      -
      629 // Inlineable functions
      -
      630 namespace {
      -
      631 
      -
      632 // This table can be used to characterize the final character of an integer
      -
      633 // string. For JSON structural character and allowable white space characters,
      -
      634 // we return SUCCESS. For 'e', '.' and 'E', we return INCORRECT_TYPE. Otherwise
      -
      635 // we return NUMBER_ERROR.
      -
      636 // Optimization note: we could easily reduce the size of the table by half (to 128)
      -
      637 // at the cost of an extra branch.
      -
      638 // Optimization note: we want the values to use at most 8 bits (not, e.g., 32 bits):
      -
      639 static_assert(error_code(uint8_t(NUMBER_ERROR))== NUMBER_ERROR, "bad NUMBER_ERROR cast");
      -
      640 static_assert(error_code(uint8_t(SUCCESS))== SUCCESS, "bad NUMBER_ERROR cast");
      -
      641 static_assert(error_code(uint8_t(INCORRECT_TYPE))== INCORRECT_TYPE, "bad NUMBER_ERROR cast");
      -
      642 
      -
      643 const uint8_t integer_string_finisher[256] = {
      - - - +
      149  // We are going to need to do some 64-bit arithmetic to get a precise product.
      +
      150  // We use a table lookup approach.
      +
      151  // It is safe because
      +
      152  // power >= smallest_power
      +
      153  // and power <= largest_power
      +
      154  // We recover the mantissa of the power, it has a leading 1. It is always
      +
      155  // rounded down.
      +
      156  //
      +
      157  // We want the most significant 64 bits of the product. We know
      +
      158  // this will be non-zero because the most significant bit of i is
      +
      159  // 1.
      +
      160  const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power);
      +
      161  // Optimization: It may be that materializing the index as a variable might confuse some compilers and prevent effective complex-addressing loads. (Done for code clarity.)
      +
      162  //
      +
      163  // The full_multiplication function computes the 128-bit product of two 64-bit words
      +
      164  // with a returned value of type value128 with a "low component" corresponding to the
      +
      165  // 64-bit least significant bits of the product and with a "high component" corresponding
      +
      166  // to the 64-bit most significant bits of the product.
      +
      167  simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]);
      +
      168  // Both i and power_of_five_128[index] have their most significant bit set to 1 which
      +
      169  // implies that the either the most or the second most significant bit of the product
      +
      170  // is 1. We pack values in this manner for efficiency reasons: it maximizes the use
      +
      171  // we make of the product. It also makes it easy to reason about the product: there
      +
      172  // is 0 or 1 leading zero in the product.
      +
      173 
      +
      174  // Unless the least significant 9 bits of the high (64-bit) part of the full
      +
      175  // product are all 1s, then we know that the most significant 55 bits are
      +
      176  // exact and no further work is needed. Having 55 bits is necessary because
      +
      177  // we need 53 bits for the mantissa but we have to have one rounding bit and
      +
      178  // we can waste a bit if the most significant bit of the product is zero.
      +
      179  if((firstproduct.high & 0x1FF) == 0x1FF) {
      +
      180  // We want to compute i * 5^q, but only care about the top 55 bits at most.
      +
      181  // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing
      +
      182  // the full computation is wasteful. So we do what is called a "truncated
      +
      183  // multiplication".
      +
      184  // We take the most significant 64-bits, and we put them in
      +
      185  // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q
      +
      186  // to the desired approximation using one multiplication. Sometimes it does not suffice.
      +
      187  // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and
      +
      188  // then we get a better approximation to i * 5^q. In very rare cases, even that
      +
      189  // will not suffice, though it is seemingly very hard to find such a scenario.
      +
      190  //
      +
      191  // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat
      +
      192  // more complicated.
      +
      193  //
      +
      194  // There is an extra layer of complexity in that we need more than 55 bits of
      +
      195  // accuracy in the round-to-even scenario.
      +
      196  //
      +
      197  // The full_multiplication function computes the 128-bit product of two 64-bit words
      +
      198  // with a returned value of type value128 with a "low component" corresponding to the
      +
      199  // 64-bit least significant bits of the product and with a "high component" corresponding
      +
      200  // to the 64-bit most significant bits of the product.
      +
      201  simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]);
      +
      202  firstproduct.low += secondproduct.high;
      +
      203  if(secondproduct.high > firstproduct.low) { firstproduct.high++; }
      +
      204  // At this point, we might need to add at most one to firstproduct, but this
      +
      205  // can only change the value of firstproduct.high if firstproduct.low is maximal.
      +
      206  if(simdjson_unlikely(firstproduct.low == 0xFFFFFFFFFFFFFFFF)) {
      +
      207  // This is very unlikely, but if so, we need to do much more work!
      +
      208  return false;
      +
      209  }
      +
      210  }
      +
      211  uint64_t lower = firstproduct.low;
      +
      212  uint64_t upper = firstproduct.high;
      +
      213  // The final mantissa should be 53 bits with a leading 1.
      +
      214  // We shift it so that it occupies 54 bits with a leading 1.
      +
      216  uint64_t upperbit = upper >> 63;
      +
      217  uint64_t mantissa = upper >> (upperbit + 9);
      +
      218  lz += int(1 ^ upperbit);
      +
      219 
      +
      220  // Here we have mantissa < (1<<54).
      +
      221  int64_t real_exponent = exponent - lz;
      +
      222  if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal?
      +
      223  // Here have that real_exponent <= 0 so -real_exponent >= 0
      +
      224  if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure.
      +
      225  d = negative ? -0.0 : 0.0;
      +
      226  return true;
      +
      227  }
      +
      228  // next line is safe because -real_exponent + 1 < 0
      +
      229  mantissa >>= -real_exponent + 1;
      +
      230  // Thankfully, we can't have both "round-to-even" and subnormals because
      +
      231  // "round-to-even" only occurs for powers close to 0.
      +
      232  mantissa += (mantissa & 1); // round up
      +
      233  mantissa >>= 1;
      +
      234  // There is a weird scenario where we don't have a subnormal but just.
      +
      235  // Suppose we start with 2.2250738585072013e-308, we end up
      +
      236  // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal
      +
      237  // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round
      +
      238  // up 0x3fffffffffffff x 2^-1023-53 and once we do, we are no longer
      +
      239  // subnormal, but we can only know this after rounding.
      +
      240  // So we only declare a subnormal if we are smaller than the threshold.
      +
      241  real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1;
      +
      242  d = to_double(mantissa, real_exponent, negative);
      +
      243  return true;
      +
      244  }
      +
      245  // We have to round to even. The "to even" part
      +
      246  // is only a problem when we are right in between two floats
      +
      247  // which we guard against.
      +
      248  // If we have lots of trailing zeros, we may fall right between two
      +
      249  // floating-point values.
      +
      250  //
      +
      251  // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54]
      +
      252  // times a power of two. That is, it is right between a number with binary significand
      +
      253  // m and another number with binary significand m+1; and it must be the case
      +
      254  // that it cannot be represented by a float itself.
      +
      255  //
      +
      256  // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p.
      +
      257  // Recall that 10^q = 5^q * 2^q.
      +
      258  // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that
      +
      259  // 5^23 <= 2^54 and it is the last power of five to qualify, so q <= 23.
      +
      260  // When q<0, we have w >= (2m+1) x 5^{-q}. We must have that w<2^{64} so
      +
      261  // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have
      +
      262  // 2^{53} x 5^{-q} < 2^{64}.
      +
      263  // Hence we have 5^{-q} < 2^{11}$ or q>= -4.
      +
      264  //
      +
      265  // We require lower <= 1 and not lower == 0 because we could not prove that
      +
      266  // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test.
      +
      267  if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) {
      +
      268  if((mantissa << (upperbit + 64 - 53 - 2)) == upper) {
      +
      269  mantissa &= ~1; // flip it so that we do not round up
      +
      270  }
      +
      271  }
      +
      272 
      +
      273  mantissa += mantissa & 1;
      +
      274  mantissa >>= 1;
      +
      275 
      +
      276  // Here we have mantissa < (1<<53), unless there was an overflow
      +
      277  if (mantissa >= (1ULL << 53)) {
      +
      279  // This will happen when parsing values such as 7.2057594037927933e+16
      +
      281  mantissa = (1ULL << 52);
      +
      282  real_exponent++;
      +
      283  }
      +
      284  mantissa &= ~(1ULL << 52);
      +
      285  // we have to check that real_exponent is in range, otherwise we bail out
      +
      286  if (simdjson_unlikely(real_exponent > 2046)) {
      +
      287  // We have an infinite value!!! We could actually throw an error here if we could.
      +
      288  return false;
      +
      289  }
      +
      290  d = to_double(mantissa, real_exponent, negative);
      +
      291  return true;
      +
      292 }
      +
      293 
      +
      294 // We call a fallback floating-point parser that might be slow. Note
      +
      295 // it will accept JSON numbers, but the JSON spec. is more restrictive so
      +
      296 // before you call parse_float_fallback, you need to have validated the input
      +
      297 // string with the JSON grammar.
      +
      298 // It will return an error (false) if the parsed number is infinite.
      +
      299 // The string parsing itself always succeeds. We know that there is at least
      +
      300 // one digit.
      +
      301 static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) {
      +
      302  *outDouble = simdjson::internal::from_chars(reinterpret_cast<const char *>(ptr));
      +
      303  // We do not accept infinite values.
      +
      304 
      +
      305  // Detecting finite values in a portable manner is ridiculously hard, ideally
      +
      306  // we would want to do:
      +
      307  // return !std::isfinite(*outDouble);
      +
      308  // but that mysteriously fails under legacy/old libc++ libraries, see
      +
      309  // https://github.com/simdjson/simdjson/issues/1286
      +
      310  //
      +
      311  // Therefore, fall back to this solution (the extra parens are there
      +
      312  // to handle that max may be a macro on windows).
      +
      313  return !(*outDouble > (std::numeric_limits<double>::max)() || *outDouble < std::numeric_limits<double>::lowest());
      +
      314 }
      +
      315 
      +
      316 static bool parse_float_fallback(const uint8_t *ptr, const uint8_t *end_ptr, double *outDouble) {
      +
      317  *outDouble = simdjson::internal::from_chars(reinterpret_cast<const char *>(ptr), reinterpret_cast<const char *>(end_ptr));
      +
      318  // We do not accept infinite values.
      +
      319 
      +
      320  // Detecting finite values in a portable manner is ridiculously hard, ideally
      +
      321  // we would want to do:
      +
      322  // return !std::isfinite(*outDouble);
      +
      323  // but that mysteriously fails under legacy/old libc++ libraries, see
      +
      324  // https://github.com/simdjson/simdjson/issues/1286
      +
      325  //
      +
      326  // Therefore, fall back to this solution (the extra parens are there
      +
      327  // to handle that max may be a macro on windows).
      +
      328  return !(*outDouble > (std::numeric_limits<double>::max)() || *outDouble < std::numeric_limits<double>::lowest());
      +
      329 }
      +
      330 
      +
      331 // check quickly whether the next 8 chars are made of digits
      +
      332 // at a glance, it looks better than Mula's
      +
      333 // http://0x80.pl/articles/swar-digits-validate.html
      +
      334 simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) {
      +
      335  uint64_t val;
      +
      336  // this can read up to 7 bytes beyond the buffer size, but we require
      +
      337  // SIMDJSON_PADDING of padding
      +
      338  static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7");
      +
      339  std::memcpy(&val, chars, 8);
      +
      340  // a branchy method might be faster:
      +
      341  // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030)
      +
      342  // && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) ==
      +
      343  // 0x3030303030303030);
      +
      344  return (((val & 0xF0F0F0F0F0F0F0F0) |
      +
      345  (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) ==
      +
      346  0x3333333333333333);
      +
      347 }
      +
      348 
      +
      349 template<typename I>
      +
      350 SIMDJSON_NO_SANITIZE_UNDEFINED // We deliberately allow overflow here and check later
      +
      351 simdjson_inline bool parse_digit(const uint8_t c, I &i) {
      +
      352  const uint8_t digit = static_cast<uint8_t>(c - '0');
      +
      353  if (digit > 9) {
      +
      354  return false;
      +
      355  }
      +
      356  // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication
      +
      357  i = 10 * i + digit; // might overflow, we will handle the overflow later
      +
      358  return true;
      +
      359 }
      +
      360 
      +
      361 simdjson_inline error_code parse_decimal_after_separator(simdjson_unused const uint8_t *const src, const uint8_t *&p, uint64_t &i, int64_t &exponent) {
      +
      362  // we continue with the fiction that we have an integer. If the
      +
      363  // floating point number is representable as x * 10^z for some integer
      +
      364  // z that fits in 53 bits, then we will be able to convert back the
      +
      365  // the integer into a float in a lossless manner.
      +
      366  const uint8_t *const first_after_period = p;
      +
      367 
      +
      368 #ifdef SIMDJSON_SWAR_NUMBER_PARSING
      +
      369 #if SIMDJSON_SWAR_NUMBER_PARSING
      +
      370  // this helps if we have lots of decimals!
      +
      371  // this turns out to be frequent enough.
      +
      372  if (is_made_of_eight_digits_fast(p)) {
      +
      373  i = i * 100000000 + parse_eight_digits_unrolled(p);
      +
      374  p += 8;
      +
      375  }
      +
      376 #endif // SIMDJSON_SWAR_NUMBER_PARSING
      +
      377 #endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING
      +
      378  // Unrolling the first digit makes a small difference on some implementations (e.g. westmere)
      +
      379  if (parse_digit(*p, i)) { ++p; }
      +
      380  while (parse_digit(*p, i)) { p++; }
      +
      381  exponent = first_after_period - p;
      +
      382  // Decimal without digits (123.) is illegal
      +
      383  if (exponent == 0) {
      +
      384  return INVALID_NUMBER(src);
      +
      385  }
      +
      386  return SUCCESS;
      +
      387 }
      +
      388 
      +
      389 simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) {
      +
      390  // Exp Sign: -123.456e[-]78
      +
      391  bool neg_exp = ('-' == *p);
      +
      392  if (neg_exp || '+' == *p) { p++; } // Skip + as well
      +
      393 
      +
      394  // Exponent: -123.456e-[78]
      +
      395  auto start_exp = p;
      +
      396  int64_t exp_number = 0;
      +
      397  while (parse_digit(*p, exp_number)) { ++p; }
      +
      398  // It is possible for parse_digit to overflow.
      +
      399  // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN.
      +
      400  // Thus we *must* check for possible overflow before we negate exp_number.
      +
      401 
      +
      402  // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into
      +
      403  // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may
      +
      404  // not oblige and may, in fact, generate two distinct paths in any case. It might be
      +
      405  // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off
      +
      406  // instructions for a simdjson_likely branch, an unconclusive gain.
      +
      407 
      +
      408  // If there were no digits, it's an error.
      +
      409  if (simdjson_unlikely(p == start_exp)) {
      +
      410  return INVALID_NUMBER(src);
      +
      411  }
      +
      412  // We have a valid positive exponent in exp_number at this point, except that
      +
      413  // it may have overflowed.
      +
      414 
      +
      415  // If there were more than 18 digits, we may have overflowed the integer. We have to do
      +
      416  // something!!!!
      +
      417  if (simdjson_unlikely(p > start_exp+18)) {
      +
      418  // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow
      +
      419  while (*start_exp == '0') { start_exp++; }
      +
      420  // 19 digits could overflow int64_t and is kind of absurd anyway. We don't
      +
      421  // support exponents smaller than -999,999,999,999,999,999 and bigger
      +
      422  // than 999,999,999,999,999,999.
      +
      423  // We can truncate.
      +
      424  // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before
      +
      425  // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could
      +
      426  // truncate at 324.
      +
      427  // Note that there is no reason to fail per se at this point in time.
      +
      428  // E.g., 0e999999999999999999999 is a fine number.
      +
      429  if (p > start_exp+18) { exp_number = 999999999999999999; }
      +
      430  }
      +
      431  // At this point, we know that exp_number is a sane, positive, signed integer.
      +
      432  // It is <= 999,999,999,999,999,999. As long as 'exponent' is in
      +
      433  // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent'
      +
      434  // is bounded in magnitude by the size of the JSON input, we are fine in this universe.
      +
      435  // To sum it up: the next line should never overflow.
      +
      436  exponent += (neg_exp ? -exp_number : exp_number);
      +
      437  return SUCCESS;
      +
      438 }
      +
      439 
      +
      440 simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) {
      +
      441  // It is possible that the integer had an overflow.
      +
      442  // We have to handle the case where we have 0.0000somenumber.
      +
      443  const uint8_t *start = start_digits;
      +
      444  while ((*start == '0') || (*start == '.')) { ++start; }
      +
      445  // we over-decrement by one when there is a '.'
      +
      446  return digit_count - size_t(start - start_digits);
      +
      447 }
      +
      448 
      +
      449 } // unnamed namespace
      +
      450 
      +
      452 template<typename W>
      +
      453 error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) {
      +
      454  double d;
      +
      455  if (parse_float_fallback(src, &d)) {
      +
      456  writer.append_double(d);
      +
      457  return SUCCESS;
      +
      458  }
      +
      459  return INVALID_NUMBER(src);
      +
      460 }
      +
      461 
      +
      463 template<typename W>
      +
      464 simdjson_inline error_code write_float(const uint8_t *const src, bool negative, uint64_t i, const uint8_t * start_digits, size_t digit_count, int64_t exponent, W &writer) {
      +
      465  // If we frequently had to deal with long strings of digits,
      +
      466  // we could extend our code by using a 128-bit integer instead
      +
      467  // of a 64-bit integer. However, this is uncommon in practice.
      +
      468  //
      +
      469  // 9999999999999999999 < 2**64 so we can accommodate 19 digits.
      +
      470  // If we have a decimal separator, then digit_count - 1 is the number of digits, but we
      +
      471  // may not have a decimal separator!
      +
      472  if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) {
      +
      473  // Ok, chances are good that we had an overflow!
      +
      474  // this is almost never going to get called!!!
      +
      475  // we start anew, going slowly!!!
      +
      476  // This will happen in the following examples:
      +
      477  // 10000000000000000000000000000000000000000000e+308
      +
      478  // 3.1415926535897932384626433832795028841971693993751
      +
      479  //
      +
      480  // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens
      +
      481  // because slow_float_parsing is a non-inlined function. If we passed our writer reference to
      +
      482  // it, it would force it to be stored in memory, preventing the compiler from picking it apart
      +
      483  // and putting into registers. i.e. if we pass it as reference, it gets slow.
      +
      484  // This is what forces the skip_double, as well.
      +
      485  error_code error = slow_float_parsing(src, writer);
      +
      486  writer.skip_double();
      +
      487  return error;
      +
      488  }
      +
      489  // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other
      +
      490  // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331
      +
      491  // To future reader: we'd love if someone found a better way, or at least could explain this result!
      +
      492  if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) {
      +
      493  //
      +
      494  // Important: smallest_power is such that it leads to a zero value.
      +
      495  // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero
      +
      496  // so something x 10^-343 goes to zero, but not so with something x 10^-342.
      +
      497  static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough");
      +
      498  //
      +
      499  if((exponent < simdjson::internal::smallest_power) || (i == 0)) {
      +
      500  // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero
      +
      501  WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer);
      +
      502  return SUCCESS;
      +
      503  } else { // (exponent > largest_power) and (i != 0)
      +
      504  // We have, for sure, an infinite value and simdjson refuses to parse infinite values.
      +
      505  return INVALID_NUMBER(src);
      +
      506  }
      +
      507  }
      +
      508  double d;
      +
      509  if (!compute_float_64(exponent, i, negative, d)) {
      +
      510  // we are almost never going to get here.
      +
      511  if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); }
      +
      512  }
      +
      513  WRITE_DOUBLE(d, src, writer);
      +
      514  return SUCCESS;
      +
      515 }
      +
      516 
      +
      517 // for performance analysis, it is sometimes useful to skip parsing
      +
      518 #ifdef SIMDJSON_SKIPNUMBERPARSING
      +
      519 
      +
      520 template<typename W>
      +
      521 simdjson_inline error_code parse_number(const uint8_t *const, W &writer) {
      +
      522  writer.append_s64(0); // always write zero
      +
      523  return SUCCESS; // always succeeds
      +
      524 }
      +
      525 
      +
      526 simdjson_unused simdjson_inline simdjson_result<uint64_t> parse_unsigned(const uint8_t * const src) noexcept { return 0; }
      +
      527 simdjson_unused simdjson_inline simdjson_result<int64_t> parse_integer(const uint8_t * const src) noexcept { return 0; }
      +
      528 simdjson_unused simdjson_inline simdjson_result<double> parse_double(const uint8_t * const src) noexcept { return 0; }
      +
      529 simdjson_unused simdjson_inline simdjson_result<uint64_t> parse_unsigned_in_string(const uint8_t * const src) noexcept { return 0; }
      +
      530 simdjson_unused simdjson_inline simdjson_result<int64_t> parse_integer_in_string(const uint8_t * const src) noexcept { return 0; }
      +
      531 simdjson_unused simdjson_inline simdjson_result<double> parse_double_in_string(const uint8_t * const src) noexcept { return 0; }
      +
      532 simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { return false; }
      +
      533 simdjson_unused simdjson_inline simdjson_result<bool> is_integer(const uint8_t * src) noexcept { return false; }
      +
      534 simdjson_unused simdjson_inline simdjson_result<number_type> get_number_type(const uint8_t * src) noexcept { return number_type::signed_integer; }
      +
      535 #else
      +
      536 
      +
      537 // parse the number at src
      +
      538 // define JSON_TEST_NUMBERS for unit testing
      +
      539 //
      +
      540 // It is assumed that the number is followed by a structural ({,},],[) character
      +
      541 // or a white space character. If that is not the case (e.g., when the JSON
      +
      542 // document is made of a single number), then it is necessary to copy the
      +
      543 // content and append a space before calling this function.
      +
      544 //
      +
      545 // Our objective is accurate parsing (ULP of 0) at high speed.
      +
      546 template<typename W>
      +
      547 simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) {
      +
      548 
      +
      549  //
      +
      550  // Check for minus sign
      +
      551  //
      +
      552  bool negative = (*src == '-');
      +
      553  const uint8_t *p = src + uint8_t(negative);
      +
      554 
      +
      555  //
      +
      556  // Parse the integer part.
      +
      557  //
      +
      558  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
      +
      559  const uint8_t *const start_digits = p;
      +
      560  uint64_t i = 0;
      +
      561  while (parse_digit(*p, i)) { p++; }
      +
      562 
      +
      563  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
      +
      564  // Optimization note: size_t is expected to be unsigned.
      +
      565  size_t digit_count = size_t(p - start_digits);
      +
      566  if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); }
      +
      567 
      +
      568  //
      +
      569  // Handle floats if there is a . or e (or both)
      +
      570  //
      +
      571  int64_t exponent = 0;
      +
      572  bool is_float = false;
      +
      573  if ('.' == *p) {
      +
      574  is_float = true;
      +
      575  ++p;
      +
      576  SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) );
      +
      577  digit_count = int(p - start_digits); // used later to guard against overflows
      +
      578  }
      +
      579  if (('e' == *p) || ('E' == *p)) {
      +
      580  is_float = true;
      +
      581  ++p;
      +
      582  SIMDJSON_TRY( parse_exponent(src, p, exponent) );
      +
      583  }
      +
      584  if (is_float) {
      +
      585  const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p);
      +
      586  SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) );
      +
      587  if (dirty_end) { return INVALID_NUMBER(src); }
      +
      588  return SUCCESS;
      +
      589  }
      +
      590 
      +
      591  // The longest negative 64-bit number is 19 digits.
      +
      592  // The longest positive 64-bit number is 20 digits.
      +
      593  // We do it this way so we don't trigger this branch unless we must.
      +
      594  size_t longest_digit_count = negative ? 19 : 20;
      +
      595  if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); }
      +
      596  if (digit_count == longest_digit_count) {
      +
      597  if (negative) {
      +
      598  // Anything negative above INT64_MAX+1 is invalid
      +
      599  if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src); }
      +
      600  WRITE_INTEGER(~i+1, src, writer);
      +
      601  if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); }
      +
      602  return SUCCESS;
      +
      603  // Positive overflow check:
      +
      604  // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the
      +
      605  // biggest uint64_t.
      +
      606  // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX.
      +
      607  // If we got here, it's a 20 digit number starting with the digit "1".
      +
      608  // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller
      +
      609  // than 1,553,255,926,290,448,384.
      +
      610  // - That is smaller than the smallest possible 20-digit number the user could write:
      +
      611  // 10,000,000,000,000,000,000.
      +
      612  // - Therefore, if the number is positive and lower than that, it's overflow.
      +
      613  // - The value we are looking at is less than or equal to INT64_MAX.
      +
      614  //
      +
      615  } else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); }
      +
      616  }
      +
      617 
      +
      618  // Write unsigned if it doesn't fit in a signed integer.
      +
      619  if (i > uint64_t(INT64_MAX)) {
      +
      620  WRITE_UNSIGNED(i, src, writer);
      +
      621  } else {
      +
      622  WRITE_INTEGER(negative ? (~i+1) : i, src, writer);
      +
      623  }
      +
      624  if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); }
      +
      625  return SUCCESS;
      +
      626 }
      +
      627 
      +
      628 // Inlineable functions
      +
      629 namespace {
      +
      630 
      +
      631 // This table can be used to characterize the final character of an integer
      +
      632 // string. For JSON structural character and allowable white space characters,
      +
      633 // we return SUCCESS. For 'e', '.' and 'E', we return INCORRECT_TYPE. Otherwise
      +
      634 // we return NUMBER_ERROR.
      +
      635 // Optimization note: we could easily reduce the size of the table by half (to 128)
      +
      636 // at the cost of an extra branch.
      +
      637 // Optimization note: we want the values to use at most 8 bits (not, e.g., 32 bits):
      +
      638 static_assert(error_code(uint8_t(NUMBER_ERROR))== NUMBER_ERROR, "bad NUMBER_ERROR cast");
      +
      639 static_assert(error_code(uint8_t(SUCCESS))== SUCCESS, "bad NUMBER_ERROR cast");
      +
      640 static_assert(error_code(uint8_t(INCORRECT_TYPE))== INCORRECT_TYPE, "bad NUMBER_ERROR cast");
      +
      641 
      +
      642 const uint8_t integer_string_finisher[256] = {
      + + + + - - - - - - - - - + + + + + + + + + - - - - + + + + - - - + + + @@ -775,585 +779,587 @@ $(document).ready(function(){initNavTree('generic_2numberparsing_8h_source.html' - -
      695  NUMBER_ERROR};
      -
      696 
      -
      697 // Parse any number from 0 to 18,446,744,073,709,551,615
      -
      698 simdjson_unused simdjson_inline simdjson_result<uint64_t> parse_unsigned(const uint8_t * const src) noexcept {
      -
      699  const uint8_t *p = src;
      -
      700  //
      -
      701  // Parse the integer part.
      -
      702  //
      -
      703  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
      -
      704  const uint8_t *const start_digits = p;
      -
      705  uint64_t i = 0;
      -
      706  while (parse_digit(*p, i)) { p++; }
      -
      707 
      -
      708  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
      -
      709  // Optimization note: size_t is expected to be unsigned.
      -
      710  size_t digit_count = size_t(p - start_digits);
      -
      711  // The longest positive 64-bit number is 20 digits.
      -
      712  // We do it this way so we don't trigger this branch unless we must.
      -
      713  // Optimization note: the compiler can probably merge
      -
      714  // ((digit_count == 0) || (digit_count > 20))
      -
      715  // into a single branch since digit_count is unsigned.
      -
      716  if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; }
      -
      717  // Here digit_count > 0.
      -
      718  if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; }
      -
      719  // We can do the following...
      -
      720  // if (!jsoncharutils::is_structural_or_whitespace(*p)) {
      -
      721  // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR;
      -
      722  // }
      -
      723  // as a single table lookup:
      -
      724  if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); }
      -
      725 
      -
      726  if (digit_count == 20) {
      -
      727  // Positive overflow check:
      -
      728  // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the
      -
      729  // biggest uint64_t.
      -
      730  // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX.
      -
      731  // If we got here, it's a 20 digit number starting with the digit "1".
      -
      732  // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller
      -
      733  // than 1,553,255,926,290,448,384.
      -
      734  // - That is smaller than the smallest possible 20-digit number the user could write:
      -
      735  // 10,000,000,000,000,000,000.
      -
      736  // - Therefore, if the number is positive and lower than that, it's overflow.
      -
      737  // - The value we are looking at is less than or equal to INT64_MAX.
      -
      738  //
      -
      739  if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; }
      -
      740  }
      -
      741 
      -
      742  return i;
      -
      743 }
      +
      694  NUMBER_ERROR};
      +
      695 
      +
      696 // Parse any number from 0 to 18,446,744,073,709,551,615
      +
      697 simdjson_unused simdjson_inline simdjson_result<uint64_t> parse_unsigned(const uint8_t * const src) noexcept {
      +
      698  const uint8_t *p = src;
      +
      699  //
      +
      700  // Parse the integer part.
      +
      701  //
      +
      702  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
      +
      703  const uint8_t *const start_digits = p;
      +
      704  uint64_t i = 0;
      +
      705  while (parse_digit(*p, i)) { p++; }
      +
      706 
      +
      707  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
      +
      708  // Optimization note: size_t is expected to be unsigned.
      +
      709  size_t digit_count = size_t(p - start_digits);
      +
      710  // The longest positive 64-bit number is 20 digits.
      +
      711  // We do it this way so we don't trigger this branch unless we must.
      +
      712  // Optimization note: the compiler can probably merge
      +
      713  // ((digit_count == 0) || (digit_count > 20))
      +
      714  // into a single branch since digit_count is unsigned.
      +
      715  if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; }
      +
      716  // Here digit_count > 0.
      +
      717  if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; }
      +
      718  // We can do the following...
      +
      719  // if (!jsoncharutils::is_structural_or_whitespace(*p)) {
      +
      720  // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR;
      +
      721  // }
      +
      722  // as a single table lookup:
      +
      723  if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); }
      +
      724 
      +
      725  if (digit_count == 20) {
      +
      726  // Positive overflow check:
      +
      727  // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the
      +
      728  // biggest uint64_t.
      +
      729  // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX.
      +
      730  // If we got here, it's a 20 digit number starting with the digit "1".
      +
      731  // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller
      +
      732  // than 1,553,255,926,290,448,384.
      +
      733  // - That is smaller than the smallest possible 20-digit number the user could write:
      +
      734  // 10,000,000,000,000,000,000.
      +
      735  // - Therefore, if the number is positive and lower than that, it's overflow.
      +
      736  // - The value we are looking at is less than or equal to INT64_MAX.
      +
      737  //
      +
      738  if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; }
      +
      739  }
      +
      740 
      +
      741  return i;
      +
      742 }
      +
      743 
      744 
      -
      745 
      -
      746 // Parse any number from 0 to 18,446,744,073,709,551,615
      -
      747 // Never read at src_end or beyond
      -
      748 simdjson_unused simdjson_inline simdjson_result<uint64_t> parse_unsigned(const uint8_t * const src, const uint8_t * const src_end) noexcept {
      -
      749  const uint8_t *p = src;
      -
      750  //
      -
      751  // Parse the integer part.
      -
      752  //
      -
      753  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
      -
      754  const uint8_t *const start_digits = p;
      -
      755  uint64_t i = 0;
      -
      756  while ((p != src_end) && parse_digit(*p, i)) { p++; }
      -
      757 
      -
      758  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
      -
      759  // Optimization note: size_t is expected to be unsigned.
      -
      760  size_t digit_count = size_t(p - start_digits);
      -
      761  // The longest positive 64-bit number is 20 digits.
      -
      762  // We do it this way so we don't trigger this branch unless we must.
      -
      763  // Optimization note: the compiler can probably merge
      -
      764  // ((digit_count == 0) || (digit_count > 20))
      -
      765  // into a single branch since digit_count is unsigned.
      -
      766  if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; }
      -
      767  // Here digit_count > 0.
      -
      768  if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; }
      -
      769  // We can do the following...
      -
      770  // if (!jsoncharutils::is_structural_or_whitespace(*p)) {
      -
      771  // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR;
      -
      772  // }
      -
      773  // as a single table lookup:
      -
      774  if ((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); }
      -
      775 
      -
      776  if (digit_count == 20) {
      -
      777  // Positive overflow check:
      -
      778  // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the
      -
      779  // biggest uint64_t.
      -
      780  // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX.
      -
      781  // If we got here, it's a 20 digit number starting with the digit "1".
      -
      782  // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller
      -
      783  // than 1,553,255,926,290,448,384.
      -
      784  // - That is smaller than the smallest possible 20-digit number the user could write:
      -
      785  // 10,000,000,000,000,000,000.
      -
      786  // - Therefore, if the number is positive and lower than that, it's overflow.
      -
      787  // - The value we are looking at is less than or equal to INT64_MAX.
      -
      788  //
      -
      789  if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; }
      -
      790  }
      -
      791 
      -
      792  return i;
      -
      793 }
      -
      794 
      -
      795 // Parse any number from 0 to 18,446,744,073,709,551,615
      -
      796 simdjson_unused simdjson_inline simdjson_result<uint64_t> parse_unsigned_in_string(const uint8_t * const src) noexcept {
      -
      797  const uint8_t *p = src + 1;
      -
      798  //
      -
      799  // Parse the integer part.
      -
      800  //
      -
      801  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
      -
      802  const uint8_t *const start_digits = p;
      -
      803  uint64_t i = 0;
      -
      804  while (parse_digit(*p, i)) { p++; }
      -
      805 
      -
      806  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
      -
      807  // Optimization note: size_t is expected to be unsigned.
      -
      808  size_t digit_count = size_t(p - start_digits);
      -
      809  // The longest positive 64-bit number is 20 digits.
      -
      810  // We do it this way so we don't trigger this branch unless we must.
      -
      811  // Optimization note: the compiler can probably merge
      -
      812  // ((digit_count == 0) || (digit_count > 20))
      -
      813  // into a single branch since digit_count is unsigned.
      -
      814  if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; }
      -
      815  // Here digit_count > 0.
      -
      816  if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; }
      -
      817  // We can do the following...
      -
      818  // if (!jsoncharutils::is_structural_or_whitespace(*p)) {
      -
      819  // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR;
      -
      820  // }
      -
      821  // as a single table lookup:
      -
      822  if (*p != '"') { return NUMBER_ERROR; }
      -
      823 
      -
      824  if (digit_count == 20) {
      -
      825  // Positive overflow check:
      -
      826  // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the
      -
      827  // biggest uint64_t.
      -
      828  // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX.
      -
      829  // If we got here, it's a 20 digit number starting with the digit "1".
      -
      830  // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller
      -
      831  // than 1,553,255,926,290,448,384.
      -
      832  // - That is smaller than the smallest possible 20-digit number the user could write:
      -
      833  // 10,000,000,000,000,000,000.
      -
      834  // - Therefore, if the number is positive and lower than that, it's overflow.
      -
      835  // - The value we are looking at is less than or equal to INT64_MAX.
      -
      836  //
      -
      837  // Note: we use src[1] and not src[0] because src[0] is the quote character in this
      -
      838  // instance.
      -
      839  if (src[1] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; }
      -
      840  }
      -
      841 
      -
      842  return i;
      -
      843 }
      -
      844 
      -
      845 // Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
      -
      846 simdjson_unused simdjson_inline simdjson_result<int64_t> parse_integer(const uint8_t *src) noexcept {
      -
      847  //
      -
      848  // Check for minus sign
      -
      849  //
      -
      850  bool negative = (*src == '-');
      -
      851  const uint8_t *p = src + uint8_t(negative);
      -
      852 
      -
      853  //
      -
      854  // Parse the integer part.
      -
      855  //
      -
      856  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
      -
      857  const uint8_t *const start_digits = p;
      -
      858  uint64_t i = 0;
      -
      859  while (parse_digit(*p, i)) { p++; }
      -
      860 
      -
      861  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
      -
      862  // Optimization note: size_t is expected to be unsigned.
      -
      863  size_t digit_count = size_t(p - start_digits);
      -
      864  // We go from
      -
      865  // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
      -
      866  // so we can never represent numbers that have more than 19 digits.
      -
      867  size_t longest_digit_count = 19;
      -
      868  // Optimization note: the compiler can probably merge
      -
      869  // ((digit_count == 0) || (digit_count > longest_digit_count))
      -
      870  // into a single branch since digit_count is unsigned.
      -
      871  if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; }
      -
      872  // Here digit_count > 0.
      -
      873  if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; }
      -
      874  // We can do the following...
      -
      875  // if (!jsoncharutils::is_structural_or_whitespace(*p)) {
      -
      876  // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR;
      -
      877  // }
      -
      878  // as a single table lookup:
      -
      879  if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); }
      -
      880  // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX.
      -
      881  // Performance note: This check is only needed when digit_count == longest_digit_count but it is
      -
      882  // so cheap that we might as well always make it.
      -
      883  if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; }
      -
      884  return negative ? (~i+1) : i;
      -
      885 }
      -
      886 
      -
      887 // Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
      -
      888 // Never read at src_end or beyond
      -
      889 simdjson_unused simdjson_inline simdjson_result<int64_t> parse_integer(const uint8_t * const src, const uint8_t * const src_end) noexcept {
      -
      890  //
      -
      891  // Check for minus sign
      -
      892  //
      -
      893  if(src == src_end) { return NUMBER_ERROR; }
      -
      894  bool negative = (*src == '-');
      -
      895  const uint8_t *p = src + uint8_t(negative);
      -
      896 
      -
      897  //
      -
      898  // Parse the integer part.
      -
      899  //
      -
      900  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
      -
      901  const uint8_t *const start_digits = p;
      -
      902  uint64_t i = 0;
      -
      903  while ((p != src_end) && parse_digit(*p, i)) { p++; }
      -
      904 
      -
      905  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
      -
      906  // Optimization note: size_t is expected to be unsigned.
      -
      907  size_t digit_count = size_t(p - start_digits);
      -
      908  // We go from
      -
      909  // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
      -
      910  // so we can never represent numbers that have more than 19 digits.
      -
      911  size_t longest_digit_count = 19;
      -
      912  // Optimization note: the compiler can probably merge
      -
      913  // ((digit_count == 0) || (digit_count > longest_digit_count))
      -
      914  // into a single branch since digit_count is unsigned.
      -
      915  if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; }
      -
      916  // Here digit_count > 0.
      -
      917  if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; }
      -
      918  // We can do the following...
      -
      919  // if (!jsoncharutils::is_structural_or_whitespace(*p)) {
      -
      920  // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR;
      -
      921  // }
      -
      922  // as a single table lookup:
      -
      923  if((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); }
      -
      924  // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX.
      -
      925  // Performance note: This check is only needed when digit_count == longest_digit_count but it is
      -
      926  // so cheap that we might as well always make it.
      -
      927  if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; }
      -
      928  return negative ? (~i+1) : i;
      -
      929 }
      -
      930 
      -
      931 // Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
      -
      932 simdjson_unused simdjson_inline simdjson_result<int64_t> parse_integer_in_string(const uint8_t *src) noexcept {
      -
      933  //
      -
      934  // Check for minus sign
      -
      935  //
      -
      936  bool negative = (*(src + 1) == '-');
      -
      937  src += uint8_t(negative) + 1;
      -
      938 
      -
      939  //
      -
      940  // Parse the integer part.
      -
      941  //
      -
      942  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
      -
      943  const uint8_t *const start_digits = src;
      -
      944  uint64_t i = 0;
      -
      945  while (parse_digit(*src, i)) { src++; }
      -
      946 
      -
      947  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
      -
      948  // Optimization note: size_t is expected to be unsigned.
      -
      949  size_t digit_count = size_t(src - start_digits);
      -
      950  // We go from
      -
      951  // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
      -
      952  // so we can never represent numbers that have more than 19 digits.
      -
      953  size_t longest_digit_count = 19;
      -
      954  // Optimization note: the compiler can probably merge
      -
      955  // ((digit_count == 0) || (digit_count > longest_digit_count))
      -
      956  // into a single branch since digit_count is unsigned.
      -
      957  if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; }
      -
      958  // Here digit_count > 0.
      -
      959  if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; }
      -
      960  // We can do the following...
      -
      961  // if (!jsoncharutils::is_structural_or_whitespace(*src)) {
      -
      962  // return (*src == '.' || *src == 'e' || *src == 'E') ? INCORRECT_TYPE : NUMBER_ERROR;
      -
      963  // }
      -
      964  // as a single table lookup:
      -
      965  if(*src != '"') { return NUMBER_ERROR; }
      -
      966  // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX.
      -
      967  // Performance note: This check is only needed when digit_count == longest_digit_count but it is
      -
      968  // so cheap that we might as well always make it.
      -
      969  if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; }
      -
      970  return negative ? (~i+1) : i;
      -
      971 }
      -
      972 
      -
      973 simdjson_unused simdjson_inline simdjson_result<double> parse_double(const uint8_t * src) noexcept {
      -
      974  //
      -
      975  // Check for minus sign
      -
      976  //
      -
      977  bool negative = (*src == '-');
      -
      978  src += uint8_t(negative);
      -
      979 
      -
      980  //
      -
      981  // Parse the integer part.
      -
      982  //
      -
      983  uint64_t i = 0;
      -
      984  const uint8_t *p = src;
      -
      985  p += parse_digit(*p, i);
      -
      986  bool leading_zero = (i == 0);
      -
      987  while (parse_digit(*p, i)) { p++; }
      -
      988  // no integer digits, or 0123 (zero must be solo)
      -
      989  if ( p == src ) { return INCORRECT_TYPE; }
      -
      990  if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; }
      -
      991 
      -
      992  //
      -
      993  // Parse the decimal part.
      -
      994  //
      -
      995  int64_t exponent = 0;
      -
      996  bool overflow;
      -
      997  if (simdjson_likely(*p == '.')) {
      -
      998  p++;
      -
      999  const uint8_t *start_decimal_digits = p;
      -
      1000  if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits
      -
      1001  p++;
      -
      1002  while (parse_digit(*p, i)) { p++; }
      -
      1003  exponent = -(p - start_decimal_digits);
      -
      1004 
      -
      1005  // Overflow check. More than 19 digits (minus the decimal) may be overflow.
      -
      1006  overflow = p-src-1 > 19;
      -
      1007  if (simdjson_unlikely(overflow && leading_zero)) {
      -
      1008  // Skip leading 0.00000 and see if it still overflows
      -
      1009  const uint8_t *start_digits = src + 2;
      -
      1010  while (*start_digits == '0') { start_digits++; }
      -
      1011  overflow = start_digits-src > 19;
      -
      1012  }
      -
      1013  } else {
      -
      1014  overflow = p-src > 19;
      -
      1015  }
      -
      1016 
      -
      1017  //
      -
      1018  // Parse the exponent
      -
      1019  //
      -
      1020  if (*p == 'e' || *p == 'E') {
      -
      1021  p++;
      -
      1022  bool exp_neg = *p == '-';
      -
      1023  p += exp_neg || *p == '+';
      -
      1024 
      -
      1025  uint64_t exp = 0;
      -
      1026  const uint8_t *start_exp_digits = p;
      -
      1027  while (parse_digit(*p, exp)) { p++; }
      -
      1028  // no exp digits, or 20+ exp digits
      -
      1029  if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; }
      -
      1030 
      -
      1031  exponent += exp_neg ? 0-exp : exp;
      -
      1032  }
      -
      1033 
      -
      1034  if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; }
      -
      1035 
      -
      1036  overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power;
      -
      1037 
      -
      1038  //
      -
      1039  // Assemble (or slow-parse) the float
      -
      1040  //
      -
      1041  double d;
      -
      1042  if (simdjson_likely(!overflow)) {
      -
      1043  if (compute_float_64(exponent, i, negative, d)) { return d; }
      -
      1044  }
      -
      1045  if (!parse_float_fallback(src - uint8_t(negative), &d)) {
      -
      1046  return NUMBER_ERROR;
      -
      1047  }
      -
      1048  return d;
      -
      1049 }
      -
      1050 
      -
      1051 simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept {
      -
      1052  return (*src == '-');
      -
      1053 }
      -
      1054 
      -
      1055 simdjson_unused simdjson_inline simdjson_result<bool> is_integer(const uint8_t * src) noexcept {
      -
      1056  bool negative = (*src == '-');
      -
      1057  src += uint8_t(negative);
      -
      1058  const uint8_t *p = src;
      -
      1059  while(static_cast<uint8_t>(*p - '0') <= 9) { p++; }
      -
      1060  if ( p == src ) { return NUMBER_ERROR; }
      -
      1061  if (jsoncharutils::is_structural_or_whitespace(*p)) { return true; }
      -
      1062  return false;
      -
      1063 }
      -
      1064 
      -
      1065 simdjson_unused simdjson_inline simdjson_result<number_type> get_number_type(const uint8_t * src) noexcept {
      -
      1066  bool negative = (*src == '-');
      -
      1067  src += uint8_t(negative);
      -
      1068  const uint8_t *p = src;
      -
      1069  while(static_cast<uint8_t>(*p - '0') <= 9) { p++; }
      -
      1070  if ( p == src ) { return NUMBER_ERROR; }
      -
      1071  if (jsoncharutils::is_structural_or_whitespace(*p)) {
      -
      1072  // We have an integer.
      -
      1073  // If the number is negative and valid, it must be a signed integer.
      -
      1074  if(negative) { return number_type::signed_integer; }
      -
      1075  // We want values larger or equal to 9223372036854775808 to be unsigned
      -
      1076  // integers, and the other values to be signed integers.
      -
      1077  int digit_count = int(p - src);
      -
      1078  if(digit_count >= 19) {
      -
      1079  const uint8_t * smaller_big_integer = reinterpret_cast<const uint8_t *>("9223372036854775808");
      -
      1080  if((digit_count >= 20) || (memcmp(src, smaller_big_integer, 19) >= 0)) {
      -
      1081  return number_type::unsigned_integer;
      -
      1082  }
      -
      1083  }
      -
      1084  return number_type::signed_integer;
      -
      1085  }
      -
      1086  // Hopefully, we have 'e' or 'E' or '.'.
      -
      1087  return number_type::floating_point_number;
      -
      1088 }
      -
      1089 
      -
      1090 // Never read at src_end or beyond
      -
      1091 simdjson_unused simdjson_inline simdjson_result<double> parse_double(const uint8_t * src, const uint8_t * const src_end) noexcept {
      -
      1092  if(src == src_end) { return NUMBER_ERROR; }
      -
      1093  //
      -
      1094  // Check for minus sign
      -
      1095  //
      -
      1096  bool negative = (*src == '-');
      -
      1097  src += uint8_t(negative);
      -
      1098 
      -
      1099  //
      -
      1100  // Parse the integer part.
      -
      1101  //
      -
      1102  uint64_t i = 0;
      -
      1103  const uint8_t *p = src;
      -
      1104  if(p == src_end) { return NUMBER_ERROR; }
      -
      1105  p += parse_digit(*p, i);
      -
      1106  bool leading_zero = (i == 0);
      -
      1107  while ((p != src_end) && parse_digit(*p, i)) { p++; }
      -
      1108  // no integer digits, or 0123 (zero must be solo)
      -
      1109  if ( p == src ) { return INCORRECT_TYPE; }
      -
      1110  if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; }
      -
      1111 
      -
      1112  //
      -
      1113  // Parse the decimal part.
      -
      1114  //
      -
      1115  int64_t exponent = 0;
      -
      1116  bool overflow;
      -
      1117  if (simdjson_likely((p != src_end) && (*p == '.'))) {
      -
      1118  p++;
      -
      1119  const uint8_t *start_decimal_digits = p;
      -
      1120  if ((p == src_end) || !parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits
      -
      1121  p++;
      -
      1122  while ((p != src_end) && parse_digit(*p, i)) { p++; }
      -
      1123  exponent = -(p - start_decimal_digits);
      -
      1124 
      -
      1125  // Overflow check. More than 19 digits (minus the decimal) may be overflow.
      -
      1126  overflow = p-src-1 > 19;
      -
      1127  if (simdjson_unlikely(overflow && leading_zero)) {
      -
      1128  // Skip leading 0.00000 and see if it still overflows
      -
      1129  const uint8_t *start_digits = src + 2;
      -
      1130  while (*start_digits == '0') { start_digits++; }
      -
      1131  overflow = start_digits-src > 19;
      -
      1132  }
      -
      1133  } else {
      -
      1134  overflow = p-src > 19;
      -
      1135  }
      -
      1136 
      -
      1137  //
      -
      1138  // Parse the exponent
      -
      1139  //
      -
      1140  if ((p != src_end) && (*p == 'e' || *p == 'E')) {
      -
      1141  p++;
      -
      1142  if(p == src_end) { return NUMBER_ERROR; }
      -
      1143  bool exp_neg = *p == '-';
      -
      1144  p += exp_neg || *p == '+';
      -
      1145 
      -
      1146  uint64_t exp = 0;
      -
      1147  const uint8_t *start_exp_digits = p;
      -
      1148  while ((p != src_end) && parse_digit(*p, exp)) { p++; }
      -
      1149  // no exp digits, or 20+ exp digits
      -
      1150  if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; }
      -
      1151 
      -
      1152  exponent += exp_neg ? 0-exp : exp;
      -
      1153  }
      -
      1154 
      -
      1155  if ((p != src_end) && jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; }
      -
      1156 
      -
      1157  overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power;
      -
      1158 
      -
      1159  //
      -
      1160  // Assemble (or slow-parse) the float
      -
      1161  //
      -
      1162  double d;
      -
      1163  if (simdjson_likely(!overflow)) {
      -
      1164  if (compute_float_64(exponent, i, negative, d)) { return d; }
      -
      1165  }
      -
      1166  if (!parse_float_fallback(src - uint8_t(negative), src_end, &d)) {
      -
      1167  return NUMBER_ERROR;
      -
      1168  }
      -
      1169  return d;
      -
      1170 }
      -
      1171 
      -
      1172 simdjson_unused simdjson_inline simdjson_result<double> parse_double_in_string(const uint8_t * src) noexcept {
      -
      1173  //
      -
      1174  // Check for minus sign
      -
      1175  //
      -
      1176  bool negative = (*(src + 1) == '-');
      -
      1177  src += uint8_t(negative) + 1;
      -
      1178 
      -
      1179  //
      -
      1180  // Parse the integer part.
      -
      1181  //
      -
      1182  uint64_t i = 0;
      -
      1183  const uint8_t *p = src;
      -
      1184  p += parse_digit(*p, i);
      -
      1185  bool leading_zero = (i == 0);
      -
      1186  while (parse_digit(*p, i)) { p++; }
      -
      1187  // no integer digits, or 0123 (zero must be solo)
      -
      1188  if ( p == src ) { return INCORRECT_TYPE; }
      -
      1189  if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; }
      -
      1190 
      -
      1191  //
      -
      1192  // Parse the decimal part.
      -
      1193  //
      -
      1194  int64_t exponent = 0;
      -
      1195  bool overflow;
      -
      1196  if (simdjson_likely(*p == '.')) {
      -
      1197  p++;
      -
      1198  const uint8_t *start_decimal_digits = p;
      -
      1199  if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits
      -
      1200  p++;
      -
      1201  while (parse_digit(*p, i)) { p++; }
      -
      1202  exponent = -(p - start_decimal_digits);
      -
      1203 
      -
      1204  // Overflow check. More than 19 digits (minus the decimal) may be overflow.
      -
      1205  overflow = p-src-1 > 19;
      -
      1206  if (simdjson_unlikely(overflow && leading_zero)) {
      -
      1207  // Skip leading 0.00000 and see if it still overflows
      -
      1208  const uint8_t *start_digits = src + 2;
      -
      1209  while (*start_digits == '0') { start_digits++; }
      -
      1210  overflow = start_digits-src > 19;
      -
      1211  }
      -
      1212  } else {
      -
      1213  overflow = p-src > 19;
      -
      1214  }
      -
      1215 
      -
      1216  //
      -
      1217  // Parse the exponent
      -
      1218  //
      -
      1219  if (*p == 'e' || *p == 'E') {
      -
      1220  p++;
      -
      1221  bool exp_neg = *p == '-';
      -
      1222  p += exp_neg || *p == '+';
      -
      1223 
      -
      1224  uint64_t exp = 0;
      -
      1225  const uint8_t *start_exp_digits = p;
      -
      1226  while (parse_digit(*p, exp)) { p++; }
      -
      1227  // no exp digits, or 20+ exp digits
      -
      1228  if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; }
      -
      1229 
      -
      1230  exponent += exp_neg ? 0-exp : exp;
      -
      1231  }
      -
      1232 
      -
      1233  if (*p != '"') { return NUMBER_ERROR; }
      -
      1234 
      -
      1235  overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power;
      -
      1236 
      -
      1237  //
      -
      1238  // Assemble (or slow-parse) the float
      -
      1239  //
      -
      1240  double d;
      -
      1241  if (simdjson_likely(!overflow)) {
      -
      1242  if (compute_float_64(exponent, i, negative, d)) { return d; }
      -
      1243  }
      -
      1244  if (!parse_float_fallback(src - uint8_t(negative), &d)) {
      -
      1245  return NUMBER_ERROR;
      -
      1246  }
      -
      1247  return d;
      -
      1248 }
      -
      1249 
      -
      1250 } // unnamed namespace
      -
      1251 #endif // SIMDJSON_SKIPNUMBERPARSING
      -
      1252 
      -
      1253 inline std::ostream& operator<<(std::ostream& out, number_type type) noexcept {
      -
      1254  switch (type) {
      -
      1255  case number_type::signed_integer: out << "integer in [-9223372036854775808,9223372036854775808)"; break;
      -
      1256  case number_type::unsigned_integer: out << "unsigned integer in [9223372036854775808,18446744073709551616)"; break;
      -
      1257  case number_type::floating_point_number: out << "floating-point number (binary64)"; break;
      -
      1258  default: SIMDJSON_UNREACHABLE();
      -
      1259  }
      -
      1260  return out;
      -
      1261 }
      -
      1262 
      -
      1263 } // namespace numberparsing
      +
      745 // Parse any number from 0 to 18,446,744,073,709,551,615
      +
      746 // Never read at src_end or beyond
      +
      747 simdjson_unused simdjson_inline simdjson_result<uint64_t> parse_unsigned(const uint8_t * const src, const uint8_t * const src_end) noexcept {
      +
      748  const uint8_t *p = src;
      +
      749  //
      +
      750  // Parse the integer part.
      +
      751  //
      +
      752  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
      +
      753  const uint8_t *const start_digits = p;
      +
      754  uint64_t i = 0;
      +
      755  while ((p != src_end) && parse_digit(*p, i)) { p++; }
      +
      756 
      +
      757  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
      +
      758  // Optimization note: size_t is expected to be unsigned.
      +
      759  size_t digit_count = size_t(p - start_digits);
      +
      760  // The longest positive 64-bit number is 20 digits.
      +
      761  // We do it this way so we don't trigger this branch unless we must.
      +
      762  // Optimization note: the compiler can probably merge
      +
      763  // ((digit_count == 0) || (digit_count > 20))
      +
      764  // into a single branch since digit_count is unsigned.
      +
      765  if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; }
      +
      766  // Here digit_count > 0.
      +
      767  if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; }
      +
      768  // We can do the following...
      +
      769  // if (!jsoncharutils::is_structural_or_whitespace(*p)) {
      +
      770  // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR;
      +
      771  // }
      +
      772  // as a single table lookup:
      +
      773  if ((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); }
      +
      774 
      +
      775  if (digit_count == 20) {
      +
      776  // Positive overflow check:
      +
      777  // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the
      +
      778  // biggest uint64_t.
      +
      779  // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX.
      +
      780  // If we got here, it's a 20 digit number starting with the digit "1".
      +
      781  // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller
      +
      782  // than 1,553,255,926,290,448,384.
      +
      783  // - That is smaller than the smallest possible 20-digit number the user could write:
      +
      784  // 10,000,000,000,000,000,000.
      +
      785  // - Therefore, if the number is positive and lower than that, it's overflow.
      +
      786  // - The value we are looking at is less than or equal to INT64_MAX.
      +
      787  //
      +
      788  if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; }
      +
      789  }
      +
      790 
      +
      791  return i;
      +
      792 }
      +
      793 
      +
      794 // Parse any number from 0 to 18,446,744,073,709,551,615
      +
      795 simdjson_unused simdjson_inline simdjson_result<uint64_t> parse_unsigned_in_string(const uint8_t * const src) noexcept {
      +
      796  const uint8_t *p = src + 1;
      +
      797  //
      +
      798  // Parse the integer part.
      +
      799  //
      +
      800  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
      +
      801  const uint8_t *const start_digits = p;
      +
      802  uint64_t i = 0;
      +
      803  while (parse_digit(*p, i)) { p++; }
      +
      804 
      +
      805  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
      +
      806  // Optimization note: size_t is expected to be unsigned.
      +
      807  size_t digit_count = size_t(p - start_digits);
      +
      808  // The longest positive 64-bit number is 20 digits.
      +
      809  // We do it this way so we don't trigger this branch unless we must.
      +
      810  // Optimization note: the compiler can probably merge
      +
      811  // ((digit_count == 0) || (digit_count > 20))
      +
      812  // into a single branch since digit_count is unsigned.
      +
      813  if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; }
      +
      814  // Here digit_count > 0.
      +
      815  if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; }
      +
      816  // We can do the following...
      +
      817  // if (!jsoncharutils::is_structural_or_whitespace(*p)) {
      +
      818  // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR;
      +
      819  // }
      +
      820  // as a single table lookup:
      +
      821  if (*p != '"') { return NUMBER_ERROR; }
      +
      822 
      +
      823  if (digit_count == 20) {
      +
      824  // Positive overflow check:
      +
      825  // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the
      +
      826  // biggest uint64_t.
      +
      827  // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX.
      +
      828  // If we got here, it's a 20 digit number starting with the digit "1".
      +
      829  // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller
      +
      830  // than 1,553,255,926,290,448,384.
      +
      831  // - That is smaller than the smallest possible 20-digit number the user could write:
      +
      832  // 10,000,000,000,000,000,000.
      +
      833  // - Therefore, if the number is positive and lower than that, it's overflow.
      +
      834  // - The value we are looking at is less than or equal to INT64_MAX.
      +
      835  //
      +
      836  // Note: we use src[1] and not src[0] because src[0] is the quote character in this
      +
      837  // instance.
      +
      838  if (src[1] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; }
      +
      839  }
      +
      840 
      +
      841  return i;
      +
      842 }
      +
      843 
      +
      844 // Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
      +
      845 simdjson_unused simdjson_inline simdjson_result<int64_t> parse_integer(const uint8_t *src) noexcept {
      +
      846  //
      +
      847  // Check for minus sign
      +
      848  //
      +
      849  bool negative = (*src == '-');
      +
      850  const uint8_t *p = src + uint8_t(negative);
      +
      851 
      +
      852  //
      +
      853  // Parse the integer part.
      +
      854  //
      +
      855  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
      +
      856  const uint8_t *const start_digits = p;
      +
      857  uint64_t i = 0;
      +
      858  while (parse_digit(*p, i)) { p++; }
      +
      859 
      +
      860  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
      +
      861  // Optimization note: size_t is expected to be unsigned.
      +
      862  size_t digit_count = size_t(p - start_digits);
      +
      863  // We go from
      +
      864  // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
      +
      865  // so we can never represent numbers that have more than 19 digits.
      +
      866  size_t longest_digit_count = 19;
      +
      867  // Optimization note: the compiler can probably merge
      +
      868  // ((digit_count == 0) || (digit_count > longest_digit_count))
      +
      869  // into a single branch since digit_count is unsigned.
      +
      870  if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; }
      +
      871  // Here digit_count > 0.
      +
      872  if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; }
      +
      873  // We can do the following...
      +
      874  // if (!jsoncharutils::is_structural_or_whitespace(*p)) {
      +
      875  // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR;
      +
      876  // }
      +
      877  // as a single table lookup:
      +
      878  if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); }
      +
      879  // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX.
      +
      880  // Performance note: This check is only needed when digit_count == longest_digit_count but it is
      +
      881  // so cheap that we might as well always make it.
      +
      882  if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; }
      +
      883  return negative ? (~i+1) : i;
      +
      884 }
      +
      885 
      +
      886 // Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
      +
      887 // Never read at src_end or beyond
      +
      888 simdjson_unused simdjson_inline simdjson_result<int64_t> parse_integer(const uint8_t * const src, const uint8_t * const src_end) noexcept {
      +
      889  //
      +
      890  // Check for minus sign
      +
      891  //
      +
      892  if(src == src_end) { return NUMBER_ERROR; }
      +
      893  bool negative = (*src == '-');
      +
      894  const uint8_t *p = src + uint8_t(negative);
      +
      895 
      +
      896  //
      +
      897  // Parse the integer part.
      +
      898  //
      +
      899  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
      +
      900  const uint8_t *const start_digits = p;
      +
      901  uint64_t i = 0;
      +
      902  while ((p != src_end) && parse_digit(*p, i)) { p++; }
      +
      903 
      +
      904  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
      +
      905  // Optimization note: size_t is expected to be unsigned.
      +
      906  size_t digit_count = size_t(p - start_digits);
      +
      907  // We go from
      +
      908  // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
      +
      909  // so we can never represent numbers that have more than 19 digits.
      +
      910  size_t longest_digit_count = 19;
      +
      911  // Optimization note: the compiler can probably merge
      +
      912  // ((digit_count == 0) || (digit_count > longest_digit_count))
      +
      913  // into a single branch since digit_count is unsigned.
      +
      914  if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; }
      +
      915  // Here digit_count > 0.
      +
      916  if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; }
      +
      917  // We can do the following...
      +
      918  // if (!jsoncharutils::is_structural_or_whitespace(*p)) {
      +
      919  // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR;
      +
      920  // }
      +
      921  // as a single table lookup:
      +
      922  if((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); }
      +
      923  // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX.
      +
      924  // Performance note: This check is only needed when digit_count == longest_digit_count but it is
      +
      925  // so cheap that we might as well always make it.
      +
      926  if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; }
      +
      927  return negative ? (~i+1) : i;
      +
      928 }
      +
      929 
      +
      930 // Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
      +
      931 simdjson_unused simdjson_inline simdjson_result<int64_t> parse_integer_in_string(const uint8_t *src) noexcept {
      +
      932  //
      +
      933  // Check for minus sign
      +
      934  //
      +
      935  bool negative = (*(src + 1) == '-');
      +
      936  src += uint8_t(negative) + 1;
      +
      937 
      +
      938  //
      +
      939  // Parse the integer part.
      +
      940  //
      +
      941  // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare
      +
      942  const uint8_t *const start_digits = src;
      +
      943  uint64_t i = 0;
      +
      944  while (parse_digit(*src, i)) { src++; }
      +
      945 
      +
      946  // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error.
      +
      947  // Optimization note: size_t is expected to be unsigned.
      +
      948  size_t digit_count = size_t(src - start_digits);
      +
      949  // We go from
      +
      950  // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
      +
      951  // so we can never represent numbers that have more than 19 digits.
      +
      952  size_t longest_digit_count = 19;
      +
      953  // Optimization note: the compiler can probably merge
      +
      954  // ((digit_count == 0) || (digit_count > longest_digit_count))
      +
      955  // into a single branch since digit_count is unsigned.
      +
      956  if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; }
      +
      957  // Here digit_count > 0.
      +
      958  if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; }
      +
      959  // We can do the following...
      +
      960  // if (!jsoncharutils::is_structural_or_whitespace(*src)) {
      +
      961  // return (*src == '.' || *src == 'e' || *src == 'E') ? INCORRECT_TYPE : NUMBER_ERROR;
      +
      962  // }
      +
      963  // as a single table lookup:
      +
      964  if(*src != '"') { return NUMBER_ERROR; }
      +
      965  // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX.
      +
      966  // Performance note: This check is only needed when digit_count == longest_digit_count but it is
      +
      967  // so cheap that we might as well always make it.
      +
      968  if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; }
      +
      969  return negative ? (~i+1) : i;
      +
      970 }
      +
      971 
      +
      972 simdjson_unused simdjson_inline simdjson_result<double> parse_double(const uint8_t * src) noexcept {
      +
      973  //
      +
      974  // Check for minus sign
      +
      975  //
      +
      976  bool negative = (*src == '-');
      +
      977  src += uint8_t(negative);
      +
      978 
      +
      979  //
      +
      980  // Parse the integer part.
      +
      981  //
      +
      982  uint64_t i = 0;
      +
      983  const uint8_t *p = src;
      +
      984  p += parse_digit(*p, i);
      +
      985  bool leading_zero = (i == 0);
      +
      986  while (parse_digit(*p, i)) { p++; }
      +
      987  // no integer digits, or 0123 (zero must be solo)
      +
      988  if ( p == src ) { return INCORRECT_TYPE; }
      +
      989  if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; }
      +
      990 
      +
      991  //
      +
      992  // Parse the decimal part.
      +
      993  //
      +
      994  int64_t exponent = 0;
      +
      995  bool overflow;
      +
      996  if (simdjson_likely(*p == '.')) {
      +
      997  p++;
      +
      998  const uint8_t *start_decimal_digits = p;
      +
      999  if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits
      +
      1000  p++;
      +
      1001  while (parse_digit(*p, i)) { p++; }
      +
      1002  exponent = -(p - start_decimal_digits);
      +
      1003 
      +
      1004  // Overflow check. More than 19 digits (minus the decimal) may be overflow.
      +
      1005  overflow = p-src-1 > 19;
      +
      1006  if (simdjson_unlikely(overflow && leading_zero)) {
      +
      1007  // Skip leading 0.00000 and see if it still overflows
      +
      1008  const uint8_t *start_digits = src + 2;
      +
      1009  while (*start_digits == '0') { start_digits++; }
      +
      1010  overflow = start_digits-src > 19;
      +
      1011  }
      +
      1012  } else {
      +
      1013  overflow = p-src > 19;
      +
      1014  }
      +
      1015 
      +
      1016  //
      +
      1017  // Parse the exponent
      +
      1018  //
      +
      1019  if (*p == 'e' || *p == 'E') {
      +
      1020  p++;
      +
      1021  bool exp_neg = *p == '-';
      +
      1022  p += exp_neg || *p == '+';
      +
      1023 
      +
      1024  uint64_t exp = 0;
      +
      1025  const uint8_t *start_exp_digits = p;
      +
      1026  while (parse_digit(*p, exp)) { p++; }
      +
      1027  // no exp digits, or 20+ exp digits
      +
      1028  if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; }
      +
      1029 
      +
      1030  exponent += exp_neg ? 0-exp : exp;
      +
      1031  }
      +
      1032 
      +
      1033  if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; }
      +
      1034 
      +
      1035  overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power;
      +
      1036 
      +
      1037  //
      +
      1038  // Assemble (or slow-parse) the float
      +
      1039  //
      +
      1040  double d;
      +
      1041  if (simdjson_likely(!overflow)) {
      +
      1042  if (compute_float_64(exponent, i, negative, d)) { return d; }
      +
      1043  }
      +
      1044  if (!parse_float_fallback(src - uint8_t(negative), &d)) {
      +
      1045  return NUMBER_ERROR;
      +
      1046  }
      +
      1047  return d;
      +
      1048 }
      +
      1049 
      +
      1050 simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept {
      +
      1051  return (*src == '-');
      +
      1052 }
      +
      1053 
      +
      1054 simdjson_unused simdjson_inline simdjson_result<bool> is_integer(const uint8_t * src) noexcept {
      +
      1055  bool negative = (*src == '-');
      +
      1056  src += uint8_t(negative);
      +
      1057  const uint8_t *p = src;
      +
      1058  while(static_cast<uint8_t>(*p - '0') <= 9) { p++; }
      +
      1059  if ( p == src ) { return NUMBER_ERROR; }
      +
      1060  if (jsoncharutils::is_structural_or_whitespace(*p)) { return true; }
      +
      1061  return false;
      +
      1062 }
      +
      1063 
      +
      1064 simdjson_unused simdjson_inline simdjson_result<number_type> get_number_type(const uint8_t * src) noexcept {
      +
      1065  bool negative = (*src == '-');
      +
      1066  src += uint8_t(negative);
      +
      1067  const uint8_t *p = src;
      +
      1068  while(static_cast<uint8_t>(*p - '0') <= 9) { p++; }
      +
      1069  if ( p == src ) { return NUMBER_ERROR; }
      +
      1070  if (jsoncharutils::is_structural_or_whitespace(*p)) {
      +
      1071  // We have an integer.
      +
      1072  // If the number is negative and valid, it must be a signed integer.
      +
      1073  if(negative) { return number_type::signed_integer; }
      +
      1074  // We want values larger or equal to 9223372036854775808 to be unsigned
      +
      1075  // integers, and the other values to be signed integers.
      +
      1076  int digit_count = int(p - src);
      +
      1077  if(digit_count >= 19) {
      +
      1078  const uint8_t * smaller_big_integer = reinterpret_cast<const uint8_t *>("9223372036854775808");
      +
      1079  if((digit_count >= 20) || (memcmp(src, smaller_big_integer, 19) >= 0)) {
      +
      1080  return number_type::unsigned_integer;
      +
      1081  }
      +
      1082  }
      +
      1083  return number_type::signed_integer;
      +
      1084  }
      +
      1085  // Hopefully, we have 'e' or 'E' or '.'.
      +
      1086  return number_type::floating_point_number;
      +
      1087 }
      +
      1088 
      +
      1089 // Never read at src_end or beyond
      +
      1090 simdjson_unused simdjson_inline simdjson_result<double> parse_double(const uint8_t * src, const uint8_t * const src_end) noexcept {
      +
      1091  if(src == src_end) { return NUMBER_ERROR; }
      +
      1092  //
      +
      1093  // Check for minus sign
      +
      1094  //
      +
      1095  bool negative = (*src == '-');
      +
      1096  src += uint8_t(negative);
      +
      1097 
      +
      1098  //
      +
      1099  // Parse the integer part.
      +
      1100  //
      +
      1101  uint64_t i = 0;
      +
      1102  const uint8_t *p = src;
      +
      1103  if(p == src_end) { return NUMBER_ERROR; }
      +
      1104  p += parse_digit(*p, i);
      +
      1105  bool leading_zero = (i == 0);
      +
      1106  while ((p != src_end) && parse_digit(*p, i)) { p++; }
      +
      1107  // no integer digits, or 0123 (zero must be solo)
      +
      1108  if ( p == src ) { return INCORRECT_TYPE; }
      +
      1109  if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; }
      +
      1110 
      +
      1111  //
      +
      1112  // Parse the decimal part.
      +
      1113  //
      +
      1114  int64_t exponent = 0;
      +
      1115  bool overflow;
      +
      1116  if (simdjson_likely((p != src_end) && (*p == '.'))) {
      +
      1117  p++;
      +
      1118  const uint8_t *start_decimal_digits = p;
      +
      1119  if ((p == src_end) || !parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits
      +
      1120  p++;
      +
      1121  while ((p != src_end) && parse_digit(*p, i)) { p++; }
      +
      1122  exponent = -(p - start_decimal_digits);
      +
      1123 
      +
      1124  // Overflow check. More than 19 digits (minus the decimal) may be overflow.
      +
      1125  overflow = p-src-1 > 19;
      +
      1126  if (simdjson_unlikely(overflow && leading_zero)) {
      +
      1127  // Skip leading 0.00000 and see if it still overflows
      +
      1128  const uint8_t *start_digits = src + 2;
      +
      1129  while (*start_digits == '0') { start_digits++; }
      +
      1130  overflow = start_digits-src > 19;
      +
      1131  }
      +
      1132  } else {
      +
      1133  overflow = p-src > 19;
      +
      1134  }
      +
      1135 
      +
      1136  //
      +
      1137  // Parse the exponent
      +
      1138  //
      +
      1139  if ((p != src_end) && (*p == 'e' || *p == 'E')) {
      +
      1140  p++;
      +
      1141  if(p == src_end) { return NUMBER_ERROR; }
      +
      1142  bool exp_neg = *p == '-';
      +
      1143  p += exp_neg || *p == '+';
      +
      1144 
      +
      1145  uint64_t exp = 0;
      +
      1146  const uint8_t *start_exp_digits = p;
      +
      1147  while ((p != src_end) && parse_digit(*p, exp)) { p++; }
      +
      1148  // no exp digits, or 20+ exp digits
      +
      1149  if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; }
      +
      1150 
      +
      1151  exponent += exp_neg ? 0-exp : exp;
      +
      1152  }
      +
      1153 
      +
      1154  if ((p != src_end) && jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; }
      +
      1155 
      +
      1156  overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power;
      +
      1157 
      +
      1158  //
      +
      1159  // Assemble (or slow-parse) the float
      +
      1160  //
      +
      1161  double d;
      +
      1162  if (simdjson_likely(!overflow)) {
      +
      1163  if (compute_float_64(exponent, i, negative, d)) { return d; }
      +
      1164  }
      +
      1165  if (!parse_float_fallback(src - uint8_t(negative), src_end, &d)) {
      +
      1166  return NUMBER_ERROR;
      +
      1167  }
      +
      1168  return d;
      +
      1169 }
      +
      1170 
      +
      1171 simdjson_unused simdjson_inline simdjson_result<double> parse_double_in_string(const uint8_t * src) noexcept {
      +
      1172  //
      +
      1173  // Check for minus sign
      +
      1174  //
      +
      1175  bool negative = (*(src + 1) == '-');
      +
      1176  src += uint8_t(negative) + 1;
      +
      1177 
      +
      1178  //
      +
      1179  // Parse the integer part.
      +
      1180  //
      +
      1181  uint64_t i = 0;
      +
      1182  const uint8_t *p = src;
      +
      1183  p += parse_digit(*p, i);
      +
      1184  bool leading_zero = (i == 0);
      +
      1185  while (parse_digit(*p, i)) { p++; }
      +
      1186  // no integer digits, or 0123 (zero must be solo)
      +
      1187  if ( p == src ) { return INCORRECT_TYPE; }
      +
      1188  if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; }
      +
      1189 
      +
      1190  //
      +
      1191  // Parse the decimal part.
      +
      1192  //
      +
      1193  int64_t exponent = 0;
      +
      1194  bool overflow;
      +
      1195  if (simdjson_likely(*p == '.')) {
      +
      1196  p++;
      +
      1197  const uint8_t *start_decimal_digits = p;
      +
      1198  if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits
      +
      1199  p++;
      +
      1200  while (parse_digit(*p, i)) { p++; }
      +
      1201  exponent = -(p - start_decimal_digits);
      +
      1202 
      +
      1203  // Overflow check. More than 19 digits (minus the decimal) may be overflow.
      +
      1204  overflow = p-src-1 > 19;
      +
      1205  if (simdjson_unlikely(overflow && leading_zero)) {
      +
      1206  // Skip leading 0.00000 and see if it still overflows
      +
      1207  const uint8_t *start_digits = src + 2;
      +
      1208  while (*start_digits == '0') { start_digits++; }
      +
      1209  overflow = start_digits-src > 19;
      +
      1210  }
      +
      1211  } else {
      +
      1212  overflow = p-src > 19;
      +
      1213  }
      +
      1214 
      +
      1215  //
      +
      1216  // Parse the exponent
      +
      1217  //
      +
      1218  if (*p == 'e' || *p == 'E') {
      +
      1219  p++;
      +
      1220  bool exp_neg = *p == '-';
      +
      1221  p += exp_neg || *p == '+';
      +
      1222 
      +
      1223  uint64_t exp = 0;
      +
      1224  const uint8_t *start_exp_digits = p;
      +
      1225  while (parse_digit(*p, exp)) { p++; }
      +
      1226  // no exp digits, or 20+ exp digits
      +
      1227  if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; }
      +
      1228 
      +
      1229  exponent += exp_neg ? 0-exp : exp;
      +
      1230  }
      +
      1231 
      +
      1232  if (*p != '"') { return NUMBER_ERROR; }
      +
      1233 
      +
      1234  overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power;
      +
      1235 
      +
      1236  //
      +
      1237  // Assemble (or slow-parse) the float
      +
      1238  //
      +
      1239  double d;
      +
      1240  if (simdjson_likely(!overflow)) {
      +
      1241  if (compute_float_64(exponent, i, negative, d)) { return d; }
      +
      1242  }
      +
      1243  if (!parse_float_fallback(src - uint8_t(negative), &d)) {
      +
      1244  return NUMBER_ERROR;
      +
      1245  }
      +
      1246  return d;
      +
      1247 }
      +
      1248 
      +
      1249 } // unnamed namespace
      +
      1250 #endif // SIMDJSON_SKIPNUMBERPARSING
      +
      1251 
      +
      1252 } // namespace numberparsing
      +
      1253 
      +
      1254 inline std::ostream& operator<<(std::ostream& out, number_type type) noexcept {
      +
      1255  switch (type) {
      +
      1256  case number_type::signed_integer: out << "integer in [-9223372036854775808,9223372036854775808)"; break;
      +
      1257  case number_type::unsigned_integer: out << "unsigned integer in [9223372036854775808,18446744073709551616)"; break;
      +
      1258  case number_type::floating_point_number: out << "floating-point number (binary64)"; break;
      +
      1259  default: SIMDJSON_UNREACHABLE();
      +
      1260  }
      +
      1261  return out;
      +
      1262 }
      +
      1263 
      1264 } // namespace SIMDJSON_IMPLEMENTATION
      1265 } // namespace simdjson
      -
      We want to support argument-dependent lookup (ADL).
      -
      std::ostream & operator<<(std::ostream &out, error_code error) noexcept
      Write the error message to the output stream.
      Definition: error-inl.h:36
      +
      1266 
      +
      1267 #endif // SIMDJSON_GENERIC_NUMBERPARSING_H
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      +
      std::ostream & operator<<(std::ostream &out, error_code error) noexcept
      Write the error message to the output stream.
      Definition: error-inl.h:35
      error_code
      All possible errors returned by simdjson.
      Definition: error.h:17
      @ INCORRECT_TYPE
      JSON element has a different type than user expected.
      Definition: error.h:34
      @ SUCCESS
      No error.
      Definition: error.h:18
      @ NUMBER_ERROR
      Problem while parsing a number.
      Definition: error.h:27
      -
      constexpr size_t SIMDJSON_PADDING
      The amount of padding needed in a buffer to parse JSON.
      Definition: common_defs.h:45
      +
      constexpr size_t SIMDJSON_PADDING
      The amount of padding needed in a buffer to parse JSON.
      Definition: base.h:30
      diff --git a/numberparsing__tables_8h_source.html b/numberparsing__tables_8h_source.html index 0eaff8b1a..8536ce9a4 100644 --- a/numberparsing__tables_8h_source.html +++ b/numberparsing__tables_8h_source.html @@ -120,7 +120,7 @@ $(document).ready(function(){initNavTree('numberparsing__tables_8h_source.html',
      57 } // namespace simdjson
      58 
      59 #endif // SIMDJSON_INTERNAL_NUMBERPARSING_TABLES_H
      -
      We want to support argument-dependent lookup (ADL).
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      diff --git a/object__iterator-inl_8h_source.html b/object__iterator-inl_8h_source.html index 18f906a50..eb3221f3f 100644 --- a/object__iterator-inl_8h_source.html +++ b/object__iterator-inl_8h_source.html @@ -91,137 +91,149 @@ $(document).ready(function(){initNavTree('object__iterator-inl_8h_source.html','
      object_iterator-inl.h
      -
      1 namespace simdjson {
      -
      2 namespace SIMDJSON_IMPLEMENTATION {
      -
      3 namespace ondemand {
      -
      4 
      -
      5 //
      -
      6 // object_iterator
      -
      7 //
      -
      8 
      -
      9 simdjson_inline object_iterator::object_iterator(const value_iterator &_iter) noexcept
      -
      10  : iter{_iter}
      -
      11 {}
      -
      12 
      -
      13 simdjson_inline simdjson_result<field> object_iterator::operator*() noexcept {
      -
      14  error_code error = iter.error();
      -
      15  if (error) { iter.abandon(); return error; }
      -
      16  auto result = field::start(iter);
      -
      17  // TODO this is a safety rail ... users should exit loops as soon as they receive an error.
      -
      18  // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free.
      -
      19  if (result.error()) { iter.abandon(); }
      -
      20  return result;
      -
      21 }
      -
      22 simdjson_inline bool object_iterator::operator==(const object_iterator &other) const noexcept {
      -
      23  return !(*this != other);
      -
      24 }
      -
      25 simdjson_inline bool object_iterator::operator!=(const object_iterator &) const noexcept {
      -
      26  return iter.is_open();
      -
      27 }
      -
      28 
      -
      29 SIMDJSON_PUSH_DISABLE_WARNINGS
      -
      30 SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING
      -
      31 simdjson_inline object_iterator &object_iterator::operator++() noexcept {
      -
      32  // TODO this is a safety rail ... users should exit loops as soon as they receive an error.
      -
      33  // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free.
      -
      34  if (!iter.is_open()) { return *this; } // Iterator will be released if there is an error
      -
      35 
      -
      36  simdjson_unused error_code error;
      -
      37  if ((error = iter.skip_child() )) { return *this; }
      +
      1 #ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H
      +
      2 
      +
      3 #ifndef SIMDJSON_AMALGAMATED
      +
      4 #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H
      +
      5 #include "simdjson/generic/ondemand/base.h"
      +
      6 #include "simdjson/generic/ondemand/object_iterator.h"
      +
      7 #include "simdjson/generic/ondemand/field-inl.h"
      +
      8 #include "simdjson/generic/ondemand/value_iterator-inl.h"
      +
      9 #endif // SIMDJSON_AMALGAMATED
      +
      10 
      +
      11 namespace simdjson {
      +
      12 namespace SIMDJSON_IMPLEMENTATION {
      +
      13 namespace ondemand {
      +
      14 
      +
      15 //
      +
      16 // object_iterator
      +
      17 //
      +
      18 
      +
      19 simdjson_inline object_iterator::object_iterator(const value_iterator &_iter) noexcept
      +
      20  : iter{_iter}
      +
      21 {}
      +
      22 
      +
      23 simdjson_inline simdjson_result<field> object_iterator::operator*() noexcept {
      +
      24  error_code error = iter.error();
      +
      25  if (error) { iter.abandon(); return error; }
      +
      26  auto result = field::start(iter);
      +
      27  // TODO this is a safety rail ... users should exit loops as soon as they receive an error.
      +
      28  // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free.
      +
      29  if (result.error()) { iter.abandon(); }
      +
      30  return result;
      +
      31 }
      +
      32 simdjson_inline bool object_iterator::operator==(const object_iterator &other) const noexcept {
      +
      33  return !(*this != other);
      +
      34 }
      +
      35 simdjson_inline bool object_iterator::operator!=(const object_iterator &) const noexcept {
      +
      36  return iter.is_open();
      +
      37 }
      38 
      -
      39  simdjson_unused bool has_value;
      -
      40  if ((error = iter.has_next_field().get(has_value) )) { return *this; };
      -
      41  return *this;
      -
      42 }
      -
      43 SIMDJSON_POP_DISABLE_WARNINGS
      -
      44 
      -
      45 //
      -
      46 // ### Live States
      -
      47 //
      -
      48 // While iterating or looking up values, depth >= iter.depth. at_start may vary. Error is
      -
      49 // always SUCCESS:
      -
      50 //
      -
      51 // - Start: This is the state when the object is first found and the iterator is just past the {.
      -
      52 // In this state, at_start == true.
      -
      53 // - Next: After we hand a scalar value to the user, or an array/object which they then fully
      -
      54 // iterate over, the iterator is at the , or } before the next value. In this state,
      -
      55 // depth == iter.depth, at_start == false, and error == SUCCESS.
      -
      56 // - Unfinished Business: When we hand an array/object to the user which they do not fully
      -
      57 // iterate over, we need to finish that iteration by skipping child values until we reach the
      -
      58 // Next state. In this state, depth > iter.depth, at_start == false, and error == SUCCESS.
      -
      59 //
      -
      60 // ## Error States
      -
      61 //
      -
      62 // In error states, we will yield exactly one more value before stopping. iter.depth == depth
      -
      63 // and at_start is always false. We decrement after yielding the error, moving to the Finished
      -
      64 // state.
      -
      65 //
      -
      66 // - Chained Error: When the object iterator is part of an error chain--for example, in
      -
      67 // `for (auto tweet : doc["tweets"])`, where the tweet field may be missing or not be an
      -
      68 // object--we yield that error in the loop, exactly once. In this state, error != SUCCESS and
      -
      69 // iter.depth == depth, and at_start == false. We decrement depth when we yield the error.
      -
      70 // - Missing Comma Error: When the iterator ++ method discovers there is no comma between fields,
      -
      71 // we flag that as an error and treat it exactly the same as a Chained Error. In this state,
      -
      72 // error == TAPE_ERROR, iter.depth == depth, and at_start == false.
      -
      73 //
      -
      74 // Errors that occur while reading a field to give to the user (such as when the key is not a
      -
      75 // string or the field is missing a colon) are yielded immediately. Depth is then decremented,
      -
      76 // moving to the Finished state without transitioning through an Error state at all.
      -
      77 //
      -
      78 // ## Terminal State
      -
      79 //
      -
      80 // The terminal state has iter.depth < depth. at_start is always false.
      -
      81 //
      -
      82 // - Finished: When we have reached a }, we are finished. We signal this by decrementing depth.
      -
      83 // In this state, iter.depth < depth, at_start == false, and error == SUCCESS.
      -
      84 //
      -
      85 
      -
      86 } // namespace ondemand
      -
      87 } // namespace SIMDJSON_IMPLEMENTATION
      -
      88 } // namespace simdjson
      -
      89 
      -
      90 namespace simdjson {
      -
      91 
      -
      92 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>::simdjson_result(
      -
      93  SIMDJSON_IMPLEMENTATION::ondemand::object_iterator &&value
      -
      94 ) noexcept
      -
      95  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>(value))
      -
      96 {
      -
      97  first.iter.assert_is_valid();
      -
      98 }
      -
      99 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>::simdjson_result(error_code error) noexcept
      -
      100  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>({}, error)
      -
      101 {
      -
      102 }
      -
      103 
      -
      104 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>::operator*() noexcept {
      -
      105  if (error()) { return error(); }
      -
      106  return *first;
      -
      107 }
      -
      108 // If we're iterating and there is an error, return the error once.
      -
      109 simdjson_inline bool simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>::operator==(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> &other) const noexcept {
      -
      110  if (!first.iter.is_valid()) { return !error(); }
      -
      111  return first == other.first;
      +
      39 SIMDJSON_PUSH_DISABLE_WARNINGS
      +
      40 SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING
      +
      41 simdjson_inline object_iterator &object_iterator::operator++() noexcept {
      +
      42  // TODO this is a safety rail ... users should exit loops as soon as they receive an error.
      +
      43  // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free.
      +
      44  if (!iter.is_open()) { return *this; } // Iterator will be released if there is an error
      +
      45 
      +
      46  simdjson_unused error_code error;
      +
      47  if ((error = iter.skip_child() )) { return *this; }
      +
      48 
      +
      49  simdjson_unused bool has_value;
      +
      50  if ((error = iter.has_next_field().get(has_value) )) { return *this; };
      +
      51  return *this;
      +
      52 }
      +
      53 SIMDJSON_POP_DISABLE_WARNINGS
      +
      54 
      +
      55 //
      +
      56 // ### Live States
      +
      57 //
      +
      58 // While iterating or looking up values, depth >= iter.depth. at_start may vary. Error is
      +
      59 // always SUCCESS:
      +
      60 //
      +
      61 // - Start: This is the state when the object is first found and the iterator is just past the {.
      +
      62 // In this state, at_start == true.
      +
      63 // - Next: After we hand a scalar value to the user, or an array/object which they then fully
      +
      64 // iterate over, the iterator is at the , or } before the next value. In this state,
      +
      65 // depth == iter.depth, at_start == false, and error == SUCCESS.
      +
      66 // - Unfinished Business: When we hand an array/object to the user which they do not fully
      +
      67 // iterate over, we need to finish that iteration by skipping child values until we reach the
      +
      68 // Next state. In this state, depth > iter.depth, at_start == false, and error == SUCCESS.
      +
      69 //
      +
      70 // ## Error States
      +
      71 //
      +
      72 // In error states, we will yield exactly one more value before stopping. iter.depth == depth
      +
      73 // and at_start is always false. We decrement after yielding the error, moving to the Finished
      +
      74 // state.
      +
      75 //
      +
      76 // - Chained Error: When the object iterator is part of an error chain--for example, in
      +
      77 // `for (auto tweet : doc["tweets"])`, where the tweet field may be missing or not be an
      +
      78 // object--we yield that error in the loop, exactly once. In this state, error != SUCCESS and
      +
      79 // iter.depth == depth, and at_start == false. We decrement depth when we yield the error.
      +
      80 // - Missing Comma Error: When the iterator ++ method discovers there is no comma between fields,
      +
      81 // we flag that as an error and treat it exactly the same as a Chained Error. In this state,
      +
      82 // error == TAPE_ERROR, iter.depth == depth, and at_start == false.
      +
      83 //
      +
      84 // Errors that occur while reading a field to give to the user (such as when the key is not a
      +
      85 // string or the field is missing a colon) are yielded immediately. Depth is then decremented,
      +
      86 // moving to the Finished state without transitioning through an Error state at all.
      +
      87 //
      +
      88 // ## Terminal State
      +
      89 //
      +
      90 // The terminal state has iter.depth < depth. at_start is always false.
      +
      91 //
      +
      92 // - Finished: When we have reached a }, we are finished. We signal this by decrementing depth.
      +
      93 // In this state, iter.depth < depth, at_start == false, and error == SUCCESS.
      +
      94 //
      +
      95 
      +
      96 } // namespace ondemand
      +
      97 } // namespace SIMDJSON_IMPLEMENTATION
      +
      98 } // namespace simdjson
      +
      99 
      +
      100 namespace simdjson {
      +
      101 
      +
      102 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>::simdjson_result(
      +
      103  SIMDJSON_IMPLEMENTATION::ondemand::object_iterator &&value
      +
      104 ) noexcept
      +
      105  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>(value))
      +
      106 {
      +
      107  first.iter.assert_is_valid();
      +
      108 }
      +
      109 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>::simdjson_result(error_code error) noexcept
      +
      110  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>({}, error)
      +
      111 {
      112 }
      -
      113 // If we're iterating and there is an error, return the error once.
      -
      114 simdjson_inline bool simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>::operator!=(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> &other) const noexcept {
      -
      115  if (!first.iter.is_valid()) { return error(); }
      -
      116  return first != other.first;
      +
      113 
      +
      114 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>::operator*() noexcept {
      +
      115  if (error()) { return error(); }
      +
      116  return *first;
      117 }
      -
      118 // Checks for ']' and ','
      -
      119 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> &simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>::operator++() noexcept {
      -
      120  // Clear the error if there is one, so we don't yield it twice
      -
      121  if (error()) { second = SUCCESS; return *this; }
      -
      122  ++first;
      -
      123  return *this;
      -
      124 }
      -
      125 
      -
      126 } // namespace simdjson
      +
      118 // If we're iterating and there is an error, return the error once.
      +
      119 simdjson_inline bool simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>::operator==(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> &other) const noexcept {
      +
      120  if (!first.iter.is_valid()) { return !error(); }
      +
      121  return first == other.first;
      +
      122 }
      +
      123 // If we're iterating and there is an error, return the error once.
      +
      124 simdjson_inline bool simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>::operator!=(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> &other) const noexcept {
      +
      125  if (!first.iter.is_valid()) { return error(); }
      +
      126  return first != other.first;
      +
      127 }
      +
      128 // Checks for ']' and ','
      +
      129 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> &simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator>::operator++() noexcept {
      +
      130  // Clear the error if there is one, so we don't yield it twice
      +
      131  if (error()) { second = SUCCESS; return *this; }
      +
      132  ++first;
      +
      133  return *this;
      +
      134 }
      +
      135 
      +
      136 } // namespace simdjson
      +
      137 
      +
      138 #endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H
      simdjson_inline object_iterator() noexcept=default
      Create a new invalid object_iterator.
      -
      We want to support argument-dependent lookup (ADL).
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      error_code
      All possible errors returned by simdjson.
      Definition: error.h:17
      @ SUCCESS
      No error.
      Definition: error.h:18
      -
      simdjson_inline error_code error() const noexcept
      The error.
      Definition: error-inl.h:132
      +
      simdjson_inline error_code error() const noexcept
      The error.
      Definition: error-inl.h:131
      diff --git a/object__iterator_8h_source.html b/object__iterator_8h_source.html index 6e6fd89a9..f9637edba 100644 --- a/object__iterator_8h_source.html +++ b/object__iterator_8h_source.html @@ -91,79 +91,86 @@ $(document).ready(function(){initNavTree('object__iterator_8h_source.html','');
      object_iterator.h
      -
      1 #include "simdjson/error.h"
      +
      1 #ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H
      2 
      -
      3 namespace simdjson {
      -
      4 namespace SIMDJSON_IMPLEMENTATION {
      -
      5 namespace ondemand {
      -
      6 
      -
      7 class field;
      -
      8 
      - -
      10 public:
      -
      16  simdjson_inline object_iterator() noexcept = default;
      -
      17 
      -
      18  //
      -
      19  // Iterator interface
      -
      20  //
      -
      21 
      -
      22  // Reads key and value, yielding them to the user.
      -
      23  // MUST ONLY BE CALLED ONCE PER ITERATION.
      -
      24  simdjson_inline simdjson_result<field> operator*() noexcept;
      -
      25  // Assumes it's being compared with the end. true if depth < iter->depth.
      -
      26  simdjson_inline bool operator==(const object_iterator &) const noexcept;
      -
      27  // Assumes it's being compared with the end. true if depth >= iter->depth.
      -
      28  simdjson_inline bool operator!=(const object_iterator &) const noexcept;
      -
      29  // Checks for ']' and ','
      -
      30  simdjson_inline object_iterator &operator++() noexcept;
      -
      31 
      -
      32 private:
      -
      39  value_iterator iter{};
      -
      40 
      -
      41  simdjson_inline object_iterator(const value_iterator &iter) noexcept;
      -
      42  friend struct simdjson_result<object_iterator>;
      -
      43  friend class object;
      -
      44 };
      +
      3 #ifndef SIMDJSON_AMALGAMATED
      +
      4 #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H
      +
      5 #include "simdjson/generic/ondemand/base.h"
      +
      6 #include "simdjson/generic/implementation_simdjson_result_base.h"
      +
      7 #include "simdjson/generic/ondemand/value_iterator.h"
      +
      8 #endif // SIMDJSON_AMALGAMATED
      +
      9 
      +
      10 namespace simdjson {
      +
      11 namespace SIMDJSON_IMPLEMENTATION {
      +
      12 namespace ondemand {
      +
      13 
      + +
      15 public:
      +
      21  simdjson_inline object_iterator() noexcept = default;
      +
      22 
      +
      23  //
      +
      24  // Iterator interface
      +
      25  //
      +
      26 
      +
      27  // Reads key and value, yielding them to the user.
      +
      28  // MUST ONLY BE CALLED ONCE PER ITERATION.
      +
      29  simdjson_inline simdjson_result<field> operator*() noexcept;
      +
      30  // Assumes it's being compared with the end. true if depth < iter->depth.
      +
      31  simdjson_inline bool operator==(const object_iterator &) const noexcept;
      +
      32  // Assumes it's being compared with the end. true if depth >= iter->depth.
      +
      33  simdjson_inline bool operator!=(const object_iterator &) const noexcept;
      +
      34  // Checks for ']' and ','
      +
      35  simdjson_inline object_iterator &operator++() noexcept;
      +
      36 
      +
      37 private:
      +
      44  value_iterator iter{};
      45 
      -
      46 } // namespace ondemand
      -
      47 } // namespace SIMDJSON_IMPLEMENTATION
      -
      48 } // namespace simdjson
      -
      49 
      -
      50 namespace simdjson {
      -
      51 
      -
      52 template<>
      -
      53 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> {
      -
      54 public:
      - -
      56  simdjson_inline simdjson_result(error_code error) noexcept;
      -
      57  simdjson_inline simdjson_result() noexcept = default;
      -
      58 
      -
      59  //
      -
      60  // Iterator interface
      -
      61  //
      -
      62 
      -
      63  // Reads key and value, yielding them to the user.
      -
      64  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field> operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION.
      -
      65  // Assumes it's being compared with the end. true if depth < iter->depth.
      -
      66  simdjson_inline bool operator==(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> &) const noexcept;
      -
      67  // Assumes it's being compared with the end. true if depth >= iter->depth.
      -
      68  simdjson_inline bool operator!=(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> &) const noexcept;
      -
      69  // Checks for ']' and ','
      -
      70  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> &operator++() noexcept;
      -
      71 };
      -
      72 
      -
      73 } // namespace simdjson
      -
      A JSON field (key/value pair) in an object.
      Definition: field.h:14
      - +
      46  simdjson_inline object_iterator(const value_iterator &iter) noexcept;
      +
      47  friend struct simdjson_result<object_iterator>;
      +
      48  friend class object;
      +
      49 };
      +
      50 
      +
      51 } // namespace ondemand
      +
      52 } // namespace SIMDJSON_IMPLEMENTATION
      +
      53 } // namespace simdjson
      +
      54 
      +
      55 namespace simdjson {
      +
      56 
      +
      57 template<>
      +
      58 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> {
      +
      59 public:
      + +
      61  simdjson_inline simdjson_result(error_code error) noexcept;
      +
      62  simdjson_inline simdjson_result() noexcept = default;
      +
      63 
      +
      64  //
      +
      65  // Iterator interface
      +
      66  //
      +
      67 
      +
      68  // Reads key and value, yielding them to the user.
      +
      69  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::field> operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION.
      +
      70  // Assumes it's being compared with the end. true if depth < iter->depth.
      +
      71  simdjson_inline bool operator==(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> &) const noexcept;
      +
      72  // Assumes it's being compared with the end. true if depth >= iter->depth.
      +
      73  simdjson_inline bool operator!=(const simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> &) const noexcept;
      +
      74  // Checks for ']' and ','
      +
      75  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object_iterator> &operator++() noexcept;
      +
      76 };
      +
      77 
      +
      78 } // namespace simdjson
      +
      79 
      +
      80 #endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H
      +
      A JSON field (key/value pair) in an object.
      Definition: field.h:22
      +
      simdjson_inline object_iterator() noexcept=default
      Create a new invalid object_iterator.
      -
      A forward-only JSON object field iterator.
      Definition: object.h:10
      -
      We want to support argument-dependent lookup (ADL).
      +
      A forward-only JSON object field iterator.
      Definition: object.h:17
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      error_code
      All possible errors returned by simdjson.
      Definition: error.h:17
      - - - + + +
      The result of a simdjson operation that could fail.
      Definition: error.h:205
      -
      simdjson_inline error_code error() const noexcept
      The error.
      Definition: error-inl.h:132
      +
      simdjson_inline error_code error() const noexcept
      The error.
      Definition: error-inl.h:131
      simdjson_inline T & value() &noexcept(false)
      Get the result value.
      diff --git a/ondemand_2amalgamated_8h_source.html b/ondemand_2amalgamated_8h_source.html new file mode 100644 index 000000000..e7f90c55f --- /dev/null +++ b/ondemand_2amalgamated_8h_source.html @@ -0,0 +1,146 @@ + + + + + + + +simdjson: include/simdjson/generic/ondemand/amalgamated.h Source File + + + + + + + + + + + + + + + + +
      +
      + + + + + + + +
      +
      simdjson +  3.2.1 +
      +
      Ridiculously Fast JSON
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      +
      +
      amalgamated.h
      +
      +
      +
      1 #if defined(SIMDJSON_AMALGAMATED) && !defined(SIMDJSON_GENERIC_ONDEMAND_DEPENDENCIES_H)
      +
      2 #error simdjson/generic/ondemand/dependencies.h must be included before simdjson/generic/ondemand/amalgamated.h!
      +
      3 #endif
      +
      4 
      +
      5 // Stuff other things depend on
      +
      6 #include "simdjson/generic/ondemand/base.h"
      +
      7 #include "simdjson/generic/ondemand/value_iterator.h"
      +
      8 #include "simdjson/generic/ondemand/value.h"
      +
      9 #include "simdjson/generic/ondemand/logger.h"
      +
      10 #include "simdjson/generic/ondemand/token_iterator.h"
      +
      11 #include "simdjson/generic/ondemand/json_iterator.h"
      +
      12 #include "simdjson/generic/ondemand/json_type.h"
      +
      13 #include "simdjson/generic/ondemand/raw_json_string.h"
      +
      14 #include "simdjson/generic/ondemand/parser.h"
      +
      15 
      +
      16 // All other declarations
      +
      17 #include "simdjson/generic/ondemand/array.h"
      +
      18 #include "simdjson/generic/ondemand/array_iterator.h"
      +
      19 #include "simdjson/generic/ondemand/document.h"
      +
      20 #include "simdjson/generic/ondemand/document_stream.h"
      +
      21 #include "simdjson/generic/ondemand/field.h"
      +
      22 #include "simdjson/generic/ondemand/object.h"
      +
      23 #include "simdjson/generic/ondemand/object_iterator.h"
      +
      24 #include "simdjson/generic/ondemand/serialization.h"
      +
      25 
      +
      26 // Inline definitions
      +
      27 #include "simdjson/generic/ondemand/array-inl.h"
      +
      28 #include "simdjson/generic/ondemand/array_iterator-inl.h"
      +
      29 #include "simdjson/generic/ondemand/document-inl.h"
      +
      30 #include "simdjson/generic/ondemand/document_stream-inl.h"
      +
      31 #include "simdjson/generic/ondemand/field-inl.h"
      +
      32 #include "simdjson/generic/ondemand/json_iterator-inl.h"
      +
      33 #include "simdjson/generic/ondemand/json_type-inl.h"
      +
      34 #include "simdjson/generic/ondemand/logger-inl.h"
      +
      35 #include "simdjson/generic/ondemand/object-inl.h"
      +
      36 #include "simdjson/generic/ondemand/object_iterator-inl.h"
      +
      37 #include "simdjson/generic/ondemand/parser-inl.h"
      +
      38 #include "simdjson/generic/ondemand/raw_json_string-inl.h"
      +
      39 #include "simdjson/generic/ondemand/serialization-inl.h"
      +
      40 #include "simdjson/generic/ondemand/token_iterator-inl.h"
      +
      41 #include "simdjson/generic/ondemand/value-inl.h"
      +
      42 #include "simdjson/generic/ondemand/value_iterator-inl.h"
      +
      +
      + + + + diff --git a/implementation-base_8h_source.html b/ondemand_2dependencies_8h_source.html similarity index 67% rename from implementation-base_8h_source.html rename to ondemand_2dependencies_8h_source.html index 0c74a4d0d..b44bb15d8 100644 --- a/implementation-base_8h_source.html +++ b/ondemand_2dependencies_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/implementation-base.h Source File +simdjson: include/simdjson/generic/ondemand/dependencies.h Source File @@ -68,7 +68,7 @@ $(function() {
      @@ -88,31 +88,32 @@ $(document).ready(function(){initNavTree('implementation-base_8h_source.html',''
      -
      implementation-base.h
      +
      dependencies.h
      -Go to the documentation of this file.
      1 #ifndef SIMDJSON_IMPLEMENTATION_BASE_H
      -
      2 #define SIMDJSON_IMPLEMENTATION_BASE_H
      -
      3 
      -
      10 #include "simdjson/base.h"
      -
      11 #include "simdjson/implementation.h"
      -
      12 
      -
      13 // Implementation-internal files (must be included before the implementations themselves, to keep
      -
      14 // amalgamation working--otherwise, the first time a file is included, it might be put inside the
      -
      15 // #ifdef SIMDJSON_IMPLEMENTATION_ARM64/FALLBACK/etc., which means the other implementations can't
      -
      16 // compile unless that implementation is turned on).
      -
      17 #include "simdjson/internal/isadetection.h"
      -
      18 #include "simdjson/internal/jsoncharutils_tables.h"
      -
      19 #include "simdjson/internal/numberparsing_tables.h"
      -
      20 #include "simdjson/internal/simdprune_tables.h"
      -
      21 
      -
      22 #endif // SIMDJSON_IMPLEMENTATION_BASE_H
      +
      1 #ifdef SIMDJSON_AMALGAMATED
      +
      2 #error simdjson/generic/ondemand/dependencies.h must be included before defining SIMDJSON_AMALGAMATED!
      +
      3 #endif
      +
      4 
      +
      5 #ifndef SIMDJSON_GENERIC_ONDEMAND_DEPENDENCIES_H
      +
      6 #define SIMDJSON_GENERIC_ONDEMAND_DEPENDENCIES_H
      +
      7 
      +
      8 // Internal headers needed for ondemand generics.
      +
      9 // All includes not under simdjson/generic/ondemand must be here!
      +
      10 // Otherwise, amalgamation will fail.
      +
      11 #include "simdjson/padded_string.h"
      +
      12 #include "simdjson/padded_string_view.h"
      +
      13 #include "simdjson/dom/base.h" // for MINIMAL_DOCUMENT_CAPACITY
      +
      14 #include "simdjson/internal/jsoncharutils_tables.h"
      +
      15 #include "simdjson/internal/numberparsing_tables.h"
      +
      16 
      +
      17 #endif // SIMDJSON_GENERIC_ONDEMAND_DEPENDENCIES_H
      diff --git a/ondemand_8h_source.html b/ondemand_8h_source.html index b97b3f08d..351ae8c45 100644 --- a/ondemand_8h_source.html +++ b/ondemand_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/generic/ondemand.h Source File +simdjson: include/simdjson/ondemand.h Source File @@ -91,43 +91,23 @@ $(document).ready(function(){initNavTree('ondemand_8h_source.html',''); initResi
      ondemand.h
      -
      1 namespace simdjson {
      -
      2 namespace SIMDJSON_IMPLEMENTATION {
      -
      8 namespace ondemand {
      -
      9 
      -
      11 using depth_t = int32_t;
      +
      1 #ifndef SIMDJSON_ONDEMAND_H
      +
      2 #define SIMDJSON_ONDEMAND_H
      +
      3 
      +
      4 #include "simdjson/builtin/ondemand.h"
      +
      5 
      +
      6 namespace simdjson {
      +
      10  namespace ondemand = builtin::ondemand;
      +
      11 } // namespace simdjson
      12 
      -
      14 using number_type = simdjson::SIMDJSON_IMPLEMENTATION::numberparsing::number_type;
      -
      15 
      -
      16 } // namespace ondemand
      -
      17 } // namespace SIMDJSON_IMPLEMENTATION
      -
      18 } // namespace simdjson
      -
      19 
      -
      20 #include "simdjson/generic/ondemand/json_type.h"
      -
      21 #include "simdjson/generic/ondemand/token_position.h"
      -
      22 #include "simdjson/generic/ondemand/logger.h"
      -
      23 #include "simdjson/generic/ondemand/raw_json_string.h"
      -
      24 #include "simdjson/generic/ondemand/token_iterator.h"
      -
      25 #include "simdjson/generic/ondemand/json_iterator.h"
      -
      26 #include "simdjson/generic/ondemand/value_iterator.h"
      -
      27 #include "simdjson/generic/ondemand/array_iterator.h"
      -
      28 #include "simdjson/generic/ondemand/object_iterator.h"
      -
      29 #include "simdjson/generic/ondemand/array.h"
      -
      30 #include "simdjson/generic/ondemand/document.h"
      -
      31 #include "simdjson/generic/ondemand/value.h"
      -
      32 #include "simdjson/generic/ondemand/field.h"
      -
      33 #include "simdjson/generic/ondemand/object.h"
      -
      34 #include "simdjson/generic/ondemand/parser.h"
      -
      35 #include "simdjson/generic/ondemand/document_stream.h"
      -
      36 #include "simdjson/generic/ondemand/serialization.h"
      -
      int32_t depth_t
      Represents the depth of a JSON value (number of nested arrays/objects).
      Definition: ondemand.h:11
      -
      We want to support argument-dependent lookup (ADL).
      +
      13 #endif // SIMDJSON_ONDEMAND_H
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      diff --git a/padded__string-inl_8h_source.html b/padded__string-inl_8h_source.html index f21ac333b..92006c2c2 100644 --- a/padded__string-inl_8h_source.html +++ b/padded__string-inl_8h_source.html @@ -94,188 +94,185 @@ $(document).ready(function(){initNavTree('padded__string-inl_8h_source.html','')
      1 #ifndef SIMDJSON_INLINE_PADDED_STRING_H
      2 #define SIMDJSON_INLINE_PADDED_STRING_H
      3 
      -
      4 #include "simdjson/portability.h"
      -
      5 #include "simdjson/common_defs.h" // for SIMDJSON_PADDING
      +
      4 #include "simdjson/padded_string.h"
      +
      5 #include "simdjson/padded_string_view.h"
      6 
      7 #include <climits>
      -
      8 #include <cstring>
      -
      9 #include <memory>
      -
      10 #include <string>
      +
      8 
      +
      9 namespace simdjson {
      +
      10 namespace internal {
      11 
      -
      12 namespace simdjson {
      -
      13 namespace internal {
      -
      14 
      -
      15 // The allocate_padded_buffer function is a low-level function to allocate memory
      -
      16 // with padding so we can read past the "length" bytes safely. It is used by
      -
      17 // the padded_string class automatically. It returns nullptr in case
      -
      18 // of error: the caller should check for a null pointer.
      -
      19 // The length parameter is the maximum size in bytes of the string.
      -
      20 // The caller is responsible to free the memory (e.g., delete[] (...)).
      -
      21 inline char *allocate_padded_buffer(size_t length) noexcept {
      -
      22  const size_t totalpaddedlength = length + SIMDJSON_PADDING;
      -
      23  if(totalpaddedlength<length) {
      -
      24  // overflow
      -
      25  return nullptr;
      -
      26  }
      -
      27 #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
      -
      28  // avoid getting out of memory
      -
      29  if (totalpaddedlength>(1UL<<20)) {
      -
      30  return nullptr;
      -
      31  }
      -
      32 #endif
      -
      33 
      -
      34  char *padded_buffer = new (std::nothrow) char[totalpaddedlength];
      -
      35  if (padded_buffer == nullptr) {
      -
      36  return nullptr;
      -
      37  }
      -
      38  // We write nulls in the padded region to avoid having uninitialized
      -
      39  // content which may trigger warning for some sanitizers
      -
      40  std::memset(padded_buffer + length, 0, totalpaddedlength - length);
      -
      41  return padded_buffer;
      -
      42 } // allocate_padded_buffer()
      +
      12 // The allocate_padded_buffer function is a low-level function to allocate memory
      +
      13 // with padding so we can read past the "length" bytes safely. It is used by
      +
      14 // the padded_string class automatically. It returns nullptr in case
      +
      15 // of error: the caller should check for a null pointer.
      +
      16 // The length parameter is the maximum size in bytes of the string.
      +
      17 // The caller is responsible to free the memory (e.g., delete[] (...)).
      +
      18 inline char *allocate_padded_buffer(size_t length) noexcept {
      +
      19  const size_t totalpaddedlength = length + SIMDJSON_PADDING;
      +
      20  if(totalpaddedlength<length) {
      +
      21  // overflow
      +
      22  return nullptr;
      +
      23  }
      +
      24 #ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
      +
      25  // avoid getting out of memory
      +
      26  if (totalpaddedlength>(1UL<<20)) {
      +
      27  return nullptr;
      +
      28  }
      +
      29 #endif
      +
      30 
      +
      31  char *padded_buffer = new (std::nothrow) char[totalpaddedlength];
      +
      32  if (padded_buffer == nullptr) {
      +
      33  return nullptr;
      +
      34  }
      +
      35  // We write nulls in the padded region to avoid having uninitialized
      +
      36  // content which may trigger warning for some sanitizers
      +
      37  std::memset(padded_buffer + length, 0, totalpaddedlength - length);
      +
      38  return padded_buffer;
      +
      39 } // allocate_padded_buffer()
      +
      40 
      +
      41 } // namespace internal
      +
      42 
      43 
      -
      44 } // namespace internal
      -
      45 
      -
      46 
      -
      47 inline padded_string::padded_string() noexcept = default;
      -
      48 inline padded_string::padded_string(size_t length) noexcept
      +
      44 inline padded_string::padded_string() noexcept = default;
      +
      45 inline padded_string::padded_string(size_t length) noexcept
      +
      46  : viable_size(length), data_ptr(internal::allocate_padded_buffer(length)) {
      +
      47 }
      +
      48 inline padded_string::padded_string(const char *data, size_t length) noexcept
      49  : viable_size(length), data_ptr(internal::allocate_padded_buffer(length)) {
      -
      50 }
      -
      51 inline padded_string::padded_string(const char *data, size_t length) noexcept
      -
      52  : viable_size(length), data_ptr(internal::allocate_padded_buffer(length)) {
      -
      53  if ((data != nullptr) && (data_ptr != nullptr)) {
      -
      54  std::memcpy(data_ptr, data, length);
      -
      55  }
      -
      56 }
      -
      57 // note: do not pass std::string arguments by value
      -
      58 inline padded_string::padded_string(const std::string & str_ ) noexcept
      -
      59  : viable_size(str_.size()), data_ptr(internal::allocate_padded_buffer(str_.size())) {
      -
      60  if (data_ptr != nullptr) {
      -
      61  std::memcpy(data_ptr, str_.data(), str_.size());
      -
      62  }
      -
      63 }
      -
      64 // note: do pass std::string_view arguments by value
      -
      65 inline padded_string::padded_string(std::string_view sv_) noexcept
      -
      66  : viable_size(sv_.size()), data_ptr(internal::allocate_padded_buffer(sv_.size())) {
      -
      67  if(simdjson_unlikely(!data_ptr)) {
      -
      68  //allocation failed or zero size
      -
      69  viable_size = 0;
      -
      70  return;
      +
      50  if ((data != nullptr) && (data_ptr != nullptr)) {
      +
      51  std::memcpy(data_ptr, data, length);
      +
      52  }
      +
      53 }
      +
      54 // note: do not pass std::string arguments by value
      +
      55 inline padded_string::padded_string(const std::string & str_ ) noexcept
      +
      56  : viable_size(str_.size()), data_ptr(internal::allocate_padded_buffer(str_.size())) {
      +
      57  if (data_ptr != nullptr) {
      +
      58  std::memcpy(data_ptr, str_.data(), str_.size());
      +
      59  }
      +
      60 }
      +
      61 // note: do pass std::string_view arguments by value
      +
      62 inline padded_string::padded_string(std::string_view sv_) noexcept
      +
      63  : viable_size(sv_.size()), data_ptr(internal::allocate_padded_buffer(sv_.size())) {
      +
      64  if(simdjson_unlikely(!data_ptr)) {
      +
      65  //allocation failed or zero size
      +
      66  viable_size = 0;
      +
      67  return;
      +
      68  }
      +
      69  if (sv_.size()) {
      +
      70  std::memcpy(data_ptr, sv_.data(), sv_.size());
      71  }
      -
      72  if (sv_.size()) {
      -
      73  std::memcpy(data_ptr, sv_.data(), sv_.size());
      -
      74  }
      -
      75 }
      - -
      77  : viable_size(o.viable_size), data_ptr(o.data_ptr) {
      -
      78  o.data_ptr = nullptr; // we take ownership
      -
      79 }
      -
      80 
      - -
      82  delete[] data_ptr;
      -
      83  data_ptr = o.data_ptr;
      -
      84  viable_size = o.viable_size;
      -
      85  o.data_ptr = nullptr; // we take ownership
      -
      86  o.viable_size = 0;
      -
      87  return *this;
      -
      88 }
      -
      89 
      -
      90 inline void padded_string::swap(padded_string &o) noexcept {
      -
      91  size_t tmp_viable_size = viable_size;
      -
      92  char *tmp_data_ptr = data_ptr;
      -
      93  viable_size = o.viable_size;
      -
      94  data_ptr = o.data_ptr;
      -
      95  o.data_ptr = tmp_data_ptr;
      -
      96  o.viable_size = tmp_viable_size;
      -
      97 }
      -
      98 
      -
      99 inline padded_string::~padded_string() noexcept {
      -
      100  delete[] data_ptr;
      -
      101 }
      -
      102 
      -
      103 inline size_t padded_string::size() const noexcept { return viable_size; }
      -
      104 
      -
      105 inline size_t padded_string::length() const noexcept { return viable_size; }
      -
      106 
      -
      107 inline const char *padded_string::data() const noexcept { return data_ptr; }
      -
      108 
      -
      109 inline char *padded_string::data() noexcept { return data_ptr; }
      -
      110 
      -
      111 inline padded_string::operator std::string_view() const { return std::string_view(data(), length()); }
      -
      112 
      -
      113 inline padded_string::operator padded_string_view() const noexcept {
      -
      114  return padded_string_view(data(), length(), length() + SIMDJSON_PADDING);
      -
      115 }
      -
      116 
      -
      117 inline simdjson_result<padded_string> padded_string::load(std::string_view filename) noexcept {
      -
      118  // Open the file
      -
      119  SIMDJSON_PUSH_DISABLE_WARNINGS
      -
      120  SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe
      -
      121  std::FILE *fp = std::fopen(filename.data(), "rb");
      -
      122  SIMDJSON_POP_DISABLE_WARNINGS
      -
      123 
      -
      124  if (fp == nullptr) {
      -
      125  return IO_ERROR;
      -
      126  }
      -
      127 
      -
      128  // Get the file size
      -
      129  int ret;
      -
      130 #if SIMDJSON_VISUAL_STUDIO && !SIMDJSON_IS_32BITS
      -
      131  ret = _fseeki64(fp, 0, SEEK_END);
      -
      132 #else
      -
      133  ret = std::fseek(fp, 0, SEEK_END);
      -
      134 #endif // _WIN64
      -
      135  if(ret < 0) {
      -
      136  std::fclose(fp);
      -
      137  return IO_ERROR;
      -
      138  }
      -
      139 #if SIMDJSON_VISUAL_STUDIO && !SIMDJSON_IS_32BITS
      -
      140  __int64 llen = _ftelli64(fp);
      -
      141  if(llen == -1L) {
      -
      142  std::fclose(fp);
      -
      143  return IO_ERROR;
      -
      144  }
      -
      145 #else
      -
      146  long llen = std::ftell(fp);
      -
      147  if((llen < 0) || (llen == LONG_MAX)) {
      -
      148  std::fclose(fp);
      -
      149  return IO_ERROR;
      -
      150  }
      -
      151 #endif
      -
      152 
      -
      153  // Allocate the padded_string
      -
      154  size_t len = static_cast<size_t>(llen);
      -
      155  padded_string s(len);
      -
      156  if (s.data() == nullptr) {
      -
      157  std::fclose(fp);
      -
      158  return MEMALLOC;
      -
      159  }
      -
      160 
      -
      161  // Read the padded_string
      -
      162  std::rewind(fp);
      -
      163  size_t bytes_read = std::fread(s.data(), 1, len, fp);
      -
      164  if (std::fclose(fp) != 0 || bytes_read != len) {
      -
      165  return IO_ERROR;
      -
      166  }
      +
      72 }
      + +
      74  : viable_size(o.viable_size), data_ptr(o.data_ptr) {
      +
      75  o.data_ptr = nullptr; // we take ownership
      +
      76 }
      +
      77 
      + +
      79  delete[] data_ptr;
      +
      80  data_ptr = o.data_ptr;
      +
      81  viable_size = o.viable_size;
      +
      82  o.data_ptr = nullptr; // we take ownership
      +
      83  o.viable_size = 0;
      +
      84  return *this;
      +
      85 }
      +
      86 
      +
      87 inline void padded_string::swap(padded_string &o) noexcept {
      +
      88  size_t tmp_viable_size = viable_size;
      +
      89  char *tmp_data_ptr = data_ptr;
      +
      90  viable_size = o.viable_size;
      +
      91  data_ptr = o.data_ptr;
      +
      92  o.data_ptr = tmp_data_ptr;
      +
      93  o.viable_size = tmp_viable_size;
      +
      94 }
      +
      95 
      +
      96 inline padded_string::~padded_string() noexcept {
      +
      97  delete[] data_ptr;
      +
      98 }
      +
      99 
      +
      100 inline size_t padded_string::size() const noexcept { return viable_size; }
      +
      101 
      +
      102 inline size_t padded_string::length() const noexcept { return viable_size; }
      +
      103 
      +
      104 inline const char *padded_string::data() const noexcept { return data_ptr; }
      +
      105 
      +
      106 inline char *padded_string::data() noexcept { return data_ptr; }
      +
      107 
      +
      108 inline padded_string::operator std::string_view() const { return std::string_view(data(), length()); }
      +
      109 
      +
      110 inline padded_string::operator padded_string_view() const noexcept {
      +
      111  return padded_string_view(data(), length(), length() + SIMDJSON_PADDING);
      +
      112 }
      +
      113 
      +
      114 inline simdjson_result<padded_string> padded_string::load(std::string_view filename) noexcept {
      +
      115  // Open the file
      +
      116  SIMDJSON_PUSH_DISABLE_WARNINGS
      +
      117  SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe
      +
      118  std::FILE *fp = std::fopen(filename.data(), "rb");
      +
      119  SIMDJSON_POP_DISABLE_WARNINGS
      +
      120 
      +
      121  if (fp == nullptr) {
      +
      122  return IO_ERROR;
      +
      123  }
      +
      124 
      +
      125  // Get the file size
      +
      126  int ret;
      +
      127 #if SIMDJSON_VISUAL_STUDIO && !SIMDJSON_IS_32BITS
      +
      128  ret = _fseeki64(fp, 0, SEEK_END);
      +
      129 #else
      +
      130  ret = std::fseek(fp, 0, SEEK_END);
      +
      131 #endif // _WIN64
      +
      132  if(ret < 0) {
      +
      133  std::fclose(fp);
      +
      134  return IO_ERROR;
      +
      135  }
      +
      136 #if SIMDJSON_VISUAL_STUDIO && !SIMDJSON_IS_32BITS
      +
      137  __int64 llen = _ftelli64(fp);
      +
      138  if(llen == -1L) {
      +
      139  std::fclose(fp);
      +
      140  return IO_ERROR;
      +
      141  }
      +
      142 #else
      +
      143  long llen = std::ftell(fp);
      +
      144  if((llen < 0) || (llen == LONG_MAX)) {
      +
      145  std::fclose(fp);
      +
      146  return IO_ERROR;
      +
      147  }
      +
      148 #endif
      +
      149 
      +
      150  // Allocate the padded_string
      +
      151  size_t len = static_cast<size_t>(llen);
      +
      152  padded_string s(len);
      +
      153  if (s.data() == nullptr) {
      +
      154  std::fclose(fp);
      +
      155  return MEMALLOC;
      +
      156  }
      +
      157 
      +
      158  // Read the padded_string
      +
      159  std::rewind(fp);
      +
      160  size_t bytes_read = std::fread(s.data(), 1, len, fp);
      +
      161  if (std::fclose(fp) != 0 || bytes_read != len) {
      +
      162  return IO_ERROR;
      +
      163  }
      +
      164 
      +
      165  return s;
      +
      166 }
      167 
      -
      168  return s;
      -
      169 }
      -
      170 
      -
      171 } // namespace simdjson
      -
      172 
      -
      173 #endif // SIMDJSON_INLINE_PADDED_STRING_H
      +
      168 } // namespace simdjson
      +
      169 
      +
      170 #endif // SIMDJSON_INLINE_PADDED_STRING_H
      User-provided string that promises it has extra padded bytes at the end for use with parser::parse().
      -
      We want to support argument-dependent lookup (ADL).
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      @ MEMALLOC
      Error allocating memory, most likely out of memory.
      Definition: error.h:20
      @ IO_ERROR
      Error reading a file.
      Definition: error.h:38
      -
      constexpr size_t SIMDJSON_PADDING
      The amount of padding needed in a buffer to parse JSON.
      Definition: common_defs.h:45
      +
      constexpr size_t SIMDJSON_PADDING
      The amount of padding needed in a buffer to parse JSON.
      Definition: base.h:30
      String with extra allocation for ease of use with parser::parse()
      Definition: padded_string.h:21
      -
      size_t size() const noexcept
      The length of the string.
      -
      size_t length() const noexcept
      The length of the string.
      +
      size_t size() const noexcept
      The length of the string.
      +
      size_t length() const noexcept
      The length of the string.
      padded_string() noexcept
      Create a new, empty padded string.
      -
      padded_string & operator=(padded_string &&o) noexcept
      Move one padded string into another.
      -
      const char * data() const noexcept
      The string data.
      -
      static simdjson_result< padded_string > load(std::string_view path) noexcept
      Load this padded string from a file.
      +
      padded_string & operator=(padded_string &&o) noexcept
      Move one padded string into another.
      +
      const char * data() const noexcept
      The string data.
      +
      static simdjson_result< padded_string > load(std::string_view path) noexcept
      Load this padded string from a file.
      The result of a simdjson operation that could fail.
      Definition: error.h:205
      diff --git a/padded__string_8h_source.html b/padded__string_8h_source.html index 287adcf07..131624536 100644 --- a/padded__string_8h_source.html +++ b/padded__string_8h_source.html @@ -95,7 +95,7 @@ $(document).ready(function(){initNavTree('padded__string_8h_source.html',''); in
      2 #define SIMDJSON_PADDED_STRING_H
      3 
      4 #include "simdjson/portability.h"
      -
      5 #include "simdjson/common_defs.h" // for SIMDJSON_PADDING
      +
      5 #include "simdjson/base.h" // for SIMDJSON_PADDING
      6 #include "simdjson/error.h"
      7 #include <cstring>
      8 #include <memory>
      @@ -171,14 +171,14 @@ $(document).ready(function(){initNavTree('padded__string_8h_source.html',''); in
      167 
      168 #endif // SIMDJSON_PADDED_STRING_H
      User-provided string that promises it has extra padded bytes at the end for use with parser::parse().
      -
      We want to support argument-dependent lookup (ADL).
      -
      std::ostream & operator<<(std::ostream &out, error_code error) noexcept
      Write the error message to the output stream.
      Definition: error-inl.h:36
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      +
      std::ostream & operator<<(std::ostream &out, error_code error) noexcept
      Write the error message to the output stream.
      Definition: error-inl.h:35
      String with extra allocation for ease of use with parser::parse()
      Definition: padded_string.h:21
      -
      size_t size() const noexcept
      The length of the string.
      -
      size_t length() const noexcept
      The length of the string.
      +
      size_t size() const noexcept
      The length of the string.
      +
      size_t length() const noexcept
      The length of the string.
      padded_string() noexcept
      Create a new, empty padded string.
      -
      const char * data() const noexcept
      The string data.
      -
      static simdjson_result< padded_string > load(std::string_view path) noexcept
      Load this padded string from a file.
      +
      const char * data() const noexcept
      The string data.
      +
      static simdjson_result< padded_string > load(std::string_view path) noexcept
      Load this padded string from a file.
      The result of a simdjson operation that could fail.
      Definition: error.h:205
      diff --git a/padded__string__view-inl_8h_source.html b/padded__string__view-inl_8h_source.html index 8e57b1a40..98c6fe4b7 100644 --- a/padded__string__view-inl_8h_source.html +++ b/padded__string__view-inl_8h_source.html @@ -94,48 +94,42 @@ $(document).ready(function(){initNavTree('padded__string__view-inl_8h_source.htm
      1 #ifndef SIMDJSON_PADDED_STRING_VIEW_INL_H
      2 #define SIMDJSON_PADDED_STRING_VIEW_INL_H
      3 
      -
      4 #include "simdjson/portability.h"
      -
      5 #include "simdjson/common_defs.h" // for SIMDJSON_PADDING
      -
      6 
      -
      7 #include <climits>
      -
      8 #include <cstring>
      -
      9 #include <memory>
      -
      10 #include <string>
      -
      11 
      -
      12 namespace simdjson {
      -
      13 
      -
      14 inline padded_string_view::padded_string_view(const char* s, size_t len, size_t capacity) noexcept
      -
      15  : std::string_view(s, len), _capacity(capacity)
      -
      16 {
      -
      17 }
      -
      18 
      -
      19 inline padded_string_view::padded_string_view(const uint8_t* s, size_t len, size_t capacity) noexcept
      -
      20  : padded_string_view(reinterpret_cast<const char*>(s), len, capacity)
      -
      21 {
      -
      22 }
      -
      23 
      -
      24 inline padded_string_view::padded_string_view(const std::string &s) noexcept
      -
      25  : std::string_view(s), _capacity(s.capacity())
      -
      26 {
      -
      27 }
      -
      28 
      -
      29 inline padded_string_view::padded_string_view(std::string_view s, size_t capacity) noexcept
      -
      30  : std::string_view(s), _capacity(capacity)
      -
      31 {
      -
      32 }
      +
      4 #include "simdjson/padded_string_view.h"
      +
      5 
      +
      6 namespace simdjson {
      +
      7 
      +
      8 inline padded_string_view::padded_string_view(const char* s, size_t len, size_t capacity) noexcept
      +
      9  : std::string_view(s, len), _capacity(capacity)
      +
      10 {
      +
      11 }
      +
      12 
      +
      13 inline padded_string_view::padded_string_view(const uint8_t* s, size_t len, size_t capacity) noexcept
      +
      14  : padded_string_view(reinterpret_cast<const char*>(s), len, capacity)
      +
      15 {
      +
      16 }
      +
      17 
      +
      18 inline padded_string_view::padded_string_view(const std::string &s) noexcept
      +
      19  : std::string_view(s), _capacity(s.capacity())
      +
      20 {
      +
      21 }
      +
      22 
      +
      23 inline padded_string_view::padded_string_view(std::string_view s, size_t capacity) noexcept
      +
      24  : std::string_view(s), _capacity(capacity)
      +
      25 {
      +
      26 }
      +
      27 
      +
      28 inline size_t padded_string_view::capacity() const noexcept { return _capacity; }
      +
      29 
      +
      30 inline size_t padded_string_view::padding() const noexcept { return capacity() - length(); }
      +
      31 
      +
      32 } // namespace simdjson
      33 
      -
      34 inline size_t padded_string_view::capacity() const noexcept { return _capacity; }
      -
      35 
      -
      36 inline size_t padded_string_view::padding() const noexcept { return capacity() - length(); }
      -
      37 
      -
      38 } // namespace simdjson
      -
      39 
      -
      40 #endif // SIMDJSON_PADDED_STRING_VIEW_INL_H
      +
      34 #endif // SIMDJSON_PADDED_STRING_VIEW_INL_H
      User-provided string that promises it has extra padded bytes at the end for use with parser::parse().
      -
      size_t padding() const noexcept
      The amount of padding on the string (capacity() - length())
      -
      size_t capacity() const noexcept
      The number of allocated bytes.
      +
      size_t padding() const noexcept
      The amount of padding on the string (capacity() - length())
      +
      size_t capacity() const noexcept
      The number of allocated bytes.
      padded_string_view() noexcept=default
      Create an empty padded_string_view.
      -
      We want to support argument-dependent lookup (ADL).
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      diff --git a/padded__string__view_8h_source.html b/padded__string__view_8h_source.html index 3829988b2..697f62def 100644 --- a/padded__string__view_8h_source.html +++ b/padded__string__view_8h_source.html @@ -95,7 +95,7 @@ $(document).ready(function(){initNavTree('padded__string__view_8h_source.html','
      2 #define SIMDJSON_PADDED_STRING_VIEW_H
      3 
      4 #include "simdjson/portability.h"
      -
      5 #include "simdjson/common_defs.h" // for SIMDJSON_PADDING
      +
      5 #include "simdjson/base.h" // for SIMDJSON_PADDING
      6 #include "simdjson/error.h"
      7 
      8 #include <cstring>
      @@ -133,11 +133,11 @@ $(document).ready(function(){initNavTree('padded__string__view_8h_source.html','
      76 
      77 #endif // SIMDJSON_PADDED_STRING_VIEW_H
      User-provided string that promises it has extra padded bytes at the end for use with parser::parse().
      -
      size_t padding() const noexcept
      The amount of padding on the string (capacity() - length())
      -
      size_t capacity() const noexcept
      The number of allocated bytes.
      +
      size_t padding() const noexcept
      The amount of padding on the string (capacity() - length())
      +
      size_t capacity() const noexcept
      The number of allocated bytes.
      padded_string_view() noexcept=default
      Create an empty padded_string_view.
      -
      We want to support argument-dependent lookup (ADL).
      -
      std::ostream & operator<<(std::ostream &out, error_code error) noexcept
      Write the error message to the output stream.
      Definition: error-inl.h:36
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      +
      std::ostream & operator<<(std::ostream &out, error_code error) noexcept
      Write the error message to the output stream.
      Definition: error-inl.h:35
      The result of a simdjson operation that could fail.
      Definition: error.h:205
      diff --git a/parsedjson_8h_source.html b/parsedjson_8h_source.html index 29d557114..3dd9ec9cd 100644 --- a/parsedjson_8h_source.html +++ b/parsedjson_8h_source.html @@ -96,7 +96,7 @@ $(document).ready(function(){initNavTree('parsedjson_8h_source.html',''); initRe
      3 #ifndef SIMDJSON_DOM_PARSEDJSON_H
      4 #define SIMDJSON_DOM_PARSEDJSON_H
      5 
      -
      6 #include "simdjson/dom/document.h"
      +
      6 #include "simdjson/dom/base.h"
      7 
      8 namespace simdjson {
      9 
      @@ -105,8 +105,8 @@ $(document).ready(function(){initNavTree('parsedjson_8h_source.html',''); initRe
      15 } // namespace simdjson
      16 
      17 #endif // SIMDJSON_DOM_PARSEDJSON_H
      -
      A persistent document parser.
      Definition: parser.h:58
      -
      We want to support argument-dependent lookup (ADL).
      +
      A persistent document parser.
      Definition: parser.h:30
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      diff --git a/parsedjson__iterator-inl_8h_source.html b/parsedjson__iterator-inl_8h_source.html index ea4d83613..44f2e6c14 100644 --- a/parsedjson__iterator-inl_8h_source.html +++ b/parsedjson__iterator-inl_8h_source.html @@ -95,492 +95,542 @@ $(document).ready(function(){initNavTree('parsedjson__iterator-inl_8h_source.htm
      2 #define SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H
      3 
      4 #include "simdjson/dom/parsedjson_iterator.h"
      -
      5 #include "simdjson/portability.h"
      -
      6 #include <cstring>
      -
      7 
      -
      8 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
      +
      5 #include "simdjson/internal/tape_ref-inl.h"
      +
      6 #include "simdjson/internal/jsonformatutils.h"
      +
      7 #include <ostream>
      +
      8 #include <iterator>
      9 
      -
      10 namespace simdjson {
      +
      10 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
      11 
      -
      12 // VS2017 reports deprecated warnings when you define a deprecated class's methods.
      -
      13 SIMDJSON_PUSH_DISABLE_WARNINGS
      -
      14 SIMDJSON_DISABLE_DEPRECATED_WARNING
      -
      15 
      -
      16 // Because of template weirdness, the actual class definition is inline in the document class
      -
      17 simdjson_warn_unused bool dom::parser::Iterator::is_ok() const {
      -
      18  return location < tape_length;
      -
      19 }
      -
      20 
      -
      21 // useful for debugging purposes
      -
      22 size_t dom::parser::Iterator::get_tape_location() const {
      -
      23  return location;
      -
      24 }
      -
      25 
      -
      26 // useful for debugging purposes
      -
      27 size_t dom::parser::Iterator::get_tape_length() const {
      -
      28  return tape_length;
      -
      29 }
      -
      30 
      -
      31 // returns the current depth (start at 1 with 0 reserved for the fictitious root
      -
      32 // node)
      -
      33 size_t dom::parser::Iterator::get_depth() const {
      -
      34  return depth;
      -
      35 }
      -
      36 
      -
      37 // A scope is a series of nodes at the same depth, typically it is either an
      -
      38 // object ({) or an array ([). The root node has type 'r'.
      -
      39 uint8_t dom::parser::Iterator::get_scope_type() const {
      -
      40  return depth_index[depth].scope_type;
      -
      41 }
      -
      42 
      -
      43 bool dom::parser::Iterator::move_forward() {
      -
      44  if (location + 1 >= tape_length) {
      -
      45  return false; // we are at the end!
      -
      46  }
      -
      47 
      -
      48  if ((current_type == '[') || (current_type == '{')) {
      -
      49  // We are entering a new scope
      -
      50  depth++;
      -
      51  assert(depth < max_depth);
      -
      52  depth_index[depth].start_of_scope = location;
      -
      53  depth_index[depth].scope_type = current_type;
      -
      54  } else if ((current_type == ']') || (current_type == '}')) {
      -
      55  // Leaving a scope.
      -
      56  depth--;
      -
      57  } else if (is_number()) {
      -
      58  // these types use 2 locations on the tape, not just one.
      -
      59  location += 1;
      -
      60  }
      -
      61 
      -
      62  location += 1;
      -
      63  current_val = doc.tape[location];
      -
      64  current_type = uint8_t(current_val >> 56);
      -
      65  return true;
      -
      66 }
      -
      67 
      -
      68 void dom::parser::Iterator::move_to_value() {
      -
      69  // assume that we are on a key, so move by 1.
      -
      70  location += 1;
      -
      71  current_val = doc.tape[location];
      -
      72  current_type = uint8_t(current_val >> 56);
      -
      73 }
      -
      74 
      -
      75 bool dom::parser::Iterator::move_to_key(const char *key) {
      -
      76  if (down()) {
      -
      77  do {
      -
      78  const bool right_key = (strcmp(get_string(), key) == 0);
      -
      79  move_to_value();
      -
      80  if (right_key) {
      -
      81  return true;
      -
      82  }
      -
      83  } while (next());
      -
      84  up();
      -
      85  }
      -
      86  return false;
      -
      87 }
      -
      88 
      -
      89 bool dom::parser::Iterator::move_to_key_insensitive(
      -
      90  const char *key) {
      -
      91  if (down()) {
      -
      92  do {
      -
      93  const bool right_key = (simdjson_strcasecmp(get_string(), key) == 0);
      -
      94  move_to_value();
      -
      95  if (right_key) {
      -
      96  return true;
      -
      97  }
      -
      98  } while (next());
      -
      99  up();
      -
      100  }
      -
      101  return false;
      -
      102 }
      -
      103 
      -
      104 bool dom::parser::Iterator::move_to_key(const char *key,
      -
      105  uint32_t length) {
      -
      106  if (down()) {
      -
      107  do {
      -
      108  bool right_key = ((get_string_length() == length) &&
      -
      109  (memcmp(get_string(), key, length) == 0));
      -
      110  move_to_value();
      -
      111  if (right_key) {
      -
      112  return true;
      -
      113  }
      -
      114  } while (next());
      -
      115  up();
      -
      116  }
      -
      117  return false;
      -
      118 }
      -
      119 
      -
      120 bool dom::parser::Iterator::move_to_index(uint32_t index) {
      -
      121  if (down()) {
      -
      122  uint32_t i = 0;
      -
      123  for (; i < index; i++) {
      -
      124  if (!next()) {
      -
      125  break;
      -
      126  }
      -
      127  }
      -
      128  if (i == index) {
      -
      129  return true;
      -
      130  }
      -
      131  up();
      -
      132  }
      -
      133  return false;
      -
      134 }
      -
      135 
      -
      136 bool dom::parser::Iterator::prev() {
      -
      137  size_t target_location = location;
      -
      138  to_start_scope();
      -
      139  size_t npos = location;
      -
      140  if (target_location == npos) {
      -
      141  return false; // we were already at the start
      -
      142  }
      -
      143  size_t oldnpos;
      -
      144  // we have that npos < target_location here
      -
      145  do {
      -
      146  oldnpos = npos;
      -
      147  if ((current_type == '[') || (current_type == '{')) {
      -
      148  // we need to jump
      -
      149  npos = uint32_t(current_val);
      -
      150  } else {
      -
      151  npos = npos + ((current_type == 'd' || current_type == 'l') ? 2 : 1);
      -
      152  }
      -
      153  } while (npos < target_location);
      -
      154  location = oldnpos;
      -
      155  current_val = doc.tape[location];
      -
      156  current_type = uint8_t(current_val >> 56);
      -
      157  return true;
      -
      158 }
      -
      159 
      -
      160 bool dom::parser::Iterator::up() {
      -
      161  if (depth == 1) {
      -
      162  return false; // don't allow moving back to root
      -
      163  }
      -
      164  to_start_scope();
      -
      165  // next we just move to the previous value
      -
      166  depth--;
      -
      167  location -= 1;
      -
      168  current_val = doc.tape[location];
      -
      169  current_type = uint8_t(current_val >> 56);
      -
      170  return true;
      -
      171 }
      -
      172 
      -
      173 bool dom::parser::Iterator::down() {
      -
      174  if (location + 1 >= tape_length) {
      -
      175  return false;
      -
      176  }
      -
      177  if ((current_type == '[') || (current_type == '{')) {
      -
      178  size_t npos = uint32_t(current_val);
      -
      179  if (npos == location + 2) {
      -
      180  return false; // we have an empty scope
      -
      181  }
      -
      182  depth++;
      -
      183  assert(depth < max_depth);
      -
      184  location = location + 1;
      -
      185  depth_index[depth].start_of_scope = location;
      -
      186  depth_index[depth].scope_type = current_type;
      -
      187  current_val = doc.tape[location];
      -
      188  current_type = uint8_t(current_val >> 56);
      -
      189  return true;
      -
      190  }
      -
      191  return false;
      -
      192 }
      -
      193 
      -
      194 void dom::parser::Iterator::to_start_scope() {
      -
      195  location = depth_index[depth].start_of_scope;
      -
      196  current_val = doc.tape[location];
      -
      197  current_type = uint8_t(current_val >> 56);
      -
      198 }
      -
      199 
      -
      200 bool dom::parser::Iterator::next() {
      -
      201  size_t npos;
      -
      202  if ((current_type == '[') || (current_type == '{')) {
      -
      203  // we need to jump
      -
      204  npos = uint32_t(current_val);
      -
      205  } else {
      -
      206  npos = location + (is_number() ? 2 : 1);
      -
      207  }
      -
      208  uint64_t next_val = doc.tape[npos];
      -
      209  uint8_t next_type = uint8_t(next_val >> 56);
      -
      210  if ((next_type == ']') || (next_type == '}')) {
      -
      211  return false; // we reached the end of the scope
      -
      212  }
      -
      213  location = npos;
      -
      214  current_val = next_val;
      -
      215  current_type = next_type;
      -
      216  return true;
      -
      217 }
      -
      218 dom::parser::Iterator::Iterator(const dom::parser &pj) noexcept(false)
      -
      219  : doc(pj.doc)
      -
      220 {
      -
      221 #if SIMDJSON_EXCEPTIONS
      -
      222  if (!pj.valid) { throw simdjson_error(pj.error); }
      -
      223 #else
      -
      224  if (!pj.valid) { return; } // abort() usage is forbidden in the library
      -
      225 #endif
      -
      226 
      -
      227  max_depth = pj.max_depth();
      -
      228  depth_index = new scopeindex_t[max_depth + 1];
      -
      229  depth_index[0].start_of_scope = location;
      -
      230  current_val = doc.tape[location++];
      -
      231  current_type = uint8_t(current_val >> 56);
      -
      232  depth_index[0].scope_type = current_type;
      -
      233  tape_length = size_t(current_val & internal::JSON_VALUE_MASK);
      -
      234  if (location < tape_length) {
      -
      235  // If we make it here, then depth_capacity must >=2, but the compiler
      -
      236  // may not know this.
      -
      237  current_val = doc.tape[location];
      -
      238  current_type = uint8_t(current_val >> 56);
      -
      239  depth++;
      -
      240  assert(depth < max_depth);
      -
      241  depth_index[depth].start_of_scope = location;
      -
      242  depth_index[depth].scope_type = current_type;
      -
      243  }
      -
      244 }
      -
      245 dom::parser::Iterator::Iterator(
      -
      246  const dom::parser::Iterator &o) noexcept
      -
      247  : doc(o.doc),
      -
      248  max_depth(o.depth),
      -
      249  depth(o.depth),
      -
      250  location(o.location),
      -
      251  tape_length(o.tape_length),
      -
      252  current_type(o.current_type),
      -
      253  current_val(o.current_val)
      -
      254 {
      -
      255  depth_index = new scopeindex_t[max_depth+1];
      -
      256  std::memcpy(depth_index, o.depth_index, (depth + 1) * sizeof(depth_index[0]));
      -
      257 }
      -
      258 
      -
      259 dom::parser::Iterator::~Iterator() noexcept {
      -
      260  if (depth_index) { delete[] depth_index; }
      -
      261 }
      -
      262 
      -
      263 bool dom::parser::Iterator::print(std::ostream &os, bool escape_strings) const {
      -
      264  if (!is_ok()) {
      -
      265  return false;
      -
      266  }
      -
      267  switch (current_type) {
      -
      268  case '"': // we have a string
      -
      269  os << '"';
      -
      270  if (escape_strings) {
      -
      271  os << internal::escape_json_string(std::string_view(get_string(), get_string_length()));
      -
      272  } else {
      -
      273  // was: os << get_string();, but given that we can include null chars, we
      -
      274  // have to do something crazier:
      -
      275  std::copy(get_string(), get_string() + get_string_length(), std::ostream_iterator<char>(os));
      -
      276  }
      +
      12 namespace simdjson {
      +
      13 
      +
      14 // VS2017 reports deprecated warnings when you define a deprecated class's methods.
      +
      15 SIMDJSON_PUSH_DISABLE_WARNINGS
      +
      16 SIMDJSON_DISABLE_DEPRECATED_WARNING
      +
      17 
      +
      18 // Because of template weirdness, the actual class definition is inline in the document class
      +
      19 simdjson_warn_unused bool dom::parser::Iterator::is_ok() const {
      +
      20  return location < tape_length;
      +
      21 }
      +
      22 
      +
      23 // useful for debugging purposes
      +
      24 size_t dom::parser::Iterator::get_tape_location() const {
      +
      25  return location;
      +
      26 }
      +
      27 
      +
      28 // useful for debugging purposes
      +
      29 size_t dom::parser::Iterator::get_tape_length() const {
      +
      30  return tape_length;
      +
      31 }
      +
      32 
      +
      33 // returns the current depth (start at 1 with 0 reserved for the fictitious root
      +
      34 // node)
      +
      35 size_t dom::parser::Iterator::get_depth() const {
      +
      36  return depth;
      +
      37 }
      +
      38 
      +
      39 // A scope is a series of nodes at the same depth, typically it is either an
      +
      40 // object ({) or an array ([). The root node has type 'r'.
      +
      41 uint8_t dom::parser::Iterator::get_scope_type() const {
      +
      42  return depth_index[depth].scope_type;
      +
      43 }
      +
      44 
      +
      45 bool dom::parser::Iterator::move_forward() {
      +
      46  if (location + 1 >= tape_length) {
      +
      47  return false; // we are at the end!
      +
      48  }
      +
      49 
      +
      50  if ((current_type == '[') || (current_type == '{')) {
      +
      51  // We are entering a new scope
      +
      52  depth++;
      +
      53  assert(depth < max_depth);
      +
      54  depth_index[depth].start_of_scope = location;
      +
      55  depth_index[depth].scope_type = current_type;
      +
      56  } else if ((current_type == ']') || (current_type == '}')) {
      +
      57  // Leaving a scope.
      +
      58  depth--;
      +
      59  } else if (is_number()) {
      +
      60  // these types use 2 locations on the tape, not just one.
      +
      61  location += 1;
      +
      62  }
      +
      63 
      +
      64  location += 1;
      +
      65  current_val = doc.tape[location];
      +
      66  current_type = uint8_t(current_val >> 56);
      +
      67  return true;
      +
      68 }
      +
      69 
      +
      70 void dom::parser::Iterator::move_to_value() {
      +
      71  // assume that we are on a key, so move by 1.
      +
      72  location += 1;
      +
      73  current_val = doc.tape[location];
      +
      74  current_type = uint8_t(current_val >> 56);
      +
      75 }
      +
      76 
      +
      77 bool dom::parser::Iterator::move_to_key(const char *key) {
      +
      78  if (down()) {
      +
      79  do {
      +
      80  const bool right_key = (strcmp(get_string(), key) == 0);
      +
      81  move_to_value();
      +
      82  if (right_key) {
      +
      83  return true;
      +
      84  }
      +
      85  } while (next());
      +
      86  up();
      +
      87  }
      +
      88  return false;
      +
      89 }
      +
      90 
      +
      91 bool dom::parser::Iterator::move_to_key_insensitive(
      +
      92  const char *key) {
      +
      93  if (down()) {
      +
      94  do {
      +
      95  const bool right_key = (simdjson_strcasecmp(get_string(), key) == 0);
      +
      96  move_to_value();
      +
      97  if (right_key) {
      +
      98  return true;
      +
      99  }
      +
      100  } while (next());
      +
      101  up();
      +
      102  }
      +
      103  return false;
      +
      104 }
      +
      105 
      +
      106 bool dom::parser::Iterator::move_to_key(const char *key,
      +
      107  uint32_t length) {
      +
      108  if (down()) {
      +
      109  do {
      +
      110  bool right_key = ((get_string_length() == length) &&
      +
      111  (memcmp(get_string(), key, length) == 0));
      +
      112  move_to_value();
      +
      113  if (right_key) {
      +
      114  return true;
      +
      115  }
      +
      116  } while (next());
      +
      117  up();
      +
      118  }
      +
      119  return false;
      +
      120 }
      +
      121 
      +
      122 bool dom::parser::Iterator::move_to_index(uint32_t index) {
      +
      123  if (down()) {
      +
      124  uint32_t i = 0;
      +
      125  for (; i < index; i++) {
      +
      126  if (!next()) {
      +
      127  break;
      +
      128  }
      +
      129  }
      +
      130  if (i == index) {
      +
      131  return true;
      +
      132  }
      +
      133  up();
      +
      134  }
      +
      135  return false;
      +
      136 }
      +
      137 
      +
      138 bool dom::parser::Iterator::prev() {
      +
      139  size_t target_location = location;
      +
      140  to_start_scope();
      +
      141  size_t npos = location;
      +
      142  if (target_location == npos) {
      +
      143  return false; // we were already at the start
      +
      144  }
      +
      145  size_t oldnpos;
      +
      146  // we have that npos < target_location here
      +
      147  do {
      +
      148  oldnpos = npos;
      +
      149  if ((current_type == '[') || (current_type == '{')) {
      +
      150  // we need to jump
      +
      151  npos = uint32_t(current_val);
      +
      152  } else {
      +
      153  npos = npos + ((current_type == 'd' || current_type == 'l') ? 2 : 1);
      +
      154  }
      +
      155  } while (npos < target_location);
      +
      156  location = oldnpos;
      +
      157  current_val = doc.tape[location];
      +
      158  current_type = uint8_t(current_val >> 56);
      +
      159  return true;
      +
      160 }
      +
      161 
      +
      162 bool dom::parser::Iterator::up() {
      +
      163  if (depth == 1) {
      +
      164  return false; // don't allow moving back to root
      +
      165  }
      +
      166  to_start_scope();
      +
      167  // next we just move to the previous value
      +
      168  depth--;
      +
      169  location -= 1;
      +
      170  current_val = doc.tape[location];
      +
      171  current_type = uint8_t(current_val >> 56);
      +
      172  return true;
      +
      173 }
      +
      174 
      +
      175 bool dom::parser::Iterator::down() {
      +
      176  if (location + 1 >= tape_length) {
      +
      177  return false;
      +
      178  }
      +
      179  if ((current_type == '[') || (current_type == '{')) {
      +
      180  size_t npos = uint32_t(current_val);
      +
      181  if (npos == location + 2) {
      +
      182  return false; // we have an empty scope
      +
      183  }
      +
      184  depth++;
      +
      185  assert(depth < max_depth);
      +
      186  location = location + 1;
      +
      187  depth_index[depth].start_of_scope = location;
      +
      188  depth_index[depth].scope_type = current_type;
      +
      189  current_val = doc.tape[location];
      +
      190  current_type = uint8_t(current_val >> 56);
      +
      191  return true;
      +
      192  }
      +
      193  return false;
      +
      194 }
      +
      195 
      +
      196 void dom::parser::Iterator::to_start_scope() {
      +
      197  location = depth_index[depth].start_of_scope;
      +
      198  current_val = doc.tape[location];
      +
      199  current_type = uint8_t(current_val >> 56);
      +
      200 }
      +
      201 
      +
      202 inline void dom::parser::Iterator::rewind() {
      +
      203  while (up())
      +
      204  ;
      +
      205 }
      +
      206 
      +
      207 
      +
      208 bool dom::parser::Iterator::next() {
      +
      209  size_t npos;
      +
      210  if ((current_type == '[') || (current_type == '{')) {
      +
      211  // we need to jump
      +
      212  npos = uint32_t(current_val);
      +
      213  } else {
      +
      214  npos = location + (is_number() ? 2 : 1);
      +
      215  }
      +
      216  uint64_t next_val = doc.tape[npos];
      +
      217  uint8_t next_type = uint8_t(next_val >> 56);
      +
      218  if ((next_type == ']') || (next_type == '}')) {
      +
      219  return false; // we reached the end of the scope
      +
      220  }
      +
      221  location = npos;
      +
      222  current_val = next_val;
      +
      223  current_type = next_type;
      +
      224  return true;
      +
      225 }
      +
      226 dom::parser::Iterator::Iterator(const dom::parser &pj) noexcept(false)
      +
      227  : doc(pj.doc)
      +
      228 {
      +
      229 #if SIMDJSON_EXCEPTIONS
      +
      230  if (!pj.valid) { throw simdjson_error(pj.error); }
      +
      231 #else
      +
      232  if (!pj.valid) { return; } // abort() usage is forbidden in the library
      +
      233 #endif
      +
      234 
      +
      235  max_depth = pj.max_depth();
      +
      236  depth_index = new scopeindex_t[max_depth + 1];
      +
      237  depth_index[0].start_of_scope = location;
      +
      238  current_val = doc.tape[location++];
      +
      239  current_type = uint8_t(current_val >> 56);
      +
      240  depth_index[0].scope_type = current_type;
      +
      241  tape_length = size_t(current_val & internal::JSON_VALUE_MASK);
      +
      242  if (location < tape_length) {
      +
      243  // If we make it here, then depth_capacity must >=2, but the compiler
      +
      244  // may not know this.
      +
      245  current_val = doc.tape[location];
      +
      246  current_type = uint8_t(current_val >> 56);
      +
      247  depth++;
      +
      248  assert(depth < max_depth);
      +
      249  depth_index[depth].start_of_scope = location;
      +
      250  depth_index[depth].scope_type = current_type;
      +
      251  }
      +
      252 }
      +
      253 dom::parser::Iterator::Iterator(
      +
      254  const dom::parser::Iterator &o) noexcept
      +
      255  : doc(o.doc),
      +
      256  max_depth(o.depth),
      +
      257  depth(o.depth),
      +
      258  location(o.location),
      +
      259  tape_length(o.tape_length),
      +
      260  current_type(o.current_type),
      +
      261  current_val(o.current_val)
      +
      262 {
      +
      263  depth_index = new scopeindex_t[max_depth+1];
      +
      264  std::memcpy(depth_index, o.depth_index, (depth + 1) * sizeof(depth_index[0]));
      +
      265 }
      +
      266 
      +
      267 dom::parser::Iterator::~Iterator() noexcept {
      +
      268  if (depth_index) { delete[] depth_index; }
      +
      269 }
      +
      270 
      +
      271 bool dom::parser::Iterator::print(std::ostream &os, bool escape_strings) const {
      +
      272  if (!is_ok()) {
      +
      273  return false;
      +
      274  }
      +
      275  switch (current_type) {
      +
      276  case '"': // we have a string
      277  os << '"';
      -
      278  break;
      -
      279  case 'l': // we have a long int
      -
      280  os << get_integer();
      -
      281  break;
      -
      282  case 'u':
      -
      283  os << get_unsigned_integer();
      -
      284  break;
      -
      285  case 'd':
      -
      286  os << get_double();
      -
      287  break;
      -
      288  case 'n': // we have a null
      -
      289  os << "null";
      -
      290  break;
      -
      291  case 't': // we have a true
      -
      292  os << "true";
      -
      293  break;
      -
      294  case 'f': // we have a false
      -
      295  os << "false";
      -
      296  break;
      -
      297  case '{': // we have an object
      -
      298  case '}': // we end an object
      -
      299  case '[': // we start an array
      -
      300  case ']': // we end an array
      -
      301  os << char(current_type);
      -
      302  break;
      -
      303  default:
      -
      304  return false;
      -
      305  }
      -
      306  return true;
      -
      307 }
      -
      308 
      -
      309 bool dom::parser::Iterator::move_to(const char *pointer,
      -
      310  uint32_t length) {
      -
      311  char *new_pointer = nullptr;
      -
      312  if (pointer[0] == '#') {
      -
      313  // Converting fragment representation to string representation
      -
      314  new_pointer = new char[length];
      -
      315  uint32_t new_length = 0;
      -
      316  for (uint32_t i = 1; i < length; i++) {
      -
      317  if (pointer[i] == '%' && pointer[i + 1] == 'x') {
      -
      318 #if __cpp_exceptions
      -
      319  try {
      -
      320 #endif
      -
      321  int fragment =
      -
      322  std::stoi(std::string(&pointer[i + 2], 2), nullptr, 16);
      -
      323  if (fragment == '\\' || fragment == '"' || (fragment <= 0x1F)) {
      -
      324  // escaping the character
      -
      325  new_pointer[new_length] = '\\';
      -
      326  new_length++;
      -
      327  }
      -
      328  new_pointer[new_length] = char(fragment);
      -
      329  i += 3;
      -
      330 #if __cpp_exceptions
      -
      331  } catch (std::invalid_argument &) {
      -
      332  delete[] new_pointer;
      -
      333  return false; // the fragment is invalid
      -
      334  }
      -
      335 #endif
      -
      336  } else {
      -
      337  new_pointer[new_length] = pointer[i];
      -
      338  }
      -
      339  new_length++;
      -
      340  }
      -
      341  length = new_length;
      -
      342  pointer = new_pointer;
      -
      343  }
      -
      344 
      -
      345  // saving the current state
      -
      346  size_t depth_s = depth;
      -
      347  size_t location_s = location;
      -
      348  uint8_t current_type_s = current_type;
      -
      349  uint64_t current_val_s = current_val;
      -
      350 
      -
      351  rewind(); // The json pointer is used from the root of the document.
      +
      278  if (escape_strings) {
      +
      279  os << internal::escape_json_string(std::string_view(get_string(), get_string_length()));
      +
      280  } else {
      +
      281  // was: os << get_string();, but given that we can include null chars, we
      +
      282  // have to do something crazier:
      +
      283  std::copy(get_string(), get_string() + get_string_length(), std::ostream_iterator<char>(os));
      +
      284  }
      +
      285  os << '"';
      +
      286  break;
      +
      287  case 'l': // we have a long int
      +
      288  os << get_integer();
      +
      289  break;
      +
      290  case 'u':
      +
      291  os << get_unsigned_integer();
      +
      292  break;
      +
      293  case 'd':
      +
      294  os << get_double();
      +
      295  break;
      +
      296  case 'n': // we have a null
      +
      297  os << "null";
      +
      298  break;
      +
      299  case 't': // we have a true
      +
      300  os << "true";
      +
      301  break;
      +
      302  case 'f': // we have a false
      +
      303  os << "false";
      +
      304  break;
      +
      305  case '{': // we have an object
      +
      306  case '}': // we end an object
      +
      307  case '[': // we start an array
      +
      308  case ']': // we end an array
      +
      309  os << char(current_type);
      +
      310  break;
      +
      311  default:
      +
      312  return false;
      +
      313  }
      +
      314  return true;
      +
      315 }
      +
      316 
      +
      317 bool dom::parser::Iterator::move_to(const char *pointer,
      +
      318  uint32_t length) {
      +
      319  char *new_pointer = nullptr;
      +
      320  if (pointer[0] == '#') {
      +
      321  // Converting fragment representation to string representation
      +
      322  new_pointer = new char[length];
      +
      323  uint32_t new_length = 0;
      +
      324  for (uint32_t i = 1; i < length; i++) {
      +
      325  if (pointer[i] == '%' && pointer[i + 1] == 'x') {
      +
      326 #if __cpp_exceptions
      +
      327  try {
      +
      328 #endif
      +
      329  int fragment =
      +
      330  std::stoi(std::string(&pointer[i + 2], 2), nullptr, 16);
      +
      331  if (fragment == '\\' || fragment == '"' || (fragment <= 0x1F)) {
      +
      332  // escaping the character
      +
      333  new_pointer[new_length] = '\\';
      +
      334  new_length++;
      +
      335  }
      +
      336  new_pointer[new_length] = char(fragment);
      +
      337  i += 3;
      +
      338 #if __cpp_exceptions
      +
      339  } catch (std::invalid_argument &) {
      +
      340  delete[] new_pointer;
      +
      341  return false; // the fragment is invalid
      +
      342  }
      +
      343 #endif
      +
      344  } else {
      +
      345  new_pointer[new_length] = pointer[i];
      +
      346  }
      +
      347  new_length++;
      +
      348  }
      +
      349  length = new_length;
      +
      350  pointer = new_pointer;
      +
      351  }
      352 
      -
      353  bool found = relative_move_to(pointer, length);
      -
      354  delete[] new_pointer;
      -
      355 
      -
      356  if (!found) {
      -
      357  // since the pointer has found nothing, we get back to the original
      -
      358  // position.
      -
      359  depth = depth_s;
      -
      360  location = location_s;
      -
      361  current_type = current_type_s;
      -
      362  current_val = current_val_s;
      -
      363  }
      -
      364 
      -
      365  return found;
      -
      366 }
      -
      367 
      -
      368 bool dom::parser::Iterator::relative_move_to(const char *pointer,
      -
      369  uint32_t length) {
      -
      370  if (length == 0) {
      -
      371  // returns the whole document
      -
      372  return true;
      -
      373  }
      -
      374 
      -
      375  if (pointer[0] != '/') {
      -
      376  // '/' must be the first character
      -
      377  return false;
      -
      378  }
      +
      353  // saving the current state
      +
      354  size_t depth_s = depth;
      +
      355  size_t location_s = location;
      +
      356  uint8_t current_type_s = current_type;
      +
      357  uint64_t current_val_s = current_val;
      +
      358 
      +
      359  rewind(); // The json pointer is used from the root of the document.
      +
      360 
      +
      361  bool found = relative_move_to(pointer, length);
      +
      362  delete[] new_pointer;
      +
      363 
      +
      364  if (!found) {
      +
      365  // since the pointer has found nothing, we get back to the original
      +
      366  // position.
      +
      367  depth = depth_s;
      +
      368  location = location_s;
      +
      369  current_type = current_type_s;
      +
      370  current_val = current_val_s;
      +
      371  }
      +
      372 
      +
      373  return found;
      +
      374 }
      +
      375 
      +
      376 inline bool dom::parser::Iterator::move_to(const std::string &pointer) {
      +
      377  return move_to(pointer.c_str(), uint32_t(pointer.length()));
      +
      378 }
      379 
      -
      380  // finding the key in an object or the index in an array
      -
      381  std::string key_or_index;
      -
      382  uint32_t offset = 1;
      -
      383 
      -
      384  // checking for the "-" case
      -
      385  if (is_array() && pointer[1] == '-') {
      -
      386  if (length != 2) {
      -
      387  // the pointer must be exactly "/-"
      -
      388  // there can't be anything more after '-' as an index
      -
      389  return false;
      +
      380 inline int64_t dom::parser::Iterator::get_integer() const {
      +
      381  if (location + 1 >= tape_length) {
      +
      382  return 0; // default value in case of error
      +
      383  }
      +
      384  return static_cast<int64_t>(doc.tape[location + 1]);
      +
      385 }
      +
      386 
      +
      387 inline uint64_t dom::parser::Iterator::get_unsigned_integer() const {
      +
      388  if (location + 1 >= tape_length) {
      +
      389  return 0; // default value in case of error
      390  }
      -
      391  key_or_index = '-';
      -
      392  offset = length; // will skip the loop coming right after
      -
      393  }
      -
      394 
      -
      395  // We either transform the first reference token to a valid json key
      -
      396  // or we make sure it is a valid index in an array.
      -
      397  for (; offset < length; offset++) {
      -
      398  if (pointer[offset] == '/') {
      -
      399  // beginning of the next key or index
      -
      400  break;
      -
      401  }
      -
      402  if (is_array() && (pointer[offset] < '0' || pointer[offset] > '9')) {
      -
      403  // the index of an array must be an integer
      -
      404  // we also make sure std::stoi won't discard whitespaces later
      -
      405  return false;
      -
      406  }
      -
      407  if (pointer[offset] == '~') {
      -
      408  // "~1" represents "/"
      -
      409  if (pointer[offset + 1] == '1') {
      -
      410  key_or_index += '/';
      -
      411  offset++;
      -
      412  continue;
      -
      413  }
      -
      414  // "~0" represents "~"
      -
      415  if (pointer[offset + 1] == '0') {
      -
      416  key_or_index += '~';
      -
      417  offset++;
      -
      418  continue;
      -
      419  }
      -
      420  }
      -
      421  if (pointer[offset] == '\\') {
      -
      422  if (pointer[offset + 1] == '\\' || pointer[offset + 1] == '"' ||
      -
      423  (pointer[offset + 1] <= 0x1F)) {
      -
      424  key_or_index += pointer[offset + 1];
      -
      425  offset++;
      -
      426  continue;
      -
      427  }
      -
      428  return false; // invalid escaped character
      -
      429  }
      -
      430  if (pointer[offset] == '\"') {
      -
      431  // unescaped quote character. this is an invalid case.
      -
      432  // lets do nothing and assume most pointers will be valid.
      -
      433  // it won't find any corresponding json key anyway.
      -
      434  // return false;
      -
      435  }
      -
      436  key_or_index += pointer[offset];
      -
      437  }
      -
      438 
      -
      439  bool found = false;
      -
      440  if (is_object()) {
      -
      441  if (move_to_key(key_or_index.c_str(), uint32_t(key_or_index.length()))) {
      -
      442  found = relative_move_to(pointer + offset, length - offset);
      -
      443  }
      -
      444  } else if (is_array()) {
      -
      445  if (key_or_index == "-") { // handling "-" case first
      -
      446  if (down()) {
      -
      447  while (next())
      -
      448  ; // moving to the end of the array
      -
      449  // moving to the nonexistent value right after...
      -
      450  size_t npos;
      -
      451  if ((current_type == '[') || (current_type == '{')) {
      -
      452  // we need to jump
      -
      453  npos = uint32_t(current_val);
      -
      454  } else {
      -
      455  npos =
      -
      456  location + ((current_type == 'd' || current_type == 'l') ? 2 : 1);
      -
      457  }
      -
      458  location = npos;
      -
      459  current_val = doc.tape[npos];
      -
      460  current_type = uint8_t(current_val >> 56);
      -
      461  return true; // how could it fail ?
      -
      462  }
      -
      463  } else { // regular numeric index
      -
      464  // The index can't have a leading '0'
      -
      465  if (key_or_index[0] == '0' && key_or_index.length() > 1) {
      -
      466  return false;
      -
      467  }
      -
      468  // it cannot be empty
      -
      469  if (key_or_index.length() == 0) {
      -
      470  return false;
      -
      471  }
      -
      472  // we already checked the index contains only valid digits
      -
      473  uint32_t index = std::stoi(key_or_index);
      -
      474  if (move_to_index(index)) {
      -
      475  found = relative_move_to(pointer + offset, length - offset);
      -
      476  }
      -
      477  }
      -
      478  }
      -
      479 
      -
      480  return found;
      -
      481 }
      -
      482 
      -
      483 SIMDJSON_POP_DISABLE_WARNINGS
      -
      484 } // namespace simdjson
      -
      485 
      -
      486 #endif // SIMDJSON_DISABLE_DEPRECATED_API
      -
      487 
      +
      391  return doc.tape[location + 1];
      +
      392 }
      +
      393 
      +
      394 inline const char * dom::parser::Iterator::get_string() const {
      +
      395  return reinterpret_cast<const char *>(
      +
      396  doc.string_buf.get() + (current_val & internal::JSON_VALUE_MASK) + sizeof(uint32_t));
      +
      397 }
      +
      398 
      +
      399 inline uint32_t dom::parser::Iterator::get_string_length() const {
      +
      400  uint32_t answer;
      +
      401  std::memcpy(&answer,
      +
      402  reinterpret_cast<const char *>(doc.string_buf.get() +
      +
      403  (current_val & internal::JSON_VALUE_MASK)),
      +
      404  sizeof(uint32_t));
      +
      405  return answer;
      +
      406 }
      +
      407 
      +
      408 inline double dom::parser::Iterator::get_double() const {
      +
      409  if (location + 1 >= tape_length) {
      +
      410  return std::numeric_limits<double>::quiet_NaN(); // default value in
      +
      411  // case of error
      +
      412  }
      +
      413  double answer;
      +
      414  std::memcpy(&answer, &doc.tape[location + 1], sizeof(answer));
      +
      415  return answer;
      +
      416 }
      +
      417 
      +
      418 bool dom::parser::Iterator::relative_move_to(const char *pointer,
      +
      419  uint32_t length) {
      +
      420  if (length == 0) {
      +
      421  // returns the whole document
      +
      422  return true;
      +
      423  }
      +
      424 
      +
      425  if (pointer[0] != '/') {
      +
      426  // '/' must be the first character
      +
      427  return false;
      +
      428  }
      +
      429 
      +
      430  // finding the key in an object or the index in an array
      +
      431  std::string key_or_index;
      +
      432  uint32_t offset = 1;
      +
      433 
      +
      434  // checking for the "-" case
      +
      435  if (is_array() && pointer[1] == '-') {
      +
      436  if (length != 2) {
      +
      437  // the pointer must be exactly "/-"
      +
      438  // there can't be anything more after '-' as an index
      +
      439  return false;
      +
      440  }
      +
      441  key_or_index = '-';
      +
      442  offset = length; // will skip the loop coming right after
      +
      443  }
      +
      444 
      +
      445  // We either transform the first reference token to a valid json key
      +
      446  // or we make sure it is a valid index in an array.
      +
      447  for (; offset < length; offset++) {
      +
      448  if (pointer[offset] == '/') {
      +
      449  // beginning of the next key or index
      +
      450  break;
      +
      451  }
      +
      452  if (is_array() && (pointer[offset] < '0' || pointer[offset] > '9')) {
      +
      453  // the index of an array must be an integer
      +
      454  // we also make sure std::stoi won't discard whitespaces later
      +
      455  return false;
      +
      456  }
      +
      457  if (pointer[offset] == '~') {
      +
      458  // "~1" represents "/"
      +
      459  if (pointer[offset + 1] == '1') {
      +
      460  key_or_index += '/';
      +
      461  offset++;
      +
      462  continue;
      +
      463  }
      +
      464  // "~0" represents "~"
      +
      465  if (pointer[offset + 1] == '0') {
      +
      466  key_or_index += '~';
      +
      467  offset++;
      +
      468  continue;
      +
      469  }
      +
      470  }
      +
      471  if (pointer[offset] == '\\') {
      +
      472  if (pointer[offset + 1] == '\\' || pointer[offset + 1] == '"' ||
      +
      473  (pointer[offset + 1] <= 0x1F)) {
      +
      474  key_or_index += pointer[offset + 1];
      +
      475  offset++;
      +
      476  continue;
      +
      477  }
      +
      478  return false; // invalid escaped character
      +
      479  }
      +
      480  if (pointer[offset] == '\"') {
      +
      481  // unescaped quote character. this is an invalid case.
      +
      482  // lets do nothing and assume most pointers will be valid.
      +
      483  // it won't find any corresponding json key anyway.
      +
      484  // return false;
      +
      485  }
      +
      486  key_or_index += pointer[offset];
      +
      487  }
      488 
      -
      489 #endif // SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H
      -
      We want to support argument-dependent lookup (ADL).
      +
      489  bool found = false;
      +
      490  if (is_object()) {
      +
      491  if (move_to_key(key_or_index.c_str(), uint32_t(key_or_index.length()))) {
      +
      492  found = relative_move_to(pointer + offset, length - offset);
      +
      493  }
      +
      494  } else if (is_array()) {
      +
      495  if (key_or_index == "-") { // handling "-" case first
      +
      496  if (down()) {
      +
      497  while (next())
      +
      498  ; // moving to the end of the array
      +
      499  // moving to the nonexistent value right after...
      +
      500  size_t npos;
      +
      501  if ((current_type == '[') || (current_type == '{')) {
      +
      502  // we need to jump
      +
      503  npos = uint32_t(current_val);
      +
      504  } else {
      +
      505  npos =
      +
      506  location + ((current_type == 'd' || current_type == 'l') ? 2 : 1);
      +
      507  }
      +
      508  location = npos;
      +
      509  current_val = doc.tape[npos];
      +
      510  current_type = uint8_t(current_val >> 56);
      +
      511  return true; // how could it fail ?
      +
      512  }
      +
      513  } else { // regular numeric index
      +
      514  // The index can't have a leading '0'
      +
      515  if (key_or_index[0] == '0' && key_or_index.length() > 1) {
      +
      516  return false;
      +
      517  }
      +
      518  // it cannot be empty
      +
      519  if (key_or_index.length() == 0) {
      +
      520  return false;
      +
      521  }
      +
      522  // we already checked the index contains only valid digits
      +
      523  uint32_t index = std::stoi(key_or_index);
      +
      524  if (move_to_index(index)) {
      +
      525  found = relative_move_to(pointer + offset, length - offset);
      +
      526  }
      +
      527  }
      +
      528  }
      +
      529 
      +
      530  return found;
      +
      531 }
      +
      532 
      +
      533 SIMDJSON_POP_DISABLE_WARNINGS
      +
      534 } // namespace simdjson
      +
      535 
      +
      536 #endif // SIMDJSON_DISABLE_DEPRECATED_API
      +
      537 
      +
      538 
      +
      539 #endif // SIMDJSON_INLINE_PARSEDJSON_ITERATOR_H
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      diff --git a/parsedjson__iterator_8h_source.html b/parsedjson__iterator_8h_source.html index 20bdf23a5..a62c96f36 100644 --- a/parsedjson__iterator_8h_source.html +++ b/parsedjson__iterator_8h_source.html @@ -96,273 +96,232 @@ $(document).ready(function(){initNavTree('parsedjson__iterator_8h_source.html','
      3 #ifndef SIMDJSON_DOM_PARSEDJSON_ITERATOR_H
      4 #define SIMDJSON_DOM_PARSEDJSON_ITERATOR_H
      5 
      -
      6 #include <cstring>
      -
      7 #include <string>
      -
      8 #include <ostream>
      -
      9 #include <iterator>
      -
      10 #include <limits>
      -
      11 #include <stdexcept>
      -
      12 
      -
      13 #include "simdjson/dom/document.h"
      -
      14 #include "simdjson/dom/parsedjson.h"
      -
      15 #include "simdjson/internal/jsonformatutils.h"
      -
      16 
      -
      17 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
      +
      6 #include "simdjson/dom/base.h"
      +
      7 #include "simdjson/dom/parser.h"
      +
      8 
      +
      9 #ifndef SIMDJSON_DISABLE_DEPRECATED_API
      +
      10 
      +
      11 namespace simdjson {
      +
      13 class [[deprecated("Use the new DOM navigation API instead (see doc/basics.md)")]] dom::parser::Iterator {
      +
      14 public:
      +
      15  inline Iterator(const dom::parser &parser) noexcept(false);
      +
      16  inline Iterator(const Iterator &o) noexcept;
      +
      17  inline ~Iterator() noexcept;
      18 
      -
      19 namespace simdjson {
      -
      21 class [[deprecated("Use the new DOM navigation API instead (see doc/basics.md)")]] dom::parser::Iterator {
      -
      22 public:
      -
      23  inline Iterator(const dom::parser &parser) noexcept(false);
      -
      24  inline Iterator(const Iterator &o) noexcept;
      -
      25  inline ~Iterator() noexcept;
      -
      26 
      -
      27  inline Iterator& operator=(const Iterator&) = delete;
      +
      19  inline Iterator& operator=(const Iterator&) = delete;
      +
      20 
      +
      21  inline bool is_ok() const;
      +
      22 
      +
      23  // useful for debugging purposes
      +
      24  inline size_t get_tape_location() const;
      +
      25 
      +
      26  // useful for debugging purposes
      +
      27  inline size_t get_tape_length() const;
      28 
      -
      29  inline bool is_ok() const;
      -
      30 
      -
      31  // useful for debugging purposes
      -
      32  inline size_t get_tape_location() const;
      -
      33 
      -
      34  // useful for debugging purposes
      -
      35  inline size_t get_tape_length() const;
      +
      29  // returns the current depth (start at 1 with 0 reserved for the fictitious
      +
      30  // root node)
      +
      31  inline size_t get_depth() const;
      +
      32 
      +
      33  // A scope is a series of nodes at the same depth, typically it is either an
      +
      34  // object ({) or an array ([). The root node has type 'r'.
      +
      35  inline uint8_t get_scope_type() const;
      36 
      -
      37  // returns the current depth (start at 1 with 0 reserved for the fictitious
      -
      38  // root node)
      -
      39  inline size_t get_depth() const;
      -
      40 
      -
      41  // A scope is a series of nodes at the same depth, typically it is either an
      -
      42  // object ({) or an array ([). The root node has type 'r'.
      -
      43  inline uint8_t get_scope_type() const;
      -
      44 
      -
      45  // move forward in document order
      -
      46  inline bool move_forward();
      -
      47 
      -
      48  // retrieve the character code of what we're looking at:
      -
      49  // [{"slutfn are the possibilities
      -
      50  inline uint8_t get_type() const {
      -
      51  return current_type; // short functions should be inlined!
      -
      52  }
      -
      53 
      -
      54  // get the int64_t value at this node; valid only if get_type is "l"
      -
      55  inline int64_t get_integer() const {
      -
      56  if (location + 1 >= tape_length) {
      -
      57  return 0; // default value in case of error
      -
      58  }
      -
      59  return static_cast<int64_t>(doc.tape[location + 1]);
      -
      60  }
      -
      61 
      -
      62  // get the value as uint64; valid only if if get_type is "u"
      -
      63  inline uint64_t get_unsigned_integer() const {
      -
      64  if (location + 1 >= tape_length) {
      -
      65  return 0; // default value in case of error
      -
      66  }
      -
      67  return doc.tape[location + 1];
      -
      68  }
      -
      69 
      -
      70  // get the string value at this node (NULL ended); valid only if get_type is "
      -
      71  // note that tabs, and line endings are escaped in the returned value (see
      -
      72  // print_with_escapes) return value is valid UTF-8, it may contain NULL chars
      -
      73  // within the string: get_string_length determines the true string length.
      -
      74  inline const char *get_string() const {
      -
      75  return reinterpret_cast<const char *>(
      -
      76  doc.string_buf.get() + (current_val & internal::JSON_VALUE_MASK) + sizeof(uint32_t));
      -
      77  }
      -
      78 
      -
      79  // return the length of the string in bytes
      -
      80  inline uint32_t get_string_length() const {
      -
      81  uint32_t answer;
      -
      82  std::memcpy(&answer,
      -
      83  reinterpret_cast<const char *>(doc.string_buf.get() +
      -
      84  (current_val & internal::JSON_VALUE_MASK)),
      -
      85  sizeof(uint32_t));
      -
      86  return answer;
      -
      87  }
      -
      88 
      -
      89  // get the double value at this node; valid only if
      -
      90  // get_type() is "d"
      -
      91  inline double get_double() const {
      -
      92  if (location + 1 >= tape_length) {
      -
      93  return std::numeric_limits<double>::quiet_NaN(); // default value in
      -
      94  // case of error
      -
      95  }
      -
      96  double answer;
      -
      97  std::memcpy(&answer, &doc.tape[location + 1], sizeof(answer));
      -
      98  return answer;
      -
      99  }
      -
      100 
      -
      101  inline bool is_object_or_array() const { return is_object() || is_array(); }
      +
      37  // move forward in document order
      +
      38  inline bool move_forward();
      +
      39 
      +
      40  // retrieve the character code of what we're looking at:
      +
      41  // [{"slutfn are the possibilities
      +
      42  inline uint8_t get_type() const {
      +
      43  return current_type; // short functions should be inlined!
      +
      44  }
      +
      45 
      +
      46  // get the int64_t value at this node; valid only if get_type is "l"
      +
      47  inline int64_t get_integer() const;
      +
      48 
      +
      49  // get the value as uint64; valid only if if get_type is "u"
      +
      50  inline uint64_t get_unsigned_integer() const;
      +
      51 
      +
      52  // get the string value at this node (NULL ended); valid only if get_type is "
      +
      53  // note that tabs, and line endings are escaped in the returned value (see
      +
      54  // print_with_escapes) return value is valid UTF-8, it may contain NULL chars
      +
      55  // within the string: get_string_length determines the true string length.
      +
      56  inline const char *get_string() const;
      +
      57 
      +
      58  // return the length of the string in bytes
      +
      59  inline uint32_t get_string_length() const;
      +
      60 
      +
      61  // get the double value at this node; valid only if
      +
      62  // get_type() is "d"
      +
      63  inline double get_double() const;
      +
      64 
      +
      65  inline bool is_object_or_array() const { return is_object() || is_array(); }
      +
      66 
      +
      67  inline bool is_object() const { return get_type() == '{'; }
      +
      68 
      +
      69  inline bool is_array() const { return get_type() == '['; }
      +
      70 
      +
      71  inline bool is_string() const { return get_type() == '"'; }
      +
      72 
      +
      73  // Returns true if the current type of the node is an signed integer.
      +
      74  // You can get its value with `get_integer()`.
      +
      75  inline bool is_integer() const { return get_type() == 'l'; }
      +
      76 
      +
      77  // Returns true if the current type of the node is an unsigned integer.
      +
      78  // You can get its value with `get_unsigned_integer()`.
      +
      79  //
      +
      80  // NOTE:
      +
      81  // Only a large value, which is out of range of a 64-bit signed integer, is
      +
      82  // represented internally as an unsigned node. On the other hand, a typical
      +
      83  // positive integer, such as 1, 42, or 1000000, is as a signed node.
      +
      84  // Be aware this function returns false for a signed node.
      +
      85  inline bool is_unsigned_integer() const { return get_type() == 'u'; }
      +
      86  // Returns true if the current type of the node is a double floating-point number.
      +
      87  inline bool is_double() const { return get_type() == 'd'; }
      +
      88  // Returns true if the current type of the node is a number (integer or floating-point).
      +
      89  inline bool is_number() const {
      +
      90  return is_integer() || is_unsigned_integer() || is_double();
      +
      91  }
      +
      92  // Returns true if the current type of the node is a bool with true value.
      +
      93  inline bool is_true() const { return get_type() == 't'; }
      +
      94  // Returns true if the current type of the node is a bool with false value.
      +
      95  inline bool is_false() const { return get_type() == 'f'; }
      +
      96  // Returns true if the current type of the node is null.
      +
      97  inline bool is_null() const { return get_type() == 'n'; }
      +
      98  // Returns true if the type byte represents an object of an array
      +
      99  static bool is_object_or_array(uint8_t type) {
      +
      100  return ((type == '[') || (type == '{'));
      +
      101  }
      102 
      -
      103  inline bool is_object() const { return get_type() == '{'; }
      -
      104 
      -
      105  inline bool is_array() const { return get_type() == '['; }
      -
      106 
      -
      107  inline bool is_string() const { return get_type() == '"'; }
      -
      108 
      -
      109  // Returns true if the current type of the node is an signed integer.
      -
      110  // You can get its value with `get_integer()`.
      -
      111  inline bool is_integer() const { return get_type() == 'l'; }
      -
      112 
      -
      113  // Returns true if the current type of the node is an unsigned integer.
      -
      114  // You can get its value with `get_unsigned_integer()`.
      -
      115  //
      -
      116  // NOTE:
      -
      117  // Only a large value, which is out of range of a 64-bit signed integer, is
      -
      118  // represented internally as an unsigned node. On the other hand, a typical
      -
      119  // positive integer, such as 1, 42, or 1000000, is as a signed node.
      -
      120  // Be aware this function returns false for a signed node.
      -
      121  inline bool is_unsigned_integer() const { return get_type() == 'u'; }
      -
      122  // Returns true if the current type of the node is a double floating-point number.
      -
      123  inline bool is_double() const { return get_type() == 'd'; }
      -
      124  // Returns true if the current type of the node is a number (integer or floating-point).
      -
      125  inline bool is_number() const {
      -
      126  return is_integer() || is_unsigned_integer() || is_double();
      -
      127  }
      -
      128  // Returns true if the current type of the node is a bool with true value.
      -
      129  inline bool is_true() const { return get_type() == 't'; }
      -
      130  // Returns true if the current type of the node is a bool with false value.
      -
      131  inline bool is_false() const { return get_type() == 'f'; }
      -
      132  // Returns true if the current type of the node is null.
      -
      133  inline bool is_null() const { return get_type() == 'n'; }
      -
      134  // Returns true if the type byte represents an object of an array
      -
      135  static bool is_object_or_array(uint8_t type) {
      -
      136  return ((type == '[') || (type == '{'));
      -
      137  }
      -
      138 
      -
      139  // when at {, go one level deep, looking for a given key
      -
      140  // if successful, we are left pointing at the value,
      -
      141  // if not, we are still pointing at the object ({)
      -
      142  // (in case of repeated keys, this only finds the first one).
      -
      143  // We seek the key using C's strcmp so if your JSON strings contain
      -
      144  // NULL chars, this would trigger a false positive: if you expect that
      -
      145  // to be the case, take extra precautions.
      -
      146  // Furthermore, we do the comparison character-by-character
      -
      147  // without taking into account Unicode equivalence.
      -
      148  inline bool move_to_key(const char *key);
      -
      149 
      -
      150  // as above, but case insensitive lookup (strcmpi instead of strcmp)
      -
      151  inline bool move_to_key_insensitive(const char *key);
      -
      152 
      -
      153  // when at {, go one level deep, looking for a given key
      -
      154  // if successful, we are left pointing at the value,
      -
      155  // if not, we are still pointing at the object ({)
      -
      156  // (in case of repeated keys, this only finds the first one).
      -
      157  // The string we search for can contain NULL values.
      -
      158  // Furthermore, we do the comparison character-by-character
      -
      159  // without taking into account Unicode equivalence.
      -
      160  inline bool move_to_key(const char *key, uint32_t length);
      -
      161 
      -
      162  // when at a key location within an object, this moves to the accompanying
      -
      163  // value (located next to it). This is equivalent but much faster than
      -
      164  // calling "next()".
      -
      165  inline void move_to_value();
      -
      166 
      -
      167  // when at [, go one level deep, and advance to the given index.
      -
      168  // if successful, we are left pointing at the value,
      -
      169  // if not, we are still pointing at the array ([)
      -
      170  inline bool move_to_index(uint32_t index);
      -
      171 
      -
      172  // Moves the iterator to the value corresponding to the json pointer.
      -
      173  // Always search from the root of the document.
      -
      174  // if successful, we are left pointing at the value,
      -
      175  // if not, we are still pointing the same value we were pointing before the
      -
      176  // call. The json pointer follows the rfc6901 standard's syntax:
      -
      177  // https://tools.ietf.org/html/rfc6901 However, the standard says "If a
      -
      178  // referenced member name is not unique in an object, the member that is
      -
      179  // referenced is undefined, and evaluation fails". Here we just return the
      -
      180  // first corresponding value. The length parameter is the length of the
      -
      181  // jsonpointer string ('pointer').
      -
      182  inline bool move_to(const char *pointer, uint32_t length);
      -
      183 
      -
      184  // Moves the iterator to the value corresponding to the json pointer.
      -
      185  // Always search from the root of the document.
      -
      186  // if successful, we are left pointing at the value,
      -
      187  // if not, we are still pointing the same value we were pointing before the
      -
      188  // call. The json pointer implementation follows the rfc6901 standard's
      -
      189  // syntax: https://tools.ietf.org/html/rfc6901 However, the standard says
      -
      190  // "If a referenced member name is not unique in an object, the member that
      -
      191  // is referenced is undefined, and evaluation fails". Here we just return
      -
      192  // the first corresponding value.
      -
      193  inline bool move_to(const std::string &pointer) {
      -
      194  return move_to(pointer.c_str(), uint32_t(pointer.length()));
      -
      195  }
      -
      196 
      -
      197  private:
      -
      198  // Almost the same as move_to(), except it searches from the current
      -
      199  // position. The pointer's syntax is identical, though that case is not
      -
      200  // handled by the rfc6901 standard. The '/' is still required at the
      -
      201  // beginning. However, contrary to move_to(), the URI Fragment Identifier
      -
      202  // Representation is not supported here. Also, in case of failure, we are
      -
      203  // left pointing at the closest value it could reach. For these reasons it
      -
      204  // is private. It exists because it is used by move_to().
      -
      205  inline bool relative_move_to(const char *pointer, uint32_t length);
      +
      103  // when at {, go one level deep, looking for a given key
      +
      104  // if successful, we are left pointing at the value,
      +
      105  // if not, we are still pointing at the object ({)
      +
      106  // (in case of repeated keys, this only finds the first one).
      +
      107  // We seek the key using C's strcmp so if your JSON strings contain
      +
      108  // NULL chars, this would trigger a false positive: if you expect that
      +
      109  // to be the case, take extra precautions.
      +
      110  // Furthermore, we do the comparison character-by-character
      +
      111  // without taking into account Unicode equivalence.
      +
      112  inline bool move_to_key(const char *key);
      +
      113 
      +
      114  // as above, but case insensitive lookup (strcmpi instead of strcmp)
      +
      115  inline bool move_to_key_insensitive(const char *key);
      +
      116 
      +
      117  // when at {, go one level deep, looking for a given key
      +
      118  // if successful, we are left pointing at the value,
      +
      119  // if not, we are still pointing at the object ({)
      +
      120  // (in case of repeated keys, this only finds the first one).
      +
      121  // The string we search for can contain NULL values.
      +
      122  // Furthermore, we do the comparison character-by-character
      +
      123  // without taking into account Unicode equivalence.
      +
      124  inline bool move_to_key(const char *key, uint32_t length);
      +
      125 
      +
      126  // when at a key location within an object, this moves to the accompanying
      +
      127  // value (located next to it). This is equivalent but much faster than
      +
      128  // calling "next()".
      +
      129  inline void move_to_value();
      +
      130 
      +
      131  // when at [, go one level deep, and advance to the given index.
      +
      132  // if successful, we are left pointing at the value,
      +
      133  // if not, we are still pointing at the array ([)
      +
      134  inline bool move_to_index(uint32_t index);
      +
      135 
      +
      136  // Moves the iterator to the value corresponding to the json pointer.
      +
      137  // Always search from the root of the document.
      +
      138  // if successful, we are left pointing at the value,
      +
      139  // if not, we are still pointing the same value we were pointing before the
      +
      140  // call. The json pointer follows the rfc6901 standard's syntax:
      +
      141  // https://tools.ietf.org/html/rfc6901 However, the standard says "If a
      +
      142  // referenced member name is not unique in an object, the member that is
      +
      143  // referenced is undefined, and evaluation fails". Here we just return the
      +
      144  // first corresponding value. The length parameter is the length of the
      +
      145  // jsonpointer string ('pointer').
      +
      146  inline bool move_to(const char *pointer, uint32_t length);
      +
      147 
      +
      148  // Moves the iterator to the value corresponding to the json pointer.
      +
      149  // Always search from the root of the document.
      +
      150  // if successful, we are left pointing at the value,
      +
      151  // if not, we are still pointing the same value we were pointing before the
      +
      152  // call. The json pointer implementation follows the rfc6901 standard's
      +
      153  // syntax: https://tools.ietf.org/html/rfc6901 However, the standard says
      +
      154  // "If a referenced member name is not unique in an object, the member that
      +
      155  // is referenced is undefined, and evaluation fails". Here we just return
      +
      156  // the first corresponding value.
      +
      157  inline bool move_to(const std::string &pointer);
      +
      158 
      +
      159  private:
      +
      160  // Almost the same as move_to(), except it searches from the current
      +
      161  // position. The pointer's syntax is identical, though that case is not
      +
      162  // handled by the rfc6901 standard. The '/' is still required at the
      +
      163  // beginning. However, contrary to move_to(), the URI Fragment Identifier
      +
      164  // Representation is not supported here. Also, in case of failure, we are
      +
      165  // left pointing at the closest value it could reach. For these reasons it
      +
      166  // is private. It exists because it is used by move_to().
      +
      167  inline bool relative_move_to(const char *pointer, uint32_t length);
      +
      168 
      +
      169  public:
      +
      170  // throughout return true if we can do the navigation, false
      +
      171  // otherwise
      +
      172 
      +
      173  // Within a given scope (series of nodes at the same depth within either an
      +
      174  // array or an object), we move forward.
      +
      175  // Thus, given [true, null, {"a":1}, [1,2]], we would visit true, null, {
      +
      176  // and [. At the object ({) or at the array ([), you can issue a "down" to
      +
      177  // visit their content. valid if we're not at the end of a scope (returns
      +
      178  // true).
      +
      179  inline bool next();
      +
      180 
      +
      181  // Within a given scope (series of nodes at the same depth within either an
      +
      182  // array or an object), we move backward.
      +
      183  // Thus, given [true, null, {"a":1}, [1,2]], we would visit ], }, null, true
      +
      184  // when starting at the end of the scope. At the object ({) or at the array
      +
      185  // ([), you can issue a "down" to visit their content.
      +
      186  // Performance warning: This function is implemented by starting again
      +
      187  // from the beginning of the scope and scanning forward. You should expect
      +
      188  // it to be relatively slow.
      +
      189  inline bool prev();
      +
      190 
      +
      191  // Moves back to either the containing array or object (type { or [) from
      +
      192  // within a contained scope.
      +
      193  // Valid unless we are at the first level of the document
      +
      194  inline bool up();
      +
      195 
      +
      196  // Valid if we're at a [ or { and it starts a non-empty scope; moves us to
      +
      197  // start of that deeper scope if it not empty. Thus, given [true, null,
      +
      198  // {"a":1}, [1,2]], if we are at the { node, we would move to the "a" node.
      +
      199  inline bool down();
      +
      200 
      +
      201  // move us to the start of our current scope,
      +
      202  // a scope is a series of nodes at the same level
      +
      203  inline void to_start_scope();
      +
      204 
      +
      205  inline void rewind();
      206 
      -
      207  public:
      -
      208  // throughout return true if we can do the navigation, false
      -
      209  // otherwise
      -
      210 
      -
      211  // Within a given scope (series of nodes at the same depth within either an
      -
      212  // array or an object), we move forward.
      -
      213  // Thus, given [true, null, {"a":1}, [1,2]], we would visit true, null, {
      -
      214  // and [. At the object ({) or at the array ([), you can issue a "down" to
      -
      215  // visit their content. valid if we're not at the end of a scope (returns
      -
      216  // true).
      -
      217  inline bool next();
      -
      218 
      -
      219  // Within a given scope (series of nodes at the same depth within either an
      -
      220  // array or an object), we move backward.
      -
      221  // Thus, given [true, null, {"a":1}, [1,2]], we would visit ], }, null, true
      -
      222  // when starting at the end of the scope. At the object ({) or at the array
      -
      223  // ([), you can issue a "down" to visit their content.
      -
      224  // Performance warning: This function is implemented by starting again
      -
      225  // from the beginning of the scope and scanning forward. You should expect
      -
      226  // it to be relatively slow.
      -
      227  inline bool prev();
      -
      228 
      -
      229  // Moves back to either the containing array or object (type { or [) from
      -
      230  // within a contained scope.
      -
      231  // Valid unless we are at the first level of the document
      -
      232  inline bool up();
      -
      233 
      -
      234  // Valid if we're at a [ or { and it starts a non-empty scope; moves us to
      -
      235  // start of that deeper scope if it not empty. Thus, given [true, null,
      -
      236  // {"a":1}, [1,2]], if we are at the { node, we would move to the "a" node.
      -
      237  inline bool down();
      -
      238 
      -
      239  // move us to the start of our current scope,
      -
      240  // a scope is a series of nodes at the same level
      -
      241  inline void to_start_scope();
      -
      242 
      -
      243  inline void rewind() {
      -
      244  while (up())
      -
      245  ;
      -
      246  }
      -
      247 
      -
      248 
      -
      249 
      -
      250  // print the node we are currently pointing at
      -
      251  inline bool print(std::ostream &os, bool escape_strings = true) const;
      -
      252 
      -
      253  private:
      -
      254  const document &doc;
      -
      255  size_t max_depth{};
      -
      256  size_t depth{};
      -
      257  size_t location{}; // our current location on a tape
      -
      258  size_t tape_length{};
      -
      259  uint8_t current_type{};
      -
      260  uint64_t current_val{};
      -
      261  typedef struct {
      -
      262  size_t start_of_scope;
      -
      263  uint8_t scope_type;
      -
      264  } scopeindex_t;
      -
      265 
      -
      266  scopeindex_t *depth_index{};
      -
      267 };
      -
      268 
      -
      269 } // namespace simdjson
      -
      270 #endif // SIMDJSON_DISABLE_DEPRECATED_API
      -
      271 
      -
      272 #endif // SIMDJSON_DOM_PARSEDJSON_ITERATOR_H
      -
      We want to support argument-dependent lookup (ADL).
      +
      207 
      +
      208 
      +
      209  // print the node we are currently pointing at
      +
      210  inline bool print(std::ostream &os, bool escape_strings = true) const;
      +
      211 
      +
      212  private:
      +
      213  const document &doc;
      +
      214  size_t max_depth{};
      +
      215  size_t depth{};
      +
      216  size_t location{}; // our current location on a tape
      +
      217  size_t tape_length{};
      +
      218  uint8_t current_type{};
      +
      219  uint64_t current_val{};
      +
      220  typedef struct {
      +
      221  size_t start_of_scope;
      +
      222  uint8_t scope_type;
      +
      223  } scopeindex_t;
      +
      224 
      +
      225  scopeindex_t *depth_index{};
      +
      226 };
      +
      227 
      +
      228 } // namespace simdjson
      +
      229 #endif // SIMDJSON_DISABLE_DEPRECATED_API
      +
      230 
      +
      231 #endif // SIMDJSON_DOM_PARSEDJSON_ITERATOR_H
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      diff --git a/portability_8h_source.html b/portability_8h_source.html index 5c16db8b3..f9638bada 100644 --- a/portability_8h_source.html +++ b/portability_8h_source.html @@ -151,127 +151,133 @@ $(document).ready(function(){initNavTree('portability_8h_source.html',''); initR
      68 #endif // SIMDJSON_NO_PORTABILITY_WARNING
      69 #endif // SIMDJSON_IS_32BITS
      70 
      -
      71 // this is almost standard?
      -
      72 #undef SIMDJSON_STRINGIFY_IMPLEMENTATION_
      -
      73 #undef SIMDJSON_STRINGIFY
      -
      74 #define SIMDJSON_STRINGIFY_IMPLEMENTATION_(a) #a
      -
      75 #define SIMDJSON_STRINGIFY(a) SIMDJSON_STRINGIFY_IMPLEMENTATION_(a)
      +
      71 #define SIMDJSON_CAT_IMPLEMENTATION_(a,...) a ## __VA_ARGS__
      +
      72 #define SIMDJSON_CAT(a,...) SIMDJSON_CAT_IMPLEMENTATION_(a, __VA_ARGS__)
      +
      73 
      +
      74 #define SIMDJSON_STRINGIFY_IMPLEMENTATION_(a,...) #a SIMDJSON_STRINGIFY(__VA_ARGS__)
      +
      75 #define SIMDJSON_STRINGIFY(a,...) SIMDJSON_CAT_IMPLEMENTATION_(a, __VA_ARGS__)
      76 
      -
      77 // Our fast kernels require 64-bit systems.
      -
      78 //
      -
      79 // On 32-bit x86, we lack 64-bit popcnt, lzcnt, blsr instructions.
      -
      80 // Furthermore, the number of SIMD registers is reduced.
      -
      81 //
      -
      82 // On 32-bit ARM, we would have smaller registers.
      -
      83 //
      -
      84 // The simdjson users should still have the fallback kernel. It is
      -
      85 // slower, but it should run everywhere.
      -
      86 
      +
      77 // this is almost standard?
      +
      78 #undef SIMDJSON_STRINGIFY_IMPLEMENTATION_
      +
      79 #undef SIMDJSON_STRINGIFY
      +
      80 #define SIMDJSON_STRINGIFY_IMPLEMENTATION_(a) #a
      +
      81 #define SIMDJSON_STRINGIFY(a) SIMDJSON_STRINGIFY_IMPLEMENTATION_(a)
      +
      82 
      +
      83 // Our fast kernels require 64-bit systems.
      +
      84 //
      +
      85 // On 32-bit x86, we lack 64-bit popcnt, lzcnt, blsr instructions.
      +
      86 // Furthermore, the number of SIMD registers is reduced.
      87 //
      -
      88 // Enable valid runtime implementations, and select SIMDJSON_BUILTIN_IMPLEMENTATION
      +
      88 // On 32-bit ARM, we would have smaller registers.
      89 //
      -
      90 
      -
      91 // We are going to use runtime dispatch.
      -
      92 #if SIMDJSON_IS_X86_64
      -
      93 #ifdef __clang__
      -
      94 // clang does not have GCC push pop
      -
      95 // warning: clang attribute push can't be used within a namespace in clang up
      -
      96 // til 8.0 so SIMDJSON_TARGET_REGION and SIMDJSON_UNTARGET_REGION must be *outside* of a
      -
      97 // namespace.
      -
      98 #define SIMDJSON_TARGET_REGION(T) \
      -
      99  _Pragma(SIMDJSON_STRINGIFY( \
      -
      100  clang attribute push(__attribute__((target(T))), apply_to = function)))
      -
      101 #define SIMDJSON_UNTARGET_REGION _Pragma("clang attribute pop")
      -
      102 #elif defined(__GNUC__)
      -
      103 // GCC is easier
      +
      90 // The simdjson users should still have the fallback kernel. It is
      +
      91 // slower, but it should run everywhere.
      +
      92 
      +
      93 //
      +
      94 // Enable valid runtime implementations, and select SIMDJSON_BUILTIN_IMPLEMENTATION
      +
      95 //
      +
      96 
      +
      97 // We are going to use runtime dispatch.
      +
      98 #if SIMDJSON_IS_X86_64
      +
      99 #ifdef __clang__
      +
      100 // clang does not have GCC push pop
      +
      101 // warning: clang attribute push can't be used within a namespace in clang up
      +
      102 // til 8.0 so SIMDJSON_TARGET_REGION and SIMDJSON_UNTARGET_REGION must be *outside* of a
      +
      103 // namespace.
      104 #define SIMDJSON_TARGET_REGION(T) \
      -
      105  _Pragma("GCC push_options") _Pragma(SIMDJSON_STRINGIFY(GCC target(T)))
      -
      106 #define SIMDJSON_UNTARGET_REGION _Pragma("GCC pop_options")
      -
      107 #endif // clang then gcc
      -
      108 
      -
      109 #endif // x86
      -
      110 
      -
      111 // Default target region macros don't do anything.
      -
      112 #ifndef SIMDJSON_TARGET_REGION
      -
      113 #define SIMDJSON_TARGET_REGION(T)
      -
      114 #define SIMDJSON_UNTARGET_REGION
      -
      115 #endif
      +
      105  _Pragma(SIMDJSON_STRINGIFY( \
      +
      106  clang attribute push(__attribute__((target(T))), apply_to = function)))
      +
      107 #define SIMDJSON_UNTARGET_REGION _Pragma("clang attribute pop")
      +
      108 #elif defined(__GNUC__)
      +
      109 // GCC is easier
      +
      110 #define SIMDJSON_TARGET_REGION(T) \
      +
      111  _Pragma("GCC push_options") _Pragma(SIMDJSON_STRINGIFY(GCC target(T)))
      +
      112 #define SIMDJSON_UNTARGET_REGION _Pragma("GCC pop_options")
      +
      113 #endif // clang then gcc
      +
      114 
      +
      115 #endif // x86
      116 
      -
      117 // Is threading enabled?
      -
      118 #if defined(_REENTRANT) || defined(_MT)
      -
      119 #ifndef SIMDJSON_THREADS_ENABLED
      -
      120 #define SIMDJSON_THREADS_ENABLED
      +
      117 // Default target region macros don't do anything.
      +
      118 #ifndef SIMDJSON_TARGET_REGION
      +
      119 #define SIMDJSON_TARGET_REGION(T)
      +
      120 #define SIMDJSON_UNTARGET_REGION
      121 #endif
      -
      122 #endif
      -
      123 
      -
      124 // workaround for large stack sizes under -O0.
      -
      125 // https://github.com/simdjson/simdjson/issues/691
      -
      126 #ifdef __APPLE__
      -
      127 #ifndef __OPTIMIZE__
      -
      128 // Apple systems have small stack sizes in secondary threads.
      -
      129 // Lack of compiler optimization may generate high stack usage.
      -
      130 // Users may want to disable threads for safety, but only when
      -
      131 // in debug mode which we detect by the fact that the __OPTIMIZE__
      -
      132 // macro is not defined.
      -
      133 #undef SIMDJSON_THREADS_ENABLED
      -
      134 #endif
      -
      135 #endif
      -
      136 
      -
      137 
      -
      138 #if defined(__clang__)
      -
      139 #define SIMDJSON_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined")))
      -
      140 #elif defined(__GNUC__)
      -
      141 #define SIMDJSON_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize_undefined))
      -
      142 #else
      -
      143 #define SIMDJSON_NO_SANITIZE_UNDEFINED
      -
      144 #endif
      -
      145 
      -
      146 
      -
      147 #if defined(__clang__) || defined(__GNUC__)
      -
      148 #if defined(__has_feature)
      -
      149 # if __has_feature(memory_sanitizer)
      -
      150 #define SIMDJSON_NO_SANITIZE_MEMORY __attribute__((no_sanitize("memory")))
      -
      151 # endif // if __has_feature(memory_sanitizer)
      -
      152 #endif // defined(__has_feature)
      -
      153 #endif
      -
      154 // make sure it is defined as 'nothing' if it is unapplicable.
      -
      155 #ifndef SIMDJSON_NO_SANITIZE_MEMORY
      -
      156 #define SIMDJSON_NO_SANITIZE_MEMORY
      -
      157 #endif
      -
      158 
      -
      159 #if SIMDJSON_VISUAL_STUDIO
      -
      160 // This is one case where we do not distinguish between
      -
      161 // regular visual studio and clang under visual studio.
      -
      162 // clang under Windows has _stricmp (like visual studio) but not strcasecmp (as clang normally has)
      -
      163 #define simdjson_strcasecmp _stricmp
      -
      164 #define simdjson_strncasecmp _strnicmp
      -
      165 #else
      -
      166 // The strcasecmp, strncasecmp, and strcasestr functions do not work with multibyte strings (e.g. UTF-8).
      -
      167 // So they are only useful for ASCII in our context.
      -
      168 // https://www.gnu.org/software/libunistring/manual/libunistring.html#char-_002a-strings
      -
      169 #define simdjson_strcasecmp strcasecmp
      -
      170 #define simdjson_strncasecmp strncasecmp
      -
      171 #endif
      -
      172 
      -
      173 #if defined(NDEBUG) || defined(__OPTIMIZE__) || (defined(_MSC_VER) && !defined(_DEBUG))
      -
      174 // If NDEBUG is set, or __OPTIMIZE__ is set, or we are under MSVC in release mode,
      -
      175 // then do away with asserts and use __assume.
      -
      176 #if SIMDJSON_VISUAL_STUDIO
      -
      177 #define SIMDJSON_UNREACHABLE() __assume(0)
      -
      178 #define SIMDJSON_ASSUME(COND) __assume(COND)
      -
      179 #else
      -
      180 #define SIMDJSON_UNREACHABLE() __builtin_unreachable();
      -
      181 #define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
      -
      182 #endif
      -
      183 
      -
      184 #else // defined(NDEBUG) || defined(__OPTIMIZE__) || (defined(_MSC_VER) && !defined(_DEBUG))
      -
      185 // This should only ever be enabled in debug mode.
      -
      186 #define SIMDJSON_UNREACHABLE() assert(0);
      -
      187 #define SIMDJSON_ASSUME(COND) assert(COND)
      -
      188 
      -
      189 #endif
      -
      190 
      -
      191 #endif // SIMDJSON_PORTABILITY_H
      +
      122 
      +
      123 // Is threading enabled?
      +
      124 #if defined(_REENTRANT) || defined(_MT)
      +
      125 #ifndef SIMDJSON_THREADS_ENABLED
      +
      126 #define SIMDJSON_THREADS_ENABLED
      +
      127 #endif
      +
      128 #endif
      +
      129 
      +
      130 // workaround for large stack sizes under -O0.
      +
      131 // https://github.com/simdjson/simdjson/issues/691
      +
      132 #ifdef __APPLE__
      +
      133 #ifndef __OPTIMIZE__
      +
      134 // Apple systems have small stack sizes in secondary threads.
      +
      135 // Lack of compiler optimization may generate high stack usage.
      +
      136 // Users may want to disable threads for safety, but only when
      +
      137 // in debug mode which we detect by the fact that the __OPTIMIZE__
      +
      138 // macro is not defined.
      +
      139 #undef SIMDJSON_THREADS_ENABLED
      +
      140 #endif
      +
      141 #endif
      +
      142 
      +
      143 
      +
      144 #if defined(__clang__)
      +
      145 #define SIMDJSON_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined")))
      +
      146 #elif defined(__GNUC__)
      +
      147 #define SIMDJSON_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize_undefined))
      +
      148 #else
      +
      149 #define SIMDJSON_NO_SANITIZE_UNDEFINED
      +
      150 #endif
      +
      151 
      +
      152 
      +
      153 #if defined(__clang__) || defined(__GNUC__)
      +
      154 #if defined(__has_feature)
      +
      155 # if __has_feature(memory_sanitizer)
      +
      156 #define SIMDJSON_NO_SANITIZE_MEMORY __attribute__((no_sanitize("memory")))
      +
      157 # endif // if __has_feature(memory_sanitizer)
      +
      158 #endif // defined(__has_feature)
      +
      159 #endif
      +
      160 // make sure it is defined as 'nothing' if it is unapplicable.
      +
      161 #ifndef SIMDJSON_NO_SANITIZE_MEMORY
      +
      162 #define SIMDJSON_NO_SANITIZE_MEMORY
      +
      163 #endif
      +
      164 
      +
      165 #if SIMDJSON_VISUAL_STUDIO
      +
      166 // This is one case where we do not distinguish between
      +
      167 // regular visual studio and clang under visual studio.
      +
      168 // clang under Windows has _stricmp (like visual studio) but not strcasecmp (as clang normally has)
      +
      169 #define simdjson_strcasecmp _stricmp
      +
      170 #define simdjson_strncasecmp _strnicmp
      +
      171 #else
      +
      172 // The strcasecmp, strncasecmp, and strcasestr functions do not work with multibyte strings (e.g. UTF-8).
      +
      173 // So they are only useful for ASCII in our context.
      +
      174 // https://www.gnu.org/software/libunistring/manual/libunistring.html#char-_002a-strings
      +
      175 #define simdjson_strcasecmp strcasecmp
      +
      176 #define simdjson_strncasecmp strncasecmp
      +
      177 #endif
      +
      178 
      +
      179 #if defined(NDEBUG) || defined(__OPTIMIZE__) || (defined(_MSC_VER) && !defined(_DEBUG))
      +
      180 // If NDEBUG is set, or __OPTIMIZE__ is set, or we are under MSVC in release mode,
      +
      181 // then do away with asserts and use __assume.
      +
      182 #if SIMDJSON_VISUAL_STUDIO
      +
      183 #define SIMDJSON_UNREACHABLE() __assume(0)
      +
      184 #define SIMDJSON_ASSUME(COND) __assume(COND)
      +
      185 #else
      +
      186 #define SIMDJSON_UNREACHABLE() __builtin_unreachable();
      +
      187 #define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0)
      +
      188 #endif
      +
      189 
      +
      190 #else // defined(NDEBUG) || defined(__OPTIMIZE__) || (defined(_MSC_VER) && !defined(_DEBUG))
      +
      191 // This should only ever be enabled in debug mode.
      +
      192 #define SIMDJSON_UNREACHABLE() assert(0);
      +
      193 #define SIMDJSON_ASSUME(COND) assert(COND)
      +
      194 
      +
      195 #endif
      +
      196 
      +
      197 #endif // SIMDJSON_PORTABILITY_H
      diff --git a/icelake_2numberparsing_8h_source.html b/ppc64_2base_8h_source.html similarity index 63% rename from icelake_2numberparsing_8h_source.html rename to ppc64_2base_8h_source.html index 1646d28b8..174400c7e 100644 --- a/icelake_2numberparsing_8h_source.html +++ b/ppc64_2base_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/icelake/numberparsing.h Source File +simdjson: include/simdjson/ppc64/base.h Source File @@ -68,7 +68,7 @@ $(function() {
      @@ -88,50 +88,46 @@ $(document).ready(function(){initNavTree('icelake_2numberparsing_8h_source.html'
      -
      numberparsing.h
      +
      base.h
      -
      1 #ifndef SIMDJSON_ICELAKE_NUMBERPARSING_H
      -
      2 #define SIMDJSON_ICELAKE_NUMBERPARSING_H
      +
      1 #ifndef SIMDJSON_PPC64_BASE_H
      +
      2 #define SIMDJSON_PPC64_BASE_H
      3 
      -
      4 namespace simdjson {
      -
      5 namespace SIMDJSON_IMPLEMENTATION {
      -
      6 namespace numberparsing {
      +
      4 #ifndef SIMDJSON_AMALGAMATED
      +
      5 #include "simdjson/base.h"
      +
      6 #endif // SIMDJSON_AMALGAMATED
      7 
      -
      8 static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) {
      -
      9  // this actually computes *16* values so we are being wasteful.
      -
      10  const __m128i ascii0 = _mm_set1_epi8('0');
      -
      11  const __m128i mul_1_10 =
      -
      12  _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1);
      -
      13  const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1);
      -
      14  const __m128i mul_1_10000 =
      -
      15  _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1);
      -
      16  const __m128i input = _mm_sub_epi8(
      -
      17  _mm_loadu_si128(reinterpret_cast<const __m128i *>(chars)), ascii0);
      -
      18  const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10);
      -
      19  const __m128i t2 = _mm_madd_epi16(t1, mul_1_100);
      -
      20  const __m128i t3 = _mm_packus_epi32(t2, t2);
      -
      21  const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000);
      -
      22  return _mm_cvtsi128_si32(
      -
      23  t4); // only captures the sum of the first 8 digits, drop the rest
      -
      24 }
      +
      8 namespace simdjson {
      +
      12 namespace ppc64 {
      +
      13 
      +
      14 class implementation;
      +
      15 
      +
      16 namespace {
      +
      17 namespace simd {
      +
      18 template <typename T> struct simd8;
      +
      19 template <typename T> struct simd8x64;
      +
      20 } // namespace simd
      +
      21 } // unnamed namespace
      +
      22 
      +
      23 } // namespace ppc64
      +
      24 } // namespace simdjson
      25 
      -
      26 } // namespace numberparsing
      -
      27 } // namespace SIMDJSON_IMPLEMENTATION
      -
      28 } // namespace simdjson
      -
      29 
      -
      30 #define SIMDJSON_SWAR_NUMBER_PARSING 1
      -
      31 
      -
      32 #include "simdjson/generic/numberparsing.h"
      -
      33 
      -
      34 #endif // SIMDJSON_ICELAKE_NUMBERPARSING_H
      -
      We want to support argument-dependent lookup (ADL).
      +
      26 #ifndef SIMDJSON_AMALGAMATED
      +
      27 // If we're editing one of the files in this directory, begin the implementation!
      +
      28 #ifndef SIMDJSON_IMPLEMENTATION
      +
      29 #include "simdjson/ppc64/begin.h"
      +
      30 #endif
      +
      31 #endif // SIMDJSON_AMALGAMATED
      +
      32 
      +
      33 #endif // SIMDJSON_PPC64_BASE_H
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      diff --git a/ppc64_2begin_8h_source.html b/ppc64_2begin_8h_source.html index 1be87922c..23f05266d 100644 --- a/ppc64_2begin_8h_source.html +++ b/ppc64_2begin_8h_source.html @@ -92,6 +92,13 @@ $(document).ready(function(){initNavTree('ppc64_2begin_8h_source.html',''); init
      1 #define SIMDJSON_IMPLEMENTATION ppc64
      +
      2 #include "simdjson/ppc64/base.h"
      +
      3 #include "simdjson/ppc64/intrinsics.h"
      +
      4 #include "simdjson/ppc64/bitmanipulation.h"
      +
      5 #include "simdjson/ppc64/bitmask.h"
      +
      6 #include "simdjson/ppc64/numberparsing_defs.h"
      +
      7 #include "simdjson/ppc64/simd.h"
      +
      8 #include "simdjson/ppc64/stringparsing_defs.h"
      diff --git a/ppc64_2bitmanipulation_8h_source.html b/ppc64_2bitmanipulation_8h_source.html index 4bb1669a5..ed00a8b18 100644 --- a/ppc64_2bitmanipulation_8h_source.html +++ b/ppc64_2bitmanipulation_8h_source.html @@ -94,78 +94,80 @@ $(document).ready(function(){initNavTree('ppc64_2bitmanipulation_8h_source.html'
      1 #ifndef SIMDJSON_PPC64_BITMANIPULATION_H
      2 #define SIMDJSON_PPC64_BITMANIPULATION_H
      3 
      -
      4 namespace simdjson {
      -
      5 namespace SIMDJSON_IMPLEMENTATION {
      -
      6 namespace {
      -
      7 
      -
      8 // We sometimes call trailing_zero on inputs that are zero,
      -
      9 // but the algorithms do not end up using the returned value.
      -
      10 // Sadly, sanitizers are not smart enough to figure it out.
      -
      11 SIMDJSON_NO_SANITIZE_UNDEFINED
      -
      12 // This function can be used safely even if not all bytes have been
      -
      13 // initialized.
      -
      14 // See issue https://github.com/simdjson/simdjson/issues/1965
      -
      15 SIMDJSON_NO_SANITIZE_MEMORY
      -
      16 simdjson_inline int trailing_zeroes(uint64_t input_num) {
      -
      17 #if SIMDJSON_REGULAR_VISUAL_STUDIO
      -
      18  unsigned long ret;
      -
      19  // Search the mask data from least significant bit (LSB)
      -
      20  // to the most significant bit (MSB) for a set bit (1).
      -
      21  _BitScanForward64(&ret, input_num);
      -
      22  return (int)ret;
      -
      23 #else // SIMDJSON_REGULAR_VISUAL_STUDIO
      -
      24  return __builtin_ctzll(input_num);
      -
      25 #endif // SIMDJSON_REGULAR_VISUAL_STUDIO
      -
      26 }
      -
      27 
      -
      28 /* result might be undefined when input_num is zero */
      -
      29 simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) {
      -
      30  return input_num & (input_num - 1);
      -
      31 }
      -
      32 
      -
      33 /* result might be undefined when input_num is zero */
      -
      34 simdjson_inline int leading_zeroes(uint64_t input_num) {
      -
      35 #if SIMDJSON_REGULAR_VISUAL_STUDIO
      -
      36  unsigned long leading_zero = 0;
      -
      37  // Search the mask data from most significant bit (MSB)
      -
      38  // to least significant bit (LSB) for a set bit (1).
      -
      39  if (_BitScanReverse64(&leading_zero, input_num))
      -
      40  return (int)(63 - leading_zero);
      -
      41  else
      -
      42  return 64;
      -
      43 #else
      -
      44  return __builtin_clzll(input_num);
      -
      45 #endif // SIMDJSON_REGULAR_VISUAL_STUDIO
      -
      46 }
      -
      47 
      -
      48 #if SIMDJSON_REGULAR_VISUAL_STUDIO
      -
      49 simdjson_inline int count_ones(uint64_t input_num) {
      -
      50  // note: we do not support legacy 32-bit Windows
      -
      51  return __popcnt64(input_num); // Visual Studio wants two underscores
      -
      52 }
      -
      53 #else
      -
      54 simdjson_inline int count_ones(uint64_t input_num) {
      -
      55  return __builtin_popcountll(input_num);
      -
      56 }
      -
      57 #endif
      -
      58 
      -
      59 simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2,
      -
      60  uint64_t *result) {
      -
      61 #if SIMDJSON_REGULAR_VISUAL_STUDIO
      -
      62  *result = value1 + value2;
      -
      63  return *result < value1;
      -
      64 #else
      -
      65  return __builtin_uaddll_overflow(value1, value2,
      -
      66  reinterpret_cast<unsigned long long *>(result));
      -
      67 #endif
      -
      68 }
      -
      69 
      -
      70 } // unnamed namespace
      -
      71 } // namespace SIMDJSON_IMPLEMENTATION
      -
      72 } // namespace simdjson
      -
      73 
      -
      74 #endif // SIMDJSON_PPC64_BITMANIPULATION_H
      -
      We want to support argument-dependent lookup (ADL).
      +
      4 #include "simdjson/ppc64/base.h"
      +
      5 
      +
      6 namespace simdjson {
      +
      7 namespace SIMDJSON_IMPLEMENTATION {
      +
      8 namespace {
      +
      9 
      +
      10 // We sometimes call trailing_zero on inputs that are zero,
      +
      11 // but the algorithms do not end up using the returned value.
      +
      12 // Sadly, sanitizers are not smart enough to figure it out.
      +
      13 SIMDJSON_NO_SANITIZE_UNDEFINED
      +
      14 // This function can be used safely even if not all bytes have been
      +
      15 // initialized.
      +
      16 // See issue https://github.com/simdjson/simdjson/issues/1965
      +
      17 SIMDJSON_NO_SANITIZE_MEMORY
      +
      18 simdjson_inline int trailing_zeroes(uint64_t input_num) {
      +
      19 #if SIMDJSON_REGULAR_VISUAL_STUDIO
      +
      20  unsigned long ret;
      +
      21  // Search the mask data from least significant bit (LSB)
      +
      22  // to the most significant bit (MSB) for a set bit (1).
      +
      23  _BitScanForward64(&ret, input_num);
      +
      24  return (int)ret;
      +
      25 #else // SIMDJSON_REGULAR_VISUAL_STUDIO
      +
      26  return __builtin_ctzll(input_num);
      +
      27 #endif // SIMDJSON_REGULAR_VISUAL_STUDIO
      +
      28 }
      +
      29 
      +
      30 /* result might be undefined when input_num is zero */
      +
      31 simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) {
      +
      32  return input_num & (input_num - 1);
      +
      33 }
      +
      34 
      +
      35 /* result might be undefined when input_num is zero */
      +
      36 simdjson_inline int leading_zeroes(uint64_t input_num) {
      +
      37 #if SIMDJSON_REGULAR_VISUAL_STUDIO
      +
      38  unsigned long leading_zero = 0;
      +
      39  // Search the mask data from most significant bit (MSB)
      +
      40  // to least significant bit (LSB) for a set bit (1).
      +
      41  if (_BitScanReverse64(&leading_zero, input_num))
      +
      42  return (int)(63 - leading_zero);
      +
      43  else
      +
      44  return 64;
      +
      45 #else
      +
      46  return __builtin_clzll(input_num);
      +
      47 #endif // SIMDJSON_REGULAR_VISUAL_STUDIO
      +
      48 }
      +
      49 
      +
      50 #if SIMDJSON_REGULAR_VISUAL_STUDIO
      +
      51 simdjson_inline int count_ones(uint64_t input_num) {
      +
      52  // note: we do not support legacy 32-bit Windows
      +
      53  return __popcnt64(input_num); // Visual Studio wants two underscores
      +
      54 }
      +
      55 #else
      +
      56 simdjson_inline int count_ones(uint64_t input_num) {
      +
      57  return __builtin_popcountll(input_num);
      +
      58 }
      +
      59 #endif
      +
      60 
      +
      61 simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2,
      +
      62  uint64_t *result) {
      +
      63 #if SIMDJSON_REGULAR_VISUAL_STUDIO
      +
      64  *result = value1 + value2;
      +
      65  return *result < value1;
      +
      66 #else
      +
      67  return __builtin_uaddll_overflow(value1, value2,
      +
      68  reinterpret_cast<unsigned long long *>(result));
      +
      69 #endif
      +
      70 }
      +
      71 
      +
      72 } // unnamed namespace
      +
      73 } // namespace SIMDJSON_IMPLEMENTATION
      +
      74 } // namespace simdjson
      +
      75 
      +
      76 #endif // SIMDJSON_PPC64_BITMANIPULATION_H
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      diff --git a/ppc64_2bitmask_8h_source.html b/ppc64_2bitmask_8h_source.html index a39fef48c..07878d14c 100644 --- a/ppc64_2bitmask_8h_source.html +++ b/ppc64_2bitmask_8h_source.html @@ -94,46 +94,48 @@ $(document).ready(function(){initNavTree('ppc64_2bitmask_8h_source.html',''); in
      1 #ifndef SIMDJSON_PPC64_BITMASK_H
      2 #define SIMDJSON_PPC64_BITMASK_H
      3 
      -
      4 namespace simdjson {
      -
      5 namespace SIMDJSON_IMPLEMENTATION {
      -
      6 namespace {
      -
      7 
      -
      8 //
      -
      9 // Perform a "cumulative bitwise xor," flipping bits each time a 1 is
      -
      10 // encountered.
      -
      11 //
      -
      12 // For example, prefix_xor(00100100) == 00011100
      +
      4 #include "simdjson/ppc64/base.h"
      +
      5 
      +
      6 namespace simdjson {
      +
      7 namespace SIMDJSON_IMPLEMENTATION {
      +
      8 namespace {
      +
      9 
      +
      10 //
      +
      11 // Perform a "cumulative bitwise xor," flipping bits each time a 1 is
      +
      12 // encountered.
      13 //
      -
      14 simdjson_inline uint64_t prefix_xor(uint64_t bitmask) {
      -
      15  // You can use the version below, however gcc sometimes miscompiles
      -
      16  // vec_pmsum_be, it happens somewhere around between 8 and 9th version.
      -
      17  // The performance boost was not noticeable, falling back to a usual
      -
      18  // implementation.
      -
      19  // __vector unsigned long long all_ones = {~0ull, ~0ull};
      -
      20  // __vector unsigned long long mask = {bitmask, 0};
      -
      21  // // Clang and GCC return different values for pmsum for ull so cast it to one.
      -
      22  // // Generally it is not specified by ALTIVEC ISA what is returned by
      -
      23  // // vec_pmsum_be.
      -
      24  // #if defined(__LITTLE_ENDIAN__)
      -
      25  // return (uint64_t)(((__vector unsigned long long)vec_pmsum_be(all_ones, mask))[0]);
      -
      26  // #else
      -
      27  // return (uint64_t)(((__vector unsigned long long)vec_pmsum_be(all_ones, mask))[1]);
      -
      28  // #endif
      -
      29  bitmask ^= bitmask << 1;
      -
      30  bitmask ^= bitmask << 2;
      -
      31  bitmask ^= bitmask << 4;
      -
      32  bitmask ^= bitmask << 8;
      -
      33  bitmask ^= bitmask << 16;
      -
      34  bitmask ^= bitmask << 32;
      -
      35  return bitmask;
      -
      36 }
      -
      37 
      -
      38 } // unnamed namespace
      -
      39 } // namespace SIMDJSON_IMPLEMENTATION
      -
      40 } // namespace simdjson
      -
      41 
      -
      42 #endif
      -
      We want to support argument-dependent lookup (ADL).
      +
      14 // For example, prefix_xor(00100100) == 00011100
      +
      15 //
      +
      16 simdjson_inline uint64_t prefix_xor(uint64_t bitmask) {
      +
      17  // You can use the version below, however gcc sometimes miscompiles
      +
      18  // vec_pmsum_be, it happens somewhere around between 8 and 9th version.
      +
      19  // The performance boost was not noticeable, falling back to a usual
      +
      20  // implementation.
      +
      21  // __vector unsigned long long all_ones = {~0ull, ~0ull};
      +
      22  // __vector unsigned long long mask = {bitmask, 0};
      +
      23  // // Clang and GCC return different values for pmsum for ull so cast it to one.
      +
      24  // // Generally it is not specified by ALTIVEC ISA what is returned by
      +
      25  // // vec_pmsum_be.
      +
      26  // #if defined(__LITTLE_ENDIAN__)
      +
      27  // return (uint64_t)(((__vector unsigned long long)vec_pmsum_be(all_ones, mask))[0]);
      +
      28  // #else
      +
      29  // return (uint64_t)(((__vector unsigned long long)vec_pmsum_be(all_ones, mask))[1]);
      +
      30  // #endif
      +
      31  bitmask ^= bitmask << 1;
      +
      32  bitmask ^= bitmask << 2;
      +
      33  bitmask ^= bitmask << 4;
      +
      34  bitmask ^= bitmask << 8;
      +
      35  bitmask ^= bitmask << 16;
      +
      36  bitmask ^= bitmask << 32;
      +
      37  return bitmask;
      +
      38 }
      +
      39 
      +
      40 } // unnamed namespace
      +
      41 } // namespace SIMDJSON_IMPLEMENTATION
      +
      42 } // namespace simdjson
      +
      43 
      +
      44 #endif
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      diff --git a/ppc64_2implementation_8h_source.html b/ppc64_2implementation_8h_source.html index 80f3d8ca0..d56db9831 100644 --- a/ppc64_2implementation_8h_source.html +++ b/ppc64_2implementation_8h_source.html @@ -94,22 +94,19 @@ $(document).ready(function(){initNavTree('ppc64_2implementation_8h_source.html',
      1 #ifndef SIMDJSON_PPC64_IMPLEMENTATION_H
      2 #define SIMDJSON_PPC64_IMPLEMENTATION_H
      3 
      -
      4 #include "simdjson/base.h"
      -
      5 #include "simdjson/internal/isadetection.h"
      +
      4 #include "simdjson/implementation.h"
      +
      5 #include "simdjson/internal/instruction_set.h"
      6 
      7 namespace simdjson {
      -
      8 namespace ppc64 {
      -
      9 
      -
      10 namespace {
      -
      11 using namespace simdjson;
      -
      12 using namespace simdjson::dom;
      -
      13 } // namespace
      -
      14 
      -
      18 class implementation final : public simdjson::implementation {
      -
      19 public:
      -
      20  simdjson_inline implementation()
      -
      21  : simdjson::implementation("ppc64", "PPC64 ALTIVEC",
      -
      22  internal::instruction_set::ALTIVEC) {}
      +
      8 
      +
      12 namespace ppc64 {
      +
      13 
      +
      17 class implementation final : public simdjson::implementation {
      +
      18 public:
      +
      19  simdjson_inline implementation()
      +
      20  : simdjson::implementation("ppc64", "PPC64 ALTIVEC",
      +
      21  internal::instruction_set::ALTIVEC) {}
      +
      22 
      23  simdjson_warn_unused error_code create_dom_parser_implementation(
      24  size_t capacity, size_t max_length,
      25  std::unique_ptr<internal::dom_parser_implementation> &dst)
      @@ -117,7 +114,7 @@ $(document).ready(function(){initNavTree('ppc64_2implementation_8h_source.html',
      27  simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len,
      28  uint8_t *dst,
      29  size_t &dst_len) const noexcept final;
      -
      30  simdjson_warn_unused bool validate_utf8(const char *buf,
      +
      30  simdjson_warn_unused bool validate_utf8(const char *buf,
      31  size_t len) const noexcept final;
      32 };
      33 
      @@ -125,11 +122,11 @@ $(document).ready(function(){initNavTree('ppc64_2implementation_8h_source.html',
      35 } // namespace simdjson
      36 
      37 #endif // SIMDJSON_PPC64_IMPLEMENTATION_H
      -
      An implementation of simdjson for a particular CPU architecture.
      -
      virtual simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept=0
      Validate the UTF-8 string.
      -
      We want to support argument-dependent lookup (ADL).
      +
      An implementation of simdjson for a particular CPU architecture.
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      +
      simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) noexcept
      Validate the UTF-8 string.
      error_code
      All possible errors returned by simdjson.
      Definition: error.h:17
      -
      std::string minify(T x)
      Minifies a JSON element or document, printing the smallest possible valid JSON.
      +
      std::string minify(T x)
      Minifies a JSON element or document, printing the smallest possible valid JSON.
      diff --git a/ppc64_2intrinsics_8h_source.html b/ppc64_2intrinsics_8h_source.html index 710be3ff8..8cfb0ab0d 100644 --- a/ppc64_2intrinsics_8h_source.html +++ b/ppc64_2intrinsics_8h_source.html @@ -94,7 +94,7 @@ $(document).ready(function(){initNavTree('ppc64_2intrinsics_8h_source.html','');
      1 #ifndef SIMDJSON_PPC64_INTRINSICS_H
      2 #define SIMDJSON_PPC64_INTRINSICS_H
      3 
      -
      4 #include "simdjson/base.h"
      +
      4 #include "simdjson/ppc64/base.h"
      5 
      6 // This should be the correct header whether
      7 // you use visual studio or other compilers.
      @@ -112,7 +112,7 @@ $(document).ready(function(){initNavTree('ppc64_2intrinsics_8h_source.html','');
      19 static_assert(sizeof(__vector unsigned char) <= simdjson::SIMDJSON_PADDING, "insufficient padding for ppc64");
      20 
      21 #endif // SIMDJSON_PPC64_INTRINSICS_H
      -
      constexpr size_t SIMDJSON_PADDING
      The amount of padding needed in a buffer to parse JSON.
      Definition: common_defs.h:45
      +
      constexpr size_t SIMDJSON_PADDING
      The amount of padding needed in a buffer to parse JSON.
      Definition: base.h:30
      diff --git a/ppc64_2numberparsing__defs_8h_source.html b/ppc64_2numberparsing__defs_8h_source.html new file mode 100644 index 000000000..dd637920d --- /dev/null +++ b/ppc64_2numberparsing__defs_8h_source.html @@ -0,0 +1,169 @@ + + + + + + + +simdjson: include/simdjson/ppc64/numberparsing_defs.h Source File + + + + + + + + + + + + + + + + +
      +
      + + + + + + + +
      +
      simdjson +  3.2.1 +
      +
      Ridiculously Fast JSON
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      +
      +
      numberparsing_defs.h
      +
      +
      +
      1 #ifndef SIMDJSON_PPC64_NUMBERPARSING_DEFS_H
      +
      2 #define SIMDJSON_PPC64_NUMBERPARSING_DEFS_H
      +
      3 
      +
      4 #include "simdjson/ppc64/base.h"
      +
      5 #include "simdjson/ppc64/intrinsics.h"
      +
      6 
      +
      7 #include <cstring>
      +
      8 
      +
      9 #if defined(__linux__)
      +
      10 #include <byteswap.h>
      +
      11 #elif defined(__FreeBSD__)
      +
      12 #include <sys/endian.h>
      +
      13 #endif
      +
      14 
      +
      15 #ifndef SIMDJSON_AMALGAMATED
      +
      16 #include "simdjson/internal/numberparsing_tables.h"
      +
      17 #endif // SIMDJSON_AMALGAMATED
      +
      18 
      +
      19 namespace simdjson {
      +
      20 namespace SIMDJSON_IMPLEMENTATION {
      +
      21 namespace numberparsing {
      +
      22 
      +
      23 // we don't have appropriate instructions, so let us use a scalar function
      +
      24 // credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/
      +
      26 static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) {
      +
      27  uint64_t val;
      +
      28  std::memcpy(&val, chars, sizeof(uint64_t));
      +
      29 #ifdef __BIG_ENDIAN__
      +
      30 #if defined(__linux__)
      +
      31  val = bswap_64(val);
      +
      32 #elif defined(__FreeBSD__)
      +
      33  val = bswap64(val);
      +
      34 #endif
      +
      35 #endif
      +
      36  val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8;
      +
      37  val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16;
      +
      38  return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32);
      +
      39 }
      +
      40 
      +
      42 simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) {
      +
      43  internal::value128 answer;
      +
      44 #if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
      +
      45 #ifdef _M_ARM64
      +
      46  // ARM64 has native support for 64-bit multiplications, no need to emultate
      +
      47  answer.high = __umulh(value1, value2);
      +
      48  answer.low = value1 * value2;
      +
      49 #else
      +
      50  answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64
      +
      51 #endif // _M_ARM64
      +
      52 #else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
      +
      53  __uint128_t r = (static_cast<__uint128_t>(value1)) * value2;
      +
      54  answer.low = uint64_t(r);
      +
      55  answer.high = uint64_t(r >> 64);
      +
      56 #endif
      +
      57  return answer;
      +
      58 }
      +
      59 
      +
      60 } // namespace numberparsing
      +
      61 } // namespace SIMDJSON_IMPLEMENTATION
      +
      62 } // namespace simdjson
      +
      63 
      +
      64 #define SIMDJSON_SWAR_NUMBER_PARSING 1
      +
      65 
      +
      66 #endif // SIMDJSON_PPC64_NUMBERPARSING_DEFS_H
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      +
      +
      + + + + diff --git a/ppc64_2ondemand_8h_source.html b/ppc64_2ondemand_8h_source.html new file mode 100644 index 000000000..8f9341336 --- /dev/null +++ b/ppc64_2ondemand_8h_source.html @@ -0,0 +1,112 @@ + + + + + + + +simdjson: include/simdjson/ppc64/ondemand.h Source File + + + + + + + + + + + + + + + + +
      +
      + + + + + + + +
      +
      simdjson +  3.2.1 +
      +
      Ridiculously Fast JSON
      +
      +
      + + + + + + + +
      +
      + +
      +
      +
      + +
      + +
      +
      + + +
      + +
      + +
      +
      +
      ondemand.h
      +
      +
      +
      1 #ifndef SIMDJSON_PPC64_ONDEMAND_H
      +
      2 #define SIMDJSON_PPC64_ONDEMAND_H
      +
      3 
      +
      4 #include "simdjson/ppc64/begin.h"
      +
      5 #include "simdjson/generic/ondemand/amalgamated.h"
      +
      6 #include "simdjson/ppc64/end.h"
      +
      7 
      +
      8 #endif // SIMDJSON_PPC64_ONDEMAND_H
      +
      +
      + + + + diff --git a/ppc64_2simd_8h_source.html b/ppc64_2simd_8h_source.html index e8cdc9318..a07979971 100644 --- a/ppc64_2simd_8h_source.html +++ b/ppc64_2simd_8h_source.html @@ -94,477 +94,478 @@ $(document).ready(function(){initNavTree('ppc64_2simd_8h_source.html',''); initR
      1 #ifndef SIMDJSON_PPC64_SIMD_H
      2 #define SIMDJSON_PPC64_SIMD_H
      3 
      -
      4 #include "simdjson/base.h"
      -
      5 #include "simdjson/internal/simdprune_tables.h"
      -
      6 #include "simdjson/ppc64/bitmanipulation.h"
      -
      7 #include <type_traits>
      -
      8 
      -
      9 namespace simdjson {
      -
      10 namespace SIMDJSON_IMPLEMENTATION {
      -
      11 namespace {
      -
      12 namespace simd {
      -
      13 
      -
      14 using __m128i = __vector unsigned char;
      -
      15 
      -
      16 template <typename Child> struct base {
      -
      17  __m128i value;
      -
      18 
      -
      19  // Zero constructor
      -
      20  simdjson_inline base() : value{__m128i()} {}
      -
      21 
      -
      22  // Conversion from SIMD register
      -
      23  simdjson_inline base(const __m128i _value) : value(_value) {}
      -
      24 
      -
      25  // Conversion to SIMD register
      -
      26  simdjson_inline operator const __m128i &() const {
      -
      27  return this->value;
      -
      28  }
      -
      29  simdjson_inline operator __m128i &() { return this->value; }
      -
      30 
      -
      31  // Bit operations
      -
      32  simdjson_inline Child operator|(const Child other) const {
      -
      33  return vec_or(this->value, (__m128i)other);
      -
      34  }
      -
      35  simdjson_inline Child operator&(const Child other) const {
      -
      36  return vec_and(this->value, (__m128i)other);
      -
      37  }
      -
      38  simdjson_inline Child operator^(const Child other) const {
      -
      39  return vec_xor(this->value, (__m128i)other);
      -
      40  }
      -
      41  simdjson_inline Child bit_andnot(const Child other) const {
      -
      42  return vec_andc(this->value, (__m128i)other);
      -
      43  }
      -
      44  simdjson_inline Child &operator|=(const Child other) {
      -
      45  auto this_cast = static_cast<Child*>(this);
      -
      46  *this_cast = *this_cast | other;
      -
      47  return *this_cast;
      -
      48  }
      -
      49  simdjson_inline Child &operator&=(const Child other) {
      -
      50  auto this_cast = static_cast<Child*>(this);
      -
      51  *this_cast = *this_cast & other;
      -
      52  return *this_cast;
      -
      53  }
      -
      54  simdjson_inline Child &operator^=(const Child other) {
      -
      55  auto this_cast = static_cast<Child*>(this);
      -
      56  *this_cast = *this_cast ^ other;
      -
      57  return *this_cast;
      -
      58  }
      -
      59 };
      -
      60 
      -
      61 // Forward-declared so they can be used by splat and friends.
      -
      62 template <typename T> struct simd8;
      -
      63 
      -
      64 template <typename T, typename Mask = simd8<bool>>
      -
      65 struct base8 : base<simd8<T>> {
      -
      66  typedef uint16_t bitmask_t;
      -
      67  typedef uint32_t bitmask2_t;
      -
      68 
      -
      69  simdjson_inline base8() : base<simd8<T>>() {}
      -
      70  simdjson_inline base8(const __m128i _value) : base<simd8<T>>(_value) {}
      -
      71 
      -
      72  friend simdjson_inline Mask operator==(const simd8<T> lhs, const simd8<T> rhs) {
      -
      73  return (__m128i)vec_cmpeq(lhs.value, (__m128i)rhs);
      -
      74  }
      -
      75 
      -
      76  static const int SIZE = sizeof(base<simd8<T>>::value);
      -
      77 
      -
      78  template <int N = 1>
      -
      79  simdjson_inline simd8<T> prev(simd8<T> prev_chunk) const {
      -
      80  __m128i chunk = this->value;
      -
      81 #ifdef __LITTLE_ENDIAN__
      -
      82  chunk = (__m128i)vec_reve(this->value);
      -
      83  prev_chunk = (__m128i)vec_reve((__m128i)prev_chunk);
      -
      84 #endif
      -
      85  chunk = (__m128i)vec_sld((__m128i)prev_chunk, (__m128i)chunk, 16 - N);
      -
      86 #ifdef __LITTLE_ENDIAN__
      -
      87  chunk = (__m128i)vec_reve((__m128i)chunk);
      -
      88 #endif
      -
      89  return chunk;
      -
      90  }
      -
      91 };
      -
      92 
      -
      93 // SIMD byte mask type (returned by things like eq and gt)
      -
      94 template <> struct simd8<bool> : base8<bool> {
      -
      95  static simdjson_inline simd8<bool> splat(bool _value) {
      -
      96  return (__m128i)vec_splats((unsigned char)(-(!!_value)));
      -
      97  }
      -
      98 
      -
      99  simdjson_inline simd8<bool>() : base8() {}
      -
      100  simdjson_inline simd8<bool>(const __m128i _value)
      -
      101  : base8<bool>(_value) {}
      -
      102  // Splat constructor
      -
      103  simdjson_inline simd8<bool>(bool _value)
      -
      104  : base8<bool>(splat(_value)) {}
      -
      105 
      -
      106  simdjson_inline int to_bitmask() const {
      -
      107  __vector unsigned long long result;
      -
      108  const __m128i perm_mask = {0x78, 0x70, 0x68, 0x60, 0x58, 0x50, 0x48, 0x40,
      -
      109  0x38, 0x30, 0x28, 0x20, 0x18, 0x10, 0x08, 0x00};
      -
      110 
      -
      111  result = ((__vector unsigned long long)vec_vbpermq((__m128i)this->value,
      -
      112  (__m128i)perm_mask));
      -
      113 #ifdef __LITTLE_ENDIAN__
      -
      114  return static_cast<int>(result[1]);
      -
      115 #else
      -
      116  return static_cast<int>(result[0]);
      -
      117 #endif
      -
      118  }
      -
      119  simdjson_inline bool any() const {
      -
      120  return !vec_all_eq(this->value, (__m128i)vec_splats(0));
      -
      121  }
      -
      122  simdjson_inline simd8<bool> operator~() const {
      -
      123  return this->value ^ (__m128i)splat(true);
      -
      124  }
      -
      125 };
      -
      126 
      -
      127 template <typename T> struct base8_numeric : base8<T> {
      -
      128  static simdjson_inline simd8<T> splat(T value) {
      -
      129  (void)value;
      -
      130  return (__m128i)vec_splats(value);
      -
      131  }
      -
      132  static simdjson_inline simd8<T> zero() { return splat(0); }
      -
      133  static simdjson_inline simd8<T> load(const T values[16]) {
      -
      134  return (__m128i)(vec_vsx_ld(0, reinterpret_cast<const uint8_t *>(values)));
      -
      135  }
      -
      136  // Repeat 16 values as many times as necessary (usually for lookup tables)
      -
      137  static simdjson_inline simd8<T> repeat_16(T v0, T v1, T v2, T v3, T v4,
      -
      138  T v5, T v6, T v7, T v8, T v9,
      -
      139  T v10, T v11, T v12, T v13,
      -
      140  T v14, T v15) {
      -
      141  return simd8<T>(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
      -
      142  v14, v15);
      -
      143  }
      -
      144 
      -
      145  simdjson_inline base8_numeric() : base8<T>() {}
      -
      146  simdjson_inline base8_numeric(const __m128i _value)
      -
      147  : base8<T>(_value) {}
      -
      148 
      -
      149  // Store to array
      -
      150  simdjson_inline void store(T dst[16]) const {
      -
      151  vec_vsx_st(this->value, 0, reinterpret_cast<__m128i *>(dst));
      -
      152  }
      -
      153 
      -
      154  // Override to distinguish from bool version
      -
      155  simdjson_inline simd8<T> operator~() const { return *this ^ 0xFFu; }
      -
      156 
      -
      157  // Addition/subtraction are the same for signed and unsigned
      -
      158  simdjson_inline simd8<T> operator+(const simd8<T> other) const {
      -
      159  return (__m128i)((__m128i)this->value + (__m128i)other);
      -
      160  }
      -
      161  simdjson_inline simd8<T> operator-(const simd8<T> other) const {
      -
      162  return (__m128i)((__m128i)this->value - (__m128i)other);
      -
      163  }
      -
      164  simdjson_inline simd8<T> &operator+=(const simd8<T> other) {
      -
      165  *this = *this + other;
      -
      166  return *static_cast<simd8<T> *>(this);
      -
      167  }
      -
      168  simdjson_inline simd8<T> &operator-=(const simd8<T> other) {
      -
      169  *this = *this - other;
      -
      170  return *static_cast<simd8<T> *>(this);
      -
      171  }
      -
      172 
      -
      173  // Perform a lookup assuming the value is between 0 and 16 (undefined behavior
      -
      174  // for out of range values)
      -
      175  template <typename L>
      -
      176  simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
      -
      177  return (__m128i)vec_perm((__m128i)lookup_table, (__m128i)lookup_table, this->value);
      -
      178  }
      -
      179 
      -
      180  // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted
      -
      181  // as a bitset). Passing a 0 value for mask would be equivalent to writing out
      -
      182  // every byte to output. Only the first 16 - count_ones(mask) bytes of the
      -
      183  // result are significant but 16 bytes get written. Design consideration: it
      -
      184  // seems like a function with the signature simd8<L> compress(uint32_t mask)
      -
      185  // would be sensible, but the AVX ISA makes this kind of approach difficult.
      -
      186  template <typename L>
      -
      187  simdjson_inline void compress(uint16_t mask, L *output) const {
      -
      188  using internal::BitsSetTable256mul2;
      -
      189  using internal::pshufb_combine_table;
      -
      190  using internal::thintable_epi8;
      -
      191  // this particular implementation was inspired by work done by @animetosho
      -
      192  // we do it in two steps, first 8 bytes and then second 8 bytes
      -
      193  uint8_t mask1 = uint8_t(mask); // least significant 8 bits
      -
      194  uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits
      -
      195  // next line just loads the 64-bit values thintable_epi8[mask1] and
      -
      196  // thintable_epi8[mask2] into a 128-bit register, using only
      -
      197  // two instructions on most compilers.
      -
      198 #ifdef __LITTLE_ENDIAN__
      -
      199  __m128i shufmask = (__m128i)(__vector unsigned long long){
      -
      200  thintable_epi8[mask1], thintable_epi8[mask2]};
      -
      201 #else
      -
      202  __m128i shufmask = (__m128i)(__vector unsigned long long){
      -
      203  thintable_epi8[mask2], thintable_epi8[mask1]};
      -
      204  shufmask = (__m128i)vec_reve((__m128i)shufmask);
      -
      205 #endif
      -
      206  // we increment by 0x08 the second half of the mask
      -
      207  shufmask = ((__m128i)shufmask) +
      -
      208  ((__m128i)(__vector int){0, 0, 0x08080808, 0x08080808});
      -
      209 
      -
      210  // this is the version "nearly pruned"
      -
      211  __m128i pruned = vec_perm(this->value, this->value, shufmask);
      -
      212  // we still need to put the two halves together.
      -
      213  // we compute the popcount of the first half:
      -
      214  int pop1 = BitsSetTable256mul2[mask1];
      -
      215  // then load the corresponding mask, what it does is to write
      -
      216  // only the first pop1 bytes from the first 8 bytes, and then
      -
      217  // it fills in with the bytes from the second 8 bytes + some filling
      -
      218  // at the end.
      -
      219  __m128i compactmask =
      -
      220  vec_vsx_ld(0, reinterpret_cast<const uint8_t *>(pshufb_combine_table + pop1 * 8));
      -
      221  __m128i answer = vec_perm(pruned, (__m128i)vec_splats(0), compactmask);
      -
      222  vec_vsx_st(answer, 0, reinterpret_cast<__m128i *>(output));
      -
      223  }
      -
      224 
      -
      225  template <typename L>
      -
      226  simdjson_inline simd8<L>
      -
      227  lookup_16(L replace0, L replace1, L replace2, L replace3, L replace4,
      -
      228  L replace5, L replace6, L replace7, L replace8, L replace9,
      -
      229  L replace10, L replace11, L replace12, L replace13, L replace14,
      -
      230  L replace15) const {
      -
      231  return lookup_16(simd8<L>::repeat_16(
      -
      232  replace0, replace1, replace2, replace3, replace4, replace5, replace6,
      -
      233  replace7, replace8, replace9, replace10, replace11, replace12,
      -
      234  replace13, replace14, replace15));
      -
      235  }
      -
      236 };
      -
      237 
      -
      238 // Signed bytes
      -
      239 template <> struct simd8<int8_t> : base8_numeric<int8_t> {
      -
      240  simdjson_inline simd8() : base8_numeric<int8_t>() {}
      -
      241  simdjson_inline simd8(const __m128i _value)
      -
      242  : base8_numeric<int8_t>(_value) {}
      -
      243  // Splat constructor
      -
      244  simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {}
      -
      245  // Array constructor
      -
      246  simdjson_inline simd8(const int8_t *values) : simd8(load(values)) {}
      -
      247  // Member-by-member initialization
      -
      248  simdjson_inline simd8(int8_t v0, int8_t v1, int8_t v2, int8_t v3,
      -
      249  int8_t v4, int8_t v5, int8_t v6, int8_t v7,
      -
      250  int8_t v8, int8_t v9, int8_t v10, int8_t v11,
      -
      251  int8_t v12, int8_t v13, int8_t v14, int8_t v15)
      -
      252  : simd8((__m128i)(__vector signed char){v0, v1, v2, v3, v4, v5, v6, v7,
      -
      253  v8, v9, v10, v11, v12, v13, v14,
      -
      254  v15}) {}
      -
      255  // Repeat 16 values as many times as necessary (usually for lookup tables)
      -
      256  simdjson_inline static simd8<int8_t>
      -
      257  repeat_16(int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5,
      -
      258  int8_t v6, int8_t v7, int8_t v8, int8_t v9, int8_t v10, int8_t v11,
      -
      259  int8_t v12, int8_t v13, int8_t v14, int8_t v15) {
      -
      260  return simd8<int8_t>(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
      -
      261  v13, v14, v15);
      -
      262  }
      -
      263 
      -
      264  // Order-sensitive comparisons
      -
      265  simdjson_inline simd8<int8_t>
      -
      266  max_val(const simd8<int8_t> other) const {
      -
      267  return (__m128i)vec_max((__vector signed char)this->value,
      -
      268  (__vector signed char)(__m128i)other);
      -
      269  }
      -
      270  simdjson_inline simd8<int8_t>
      -
      271  min_val(const simd8<int8_t> other) const {
      -
      272  return (__m128i)vec_min((__vector signed char)this->value,
      -
      273  (__vector signed char)(__m128i)other);
      -
      274  }
      -
      275  simdjson_inline simd8<bool>
      -
      276  operator>(const simd8<int8_t> other) const {
      -
      277  return (__m128i)vec_cmpgt((__vector signed char)this->value,
      -
      278  (__vector signed char)(__m128i)other);
      -
      279  }
      -
      280  simdjson_inline simd8<bool>
      -
      281  operator<(const simd8<int8_t> other) const {
      -
      282  return (__m128i)vec_cmplt((__vector signed char)this->value,
      -
      283  (__vector signed char)(__m128i)other);
      -
      284  }
      -
      285 };
      -
      286 
      -
      287 // Unsigned bytes
      -
      288 template <> struct simd8<uint8_t> : base8_numeric<uint8_t> {
      -
      289  simdjson_inline simd8() : base8_numeric<uint8_t>() {}
      -
      290  simdjson_inline simd8(const __m128i _value)
      -
      291  : base8_numeric<uint8_t>(_value) {}
      -
      292  // Splat constructor
      -
      293  simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
      -
      294  // Array constructor
      -
      295  simdjson_inline simd8(const uint8_t *values) : simd8(load(values)) {}
      -
      296  // Member-by-member initialization
      -
      297  simdjson_inline
      -
      298  simd8(uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5,
      -
      299  uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, uint8_t v10,
      -
      300  uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15)
      -
      301  : simd8((__m128i){v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
      -
      302  v13, v14, v15}) {}
      -
      303  // Repeat 16 values as many times as necessary (usually for lookup tables)
      -
      304  simdjson_inline static simd8<uint8_t>
      -
      305  repeat_16(uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4,
      -
      306  uint8_t v5, uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9,
      -
      307  uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14,
      -
      308  uint8_t v15) {
      -
      309  return simd8<uint8_t>(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
      -
      310  v13, v14, v15);
      -
      311  }
      -
      312 
      -
      313  // Saturated math
      -
      314  simdjson_inline simd8<uint8_t>
      -
      315  saturating_add(const simd8<uint8_t> other) const {
      -
      316  return (__m128i)vec_adds(this->value, (__m128i)other);
      -
      317  }
      -
      318  simdjson_inline simd8<uint8_t>
      -
      319  saturating_sub(const simd8<uint8_t> other) const {
      -
      320  return (__m128i)vec_subs(this->value, (__m128i)other);
      -
      321  }
      -
      322 
      -
      323  // Order-specific operations
      -
      324  simdjson_inline simd8<uint8_t>
      -
      325  max_val(const simd8<uint8_t> other) const {
      -
      326  return (__m128i)vec_max(this->value, (__m128i)other);
      -
      327  }
      -
      328  simdjson_inline simd8<uint8_t>
      -
      329  min_val(const simd8<uint8_t> other) const {
      -
      330  return (__m128i)vec_min(this->value, (__m128i)other);
      -
      331  }
      -
      332  // Same as >, but only guarantees true is nonzero (< guarantees true = -1)
      -
      333  simdjson_inline simd8<uint8_t>
      -
      334  gt_bits(const simd8<uint8_t> other) const {
      -
      335  return this->saturating_sub(other);
      -
      336  }
      -
      337  // Same as <, but only guarantees true is nonzero (< guarantees true = -1)
      -
      338  simdjson_inline simd8<uint8_t>
      -
      339  lt_bits(const simd8<uint8_t> other) const {
      -
      340  return other.saturating_sub(*this);
      -
      341  }
      -
      342  simdjson_inline simd8<bool>
      -
      343  operator<=(const simd8<uint8_t> other) const {
      -
      344  return other.max_val(*this) == other;
      -
      345  }
      -
      346  simdjson_inline simd8<bool>
      -
      347  operator>=(const simd8<uint8_t> other) const {
      -
      348  return other.min_val(*this) == other;
      -
      349  }
      -
      350  simdjson_inline simd8<bool>
      -
      351  operator>(const simd8<uint8_t> other) const {
      -
      352  return this->gt_bits(other).any_bits_set();
      -
      353  }
      -
      354  simdjson_inline simd8<bool>
      -
      355  operator<(const simd8<uint8_t> other) const {
      -
      356  return this->gt_bits(other).any_bits_set();
      -
      357  }
      -
      358 
      -
      359  // Bit-specific operations
      -
      360  simdjson_inline simd8<bool> bits_not_set() const {
      -
      361  return (__m128i)vec_cmpeq(this->value, (__m128i)vec_splats(uint8_t(0)));
      -
      362  }
      -
      363  simdjson_inline simd8<bool> bits_not_set(simd8<uint8_t> bits) const {
      -
      364  return (*this & bits).bits_not_set();
      -
      365  }
      -
      366  simdjson_inline simd8<bool> any_bits_set() const {
      -
      367  return ~this->bits_not_set();
      -
      368  }
      -
      369  simdjson_inline simd8<bool> any_bits_set(simd8<uint8_t> bits) const {
      -
      370  return ~this->bits_not_set(bits);
      -
      371  }
      -
      372  simdjson_inline bool bits_not_set_anywhere() const {
      -
      373  return vec_all_eq(this->value, (__m128i)vec_splats(0));
      -
      374  }
      -
      375  simdjson_inline bool any_bits_set_anywhere() const {
      -
      376  return !bits_not_set_anywhere();
      -
      377  }
      -
      378  simdjson_inline bool bits_not_set_anywhere(simd8<uint8_t> bits) const {
      -
      379  return vec_all_eq(vec_and(this->value, (__m128i)bits),
      -
      380  (__m128i)vec_splats(0));
      -
      381  }
      -
      382  simdjson_inline bool any_bits_set_anywhere(simd8<uint8_t> bits) const {
      -
      383  return !bits_not_set_anywhere(bits);
      -
      384  }
      -
      385  template <int N> simdjson_inline simd8<uint8_t> shr() const {
      -
      386  return simd8<uint8_t>(
      -
      387  (__m128i)vec_sr(this->value, (__m128i)vec_splat_u8(N)));
      -
      388  }
      -
      389  template <int N> simdjson_inline simd8<uint8_t> shl() const {
      -
      390  return simd8<uint8_t>(
      -
      391  (__m128i)vec_sl(this->value, (__m128i)vec_splat_u8(N)));
      -
      392  }
      -
      393 };
      -
      394 
      -
      395 template <typename T> struct simd8x64 {
      -
      396  static constexpr int NUM_CHUNKS = 64 / sizeof(simd8<T>);
      -
      397  static_assert(NUM_CHUNKS == 4,
      -
      398  "PPC64 kernel should use four registers per 64-byte block.");
      -
      399  const simd8<T> chunks[NUM_CHUNKS];
      -
      400 
      -
      401  simd8x64(const simd8x64<T> &o) = delete; // no copy allowed
      -
      402  simd8x64<T> &
      -
      403  operator=(const simd8<T>& other) = delete; // no assignment allowed
      -
      404  simd8x64() = delete; // no default constructor allowed
      -
      405 
      -
      406  simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1,
      -
      407  const simd8<T> chunk2, const simd8<T> chunk3)
      -
      408  : chunks{chunk0, chunk1, chunk2, chunk3} {}
      -
      409  simdjson_inline simd8x64(const T ptr[64])
      -
      410  : chunks{simd8<T>::load(ptr), simd8<T>::load(ptr + 16),
      -
      411  simd8<T>::load(ptr + 32), simd8<T>::load(ptr + 48)} {}
      -
      412 
      -
      413  simdjson_inline void store(T ptr[64]) const {
      -
      414  this->chunks[0].store(ptr + sizeof(simd8<T>) * 0);
      -
      415  this->chunks[1].store(ptr + sizeof(simd8<T>) * 1);
      -
      416  this->chunks[2].store(ptr + sizeof(simd8<T>) * 2);
      -
      417  this->chunks[3].store(ptr + sizeof(simd8<T>) * 3);
      -
      418  }
      -
      419 
      -
      420  simdjson_inline simd8<T> reduce_or() const {
      -
      421  return (this->chunks[0] | this->chunks[1]) |
      -
      422  (this->chunks[2] | this->chunks[3]);
      -
      423  }
      -
      424 
      -
      425  simdjson_inline uint64_t compress(uint64_t mask, T *output) const {
      -
      426  this->chunks[0].compress(uint16_t(mask), output);
      -
      427  this->chunks[1].compress(uint16_t(mask >> 16),
      -
      428  output + 16 - count_ones(mask & 0xFFFF));
      -
      429  this->chunks[2].compress(uint16_t(mask >> 32),
      -
      430  output + 32 - count_ones(mask & 0xFFFFFFFF));
      -
      431  this->chunks[3].compress(uint16_t(mask >> 48),
      -
      432  output + 48 - count_ones(mask & 0xFFFFFFFFFFFF));
      -
      433  return 64 - count_ones(mask);
      -
      434  }
      -
      435 
      -
      436  simdjson_inline uint64_t to_bitmask() const {
      -
      437  uint64_t r0 = uint32_t(this->chunks[0].to_bitmask());
      -
      438  uint64_t r1 = this->chunks[1].to_bitmask();
      -
      439  uint64_t r2 = this->chunks[2].to_bitmask();
      -
      440  uint64_t r3 = this->chunks[3].to_bitmask();
      -
      441  return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48);
      -
      442  }
      -
      443 
      -
      444  simdjson_inline uint64_t eq(const T m) const {
      -
      445  const simd8<T> mask = simd8<T>::splat(m);
      -
      446  return simd8x64<bool>(this->chunks[0] == mask, this->chunks[1] == mask,
      -
      447  this->chunks[2] == mask, this->chunks[3] == mask)
      -
      448  .to_bitmask();
      -
      449  }
      -
      450 
      -
      451  simdjson_inline uint64_t eq(const simd8x64<uint8_t> &other) const {
      -
      452  return simd8x64<bool>(this->chunks[0] == other.chunks[0],
      -
      453  this->chunks[1] == other.chunks[1],
      -
      454  this->chunks[2] == other.chunks[2],
      -
      455  this->chunks[3] == other.chunks[3])
      -
      456  .to_bitmask();
      -
      457  }
      -
      458 
      -
      459  simdjson_inline uint64_t lteq(const T m) const {
      -
      460  const simd8<T> mask = simd8<T>::splat(m);
      -
      461  return simd8x64<bool>(this->chunks[0] <= mask, this->chunks[1] <= mask,
      -
      462  this->chunks[2] <= mask, this->chunks[3] <= mask)
      -
      463  .to_bitmask();
      -
      464  }
      -
      465 }; // struct simd8x64<T>
      -
      466 
      -
      467 } // namespace simd
      -
      468 } // unnamed namespace
      -
      469 } // namespace SIMDJSON_IMPLEMENTATION
      -
      470 } // namespace simdjson
      -
      471 
      -
      472 #endif // SIMDJSON_PPC64_SIMD_INPUT_H
      -
      simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
      Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
      -
      We want to support argument-dependent lookup (ADL).
      +
      4 #include "simdjson/ppc64/base.h"
      +
      5 #include "simdjson/ppc64/bitmanipulation.h"
      +
      6 
      +
      7 #ifndef SIMDJSON_AMALGAMATED
      +
      8 #include "simdjson/internal/simdprune_tables.h"
      +
      9 #endif // SIMDJSON_AMALGAMATED
      +
      10 
      +
      11 #include <type_traits>
      +
      12 
      +
      13 namespace simdjson {
      +
      14 namespace SIMDJSON_IMPLEMENTATION {
      +
      15 namespace {
      +
      16 namespace simd {
      +
      17 
      +
      18 using __m128i = __vector unsigned char;
      +
      19 
      +
      20 template <typename Child> struct base {
      +
      21  __m128i value;
      +
      22 
      +
      23  // Zero constructor
      +
      24  simdjson_inline base() : value{__m128i()} {}
      +
      25 
      +
      26  // Conversion from SIMD register
      +
      27  simdjson_inline base(const __m128i _value) : value(_value) {}
      +
      28 
      +
      29  // Conversion to SIMD register
      +
      30  simdjson_inline operator const __m128i &() const {
      +
      31  return this->value;
      +
      32  }
      +
      33  simdjson_inline operator __m128i &() { return this->value; }
      +
      34 
      +
      35  // Bit operations
      +
      36  simdjson_inline Child operator|(const Child other) const {
      +
      37  return vec_or(this->value, (__m128i)other);
      +
      38  }
      +
      39  simdjson_inline Child operator&(const Child other) const {
      +
      40  return vec_and(this->value, (__m128i)other);
      +
      41  }
      +
      42  simdjson_inline Child operator^(const Child other) const {
      +
      43  return vec_xor(this->value, (__m128i)other);
      +
      44  }
      +
      45  simdjson_inline Child bit_andnot(const Child other) const {
      +
      46  return vec_andc(this->value, (__m128i)other);
      +
      47  }
      +
      48  simdjson_inline Child &operator|=(const Child other) {
      +
      49  auto this_cast = static_cast<Child*>(this);
      +
      50  *this_cast = *this_cast | other;
      +
      51  return *this_cast;
      +
      52  }
      +
      53  simdjson_inline Child &operator&=(const Child other) {
      +
      54  auto this_cast = static_cast<Child*>(this);
      +
      55  *this_cast = *this_cast & other;
      +
      56  return *this_cast;
      +
      57  }
      +
      58  simdjson_inline Child &operator^=(const Child other) {
      +
      59  auto this_cast = static_cast<Child*>(this);
      +
      60  *this_cast = *this_cast ^ other;
      +
      61  return *this_cast;
      +
      62  }
      +
      63 };
      +
      64 
      +
      65 template <typename T, typename Mask = simd8<bool>>
      +
      66 struct base8 : base<simd8<T>> {
      +
      67  typedef uint16_t bitmask_t;
      +
      68  typedef uint32_t bitmask2_t;
      +
      69 
      +
      70  simdjson_inline base8() : base<simd8<T>>() {}
      +
      71  simdjson_inline base8(const __m128i _value) : base<simd8<T>>(_value) {}
      +
      72 
      +
      73  friend simdjson_inline Mask operator==(const simd8<T> lhs, const simd8<T> rhs) {
      +
      74  return (__m128i)vec_cmpeq(lhs.value, (__m128i)rhs);
      +
      75  }
      +
      76 
      +
      77  static const int SIZE = sizeof(base<simd8<T>>::value);
      +
      78 
      +
      79  template <int N = 1>
      +
      80  simdjson_inline simd8<T> prev(simd8<T> prev_chunk) const {
      +
      81  __m128i chunk = this->value;
      +
      82 #ifdef __LITTLE_ENDIAN__
      +
      83  chunk = (__m128i)vec_reve(this->value);
      +
      84  prev_chunk = (__m128i)vec_reve((__m128i)prev_chunk);
      +
      85 #endif
      +
      86  chunk = (__m128i)vec_sld((__m128i)prev_chunk, (__m128i)chunk, 16 - N);
      +
      87 #ifdef __LITTLE_ENDIAN__
      +
      88  chunk = (__m128i)vec_reve((__m128i)chunk);
      +
      89 #endif
      +
      90  return chunk;
      +
      91  }
      +
      92 };
      +
      93 
      +
      94 // SIMD byte mask type (returned by things like eq and gt)
      +
      95 template <> struct simd8<bool> : base8<bool> {
      +
      96  static simdjson_inline simd8<bool> splat(bool _value) {
      +
      97  return (__m128i)vec_splats((unsigned char)(-(!!_value)));
      +
      98  }
      +
      99 
      +
      100  simdjson_inline simd8<bool>() : base8<bool>() {}
      +
      101  simdjson_inline simd8<bool>(const __m128i _value)
      +
      102  : base8<bool>(_value) {}
      +
      103  // Splat constructor
      +
      104  simdjson_inline simd8<bool>(bool _value)
      +
      105  : base8<bool>(splat(_value)) {}
      +
      106 
      +
      107  simdjson_inline int to_bitmask() const {
      +
      108  __vector unsigned long long result;
      +
      109  const __m128i perm_mask = {0x78, 0x70, 0x68, 0x60, 0x58, 0x50, 0x48, 0x40,
      +
      110  0x38, 0x30, 0x28, 0x20, 0x18, 0x10, 0x08, 0x00};
      +
      111 
      +
      112  result = ((__vector unsigned long long)vec_vbpermq((__m128i)this->value,
      +
      113  (__m128i)perm_mask));
      +
      114 #ifdef __LITTLE_ENDIAN__
      +
      115  return static_cast<int>(result[1]);
      +
      116 #else
      +
      117  return static_cast<int>(result[0]);
      +
      118 #endif
      +
      119  }
      +
      120  simdjson_inline bool any() const {
      +
      121  return !vec_all_eq(this->value, (__m128i)vec_splats(0));
      +
      122  }
      +
      123  simdjson_inline simd8<bool> operator~() const {
      +
      124  return this->value ^ (__m128i)splat(true);
      +
      125  }
      +
      126 };
      +
      127 
      +
      128 template <typename T> struct base8_numeric : base8<T> {
      +
      129  static simdjson_inline simd8<T> splat(T value) {
      +
      130  (void)value;
      +
      131  return (__m128i)vec_splats(value);
      +
      132  }
      +
      133  static simdjson_inline simd8<T> zero() { return splat(0); }
      +
      134  static simdjson_inline simd8<T> load(const T values[16]) {
      +
      135  return (__m128i)(vec_vsx_ld(0, reinterpret_cast<const uint8_t *>(values)));
      +
      136  }
      +
      137  // Repeat 16 values as many times as necessary (usually for lookup tables)
      +
      138  static simdjson_inline simd8<T> repeat_16(T v0, T v1, T v2, T v3, T v4,
      +
      139  T v5, T v6, T v7, T v8, T v9,
      +
      140  T v10, T v11, T v12, T v13,
      +
      141  T v14, T v15) {
      +
      142  return simd8<T>(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13,
      +
      143  v14, v15);
      +
      144  }
      +
      145 
      +
      146  simdjson_inline base8_numeric() : base8<T>() {}
      +
      147  simdjson_inline base8_numeric(const __m128i _value)
      +
      148  : base8<T>(_value) {}
      +
      149 
      +
      150  // Store to array
      +
      151  simdjson_inline void store(T dst[16]) const {
      +
      152  vec_vsx_st(this->value, 0, reinterpret_cast<__m128i *>(dst));
      +
      153  }
      +
      154 
      +
      155  // Override to distinguish from bool version
      +
      156  simdjson_inline simd8<T> operator~() const { return *this ^ 0xFFu; }
      +
      157 
      +
      158  // Addition/subtraction are the same for signed and unsigned
      +
      159  simdjson_inline simd8<T> operator+(const simd8<T> other) const {
      +
      160  return (__m128i)((__m128i)this->value + (__m128i)other);
      +
      161  }
      +
      162  simdjson_inline simd8<T> operator-(const simd8<T> other) const {
      +
      163  return (__m128i)((__m128i)this->value - (__m128i)other);
      +
      164  }
      +
      165  simdjson_inline simd8<T> &operator+=(const simd8<T> other) {
      +
      166  *this = *this + other;
      +
      167  return *static_cast<simd8<T> *>(this);
      +
      168  }
      +
      169  simdjson_inline simd8<T> &operator-=(const simd8<T> other) {
      +
      170  *this = *this - other;
      +
      171  return *static_cast<simd8<T> *>(this);
      +
      172  }
      +
      173 
      +
      174  // Perform a lookup assuming the value is between 0 and 16 (undefined behavior
      +
      175  // for out of range values)
      +
      176  template <typename L>
      +
      177  simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
      +
      178  return (__m128i)vec_perm((__m128i)lookup_table, (__m128i)lookup_table, this->value);
      +
      179  }
      +
      180 
      +
      181  // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted
      +
      182  // as a bitset). Passing a 0 value for mask would be equivalent to writing out
      +
      183  // every byte to output. Only the first 16 - count_ones(mask) bytes of the
      +
      184  // result are significant but 16 bytes get written. Design consideration: it
      +
      185  // seems like a function with the signature simd8<L> compress(uint32_t mask)
      +
      186  // would be sensible, but the AVX ISA makes this kind of approach difficult.
      +
      187  template <typename L>
      +
      188  simdjson_inline void compress(uint16_t mask, L *output) const {
      +
      189  using internal::BitsSetTable256mul2;
      +
      190  using internal::pshufb_combine_table;
      +
      191  using internal::thintable_epi8;
      +
      192  // this particular implementation was inspired by work done by @animetosho
      +
      193  // we do it in two steps, first 8 bytes and then second 8 bytes
      +
      194  uint8_t mask1 = uint8_t(mask); // least significant 8 bits
      +
      195  uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits
      +
      196  // next line just loads the 64-bit values thintable_epi8[mask1] and
      +
      197  // thintable_epi8[mask2] into a 128-bit register, using only
      +
      198  // two instructions on most compilers.
      +
      199 #ifdef __LITTLE_ENDIAN__
      +
      200  __m128i shufmask = (__m128i)(__vector unsigned long long){
      +
      201  thintable_epi8[mask1], thintable_epi8[mask2]};
      +
      202 #else
      +
      203  __m128i shufmask = (__m128i)(__vector unsigned long long){
      +
      204  thintable_epi8[mask2], thintable_epi8[mask1]};
      +
      205  shufmask = (__m128i)vec_reve((__m128i)shufmask);
      +
      206 #endif
      +
      207  // we increment by 0x08 the second half of the mask
      +
      208  shufmask = ((__m128i)shufmask) +
      +
      209  ((__m128i)(__vector int){0, 0, 0x08080808, 0x08080808});
      +
      210 
      +
      211  // this is the version "nearly pruned"
      +
      212  __m128i pruned = vec_perm(this->value, this->value, shufmask);
      +
      213  // we still need to put the two halves together.
      +
      214  // we compute the popcount of the first half:
      +
      215  int pop1 = BitsSetTable256mul2[mask1];
      +
      216  // then load the corresponding mask, what it does is to write
      +
      217  // only the first pop1 bytes from the first 8 bytes, and then
      +
      218  // it fills in with the bytes from the second 8 bytes + some filling
      +
      219  // at the end.
      +
      220  __m128i compactmask =
      +
      221  vec_vsx_ld(0, reinterpret_cast<const uint8_t *>(pshufb_combine_table + pop1 * 8));
      +
      222  __m128i answer = vec_perm(pruned, (__m128i)vec_splats(0), compactmask);
      +
      223  vec_vsx_st(answer, 0, reinterpret_cast<__m128i *>(output));
      +
      224  }
      +
      225 
      +
      226  template <typename L>
      +
      227  simdjson_inline simd8<L>
      +
      228  lookup_16(L replace0, L replace1, L replace2, L replace3, L replace4,
      +
      229  L replace5, L replace6, L replace7, L replace8, L replace9,
      +
      230  L replace10, L replace11, L replace12, L replace13, L replace14,
      +
      231  L replace15) const {
      +
      232  return lookup_16(simd8<L>::repeat_16(
      +
      233  replace0, replace1, replace2, replace3, replace4, replace5, replace6,
      +
      234  replace7, replace8, replace9, replace10, replace11, replace12,
      +
      235  replace13, replace14, replace15));
      +
      236  }
      +
      237 };
      +
      238 
      +
      239 // Signed bytes
      +
      240 template <> struct simd8<int8_t> : base8_numeric<int8_t> {
      +
      241  simdjson_inline simd8() : base8_numeric<int8_t>() {}
      +
      242  simdjson_inline simd8(const __m128i _value)
      +
      243  : base8_numeric<int8_t>(_value) {}
      +
      244  // Splat constructor
      +
      245  simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {}
      +
      246  // Array constructor
      +
      247  simdjson_inline simd8(const int8_t *values) : simd8(load(values)) {}
      +
      248  // Member-by-member initialization
      +
      249  simdjson_inline simd8(int8_t v0, int8_t v1, int8_t v2, int8_t v3,
      +
      250  int8_t v4, int8_t v5, int8_t v6, int8_t v7,
      +
      251  int8_t v8, int8_t v9, int8_t v10, int8_t v11,
      +
      252  int8_t v12, int8_t v13, int8_t v14, int8_t v15)
      +
      253  : simd8((__m128i)(__vector signed char){v0, v1, v2, v3, v4, v5, v6, v7,
      +
      254  v8, v9, v10, v11, v12, v13, v14,
      +
      255  v15}) {}
      +
      256  // Repeat 16 values as many times as necessary (usually for lookup tables)
      +
      257  simdjson_inline static simd8<int8_t>
      +
      258  repeat_16(int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5,
      +
      259  int8_t v6, int8_t v7, int8_t v8, int8_t v9, int8_t v10, int8_t v11,
      +
      260  int8_t v12, int8_t v13, int8_t v14, int8_t v15) {
      +
      261  return simd8<int8_t>(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
      +
      262  v13, v14, v15);
      +
      263  }
      +
      264 
      +
      265  // Order-sensitive comparisons
      +
      266  simdjson_inline simd8<int8_t>
      +
      267  max_val(const simd8<int8_t> other) const {
      +
      268  return (__m128i)vec_max((__vector signed char)this->value,
      +
      269  (__vector signed char)(__m128i)other);
      +
      270  }
      +
      271  simdjson_inline simd8<int8_t>
      +
      272  min_val(const simd8<int8_t> other) const {
      +
      273  return (__m128i)vec_min((__vector signed char)this->value,
      +
      274  (__vector signed char)(__m128i)other);
      +
      275  }
      +
      276  simdjson_inline simd8<bool>
      +
      277  operator>(const simd8<int8_t> other) const {
      +
      278  return (__m128i)vec_cmpgt((__vector signed char)this->value,
      +
      279  (__vector signed char)(__m128i)other);
      +
      280  }
      +
      281  simdjson_inline simd8<bool>
      +
      282  operator<(const simd8<int8_t> other) const {
      +
      283  return (__m128i)vec_cmplt((__vector signed char)this->value,
      +
      284  (__vector signed char)(__m128i)other);
      +
      285  }
      +
      286 };
      +
      287 
      +
      288 // Unsigned bytes
      +
      289 template <> struct simd8<uint8_t> : base8_numeric<uint8_t> {
      +
      290  simdjson_inline simd8() : base8_numeric<uint8_t>() {}
      +
      291  simdjson_inline simd8(const __m128i _value)
      +
      292  : base8_numeric<uint8_t>(_value) {}
      +
      293  // Splat constructor
      +
      294  simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
      +
      295  // Array constructor
      +
      296  simdjson_inline simd8(const uint8_t *values) : simd8(load(values)) {}
      +
      297  // Member-by-member initialization
      +
      298  simdjson_inline
      +
      299  simd8(uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5,
      +
      300  uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, uint8_t v10,
      +
      301  uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15)
      +
      302  : simd8((__m128i){v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
      +
      303  v13, v14, v15}) {}
      +
      304  // Repeat 16 values as many times as necessary (usually for lookup tables)
      +
      305  simdjson_inline static simd8<uint8_t>
      +
      306  repeat_16(uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4,
      +
      307  uint8_t v5, uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9,
      +
      308  uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14,
      +
      309  uint8_t v15) {
      +
      310  return simd8<uint8_t>(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12,
      +
      311  v13, v14, v15);
      +
      312  }
      +
      313 
      +
      314  // Saturated math
      +
      315  simdjson_inline simd8<uint8_t>
      +
      316  saturating_add(const simd8<uint8_t> other) const {
      +
      317  return (__m128i)vec_adds(this->value, (__m128i)other);
      +
      318  }
      +
      319  simdjson_inline simd8<uint8_t>
      +
      320  saturating_sub(const simd8<uint8_t> other) const {
      +
      321  return (__m128i)vec_subs(this->value, (__m128i)other);
      +
      322  }
      +
      323 
      +
      324  // Order-specific operations
      +
      325  simdjson_inline simd8<uint8_t>
      +
      326  max_val(const simd8<uint8_t> other) const {
      +
      327  return (__m128i)vec_max(this->value, (__m128i)other);
      +
      328  }
      +
      329  simdjson_inline simd8<uint8_t>
      +
      330  min_val(const simd8<uint8_t> other) const {
      +
      331  return (__m128i)vec_min(this->value, (__m128i)other);
      +
      332  }
      +
      333  // Same as >, but only guarantees true is nonzero (< guarantees true = -1)
      +
      334  simdjson_inline simd8<uint8_t>
      +
      335  gt_bits(const simd8<uint8_t> other) const {
      +
      336  return this->saturating_sub(other);
      +
      337  }
      +
      338  // Same as <, but only guarantees true is nonzero (< guarantees true = -1)
      +
      339  simdjson_inline simd8<uint8_t>
      +
      340  lt_bits(const simd8<uint8_t> other) const {
      +
      341  return other.saturating_sub(*this);
      +
      342  }
      +
      343  simdjson_inline simd8<bool>
      +
      344  operator<=(const simd8<uint8_t> other) const {
      +
      345  return other.max_val(*this) == other;
      +
      346  }
      +
      347  simdjson_inline simd8<bool>
      +
      348  operator>=(const simd8<uint8_t> other) const {
      +
      349  return other.min_val(*this) == other;
      +
      350  }
      +
      351  simdjson_inline simd8<bool>
      +
      352  operator>(const simd8<uint8_t> other) const {
      +
      353  return this->gt_bits(other).any_bits_set();
      +
      354  }
      +
      355  simdjson_inline simd8<bool>
      +
      356  operator<(const simd8<uint8_t> other) const {
      +
      357  return this->gt_bits(other).any_bits_set();
      +
      358  }
      +
      359 
      +
      360  // Bit-specific operations
      +
      361  simdjson_inline simd8<bool> bits_not_set() const {
      +
      362  return (__m128i)vec_cmpeq(this->value, (__m128i)vec_splats(uint8_t(0)));
      +
      363  }
      +
      364  simdjson_inline simd8<bool> bits_not_set(simd8<uint8_t> bits) const {
      +
      365  return (*this & bits).bits_not_set();
      +
      366  }
      +
      367  simdjson_inline simd8<bool> any_bits_set() const {
      +
      368  return ~this->bits_not_set();
      +
      369  }
      +
      370  simdjson_inline simd8<bool> any_bits_set(simd8<uint8_t> bits) const {
      +
      371  return ~this->bits_not_set(bits);
      +
      372  }
      +
      373  simdjson_inline bool bits_not_set_anywhere() const {
      +
      374  return vec_all_eq(this->value, (__m128i)vec_splats(0));
      +
      375  }
      +
      376  simdjson_inline bool any_bits_set_anywhere() const {
      +
      377  return !bits_not_set_anywhere();
      +
      378  }
      +
      379  simdjson_inline bool bits_not_set_anywhere(simd8<uint8_t> bits) const {
      +
      380  return vec_all_eq(vec_and(this->value, (__m128i)bits),
      +
      381  (__m128i)vec_splats(0));
      +
      382  }
      +
      383  simdjson_inline bool any_bits_set_anywhere(simd8<uint8_t> bits) const {
      +
      384  return !bits_not_set_anywhere(bits);
      +
      385  }
      +
      386  template <int N> simdjson_inline simd8<uint8_t> shr() const {
      +
      387  return simd8<uint8_t>(
      +
      388  (__m128i)vec_sr(this->value, (__m128i)vec_splat_u8(N)));
      +
      389  }
      +
      390  template <int N> simdjson_inline simd8<uint8_t> shl() const {
      +
      391  return simd8<uint8_t>(
      +
      392  (__m128i)vec_sl(this->value, (__m128i)vec_splat_u8(N)));
      +
      393  }
      +
      394 };
      +
      395 
      +
      396 template <typename T> struct simd8x64 {
      +
      397  static constexpr int NUM_CHUNKS = 64 / sizeof(simd8<T>);
      +
      398  static_assert(NUM_CHUNKS == 4,
      +
      399  "PPC64 kernel should use four registers per 64-byte block.");
      +
      400  const simd8<T> chunks[NUM_CHUNKS];
      +
      401 
      +
      402  simd8x64(const simd8x64<T> &o) = delete; // no copy allowed
      +
      403  simd8x64<T> &
      +
      404  operator=(const simd8<T>& other) = delete; // no assignment allowed
      +
      405  simd8x64() = delete; // no default constructor allowed
      +
      406 
      +
      407  simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1,
      +
      408  const simd8<T> chunk2, const simd8<T> chunk3)
      +
      409  : chunks{chunk0, chunk1, chunk2, chunk3} {}
      +
      410  simdjson_inline simd8x64(const T ptr[64])
      +
      411  : chunks{simd8<T>::load(ptr), simd8<T>::load(ptr + 16),
      +
      412  simd8<T>::load(ptr + 32), simd8<T>::load(ptr + 48)} {}
      +
      413 
      +
      414  simdjson_inline void store(T ptr[64]) const {
      +
      415  this->chunks[0].store(ptr + sizeof(simd8<T>) * 0);
      +
      416  this->chunks[1].store(ptr + sizeof(simd8<T>) * 1);
      +
      417  this->chunks[2].store(ptr + sizeof(simd8<T>) * 2);
      +
      418  this->chunks[3].store(ptr + sizeof(simd8<T>) * 3);
      +
      419  }
      +
      420 
      +
      421  simdjson_inline simd8<T> reduce_or() const {
      +
      422  return (this->chunks[0] | this->chunks[1]) |
      +
      423  (this->chunks[2] | this->chunks[3]);
      +
      424  }
      +
      425 
      +
      426  simdjson_inline uint64_t compress(uint64_t mask, T *output) const {
      +
      427  this->chunks[0].compress(uint16_t(mask), output);
      +
      428  this->chunks[1].compress(uint16_t(mask >> 16),
      +
      429  output + 16 - count_ones(mask & 0xFFFF));
      +
      430  this->chunks[2].compress(uint16_t(mask >> 32),
      +
      431  output + 32 - count_ones(mask & 0xFFFFFFFF));
      +
      432  this->chunks[3].compress(uint16_t(mask >> 48),
      +
      433  output + 48 - count_ones(mask & 0xFFFFFFFFFFFF));
      +
      434  return 64 - count_ones(mask);
      +
      435  }
      +
      436 
      +
      437  simdjson_inline uint64_t to_bitmask() const {
      +
      438  uint64_t r0 = uint32_t(this->chunks[0].to_bitmask());
      +
      439  uint64_t r1 = this->chunks[1].to_bitmask();
      +
      440  uint64_t r2 = this->chunks[2].to_bitmask();
      +
      441  uint64_t r3 = this->chunks[3].to_bitmask();
      +
      442  return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48);
      +
      443  }
      +
      444 
      +
      445  simdjson_inline uint64_t eq(const T m) const {
      +
      446  const simd8<T> mask = simd8<T>::splat(m);
      +
      447  return simd8x64<bool>(this->chunks[0] == mask, this->chunks[1] == mask,
      +
      448  this->chunks[2] == mask, this->chunks[3] == mask)
      +
      449  .to_bitmask();
      +
      450  }
      +
      451 
      +
      452  simdjson_inline uint64_t eq(const simd8x64<uint8_t> &other) const {
      +
      453  return simd8x64<bool>(this->chunks[0] == other.chunks[0],
      +
      454  this->chunks[1] == other.chunks[1],
      +
      455  this->chunks[2] == other.chunks[2],
      +
      456  this->chunks[3] == other.chunks[3])
      +
      457  .to_bitmask();
      +
      458  }
      +
      459 
      +
      460  simdjson_inline uint64_t lteq(const T m) const {
      +
      461  const simd8<T> mask = simd8<T>::splat(m);
      +
      462  return simd8x64<bool>(this->chunks[0] <= mask, this->chunks[1] <= mask,
      +
      463  this->chunks[2] <= mask, this->chunks[3] <= mask)
      +
      464  .to_bitmask();
      +
      465  }
      +
      466 }; // struct simd8x64<T>
      +
      467 
      +
      468 } // namespace simd
      +
      469 } // unnamed namespace
      +
      470 } // namespace SIMDJSON_IMPLEMENTATION
      +
      471 } // namespace simdjson
      +
      472 
      +
      473 #endif // SIMDJSON_PPC64_SIMD_INPUT_H
      +
      simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
      Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      diff --git a/ppc64_2stringparsing_8h_source.html b/ppc64_2stringparsing__defs_8h_source.html similarity index 74% rename from ppc64_2stringparsing_8h_source.html rename to ppc64_2stringparsing__defs_8h_source.html index 55ee06e54..9f414d81a 100644 --- a/ppc64_2stringparsing_8h_source.html +++ b/ppc64_2stringparsing__defs_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/ppc64/stringparsing.h Source File +simdjson: include/simdjson/ppc64/stringparsing_defs.h Source File @@ -68,7 +68,7 @@ $(function() {
      @@ -88,80 +88,79 @@ $(document).ready(function(){initNavTree('ppc64_2stringparsing_8h_source.html','
      -
      stringparsing.h
      +
      stringparsing_defs.h
      -
      1 #ifndef SIMDJSON_PPC64_STRINGPARSING_H
      -
      2 #define SIMDJSON_PPC64_STRINGPARSING_H
      +
      1 #ifndef SIMDJSON_PPC64_STRINGPARSING_DEFS_H
      +
      2 #define SIMDJSON_PPC64_STRINGPARSING_DEFS_H
      3 
      -
      4 #include "simdjson/base.h"
      -
      5 #include "simdjson/ppc64/bitmanipulation.h"
      -
      6 #include "simdjson/ppc64/simd.h"
      -
      7 
      -
      8 namespace simdjson {
      -
      9 namespace SIMDJSON_IMPLEMENTATION {
      -
      10 namespace {
      -
      11 
      -
      12 using namespace simd;
      -
      13 
      -
      14 // Holds backslashes and quotes locations.
      -
      15 struct backslash_and_quote {
      -
      16 public:
      -
      17  static constexpr uint32_t BYTES_PROCESSED = 32;
      -
      18  simdjson_inline static backslash_and_quote
      -
      19  copy_and_find(const uint8_t *src, uint8_t *dst);
      -
      20 
      -
      21  simdjson_inline bool has_quote_first() {
      -
      22  return ((bs_bits - 1) & quote_bits) != 0;
      -
      23  }
      -
      24  simdjson_inline bool has_backslash() { return bs_bits != 0; }
      -
      25  simdjson_inline int quote_index() {
      -
      26  return trailing_zeroes(quote_bits);
      -
      27  }
      -
      28  simdjson_inline int backslash_index() {
      -
      29  return trailing_zeroes(bs_bits);
      -
      30  }
      -
      31 
      -
      32  uint32_t bs_bits;
      -
      33  uint32_t quote_bits;
      -
      34 }; // struct backslash_and_quote
      -
      35 
      -
      36 simdjson_inline backslash_and_quote
      -
      37 backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) {
      -
      38  // this can read up to 31 bytes beyond the buffer size, but we require
      -
      39  // SIMDJSON_PADDING of padding
      -
      40  static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1),
      -
      41  "backslash and quote finder must process fewer than "
      -
      42  "SIMDJSON_PADDING bytes");
      -
      43  simd8<uint8_t> v0(src);
      -
      44  simd8<uint8_t> v1(src + sizeof(v0));
      -
      45  v0.store(dst);
      -
      46  v1.store(dst + sizeof(v0));
      -
      47 
      -
      48  // Getting a 64-bit bitmask is much cheaper than multiple 16-bit bitmasks on
      -
      49  // PPC; therefore, we smash them together into a 64-byte mask and get the
      -
      50  // bitmask from there.
      -
      51  uint64_t bs_and_quote =
      -
      52  simd8x64<bool>(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask();
      -
      53  return {
      -
      54  uint32_t(bs_and_quote), // bs_bits
      -
      55  uint32_t(bs_and_quote >> 32) // quote_bits
      -
      56  };
      -
      57 }
      -
      58 
      -
      59 } // unnamed namespace
      -
      60 } // namespace SIMDJSON_IMPLEMENTATION
      -
      61 } // namespace simdjson
      -
      62 
      -
      63 #endif // SIMDJSON_PPC64_STRINGPARSING_H
      -
      We want to support argument-dependent lookup (ADL).
      -
      constexpr size_t SIMDJSON_PADDING
      The amount of padding needed in a buffer to parse JSON.
      Definition: common_defs.h:45
      +
      4 #include "simdjson/ppc64/bitmanipulation.h"
      +
      5 #include "simdjson/ppc64/simd.h"
      +
      6 
      +
      7 namespace simdjson {
      +
      8 namespace SIMDJSON_IMPLEMENTATION {
      +
      9 namespace {
      +
      10 
      +
      11 using namespace simd;
      +
      12 
      +
      13 // Holds backslashes and quotes locations.
      +
      14 struct backslash_and_quote {
      +
      15 public:
      +
      16  static constexpr uint32_t BYTES_PROCESSED = 32;
      +
      17  simdjson_inline static backslash_and_quote
      +
      18  copy_and_find(const uint8_t *src, uint8_t *dst);
      +
      19 
      +
      20  simdjson_inline bool has_quote_first() {
      +
      21  return ((bs_bits - 1) & quote_bits) != 0;
      +
      22  }
      +
      23  simdjson_inline bool has_backslash() { return bs_bits != 0; }
      +
      24  simdjson_inline int quote_index() {
      +
      25  return trailing_zeroes(quote_bits);
      +
      26  }
      +
      27  simdjson_inline int backslash_index() {
      +
      28  return trailing_zeroes(bs_bits);
      +
      29  }
      +
      30 
      +
      31  uint32_t bs_bits;
      +
      32  uint32_t quote_bits;
      +
      33 }; // struct backslash_and_quote
      +
      34 
      +
      35 simdjson_inline backslash_and_quote
      +
      36 backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) {
      +
      37  // this can read up to 31 bytes beyond the buffer size, but we require
      +
      38  // SIMDJSON_PADDING of padding
      +
      39  static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1),
      +
      40  "backslash and quote finder must process fewer than "
      +
      41  "SIMDJSON_PADDING bytes");
      +
      42  simd8<uint8_t> v0(src);
      +
      43  simd8<uint8_t> v1(src + sizeof(v0));
      +
      44  v0.store(dst);
      +
      45  v1.store(dst + sizeof(v0));
      +
      46 
      +
      47  // Getting a 64-bit bitmask is much cheaper than multiple 16-bit bitmasks on
      +
      48  // PPC; therefore, we smash them together into a 64-byte mask and get the
      +
      49  // bitmask from there.
      +
      50  uint64_t bs_and_quote =
      +
      51  simd8x64<bool>(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask();
      +
      52  return {
      +
      53  uint32_t(bs_and_quote), // bs_bits
      +
      54  uint32_t(bs_and_quote >> 32) // quote_bits
      +
      55  };
      +
      56 }
      +
      57 
      +
      58 } // unnamed namespace
      +
      59 } // namespace SIMDJSON_IMPLEMENTATION
      +
      60 } // namespace simdjson
      +
      61 
      +
      62 #endif // SIMDJSON_PPC64_STRINGPARSING_DEFS_H
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      +
      constexpr size_t SIMDJSON_PADDING
      The amount of padding needed in a buffer to parse JSON.
      Definition: base.h:30
      diff --git a/ppc64_8h_source.html b/ppc64_8h_source.html index 51437ca23..83e5ec701 100644 --- a/ppc64_8h_source.html +++ b/ppc64_8h_source.html @@ -94,36 +94,11 @@ $(document).ready(function(){initNavTree('ppc64_8h_source.html',''); initResizab
      1 #ifndef SIMDJSON_PPC64_H
      2 #define SIMDJSON_PPC64_H
      3 
      - -
      5 
      -
      6 #if SIMDJSON_IMPLEMENTATION_PPC64
      +
      4 #include "simdjson/ppc64/begin.h"
      +
      5 #include "simdjson/generic/amalgamated.h"
      +
      6 #include "simdjson/ppc64/end.h"
      7 
      -
      8 namespace simdjson {
      -
      12 namespace ppc64 {
      -
      13 } // namespace ppc64
      -
      14 } // namespace simdjson
      -
      15 
      -
      16 #include "simdjson/ppc64/implementation.h"
      -
      17 
      -
      18 #include "simdjson/ppc64/begin.h"
      -
      19 
      -
      20 // Declarations
      -
      21 #include "simdjson/generic/dom_parser_implementation.h"
      -
      22 #include "simdjson/ppc64/intrinsics.h"
      -
      23 #include "simdjson/ppc64/bitmanipulation.h"
      -
      24 #include "simdjson/ppc64/bitmask.h"
      -
      25 #include "simdjson/ppc64/simd.h"
      -
      26 #include "simdjson/generic/jsoncharutils.h"
      -
      27 #include "simdjson/generic/atomparsing.h"
      -
      28 #include "simdjson/ppc64/stringparsing.h"
      -
      29 #include "simdjson/ppc64/numberparsing.h"
      -
      30 #include "simdjson/ppc64/end.h"
      -
      31 
      -
      32 #endif // SIMDJSON_IMPLEMENTATION_PPC64
      -
      33 
      -
      34 #endif // SIMDJSON_PPC64_H
      -
      Includes common stuff needed for implementations.
      -
      We want to support argument-dependent lookup (ADL).
      +
      8 #endif // SIMDJSON_PPC64_H
      diff --git a/raw__json__string-inl_8h_source.html b/raw__json__string-inl_8h_source.html index 5ad81d0f5..3a6a6338e 100644 --- a/raw__json__string-inl_8h_source.html +++ b/raw__json__string-inl_8h_source.html @@ -91,209 +91,221 @@ $(document).ready(function(){initNavTree('raw__json__string-inl_8h_source.html',
      raw_json_string-inl.h
      -
      1 namespace simdjson {
      +
      1 #ifndef SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H
      2 
      -
      3 namespace SIMDJSON_IMPLEMENTATION {
      -
      4 namespace ondemand {
      -
      5 
      -
      6 simdjson_inline raw_json_string::raw_json_string(const uint8_t * _buf) noexcept : buf{_buf} {}
      -
      7 
      -
      8 simdjson_inline const char * raw_json_string::raw() const noexcept { return reinterpret_cast<const char *>(buf); }
      -
      9 
      +
      3 #ifndef SIMDJSON_AMALGAMATED
      +
      4 #define SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H
      +
      5 #include "simdjson/generic/ondemand/base.h"
      +
      6 #include "simdjson/generic/ondemand/raw_json_string.h"
      +
      7 #include "simdjson/generic/ondemand/json_iterator-inl.h"
      +
      8 #include "simdjson/generic/implementation_simdjson_result_base-inl.h"
      +
      9 #endif // SIMDJSON_AMALGAMATED
      10 
      -
      11 simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(std::string_view target) noexcept {
      -
      12  size_t pos{0};
      -
      13  // if the content has no escape character, just scan through it quickly!
      -
      14  for(;pos < target.size() && target[pos] != '\\';pos++) {}
      -
      15  // slow path may begin.
      -
      16  bool escaping{false};
      -
      17  for(;pos < target.size();pos++) {
      -
      18  if((target[pos] == '"') && !escaping) {
      -
      19  return false;
      -
      20  } else if(target[pos] == '\\') {
      -
      21  escaping = !escaping;
      -
      22  } else {
      -
      23  escaping = false;
      -
      24  }
      -
      25  }
      -
      26  return true;
      -
      27 }
      -
      28 
      -
      29 simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(const char* target) noexcept {
      -
      30  size_t pos{0};
      -
      31  // if the content has no escape character, just scan through it quickly!
      -
      32  for(;target[pos] && target[pos] != '\\';pos++) {}
      -
      33  // slow path may begin.
      -
      34  bool escaping{false};
      -
      35  for(;target[pos];pos++) {
      -
      36  if((target[pos] == '"') && !escaping) {
      -
      37  return false;
      -
      38  } else if(target[pos] == '\\') {
      -
      39  escaping = !escaping;
      -
      40  } else {
      -
      41  escaping = false;
      -
      42  }
      -
      43  }
      -
      44  return true;
      -
      45 }
      -
      46 
      -
      47 
      -
      48 simdjson_inline bool raw_json_string::unsafe_is_equal(size_t length, std::string_view target) const noexcept {
      -
      49  // If we are going to call memcmp, then we must know something about the length of the raw_json_string.
      -
      50  return (length >= target.size()) && (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size());
      -
      51 }
      -
      52 
      -
      53 simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) const noexcept {
      -
      54  // Assumptions: does not contain unescaped quote characters, and
      -
      55  // the raw content is quote terminated within a valid JSON string.
      -
      56  if(target.size() <= SIMDJSON_PADDING) {
      -
      57  return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size());
      -
      58  }
      -
      59  const char * r{raw()};
      -
      60  size_t pos{0};
      -
      61  for(;pos < target.size();pos++) {
      -
      62  if(r[pos] != target[pos]) { return false; }
      -
      63  }
      -
      64  if(r[pos] != '"') { return false; }
      -
      65  return true;
      -
      66 }
      -
      67 
      -
      68 simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept {
      +
      11 namespace simdjson {
      +
      12 
      +
      13 namespace SIMDJSON_IMPLEMENTATION {
      +
      14 namespace ondemand {
      +
      15 
      +
      16 simdjson_inline raw_json_string::raw_json_string(const uint8_t * _buf) noexcept : buf{_buf} {}
      +
      17 
      +
      18 simdjson_inline const char * raw_json_string::raw() const noexcept { return reinterpret_cast<const char *>(buf); }
      +
      19 
      +
      20 
      +
      21 simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(std::string_view target) noexcept {
      +
      22  size_t pos{0};
      +
      23  // if the content has no escape character, just scan through it quickly!
      +
      24  for(;pos < target.size() && target[pos] != '\\';pos++) {}
      +
      25  // slow path may begin.
      +
      26  bool escaping{false};
      +
      27  for(;pos < target.size();pos++) {
      +
      28  if((target[pos] == '"') && !escaping) {
      +
      29  return false;
      +
      30  } else if(target[pos] == '\\') {
      +
      31  escaping = !escaping;
      +
      32  } else {
      +
      33  escaping = false;
      +
      34  }
      +
      35  }
      +
      36  return true;
      +
      37 }
      +
      38 
      +
      39 simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(const char* target) noexcept {
      +
      40  size_t pos{0};
      +
      41  // if the content has no escape character, just scan through it quickly!
      +
      42  for(;target[pos] && target[pos] != '\\';pos++) {}
      +
      43  // slow path may begin.
      +
      44  bool escaping{false};
      +
      45  for(;target[pos];pos++) {
      +
      46  if((target[pos] == '"') && !escaping) {
      +
      47  return false;
      +
      48  } else if(target[pos] == '\\') {
      +
      49  escaping = !escaping;
      +
      50  } else {
      +
      51  escaping = false;
      +
      52  }
      +
      53  }
      +
      54  return true;
      +
      55 }
      +
      56 
      +
      57 
      +
      58 simdjson_inline bool raw_json_string::unsafe_is_equal(size_t length, std::string_view target) const noexcept {
      +
      59  // If we are going to call memcmp, then we must know something about the length of the raw_json_string.
      +
      60  return (length >= target.size()) && (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size());
      +
      61 }
      +
      62 
      +
      63 simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) const noexcept {
      +
      64  // Assumptions: does not contain unescaped quote characters, and
      +
      65  // the raw content is quote terminated within a valid JSON string.
      +
      66  if(target.size() <= SIMDJSON_PADDING) {
      +
      67  return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size());
      +
      68  }
      69  const char * r{raw()};
      70  size_t pos{0};
      -
      71  bool escaping{false};
      -
      72  for(;pos < target.size();pos++) {
      -
      73  if(r[pos] != target[pos]) { return false; }
      -
      74  // if target is a compile-time constant and it is free from
      -
      75  // quotes, then the next part could get optimized away through
      -
      76  // inlining.
      -
      77  if((target[pos] == '"') && !escaping) {
      -
      78  // We have reached the end of the raw_json_string but
      -
      79  // the target is not done.
      -
      80  return false;
      -
      81  } else if(target[pos] == '\\') {
      -
      82  escaping = !escaping;
      -
      83  } else {
      -
      84  escaping = false;
      -
      85  }
      -
      86  }
      -
      87  if(r[pos] != '"') { return false; }
      -
      88  return true;
      -
      89 }
      -
      90 
      -
      91 
      -
      92 simdjson_inline bool raw_json_string::unsafe_is_equal(const char * target) const noexcept {
      -
      93  // Assumptions: 'target' does not contain unescaped quote characters, is null terminated and
      -
      94  // the raw content is quote terminated within a valid JSON string.
      -
      95  const char * r{raw()};
      -
      96  size_t pos{0};
      -
      97  for(;target[pos];pos++) {
      -
      98  if(r[pos] != target[pos]) { return false; }
      -
      99  }
      -
      100  if(r[pos] != '"') { return false; }
      -
      101  return true;
      -
      102 }
      -
      103 
      -
      104 simdjson_inline bool raw_json_string::is_equal(const char* target) const noexcept {
      -
      105  // Assumptions: does not contain unescaped quote characters, and
      -
      106  // the raw content is quote terminated within a valid JSON string.
      -
      107  const char * r{raw()};
      -
      108  size_t pos{0};
      -
      109  bool escaping{false};
      -
      110  for(;target[pos];pos++) {
      -
      111  if(r[pos] != target[pos]) { return false; }
      -
      112  // if target is a compile-time constant and it is free from
      -
      113  // quotes, then the next part could get optimized away through
      -
      114  // inlining.
      -
      115  if((target[pos] == '"') && !escaping) {
      -
      116  // We have reached the end of the raw_json_string but
      -
      117  // the target is not done.
      -
      118  return false;
      -
      119  } else if(target[pos] == '\\') {
      -
      120  escaping = !escaping;
      -
      121  } else {
      -
      122  escaping = false;
      -
      123  }
      -
      124  }
      -
      125  if(r[pos] != '"') { return false; }
      -
      126  return true;
      -
      127 }
      -
      128 
      -
      129 simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept {
      -
      130  return a.unsafe_is_equal(c);
      -
      131 }
      -
      132 
      -
      133 simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept {
      -
      134  return a == c;
      -
      135 }
      -
      136 
      -
      137 simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept {
      -
      138  return !(a == c);
      -
      139 }
      -
      140 
      -
      141 simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept {
      -
      142  return !(a == c);
      -
      143 }
      -
      144 
      -
      145 
      -
      146 simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> raw_json_string::unescape(json_iterator &iter, bool allow_replacement) const noexcept {
      -
      147  return iter.unescape(*this, allow_replacement);
      -
      148 }
      -
      149 
      -
      150 simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> raw_json_string::unescape_wobbly(json_iterator &iter) const noexcept {
      -
      151  return iter.unescape_wobbly(*this);
      -
      152 }
      -
      153 
      -
      154 simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &out, const raw_json_string &str) noexcept {
      -
      155  bool in_escape = false;
      -
      156  const char *s = str.raw();
      -
      157  while (true) {
      -
      158  switch (*s) {
      -
      159  case '\\': in_escape = !in_escape; break;
      -
      160  case '"': if (in_escape) { in_escape = false; } else { return out; } break;
      -
      161  default: if (in_escape) { in_escape = false; }
      -
      162  }
      -
      163  out << *s;
      -
      164  s++;
      -
      165  }
      -
      166 }
      -
      167 
      -
      168 } // namespace ondemand
      -
      169 } // namespace SIMDJSON_IMPLEMENTATION
      -
      170 } // namespace simdjson
      -
      171 
      -
      172 namespace simdjson {
      -
      173 
      -
      174 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string &&value) noexcept
      -
      175  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>(value)) {}
      -
      176 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>::simdjson_result(error_code error) noexcept
      -
      177  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>(error) {}
      -
      178 
      -
      179 simdjson_inline simdjson_result<const char *> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>::raw() const noexcept {
      -
      180  if (error()) { return error(); }
      -
      181  return first.raw();
      -
      182 }
      -
      183 simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>::unescape(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &iter, bool allow_replacement) const noexcept {
      -
      184  if (error()) { return error(); }
      -
      185  return first.unescape(iter, allow_replacement);
      -
      186 }
      -
      187 simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>::unescape_wobbly(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &iter) const noexcept {
      -
      188  if (error()) { return error(); }
      -
      189  return first.unescape_wobbly(iter);
      -
      190 }
      -
      191 } // namespace simdjson
      -
      A string escaped per JSON rules, terminated with quote (").
      -
      simdjson_inline bool is_equal(std::string_view target) const noexcept
      This compares the current instance to the std::string_view target: returns true if they are byte-by-b...
      -
      static simdjson_inline bool is_free_from_unescaped_quote(std::string_view target) noexcept
      Returns true if target is free from unescaped quote.
      +
      71  for(;pos < target.size();pos++) {
      +
      72  if(r[pos] != target[pos]) { return false; }
      +
      73  }
      +
      74  if(r[pos] != '"') { return false; }
      +
      75  return true;
      +
      76 }
      +
      77 
      +
      78 simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept {
      +
      79  const char * r{raw()};
      +
      80  size_t pos{0};
      +
      81  bool escaping{false};
      +
      82  for(;pos < target.size();pos++) {
      +
      83  if(r[pos] != target[pos]) { return false; }
      +
      84  // if target is a compile-time constant and it is free from
      +
      85  // quotes, then the next part could get optimized away through
      +
      86  // inlining.
      +
      87  if((target[pos] == '"') && !escaping) {
      +
      88  // We have reached the end of the raw_json_string but
      +
      89  // the target is not done.
      +
      90  return false;
      +
      91  } else if(target[pos] == '\\') {
      +
      92  escaping = !escaping;
      +
      93  } else {
      +
      94  escaping = false;
      +
      95  }
      +
      96  }
      +
      97  if(r[pos] != '"') { return false; }
      +
      98  return true;
      +
      99 }
      +
      100 
      +
      101 
      +
      102 simdjson_inline bool raw_json_string::unsafe_is_equal(const char * target) const noexcept {
      +
      103  // Assumptions: 'target' does not contain unescaped quote characters, is null terminated and
      +
      104  // the raw content is quote terminated within a valid JSON string.
      +
      105  const char * r{raw()};
      +
      106  size_t pos{0};
      +
      107  for(;target[pos];pos++) {
      +
      108  if(r[pos] != target[pos]) { return false; }
      +
      109  }
      +
      110  if(r[pos] != '"') { return false; }
      +
      111  return true;
      +
      112 }
      +
      113 
      +
      114 simdjson_inline bool raw_json_string::is_equal(const char* target) const noexcept {
      +
      115  // Assumptions: does not contain unescaped quote characters, and
      +
      116  // the raw content is quote terminated within a valid JSON string.
      +
      117  const char * r{raw()};
      +
      118  size_t pos{0};
      +
      119  bool escaping{false};
      +
      120  for(;target[pos];pos++) {
      +
      121  if(r[pos] != target[pos]) { return false; }
      +
      122  // if target is a compile-time constant and it is free from
      +
      123  // quotes, then the next part could get optimized away through
      +
      124  // inlining.
      +
      125  if((target[pos] == '"') && !escaping) {
      +
      126  // We have reached the end of the raw_json_string but
      +
      127  // the target is not done.
      +
      128  return false;
      +
      129  } else if(target[pos] == '\\') {
      +
      130  escaping = !escaping;
      +
      131  } else {
      +
      132  escaping = false;
      +
      133  }
      +
      134  }
      +
      135  if(r[pos] != '"') { return false; }
      +
      136  return true;
      +
      137 }
      +
      138 
      +
      139 simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept {
      +
      140  return a.unsafe_is_equal(c);
      +
      141 }
      +
      142 
      +
      143 simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept {
      +
      144  return a == c;
      +
      145 }
      +
      146 
      +
      147 simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept {
      +
      148  return !(a == c);
      +
      149 }
      +
      150 
      +
      151 simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept {
      +
      152  return !(a == c);
      +
      153 }
      +
      154 
      +
      155 
      +
      156 simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> raw_json_string::unescape(json_iterator &iter, bool allow_replacement) const noexcept {
      +
      157  return iter.unescape(*this, allow_replacement);
      +
      158 }
      +
      159 
      +
      160 simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> raw_json_string::unescape_wobbly(json_iterator &iter) const noexcept {
      +
      161  return iter.unescape_wobbly(*this);
      +
      162 }
      +
      163 
      +
      164 simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &out, const raw_json_string &str) noexcept {
      +
      165  bool in_escape = false;
      +
      166  const char *s = str.raw();
      +
      167  while (true) {
      +
      168  switch (*s) {
      +
      169  case '\\': in_escape = !in_escape; break;
      +
      170  case '"': if (in_escape) { in_escape = false; } else { return out; } break;
      +
      171  default: if (in_escape) { in_escape = false; }
      +
      172  }
      +
      173  out << *s;
      +
      174  s++;
      +
      175  }
      +
      176 }
      +
      177 
      +
      178 } // namespace ondemand
      +
      179 } // namespace SIMDJSON_IMPLEMENTATION
      +
      180 } // namespace simdjson
      +
      181 
      +
      182 namespace simdjson {
      +
      183 
      +
      184 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string &&value) noexcept
      +
      185  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>(value)) {}
      +
      186 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>::simdjson_result(error_code error) noexcept
      +
      187  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>(error) {}
      +
      188 
      +
      189 simdjson_inline simdjson_result<const char *> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>::raw() const noexcept {
      +
      190  if (error()) { return error(); }
      +
      191  return first.raw();
      +
      192 }
      +
      193 simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>::unescape(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &iter, bool allow_replacement) const noexcept {
      +
      194  if (error()) { return error(); }
      +
      195  return first.unescape(iter, allow_replacement);
      +
      196 }
      +
      197 simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string>::unescape_wobbly(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &iter) const noexcept {
      +
      198  if (error()) { return error(); }
      +
      199  return first.unescape_wobbly(iter);
      +
      200 }
      +
      201 } // namespace simdjson
      +
      202 
      +
      203 #endif // SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H
      +
      A string escaped per JSON rules, terminated with quote (").
      +
      simdjson_inline bool is_equal(std::string_view target) const noexcept
      This compares the current instance to the std::string_view target: returns true if they are byte-by-b...
      +
      static simdjson_inline bool is_free_from_unescaped_quote(std::string_view target) noexcept
      Returns true if target is free from unescaped quote.
      simdjson_inline raw_json_string() noexcept=default
      Create a new invalid raw_json_string.
      -
      simdjson_inline const char * raw() const noexcept
      Get the raw pointer to the beginning of the string in the JSON (just after the ").
      -
      simdjson_inline bool unsafe_is_equal(size_t length, std::string_view target) const noexcept
      This compares the current instance to the std::string_view target: returns true if they are byte-by-b...
      -
      simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
      Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
      -
      std::ostream & operator<<(std::ostream &out, json_type type) noexcept
      Write the JSON type to the output stream.
      Definition: json_type-inl.h:5
      -
      We want to support argument-dependent lookup (ADL).
      +
      simdjson_inline const char * raw() const noexcept
      Get the raw pointer to the beginning of the string in the JSON (just after the ").
      +
      simdjson_inline bool unsafe_is_equal(size_t length, std::string_view target) const noexcept
      This compares the current instance to the std::string_view target: returns true if they are byte-by-b...
      +
      simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
      Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
      +
      std::ostream & operator<<(std::ostream &out, json_type type) noexcept
      Write the JSON type to the output stream.
      Definition: json_type-inl.h:14
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      error_code
      All possible errors returned by simdjson.
      Definition: error.h:17
      -
      constexpr size_t SIMDJSON_PADDING
      The amount of padding needed in a buffer to parse JSON.
      Definition: common_defs.h:45
      -
      simdjson_inline error_code error() const noexcept
      The error.
      Definition: error-inl.h:132
      +
      constexpr size_t SIMDJSON_PADDING
      The amount of padding needed in a buffer to parse JSON.
      Definition: base.h:30
      +
      simdjson_inline error_code error() const noexcept
      The error.
      Definition: error-inl.h:131
      diff --git a/raw__json__string_8h_source.html b/raw__json__string_8h_source.html index 684e8171e..84f405d45 100644 --- a/raw__json__string_8h_source.html +++ b/raw__json__string_8h_source.html @@ -91,95 +91,98 @@ $(document).ready(function(){initNavTree('raw__json__string_8h_source.html','');
      raw_json_string.h
      -
      1 #include "simdjson/error.h"
      +
      1 #ifndef SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H
      2 
      -
      3 namespace simdjson {
      -
      4 namespace SIMDJSON_IMPLEMENTATION {
      -
      5 namespace ondemand {
      -
      6 
      -
      7 class object;
      -
      8 class parser;
      -
      9 class json_iterator;
      -
      10 
      - -
      35 public:
      -
      41  simdjson_inline raw_json_string() noexcept = default;
      -
      42 
      -
      50  simdjson_inline raw_json_string(const uint8_t * _buf) noexcept;
      -
      57  simdjson_inline const char * raw() const noexcept;
      -
      58 
      -
      73  simdjson_inline bool unsafe_is_equal(size_t length, std::string_view target) const noexcept;
      -
      74 
      -
      90  simdjson_inline bool unsafe_is_equal(std::string_view target) const noexcept;
      -
      91 
      -
      104  simdjson_inline bool unsafe_is_equal(const char* target) const noexcept;
      -
      105 
      -
      110  simdjson_inline bool is_equal(std::string_view target) const noexcept;
      -
      111 
      -
      116  simdjson_inline bool is_equal(const char* target) const noexcept;
      -
      117 
      -
      123  static simdjson_inline bool is_free_from_unescaped_quote(std::string_view target) noexcept;
      -
      124  static simdjson_inline bool is_free_from_unescaped_quote(const char* target) noexcept;
      -
      125 
      -
      126 private:
      +
      3 #ifndef SIMDJSON_AMALGAMATED
      +
      4 #define SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H
      +
      5 #include "simdjson/generic/ondemand/base.h"
      +
      6 #include "simdjson/generic/implementation_simdjson_result_base.h"
      +
      7 #endif // SIMDJSON_AMALGAMATED
      +
      8 
      +
      9 namespace simdjson {
      +
      10 namespace SIMDJSON_IMPLEMENTATION {
      +
      11 namespace ondemand {
      +
      12 
      + +
      37 public:
      +
      43  simdjson_inline raw_json_string() noexcept = default;
      +
      44 
      +
      52  simdjson_inline raw_json_string(const uint8_t * _buf) noexcept;
      +
      59  simdjson_inline const char * raw() const noexcept;
      +
      60 
      +
      75  simdjson_inline bool unsafe_is_equal(size_t length, std::string_view target) const noexcept;
      +
      76 
      +
      92  simdjson_inline bool unsafe_is_equal(std::string_view target) const noexcept;
      +
      93 
      +
      106  simdjson_inline bool unsafe_is_equal(const char* target) const noexcept;
      +
      107 
      +
      112  simdjson_inline bool is_equal(std::string_view target) const noexcept;
      +
      113 
      +
      118  simdjson_inline bool is_equal(const char* target) const noexcept;
      +
      119 
      +
      125  static simdjson_inline bool is_free_from_unescaped_quote(std::string_view target) noexcept;
      +
      126  static simdjson_inline bool is_free_from_unescaped_quote(const char* target) noexcept;
      127 
      -
      128 
      -
      133  simdjson_inline void consume() noexcept { buf = nullptr; }
      -
      134 
      -
      138  simdjson_inline simdjson_warn_unused bool alive() const noexcept { return buf != nullptr; }
      -
      139 
      -
      151  simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> unescape(json_iterator &iter, bool allow_replacement) const noexcept;
      -
      152 
      -
      163  simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> unescape_wobbly(json_iterator &iter) const noexcept;
      -
      164  const uint8_t * buf{};
      -
      165  friend class object;
      -
      166  friend class field;
      -
      167  friend class parser;
      -
      168  friend struct simdjson_result<raw_json_string>;
      -
      169 };
      -
      170 
      -
      171 simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &, const raw_json_string &) noexcept;
      +
      128 private:
      +
      129 
      +
      130 
      +
      135  simdjson_inline void consume() noexcept { buf = nullptr; }
      +
      136 
      +
      140  simdjson_inline simdjson_warn_unused bool alive() const noexcept { return buf != nullptr; }
      +
      141 
      +
      153  simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> unescape(json_iterator &iter, bool allow_replacement) const noexcept;
      +
      154 
      +
      165  simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> unescape_wobbly(json_iterator &iter) const noexcept;
      +
      166  const uint8_t * buf{};
      +
      167  friend class object;
      +
      168  friend class field;
      +
      169  friend class parser;
      +
      170  friend struct simdjson_result<raw_json_string>;
      +
      171 };
      172 
      -
      177 simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept;
      -
      178 simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept;
      -
      179 simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept;
      -
      180 simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept;
      -
      181 
      -
      182 
      -
      183 } // namespace ondemand
      -
      184 } // namespace SIMDJSON_IMPLEMENTATION
      -
      185 } // namespace simdjson
      -
      186 
      -
      187 namespace simdjson {
      +
      173 simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &, const raw_json_string &) noexcept;
      +
      174 
      +
      179 simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept;
      +
      180 simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept;
      +
      181 simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept;
      +
      182 simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept;
      +
      183 
      +
      184 
      +
      185 } // namespace ondemand
      +
      186 } // namespace SIMDJSON_IMPLEMENTATION
      +
      187 } // namespace simdjson
      188 
      -
      189 template<>
      -
      190 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> {
      -
      191 public:
      - -
      193  simdjson_inline simdjson_result(error_code error) noexcept;
      -
      194  simdjson_inline simdjson_result() noexcept = default;
      -
      195  simdjson_inline ~simdjson_result() noexcept = default;
      -
      196 
      -
      197  simdjson_inline simdjson_result<const char *> raw() const noexcept;
      -
      198  simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> unescape(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &iter, bool allow_replacement) const noexcept;
      -
      199  simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> unescape_wobbly(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &iter) const noexcept;
      -
      200 };
      -
      201 
      -
      202 } // namespace simdjson
      -
      A string escaped per JSON rules, terminated with quote (").
      -
      simdjson_inline bool is_equal(std::string_view target) const noexcept
      This compares the current instance to the std::string_view target: returns true if they are byte-by-b...
      -
      static simdjson_inline bool is_free_from_unescaped_quote(std::string_view target) noexcept
      Returns true if target is free from unescaped quote.
      +
      189 namespace simdjson {
      +
      190 
      +
      191 template<>
      +
      192 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> {
      +
      193 public:
      + +
      195  simdjson_inline simdjson_result(error_code error) noexcept;
      +
      196  simdjson_inline simdjson_result() noexcept = default;
      +
      197  simdjson_inline ~simdjson_result() noexcept = default;
      +
      198 
      +
      199  simdjson_inline simdjson_result<const char *> raw() const noexcept;
      +
      200  simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> unescape(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &iter, bool allow_replacement) const noexcept;
      +
      201  simdjson_inline simdjson_warn_unused simdjson_result<std::string_view> unescape_wobbly(SIMDJSON_IMPLEMENTATION::ondemand::json_iterator &iter) const noexcept;
      +
      202 };
      +
      203 
      +
      204 } // namespace simdjson
      +
      205 
      +
      206 #endif // SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H
      +
      A string escaped per JSON rules, terminated with quote (").
      +
      simdjson_inline bool is_equal(std::string_view target) const noexcept
      This compares the current instance to the std::string_view target: returns true if they are byte-by-b...
      +
      static simdjson_inline bool is_free_from_unescaped_quote(std::string_view target) noexcept
      Returns true if target is free from unescaped quote.
      simdjson_inline raw_json_string() noexcept=default
      Create a new invalid raw_json_string.
      -
      simdjson_inline const char * raw() const noexcept
      Get the raw pointer to the beginning of the string in the JSON (just after the ").
      -
      simdjson_inline bool unsafe_is_equal(size_t length, std::string_view target) const noexcept
      This compares the current instance to the std::string_view target: returns true if they are byte-by-b...
      -
      simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
      Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
      -
      std::ostream & operator<<(std::ostream &out, json_type type) noexcept
      Write the JSON type to the output stream.
      Definition: json_type-inl.h:5
      -
      @ object
      A JSON object ( { "a": 1, "b" 2, ... } )
      -
      We want to support argument-dependent lookup (ADL).
      +
      simdjson_inline const char * raw() const noexcept
      Get the raw pointer to the beginning of the string in the JSON (just after the ").
      +
      simdjson_inline bool unsafe_is_equal(size_t length, std::string_view target) const noexcept
      This compares the current instance to the std::string_view target: returns true if they are byte-by-b...
      +
      simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
      Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
      +
      std::ostream & operator<<(std::ostream &out, json_type type) noexcept
      Write the JSON type to the output stream.
      Definition: json_type-inl.h:14
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      error_code
      All possible errors returned by simdjson.
      Definition: error.h:17
      - +
      The result of a simdjson operation that could fail.
      Definition: error.h:205
      -
      simdjson_inline error_code error() const noexcept
      The error.
      Definition: error-inl.h:132
      +
      simdjson_inline error_code error() const noexcept
      The error.
      Definition: error-inl.h:131
      simdjson_inline T & value() &noexcept(false)
      Get the result value.
      diff --git a/search/all_0.js b/search/all_0.js index 8f8defe41..9cdba593c 100644 --- a/search/all_0.js +++ b/search/all_0.js @@ -5,13 +5,15 @@ var searchData= ['append_5fdouble_2',['append_double',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#ae5b327f855878cba9b026059a1fc8a1b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], ['append_5fs64_3',['append_s64',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#adb931b17ba9d4d41dd8111ad9288256c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], ['append_5fu64_4',['append_u64',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#aa3481ec0d0726a732688b7fc64372049',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], - ['array_5',['array',['../classsimdjson_1_1dom_1_1array.html#a8b3d6eaec52a2b44965e53d874e367e9',1,'simdjson::dom::array::array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a8cc89dada9999c2ecc319954cc3fc90a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::array() noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a240a8118a5b6f76962425134cc284764',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::array(const value_iterator &iter) noexcept'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330af1f713c9e000f5d3f280adbd124df4f5',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array()'],['../classsimdjson_1_1dom_1_1array.html',1,'simdjson::dom::array'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array']]], - ['array_20iteration_6',['Array iteration',['../group__array.html',1,'']]], - ['array_5fiterator_7',['array_iterator',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#aa330b23feb572f33d77516431572b643',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::array_iterator()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator']]], - ['as_5fdouble_8',['as_double',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a41dc1bfd660e0b9c86cb5a5171fd7c02',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], - ['at_9',['at',['../classsimdjson_1_1dom_1_1array.html#a6a6373cc1542a7137b79978680a93d18',1,'simdjson::dom::array::at()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#acc369e813e7cf4a97564bb0d85f76db3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::at()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a01c6bde0574654dc22ea219c3b3dbf51',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::at()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a1c97143f7637414d737d58daeec2eb84',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::at()'],['../classsimdjson_1_1dom_1_1element.html#aeb155c47ef7bebcad79e1b7449734030',1,'simdjson::dom::element::at(size_t index) const noexcept'],['../classsimdjson_1_1dom_1_1element.html#aa8b5798004a859bf922778226b8c1cce',1,'simdjson::dom::element::at(const std::string_view json_pointer) const noexcept']]], - ['at_5fend_10',['at_end',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ae896ac465551b036763e4465b3a16c7b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['at_5fkey_11',['at_key',['../classsimdjson_1_1dom_1_1element.html#a686a21f39c755dcbf95116757d2193bd',1,'simdjson::dom::element::at_key()'],['../classsimdjson_1_1dom_1_1object.html#a4fb3e04e0ea591132da90341bf9ed819',1,'simdjson::dom::object::at_key()']]], - ['at_5fkey_5fcase_5finsensitive_12',['at_key_case_insensitive',['../classsimdjson_1_1dom_1_1element.html#a5185447e6bf8949e7c5e9c22711e8764',1,'simdjson::dom::element::at_key_case_insensitive()'],['../classsimdjson_1_1dom_1_1object.html#ab075da9eb7678f6321cecf4cbd196039',1,'simdjson::dom::object::at_key_case_insensitive()']]], - ['at_5fpointer_13',['at_pointer',['../classsimdjson_1_1dom_1_1array.html#a8141c7d98672bc3ab69fea7b63afcfb2',1,'simdjson::dom::array::at_pointer()'],['../classsimdjson_1_1dom_1_1element.html#a3777fed88f37555f2d090aeb604a117c',1,'simdjson::dom::element::at_pointer()'],['../classsimdjson_1_1dom_1_1object.html#ace84581be0fee46d5128c49710522aba',1,'simdjson::dom::object::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a73c2fc4db0c0b4083fafe706412d3b26',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a74484485f4a3d8dce5943b0cb60ac815',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ae3d80f8e7f31c319fe6ee09c0860df83',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aadd2f646a3231d407948bf5f3da46528',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::at_pointer()']]] + ['array_5',['array',['../classsimdjson_1_1dom_1_1array.html#a8b3d6eaec52a2b44965e53d874e367e9',1,'simdjson::dom::array::array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a8cc89dada9999c2ecc319954cc3fc90a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::array() noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a240a8118a5b6f76962425134cc284764',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::array(const value_iterator &iter) noexcept'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330af1f713c9e000f5d3f280adbd124df4f5',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array()']]], + ['array_6',['ARRAY',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aacb4fb1757fb37c43cded35d3eb857c43',1,'simdjson::dom']]], + ['array_7',['array',['../classsimdjson_1_1dom_1_1array.html',1,'simdjson::dom::array'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array']]], + ['array_20iteration_8',['Array iteration',['../group__array.html',1,'']]], + ['array_5fiterator_9',['array_iterator',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#aa330b23feb572f33d77516431572b643',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::array_iterator()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator']]], + ['as_5fdouble_10',['as_double',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a41dc1bfd660e0b9c86cb5a5171fd7c02',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], + ['at_11',['at',['../classsimdjson_1_1dom_1_1element.html#aa8b5798004a859bf922778226b8c1cce',1,'simdjson::dom::element::at()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#acc369e813e7cf4a97564bb0d85f76db3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::at()'],['../classsimdjson_1_1dom_1_1array.html#a6a6373cc1542a7137b79978680a93d18',1,'simdjson::dom::array::at()'],['../classsimdjson_1_1dom_1_1element.html#aeb155c47ef7bebcad79e1b7449734030',1,'simdjson::dom::element::at()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a1c97143f7637414d737d58daeec2eb84',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::at()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a01c6bde0574654dc22ea219c3b3dbf51',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::at(size_t index) &noexcept']]], + ['at_5fend_12',['at_end',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ae896ac465551b036763e4465b3a16c7b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['at_5fkey_13',['at_key',['../classsimdjson_1_1dom_1_1object.html#a4fb3e04e0ea591132da90341bf9ed819',1,'simdjson::dom::object::at_key()'],['../classsimdjson_1_1dom_1_1element.html#a686a21f39c755dcbf95116757d2193bd',1,'simdjson::dom::element::at_key()']]], + ['at_5fkey_5fcase_5finsensitive_14',['at_key_case_insensitive',['../classsimdjson_1_1dom_1_1object.html#ab075da9eb7678f6321cecf4cbd196039',1,'simdjson::dom::object::at_key_case_insensitive()'],['../classsimdjson_1_1dom_1_1element.html#a5185447e6bf8949e7c5e9c22711e8764',1,'simdjson::dom::element::at_key_case_insensitive()']]], + ['at_5fpointer_15',['at_pointer',['../classsimdjson_1_1dom_1_1array.html#a8141c7d98672bc3ab69fea7b63afcfb2',1,'simdjson::dom::array::at_pointer()'],['../classsimdjson_1_1dom_1_1element.html#a3777fed88f37555f2d090aeb604a117c',1,'simdjson::dom::element::at_pointer()'],['../classsimdjson_1_1dom_1_1object.html#ace84581be0fee46d5128c49710522aba',1,'simdjson::dom::object::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a73c2fc4db0c0b4083fafe706412d3b26',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a74484485f4a3d8dce5943b0cb60ac815',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ae3d80f8e7f31c319fe6ee09c0860df83',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aadd2f646a3231d407948bf5f3da46528',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::at_pointer()']]] ]; diff --git a/search/all_1.js b/search/all_1.js index a3ad95095..28a65a32c 100644 --- a/search/all_1.js +++ b/search/all_1.js @@ -1,7 +1,8 @@ var searchData= [ - ['begin_14',['begin',['../classsimdjson_1_1dom_1_1array.html#aebd2b7ca5e1d87476ea2cd4fc9239a74',1,'simdjson::dom::array::begin()'],['../classsimdjson_1_1dom_1_1document__stream.html#a9a51df3d81c9b7849bbbc8ae42096b76',1,'simdjson::dom::document_stream::begin()'],['../classsimdjson_1_1dom_1_1element.html#aa59ecf8e9ac7b1a9e977d2cd3f03aa7f',1,'simdjson::dom::element::begin()'],['../classsimdjson_1_1dom_1_1object.html#afe127a7e9ec8dab9ec76160525a68a83',1,'simdjson::dom::object::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a8cb4bf0ca1890a4a3c86f69be40f17f2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a1a450826deb3ba982c9f0ec6208cb246',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#ae88253d9f6cef0dfc0bd05c45cdfc06f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a88d1cdc3124965d707754af4fcfae7f9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::begin()']]], - ['boolean_15',['boolean',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330a84e2c64f38f78ba3ea5c905ab5a2da27',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], - ['buf_16',['buf',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a961b4870710d5ee1da938c4923d6f68d',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]], - ['builtin_5fimplementation_17',['builtin_implementation',['../namespacesimdjson.html#af63210cc51d5c99ad84958daf9812e63',1,'simdjson']]] + ['begin_16',['begin',['../classsimdjson_1_1dom_1_1array.html#aebd2b7ca5e1d87476ea2cd4fc9239a74',1,'simdjson::dom::array::begin()'],['../classsimdjson_1_1dom_1_1document__stream.html#a9a51df3d81c9b7849bbbc8ae42096b76',1,'simdjson::dom::document_stream::begin()'],['../classsimdjson_1_1dom_1_1element.html#aa59ecf8e9ac7b1a9e977d2cd3f03aa7f',1,'simdjson::dom::element::begin()'],['../classsimdjson_1_1dom_1_1object.html#afe127a7e9ec8dab9ec76160525a68a83',1,'simdjson::dom::object::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a8cb4bf0ca1890a4a3c86f69be40f17f2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a1a450826deb3ba982c9f0ec6208cb246',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#ae88253d9f6cef0dfc0bd05c45cdfc06f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a88d1cdc3124965d707754af4fcfae7f9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::begin()']]], + ['bool_17',['BOOL',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aaa97b2c144243b2b9d2c593ec268b62f5',1,'simdjson::dom']]], + ['boolean_18',['boolean',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330a84e2c64f38f78ba3ea5c905ab5a2da27',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], + ['buf_19',['buf',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a961b4870710d5ee1da938c4923d6f68d',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]], + ['builtin_5fimplementation_20',['builtin_implementation',['../namespacesimdjson.html#af63210cc51d5c99ad84958daf9812e63',1,'simdjson']]] ]; diff --git a/search/all_10.js b/search/all_10.js index edf801c6c..2424421ff 100644 --- a/search/all_10.js +++ b/search/all_10.js @@ -1,11 +1,11 @@ var searchData= [ - ['raw_189',['raw',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a8736f5e397a3e0a55090aadee0596214',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string']]], - ['raw_5fjson_190',['raw_json',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#ad8a7f0b418fae60160e403f71a5a8088',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::raw_json()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aa3a27654a19c386ad0c775cff258cf0c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::raw_json()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a71600033791f9c6bbc9f40fb2f82fdc8',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::raw_json()']]], - ['raw_5fjson_5fstring_191',['raw_json_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a78b420ddb8a0570ee973cdfbccd31c9a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::raw_json_string() noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#acf64001cc9961cd01712211b778e760b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::raw_json_string(const uint8_t *_buf) noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string']]], - ['raw_5fjson_5ftoken_192',['raw_json_token',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a0bcbee63db869ac122bed75000b54d46',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document >::raw_json_token()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a442b2e5803e69d4845b5b7f7bd51a0ed',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::raw_json_token()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a37427e768435aafef5af097b8cc3cfec',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::raw_json_token()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ac1bcd8afb10742d6f18b8f2f07ba0392',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document_reference >::raw_json_token()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a58802e77b6fb25a3d2ec8a4d2482f9bf',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::raw_json_token()']]], - ['reset_193',['reset',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#ae7248918b09cb4cb1d866605c641679d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::reset()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ae0bc6b9803e0c989e9defaf3edcaaae4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::reset()']]], - ['resume_194',['resume',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a970f5c3f3e668a399765d52c7426764d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value']]], - ['rewind_195',['rewind',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a9cc053001e8246e6e65bbcbf3db035c4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['root_196',['root',['../classsimdjson_1_1dom_1_1document.html#ae19dced0eee5f63b9d1591ef51dcda4e',1,'simdjson::dom::document']]] + ['raw_196',['raw',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a8736f5e397a3e0a55090aadee0596214',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string']]], + ['raw_5fjson_197',['raw_json',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#ad8a7f0b418fae60160e403f71a5a8088',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::raw_json()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aa3a27654a19c386ad0c775cff258cf0c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::raw_json()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a71600033791f9c6bbc9f40fb2f82fdc8',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::raw_json()']]], + ['raw_5fjson_5fstring_198',['raw_json_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a78b420ddb8a0570ee973cdfbccd31c9a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::raw_json_string() noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#acf64001cc9961cd01712211b778e760b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::raw_json_string(const uint8_t *_buf) noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string']]], + ['raw_5fjson_5ftoken_199',['raw_json_token',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a0bcbee63db869ac122bed75000b54d46',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document >::raw_json_token()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a442b2e5803e69d4845b5b7f7bd51a0ed',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::raw_json_token()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a37427e768435aafef5af097b8cc3cfec',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::raw_json_token()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ac1bcd8afb10742d6f18b8f2f07ba0392',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document_reference >::raw_json_token()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a58802e77b6fb25a3d2ec8a4d2482f9bf',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::raw_json_token()']]], + ['reset_200',['reset',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#ae7248918b09cb4cb1d866605c641679d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::reset()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ae0bc6b9803e0c989e9defaf3edcaaae4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::reset()']]], + ['resume_201',['resume',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a970f5c3f3e668a399765d52c7426764d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value']]], + ['rewind_202',['rewind',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a9cc053001e8246e6e65bbcbf3db035c4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['root_203',['root',['../classsimdjson_1_1dom_1_1document.html#ae19dced0eee5f63b9d1591ef51dcda4e',1,'simdjson::dom::document']]] ]; diff --git a/search/all_11.js b/search/all_11.js index 2d1c089c1..5235614f6 100644 --- a/search/all_11.js +++ b/search/all_11.js @@ -1,57 +1,65 @@ var searchData= [ - ['ondemand_197',['ondemand',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['scalar_20values_198',['Scalar values',['../group__scalar.html',1,'']]], - ['scalar_5fdocument_5fas_5fvalue_199',['SCALAR_DOCUMENT_AS_VALUE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a00d7c038f551d9527ba8897f3cee907d',1,'simdjson']]], - ['second_200',['second',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a25289df3eaabd14f029e9872a6db3dfb',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base']]], - ['set_5fmax_5fcapacity_201',['set_max_capacity',['../classsimdjson_1_1dom_1_1parser.html#a6977b4586bc601070cf100e2973a4cbc',1,'simdjson::dom::parser']]], - ['simdjson_202',['simdjson',['../namespacesimdjson.html',1,'']]], - ['simdjson_2eh_203',['simdjson.h',['../simdjson_8h.html',1,'']]], - ['simdjson_5ferror_204',['simdjson_error',['../structsimdjson_1_1simdjson__error.html',1,'simdjson::simdjson_error'],['../structsimdjson_1_1simdjson__error.html#af5355b65f85b897251b3665086075f39',1,'simdjson::simdjson_error::simdjson_error()']]], - ['simdjson_5fmaxsize_5fbytes_205',['SIMDJSON_MAXSIZE_BYTES',['../namespacesimdjson.html#ac66973a7111dc4aa96ba7b3434344347',1,'simdjson']]], - ['simdjson_5fpadding_206',['SIMDJSON_PADDING',['../namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf',1,'simdjson']]], - ['simdjson_5fresult_207',['simdjson_result',['../structsimdjson_1_1simdjson__result.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20dom_3a_3aarray_20_3e_208',['simdjson_result< dom::array >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1array_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20dom_3a_3adocument_5fstream_20_3e_209',['simdjson_result< dom::document_stream >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1document__stream_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20dom_3a_3aelement_20_3e_210',['simdjson_result< dom::element >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1element_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20dom_3a_3aobject_20_3e_211',['simdjson_result< dom::object >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1object_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_20_3e_212',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::array >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_5fiterator_20_3e_213',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::array_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_20_3e_214',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5freference_20_3e_215',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document_reference >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5fstream_20_3e_216',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document_stream >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3afield_20_3e_217',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::field >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5fiterator_20_3e_218',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::json_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__iterator_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5ftype_20_3e_219',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::json_type >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__type_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_20_3e_220',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::object >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_5fiterator_20_3e_221',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::object_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aparser_20_3e_222',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::parser >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3araw_5fjson_5fstring_20_3e_223',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3atoken_5fiterator_20_3e_224',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::token_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1token__iterator_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_20_3e_225',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_5fiterator_20_3e_226',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value__iterator_01_4.html',1,'simdjson']]], - ['simdjson_5fversion_5fmajor_227',['SIMDJSON_VERSION_MAJOR',['../namespacesimdjson.html#a44beb117a12abd0d8d18589dbc3dbe97ae36fce138c6f2f7a25e9ee06e7ed37ae',1,'simdjson']]], - ['simdjson_5fversion_5fminor_228',['SIMDJSON_VERSION_MINOR',['../namespacesimdjson.html#a44beb117a12abd0d8d18589dbc3dbe97ab442d4c66052c2f30b72a0d6f8dc8814',1,'simdjson']]], - ['simdjson_5fversion_5frevision_229',['SIMDJSON_VERSION_REVISION',['../namespacesimdjson.html#a44beb117a12abd0d8d18589dbc3dbe97a5537fa0bdb6b7345ea789c51f74b10ee',1,'simdjson']]], - ['size_230',['size',['../classsimdjson_1_1dom_1_1array.html#a698f2f984d1a78a68962c06b2f047686',1,'simdjson::dom::array::size()'],['../classsimdjson_1_1dom_1_1object.html#a93ec5c36aae913f266f533b2e02bc873',1,'simdjson::dom::object::size()'],['../structsimdjson_1_1padded__string.html#a07d50795f042119ab848c37cb8911db4',1,'simdjson::padded_string::size()']]], - ['size_5fin_5fbytes_231',['size_in_bytes',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#a43723c86c43ee3533a3278b5cd2fe2d0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::size_in_bytes()'],['../classsimdjson_1_1dom_1_1document__stream.html#a2a08525ae815167b73b6393a8999e46b',1,'simdjson::dom::document_stream::size_in_bytes()']]], - ['skip_232',['skip',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ae75aa0d09a10682fd30dc4e8e25d0a73',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value']]], - ['skip_5fdouble_233',['skip_double',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#ac6b75b1d1af73c9ef8958e573c367e1c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], - ['stage1_5fmode_234',['stage1_mode',['../namespacesimdjson.html#ae6ec9f0ce23fc51d87116b64fdbeb811',1,'simdjson']]], - ['start_235',['start',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a760c4d01ad03f18e09a93387de5de60e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::start()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a0126e4a8e02fa0a02481d3bdfd3965f7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::start()']]], - ['start_5farray_236',['start_array',['../group__array.html#ga14e69f9c4949805695e30a576bd9c964',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['start_5fobject_237',['start_object',['../group__object.html#ga46e677764da46ebbe4b0e4dea6672a5f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['start_5for_5fresume_5fobject_238',['start_or_resume_object',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a821e11bc3b6b3f16fa7d6b15c77c17d3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value']]], - ['start_5froot_239',['start_root',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#aac11a5e300a49531b3600a019cd89304',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array']]], - ['start_5froot_5farray_240',['start_root_array',['../group__array.html#ga334481c295286d926bb3bb912232e225',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['start_5froot_5fobject_241',['start_root_object',['../group__object.html#gab9563a58e164e9f5f75805cffb3582ec',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['started_242',['started',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#aca1c364caedac11edc78c64734013ce0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array']]], - ['started_5farray_243',['started_array',['../group__array.html#ga136e508ce46622b86cc901490c807578',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['started_5fobject_244',['started_object',['../group__object.html#ga192424d19b12648eea73e3d073d5fcac',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['started_5froot_5farray_245',['started_root_array',['../group__array.html#gaa3428f6c87e63d8a2ba93a3816721066',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['started_5froot_5fobject_246',['started_root_object',['../group__object.html#gaa0c31077aeadb6fc627d4c5750e58ecb',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['string_247',['string',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330ab45cffe084dd3d20d928bee85e7b0f21',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], - ['string_5ferror_248',['STRING_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a8ef9cfdd78dd92d2b304249917638d12',1,'simdjson']]], - ['success_249',['SUCCESS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aa4ffc800804829a88c5b52ac3c4c6681',1,'simdjson']]], - ['supported_5fby_5fruntime_5fsystem_250',['supported_by_runtime_system',['../classsimdjson_1_1implementation.html#adf77c9bc0869eff8fd46e942c4532135',1,'simdjson::implementation']]] + ['arm64_204',['arm64',['../namespacesimdjson_1_1arm64.html',1,'simdjson']]], + ['dom_205',['dom',['../namespacesimdjson_1_1dom.html',1,'simdjson']]], + ['fallback_206',['fallback',['../namespacesimdjson_1_1fallback.html',1,'simdjson']]], + ['haswell_207',['haswell',['../namespacesimdjson_1_1haswell.html',1,'simdjson']]], + ['icelake_208',['icelake',['../namespacesimdjson_1_1icelake.html',1,'simdjson']]], + ['ondemand_209',['ondemand',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['ppc64_210',['ppc64',['../namespacesimdjson_1_1ppc64.html',1,'simdjson']]], + ['scalar_20values_211',['Scalar values',['../group__scalar.html',1,'']]], + ['scalar_5fdocument_5fas_5fvalue_212',['SCALAR_DOCUMENT_AS_VALUE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a00d7c038f551d9527ba8897f3cee907d',1,'simdjson']]], + ['second_213',['second',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a25289df3eaabd14f029e9872a6db3dfb',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base']]], + ['set_5fmax_5fcapacity_214',['set_max_capacity',['../classsimdjson_1_1dom_1_1parser.html#a6977b4586bc601070cf100e2973a4cbc',1,'simdjson::dom::parser']]], + ['simdjson_215',['simdjson',['../namespacesimdjson.html',1,'']]], + ['simdjson_2eh_216',['simdjson.h',['../simdjson_8h.html',1,'']]], + ['simdjson_5ferror_217',['simdjson_error',['../structsimdjson_1_1simdjson__error.html',1,'simdjson::simdjson_error'],['../structsimdjson_1_1simdjson__error.html#af5355b65f85b897251b3665086075f39',1,'simdjson::simdjson_error::simdjson_error()']]], + ['simdjson_5fmaxsize_5fbytes_218',['SIMDJSON_MAXSIZE_BYTES',['../namespacesimdjson.html#a32d36effa0943f5006e9d4151f5de0e4',1,'simdjson']]], + ['simdjson_5fpadding_219',['SIMDJSON_PADDING',['../namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf',1,'simdjson']]], + ['simdjson_5fresult_220',['simdjson_result',['../structsimdjson_1_1simdjson__result.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20dom_3a_3aarray_20_3e_221',['simdjson_result< dom::array >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1array_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20dom_3a_3adocument_5fstream_20_3e_222',['simdjson_result< dom::document_stream >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1document__stream_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20dom_3a_3aelement_20_3e_223',['simdjson_result< dom::element >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1element_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20dom_3a_3aobject_20_3e_224',['simdjson_result< dom::object >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1object_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_20_3e_225',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::array >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_5fiterator_20_3e_226',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::array_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_20_3e_227',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5freference_20_3e_228',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document_reference >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5fstream_20_3e_229',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document_stream >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3afield_20_3e_230',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::field >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5fiterator_20_3e_231',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::json_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__iterator_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5ftype_20_3e_232',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::json_type >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__type_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_20_3e_233',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::object >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_5fiterator_20_3e_234',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::object_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aparser_20_3e_235',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::parser >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3araw_5fjson_5fstring_20_3e_236',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3atoken_5fiterator_20_3e_237',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::token_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1token__iterator_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_20_3e_238',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_5fiterator_20_3e_239',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value__iterator_01_4.html',1,'simdjson']]], + ['simdjson_5fversion_5fmajor_240',['SIMDJSON_VERSION_MAJOR',['../namespacesimdjson.html#a44beb117a12abd0d8d18589dbc3dbe97ae36fce138c6f2f7a25e9ee06e7ed37ae',1,'simdjson']]], + ['simdjson_5fversion_5fminor_241',['SIMDJSON_VERSION_MINOR',['../namespacesimdjson.html#a44beb117a12abd0d8d18589dbc3dbe97ab442d4c66052c2f30b72a0d6f8dc8814',1,'simdjson']]], + ['simdjson_5fversion_5frevision_242',['SIMDJSON_VERSION_REVISION',['../namespacesimdjson.html#a44beb117a12abd0d8d18589dbc3dbe97a5537fa0bdb6b7345ea789c51f74b10ee',1,'simdjson']]], + ['size_243',['size',['../classsimdjson_1_1dom_1_1array.html#a698f2f984d1a78a68962c06b2f047686',1,'simdjson::dom::array::size()'],['../classsimdjson_1_1dom_1_1object.html#a93ec5c36aae913f266f533b2e02bc873',1,'simdjson::dom::object::size()'],['../structsimdjson_1_1padded__string.html#a07d50795f042119ab848c37cb8911db4',1,'simdjson::padded_string::size()']]], + ['size_5fin_5fbytes_244',['size_in_bytes',['../classsimdjson_1_1dom_1_1document__stream.html#a2a08525ae815167b73b6393a8999e46b',1,'simdjson::dom::document_stream::size_in_bytes()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#a43723c86c43ee3533a3278b5cd2fe2d0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::size_in_bytes()']]], + ['skip_245',['skip',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ae75aa0d09a10682fd30dc4e8e25d0a73',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value']]], + ['skip_5fdouble_246',['skip_double',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#ac6b75b1d1af73c9ef8958e573c367e1c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], + ['stage1_5fmode_247',['stage1_mode',['../namespacesimdjson.html#ae6ec9f0ce23fc51d87116b64fdbeb811',1,'simdjson']]], + ['start_248',['start',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a0126e4a8e02fa0a02481d3bdfd3965f7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::start()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a760c4d01ad03f18e09a93387de5de60e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::start()']]], + ['start_5farray_249',['start_array',['../group__array.html#ga14e69f9c4949805695e30a576bd9c964',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['start_5fobject_250',['start_object',['../group__object.html#ga46e677764da46ebbe4b0e4dea6672a5f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['start_5for_5fresume_5fobject_251',['start_or_resume_object',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a821e11bc3b6b3f16fa7d6b15c77c17d3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value']]], + ['start_5froot_252',['start_root',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#aac11a5e300a49531b3600a019cd89304',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array']]], + ['start_5froot_5farray_253',['start_root_array',['../group__array.html#ga334481c295286d926bb3bb912232e225',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['start_5froot_5fobject_254',['start_root_object',['../group__object.html#gab9563a58e164e9f5f75805cffb3582ec',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['started_255',['started',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#aca1c364caedac11edc78c64734013ce0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array']]], + ['started_5farray_256',['started_array',['../group__array.html#ga136e508ce46622b86cc901490c807578',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['started_5fobject_257',['started_object',['../group__object.html#ga192424d19b12648eea73e3d073d5fcac',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['started_5froot_5farray_258',['started_root_array',['../group__array.html#gaa3428f6c87e63d8a2ba93a3816721066',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['started_5froot_5fobject_259',['started_root_object',['../group__object.html#gaa0c31077aeadb6fc627d4c5750e58ecb',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['string_260',['string',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330ab45cffe084dd3d20d928bee85e7b0f21',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], + ['string_261',['STRING',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa63b588d5559f64f89a416e656880b949',1,'simdjson::dom']]], + ['string_5ferror_262',['STRING_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a8ef9cfdd78dd92d2b304249917638d12',1,'simdjson']]], + ['success_263',['SUCCESS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aa4ffc800804829a88c5b52ac3c4c6681',1,'simdjson']]], + ['supported_5fby_5fruntime_5fsystem_264',['supported_by_runtime_system',['../classsimdjson_1_1implementation.html#adf77c9bc0869eff8fd46e942c4532135',1,'simdjson::implementation']]], + ['westmere_265',['westmere',['../namespacesimdjson_1_1westmere.html',1,'simdjson']]] ]; diff --git a/search/all_12.js b/search/all_12.js index a5cea8217..dffcd3251 100644 --- a/search/all_12.js +++ b/search/all_12.js @@ -1,16 +1,16 @@ var searchData= [ - ['t_5fatom_5ferror_251',['T_ATOM_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab6e8bfc242f7bea38657eaf61400077f',1,'simdjson']]], - ['take_5fvalue_252',['take_value',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#affadf1e1f762248d60950e333b739820',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::take_value()'],['../structsimdjson_1_1simdjson__result.html#a815368a9e09fa675d0b6672595f5ad19',1,'simdjson::simdjson_result::take_value()']]], - ['tape_20structure_20in_20simdjson_253',['Tape structure in simdjson',['../md_doc_tape.html',1,'']]], - ['tape_5ferror_254',['TAPE_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4005fbda56edc47e077e5cfd4e68cda9',1,'simdjson']]], - ['the_20basics_255',['The Basics',['../md_doc_basics.html',1,'']]], - ['the_20document_2dobject_2dmodel_20_28dom_29_20front_2dend_256',['The Document-Object-Model (DOM) front-end',['../md_doc_dom.html',1,'']]], - ['tie_257',['tie',['../classsimdjson_1_1dom_1_1element.html#a5342161b8c52c78b2f5edac10e9d05ca',1,'simdjson::dom::element::tie()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#acd950d432e76a0bc1a7f3236cc7a1894',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::tie()'],['../structsimdjson_1_1simdjson__result.html#a86dbcba063713c0e284dbde9fae17568',1,'simdjson::simdjson_result::tie()']]], - ['to_5fdebug_5fstring_258',['to_debug_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a9afdfb30ac2aacabce09a5c9d7fd375a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['to_5fjson_5fstring_259',['to_json_string',['../namespacesimdjson.html#a2cda17221b852e5c398bad5bf350d270',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document &x) noexcept'],['../namespacesimdjson.html#a4c998fcc6bf2bca2196b45a5c3e1967a',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::value &x) noexcept'],['../namespacesimdjson.html#afc529e3bcacb5b3c747b525fb443771f',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::object &x) noexcept'],['../namespacesimdjson.html#a598dd79ec46726de8a6d409ba1bae034',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::array &x) noexcept']]], - ['to_5fstring_260',['to_string',['../namespacesimdjson.html#ade4516933f53705eacfaed65ed14962d',1,'simdjson']]], - ['trailing_5fcontent_261',['TRAILING_CONTENT',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab70f5a6f0ac798d482e95a0fcc528676',1,'simdjson']]], - ['truncated_5fbytes_262',['truncated_bytes',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#acd3fd372dfd30fcce1d6a103c6682d0e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::truncated_bytes()'],['../classsimdjson_1_1dom_1_1document__stream.html#a6c2a07e08213dc9a51754940942f9e69',1,'simdjson::dom::document_stream::truncated_bytes()']]], - ['type_263',['type',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ac39965b3006b8f19ed576ce99b7534c5',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::type()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#af3d0d03752d5e96d7ee5b83f29136b1b',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::type()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a77bdebf4d2105efdd123cbf0a4906b1e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::type()'],['../classsimdjson_1_1dom_1_1element.html#a19162bf6d94fb6c21bb2bf2e9b78ff0d',1,'simdjson::dom::element::type()']]] + ['t_5fatom_5ferror_266',['T_ATOM_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab6e8bfc242f7bea38657eaf61400077f',1,'simdjson']]], + ['take_5fvalue_267',['take_value',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#affadf1e1f762248d60950e333b739820',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::take_value()'],['../structsimdjson_1_1simdjson__result.html#a815368a9e09fa675d0b6672595f5ad19',1,'simdjson::simdjson_result::take_value()']]], + ['tape_20structure_20in_20simdjson_268',['Tape structure in simdjson',['../md_doc_tape.html',1,'']]], + ['tape_5ferror_269',['TAPE_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4005fbda56edc47e077e5cfd4e68cda9',1,'simdjson']]], + ['the_20basics_270',['The Basics',['../md_doc_basics.html',1,'']]], + ['the_20document_2dobject_2dmodel_20_28dom_29_20front_2dend_271',['The Document-Object-Model (DOM) front-end',['../md_doc_dom.html',1,'']]], + ['tie_272',['tie',['../classsimdjson_1_1dom_1_1element.html#a5342161b8c52c78b2f5edac10e9d05ca',1,'simdjson::dom::element::tie()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#acd950d432e76a0bc1a7f3236cc7a1894',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::tie()'],['../structsimdjson_1_1simdjson__result.html#a86dbcba063713c0e284dbde9fae17568',1,'simdjson::simdjson_result::tie()']]], + ['to_5fdebug_5fstring_273',['to_debug_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a9afdfb30ac2aacabce09a5c9d7fd375a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['to_5fjson_5fstring_274',['to_json_string',['../namespacesimdjson.html#a2cda17221b852e5c398bad5bf350d270',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document &x) noexcept'],['../namespacesimdjson.html#a4c998fcc6bf2bca2196b45a5c3e1967a',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::value &x) noexcept'],['../namespacesimdjson.html#afc529e3bcacb5b3c747b525fb443771f',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::object &x) noexcept'],['../namespacesimdjson.html#a598dd79ec46726de8a6d409ba1bae034',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::array &x) noexcept']]], + ['to_5fstring_275',['to_string',['../namespacesimdjson.html#ade4516933f53705eacfaed65ed14962d',1,'simdjson']]], + ['trailing_5fcontent_276',['TRAILING_CONTENT',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab70f5a6f0ac798d482e95a0fcc528676',1,'simdjson']]], + ['truncated_5fbytes_277',['truncated_bytes',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#acd3fd372dfd30fcce1d6a103c6682d0e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::truncated_bytes()'],['../classsimdjson_1_1dom_1_1document__stream.html#a6c2a07e08213dc9a51754940942f9e69',1,'simdjson::dom::document_stream::truncated_bytes()']]], + ['type_278',['type',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ac39965b3006b8f19ed576ce99b7534c5',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::type()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#af3d0d03752d5e96d7ee5b83f29136b1b',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::type()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a77bdebf4d2105efdd123cbf0a4906b1e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::type()'],['../classsimdjson_1_1dom_1_1element.html#a19162bf6d94fb6c21bb2bf2e9b78ff0d',1,'simdjson::dom::element::type()']]] ]; diff --git a/search/all_13.js b/search/all_13.js index f8ec03f2d..46f81ee88 100644 --- a/search/all_13.js +++ b/search/all_13.js @@ -1,13 +1,14 @@ var searchData= [ - ['unclosed_5fstring_264',['UNCLOSED_STRING',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a0f9ce97e85e7607e0f4d3811b818a013',1,'simdjson']]], - ['unescape_265',['unescape',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a27714b0095b036a169cabebdc1031937',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], - ['unescape_5fwobbly_266',['unescape_wobbly',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a926e145e3ffb2b1024646dd56bc938e4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], - ['unescaped_5fchars_267',['UNESCAPED_CHARS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aca57917fc85c421aab3f2dd451519fa5',1,'simdjson']]], - ['unescaped_5fkey_268',['unescaped_key',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#a8e655ba1a0fd26809821f77aac355b7c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field']]], - ['unexpected_5ferror_269',['UNEXPECTED_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9abdd3905c91a152a01637a2946066db6b',1,'simdjson']]], - ['uninitialized_270',['UNINITIALIZED',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ac2aef8f0fc33187cc118c95fade925d2',1,'simdjson']]], - ['unsafe_5fis_5fequal_271',['unsafe_is_equal',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#affa14023a66c65f906ee3e673443d943',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::unsafe_is_equal(size_t length, std::string_view target) const noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a11bccba8ede5e7dff56e2737fcb853c7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::unsafe_is_equal(std::string_view target) const noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a3d8f15d3b004acd695b6fff5ba94b515',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::unsafe_is_equal(const char *target) const noexcept']]], - ['unsupported_5farchitecture_272',['UNSUPPORTED_ARCHITECTURE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4d768ac107473bceb91f8a0d1a824bc2',1,'simdjson']]], - ['utf8_5ferror_273',['UTF8_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a398a5389d6e20c39e8880b0101b66f56',1,'simdjson']]] + ['uint64_279',['UINT64',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa6de7acf711860176ba606e9aa2b85d5f',1,'simdjson::dom']]], + ['unclosed_5fstring_280',['UNCLOSED_STRING',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a0f9ce97e85e7607e0f4d3811b818a013',1,'simdjson']]], + ['unescape_281',['unescape',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a27714b0095b036a169cabebdc1031937',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], + ['unescape_5fwobbly_282',['unescape_wobbly',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a926e145e3ffb2b1024646dd56bc938e4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], + ['unescaped_5fchars_283',['UNESCAPED_CHARS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aca57917fc85c421aab3f2dd451519fa5',1,'simdjson']]], + ['unescaped_5fkey_284',['unescaped_key',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#a8e655ba1a0fd26809821f77aac355b7c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field']]], + ['unexpected_5ferror_285',['UNEXPECTED_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9abdd3905c91a152a01637a2946066db6b',1,'simdjson']]], + ['uninitialized_286',['UNINITIALIZED',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ac2aef8f0fc33187cc118c95fade925d2',1,'simdjson']]], + ['unsafe_5fis_5fequal_287',['unsafe_is_equal',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#affa14023a66c65f906ee3e673443d943',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::unsafe_is_equal(size_t length, std::string_view target) const noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a11bccba8ede5e7dff56e2737fcb853c7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::unsafe_is_equal(std::string_view target) const noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a3d8f15d3b004acd695b6fff5ba94b515',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::unsafe_is_equal(const char *target) const noexcept']]], + ['unsupported_5farchitecture_288',['UNSUPPORTED_ARCHITECTURE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4d768ac107473bceb91f8a0d1a824bc2',1,'simdjson']]], + ['utf8_5ferror_289',['UTF8_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a398a5389d6e20c39e8880b0101b66f56',1,'simdjson']]] ]; diff --git a/search/all_14.js b/search/all_14.js index 53b918881..bec4c68f8 100644 --- a/search/all_14.js +++ b/search/all_14.js @@ -1,6 +1,6 @@ var searchData= [ - ['validate_5futf8_274',['validate_utf8',['../classsimdjson_1_1implementation.html#aa3a7b818d56a54cca272191ec176f8f1',1,'simdjson::implementation::validate_utf8()'],['../namespacesimdjson.html#a04edabca6d128b8b31592e1e2e331ae0',1,'simdjson::validate_utf8(const std::string &s) noexcept'],['../namespacesimdjson.html#a28a847c4b31fc804bec2987b171dbd07',1,'simdjson::validate_utf8(const std::string_view sv) noexcept'],['../namespacesimdjson.html#a53546f3af0ed6840ffbeefcbefd305a1',1,'simdjson::validate_utf8(const char *buf, size_t len) noexcept']]], - ['value_275',['value',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value'],['../structsimdjson_1_1simdjson__result.html#af7f6d5a5e979b60d5231449d53dcd9be',1,'simdjson::simdjson_result::value() &noexcept(false)'],['../structsimdjson_1_1simdjson__result.html#ae52c2cc66e62e47b05f29e342ad5078a',1,'simdjson::simdjson_result::value() &&noexcept(false)'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a78c5842bded486846c816eb01ff439fc',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value() &noexcept(false)'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a934c09eb8db55277d2d7190f1bbc1a84',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value() &&noexcept(false)'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#ad5f688629f86f80dff49cab2270b1967',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field::value()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ab96f6c19a1866863a110e8bcc93e0392',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::value() noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a7188b9843c2b3b3050c54b52d5b6886f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::value(const value_iterator &iter) noexcept'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a2049ae539dca6999cc33300d212a5014',1,'simdjson::dom::object::iterator::value()'],['../classsimdjson_1_1dom_1_1key__value__pair.html#af7e38d9eb63a40256c9f936e45edf703',1,'simdjson::dom::key_value_pair::value()']]], - ['value_5funsafe_276',['value_unsafe',['../structsimdjson_1_1simdjson__result.html#a3c25e74570144de48ef71ae490def85f',1,'simdjson::simdjson_result::value_unsafe() const &noexcept'],['../structsimdjson_1_1simdjson__result.html#a67ac8535dcf368fed604549a07e423e2',1,'simdjson::simdjson_result::value_unsafe() &&noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a92e1c9ffc7a854b4b33fa48fe2d95709',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value_unsafe() const &noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a5d412981bc3cee0f0bcf3bfb53ae83e1',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value_unsafe() &noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#ad06c8e25c44d091eb3757a65ccd9f57f',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value_unsafe() &&noexcept']]] + ['validate_5futf8_290',['validate_utf8',['../classsimdjson_1_1implementation.html#aa3a7b818d56a54cca272191ec176f8f1',1,'simdjson::implementation::validate_utf8()'],['../namespacesimdjson.html#a04edabca6d128b8b31592e1e2e331ae0',1,'simdjson::validate_utf8(const std::string &s) noexcept'],['../namespacesimdjson.html#a28a847c4b31fc804bec2987b171dbd07',1,'simdjson::validate_utf8(const std::string_view sv) noexcept'],['../namespacesimdjson.html#a53546f3af0ed6840ffbeefcbefd305a1',1,'simdjson::validate_utf8(const char *buf, size_t len) noexcept']]], + ['value_291',['value',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value'],['../structsimdjson_1_1simdjson__result.html#af7f6d5a5e979b60d5231449d53dcd9be',1,'simdjson::simdjson_result::value() &noexcept(false)'],['../structsimdjson_1_1simdjson__result.html#ae52c2cc66e62e47b05f29e342ad5078a',1,'simdjson::simdjson_result::value() &&noexcept(false)'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a78c5842bded486846c816eb01ff439fc',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value() &noexcept(false)'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a934c09eb8db55277d2d7190f1bbc1a84',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value() &&noexcept(false)'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#ad5f688629f86f80dff49cab2270b1967',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field::value()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ab96f6c19a1866863a110e8bcc93e0392',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::value() noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a7188b9843c2b3b3050c54b52d5b6886f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::value(const value_iterator &iter) noexcept'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a2049ae539dca6999cc33300d212a5014',1,'simdjson::dom::object::iterator::value()'],['../classsimdjson_1_1dom_1_1key__value__pair.html#af7e38d9eb63a40256c9f936e45edf703',1,'simdjson::dom::key_value_pair::value()']]], + ['value_5funsafe_292',['value_unsafe',['../structsimdjson_1_1simdjson__result.html#a3c25e74570144de48ef71ae490def85f',1,'simdjson::simdjson_result::value_unsafe() const &noexcept'],['../structsimdjson_1_1simdjson__result.html#a67ac8535dcf368fed604549a07e423e2',1,'simdjson::simdjson_result::value_unsafe() &&noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a92e1c9ffc7a854b4b33fa48fe2d95709',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value_unsafe() const &noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a5d412981bc3cee0f0bcf3bfb53ae83e1',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value_unsafe() &noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#ad06c8e25c44d091eb3757a65ccd9f57f',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value_unsafe() &&noexcept']]] ]; diff --git a/search/all_15.js b/search/all_15.js index 88c747131..99ce0c6d7 100644 --- a/search/all_15.js +++ b/search/all_15.js @@ -1,4 +1,4 @@ var searchData= [ - ['what_277',['what',['../structsimdjson_1_1simdjson__error.html#a73b15aae33a4eef105d0735e03d83a49',1,'simdjson::simdjson_error']]] + ['what_293',['what',['../structsimdjson_1_1simdjson__error.html#a73b15aae33a4eef105d0735e03d83a49',1,'simdjson::simdjson_error']]] ]; diff --git a/search/all_16.js b/search/all_16.js index 9c6e64c1b..87e0648f7 100644 --- a/search/all_16.js +++ b/search/all_16.js @@ -1,4 +1,4 @@ var searchData= [ - ['_7eparser_278',['~parser',['../classsimdjson_1_1dom_1_1parser.html#aeb48211f320af02b58dc3d0505059844',1,'simdjson::dom::parser::~parser()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a4a144d96ad06a2295137dd0e5b7dcc1d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::~parser()']]] + ['_7eparser_294',['~parser',['../classsimdjson_1_1dom_1_1parser.html#aeb48211f320af02b58dc3d0505059844',1,'simdjson::dom::parser::~parser()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a4a144d96ad06a2295137dd0e5b7dcc1d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::~parser()']]] ]; diff --git a/search/all_2.js b/search/all_2.js index beeb8acba..95f342995 100644 --- a/search/all_2.js +++ b/search/all_2.js @@ -1,15 +1,15 @@ var searchData= [ - ['capacity_18',['capacity',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#aec2c883af898053ab8e5eca8e9e870ae',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::capacity()'],['../classsimdjson_1_1padded__string__view.html#a9d98e1984b893116d8bb7123d84d75b8',1,'simdjson::padded_string_view::capacity()']]], - ['capacity_19',['CAPACITY',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a2d50048bbe409023df4e88f6ffe3bc71',1,'simdjson']]], - ['capacity_20',['capacity',['../classsimdjson_1_1dom_1_1parser.html#aedf495a6e090929be23473e8a29f2fe2',1,'simdjson::dom::parser']]], - ['check_5froot_5farray_21',['check_root_array',['../group__array.html#ga1e023cb72adae168dc7157776976ad75',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['check_5froot_5fobject_22',['check_root_object',['../group__object.html#ga262c7a1f9320fefb1711fec7b69ef6b1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['child_23',['child',['../group__array.html#gaba7c4e5787c7295da3a0d73b0db1c890',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['consume_24',['consume',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a96aeba1fb4eac299260937b78e346ee8',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::consume()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ac16e0e51de3ce97fbd3fd0b1f947d552',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::consume()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#add102ee85423a75e22e4d7ca9a3eaacd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::consume()']]], - ['count_5felements_25',['count_elements',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a481e2b0b216d29038ddca3242a7047ad',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::count_elements()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ab408c2ea4be8874e3514b389c70a5667',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::count_elements()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a9f23e6ab13ad93c43e705ce7fe6134c9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::count_elements()']]], - ['count_5ffields_26',['count_fields',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a24fd6a8aa158b80d851e3a57c9fef642',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::count_fields()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aef6872e07743217fe2e2abe790a21d4c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::count_fields()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a55f04607ee4e718294a572f9b6ad94cc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::count_fields()']]], - ['cpu_20architecture_2dspecific_20implementations_27',['CPU Architecture-Specific Implementations',['../md_doc_implementation_selection.html',1,'']]], - ['current_5fdepth_28',['current_depth',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a1919a4ca6418c94ed54f026fbbda6f1d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::current_depth()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8bcd64ae6b4d204c4b6b2a8420e0270c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::current_depth()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a3bfd36dafc82c212f165b434ab5378b3',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::current_depth()']]], - ['current_5flocation_29',['current_location',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#af4c151ba820f579e149b4bf98e644a49',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::current_location()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a06258e49f2dbb910beeaf6814ff7e071',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::current_location()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a78b9e4e22a89050c9f911f1878165e88',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::current_location()']]] + ['capacity_21',['capacity',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#aec2c883af898053ab8e5eca8e9e870ae',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::capacity()'],['../classsimdjson_1_1padded__string__view.html#a9d98e1984b893116d8bb7123d84d75b8',1,'simdjson::padded_string_view::capacity()']]], + ['capacity_22',['CAPACITY',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a2d50048bbe409023df4e88f6ffe3bc71',1,'simdjson']]], + ['capacity_23',['capacity',['../classsimdjson_1_1dom_1_1parser.html#aedf495a6e090929be23473e8a29f2fe2',1,'simdjson::dom::parser']]], + ['check_5froot_5farray_24',['check_root_array',['../group__array.html#ga1e023cb72adae168dc7157776976ad75',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['check_5froot_5fobject_25',['check_root_object',['../group__object.html#ga262c7a1f9320fefb1711fec7b69ef6b1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['child_26',['child',['../group__array.html#gaba7c4e5787c7295da3a0d73b0db1c890',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['consume_27',['consume',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a96aeba1fb4eac299260937b78e346ee8',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::consume()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ac16e0e51de3ce97fbd3fd0b1f947d552',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::consume()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#add102ee85423a75e22e4d7ca9a3eaacd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::consume()']]], + ['count_5felements_28',['count_elements',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a481e2b0b216d29038ddca3242a7047ad',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::count_elements()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ab408c2ea4be8874e3514b389c70a5667',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::count_elements()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a9f23e6ab13ad93c43e705ce7fe6134c9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::count_elements()']]], + ['count_5ffields_29',['count_fields',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a24fd6a8aa158b80d851e3a57c9fef642',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::count_fields()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aef6872e07743217fe2e2abe790a21d4c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::count_fields()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a55f04607ee4e718294a572f9b6ad94cc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::count_fields()']]], + ['cpu_20architecture_2dspecific_20implementations_30',['CPU Architecture-Specific Implementations',['../md_doc_implementation_selection.html',1,'']]], + ['current_5fdepth_31',['current_depth',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a1919a4ca6418c94ed54f026fbbda6f1d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::current_depth()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8bcd64ae6b4d204c4b6b2a8420e0270c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::current_depth()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a3bfd36dafc82c212f165b434ab5378b3',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::current_depth()']]], + ['current_5flocation_32',['current_location',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#af4c151ba820f579e149b4bf98e644a49',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::current_location()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a06258e49f2dbb910beeaf6814ff7e071',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::current_location()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a78b9e4e22a89050c9f911f1878165e88',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::current_location()']]] ]; diff --git a/search/all_3.js b/search/all_3.js index 3d58b191d..5527c60b3 100644 --- a/search/all_3.js +++ b/search/all_3.js @@ -1,15 +1,16 @@ var searchData= [ - ['data_30',['data',['../structsimdjson_1_1padded__string.html#aadd3bb268cbba43012c5d17a8c1ab7ef',1,'simdjson::padded_string::data() const noexcept'],['../structsimdjson_1_1padded__string.html#aa833ecdbe40c220c5baf7a29c472c972',1,'simdjson::padded_string::data() noexcept']]], - ['default_5fmax_5fdepth_31',['DEFAULT_MAX_DEPTH',['../namespacesimdjson.html#a6df2598eb1d4e1ea669c41831cc7325d',1,'simdjson']]], - ['deprecated_20list_32',['Deprecated List',['../deprecated.html',1,'']]], - ['depth_5ferror_33',['DEPTH_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a0c6b4af181d3d5f40a09182522c88681',1,'simdjson']]], - ['depth_5ft_34',['depth_t',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#af941be7ff0cfaeb30d15d2fb52e76dd1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], - ['description_35',['description',['../classsimdjson_1_1implementation.html#a4f41daefefc573e20fccd591b158e063',1,'simdjson::implementation']]], - ['doc_36',['doc',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a4089d6265ec845fd85acd2db0973b858',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]], - ['document_37',['document',['../classsimdjson_1_1dom_1_1document.html#af34f108b46f82428bfe4ea33869358f0',1,'simdjson::dom::document::document()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a54cd729a715a09bc9e706b7640233427',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::document()'],['../classsimdjson_1_1dom_1_1document.html#a6947c9d79453071ca73d06e398bcdd2a',1,'simdjson::dom::document::document()'],['../classsimdjson_1_1dom_1_1document.html',1,'simdjson::dom::document'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['document_5fdepth_38',['DOCUMENT_DEPTH',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a18847ef30e5800f1c628a344c23ec968',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['document_5freference_39',['document_reference',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], - ['document_5fstream_40',['document_stream',['../classsimdjson_1_1dom_1_1document__stream.html#ae6ee894790448145e11a456f12253364',1,'simdjson::dom::document_stream::document_stream() noexcept'],['../classsimdjson_1_1dom_1_1document__stream.html#a9d6bb44a7d8f818c401d65fb80f6a523',1,'simdjson::dom::document_stream::document_stream(document_stream &&other) noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#af12dc14d4d16b9f4f4602c738678cb0c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::document_stream() noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#a0ac2a6ad0393eb4330b440c8c09290f2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::document_stream(document_stream &&other) noexcept=default'],['../classsimdjson_1_1dom_1_1document__stream.html',1,'simdjson::dom::document_stream'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream']]], - ['dom_5fparser_5fimplementation_41',['dom_parser_implementation',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]] + ['data_33',['data',['../structsimdjson_1_1padded__string.html#aadd3bb268cbba43012c5d17a8c1ab7ef',1,'simdjson::padded_string::data() const noexcept'],['../structsimdjson_1_1padded__string.html#aa833ecdbe40c220c5baf7a29c472c972',1,'simdjson::padded_string::data() noexcept']]], + ['default_5fmax_5fdepth_34',['DEFAULT_MAX_DEPTH',['../namespacesimdjson.html#a6df2598eb1d4e1ea669c41831cc7325d',1,'simdjson']]], + ['deprecated_20list_35',['Deprecated List',['../deprecated.html',1,'']]], + ['depth_5ferror_36',['DEPTH_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a0c6b4af181d3d5f40a09182522c88681',1,'simdjson']]], + ['depth_5ft_37',['depth_t',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#af941be7ff0cfaeb30d15d2fb52e76dd1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], + ['description_38',['description',['../classsimdjson_1_1implementation.html#a4f41daefefc573e20fccd591b158e063',1,'simdjson::implementation']]], + ['doc_39',['doc',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a4089d6265ec845fd85acd2db0973b858',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]], + ['document_40',['document',['../classsimdjson_1_1dom_1_1document.html#af34f108b46f82428bfe4ea33869358f0',1,'simdjson::dom::document::document()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a54cd729a715a09bc9e706b7640233427',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::document()'],['../classsimdjson_1_1dom_1_1document.html#a6947c9d79453071ca73d06e398bcdd2a',1,'simdjson::dom::document::document()'],['../classsimdjson_1_1dom_1_1document.html',1,'simdjson::dom::document'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['document_5fdepth_41',['DOCUMENT_DEPTH',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a18847ef30e5800f1c628a344c23ec968',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['document_5freference_42',['document_reference',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], + ['document_5fstream_43',['document_stream',['../classsimdjson_1_1dom_1_1document__stream.html#ae6ee894790448145e11a456f12253364',1,'simdjson::dom::document_stream::document_stream() noexcept'],['../classsimdjson_1_1dom_1_1document__stream.html#a9d6bb44a7d8f818c401d65fb80f6a523',1,'simdjson::dom::document_stream::document_stream(document_stream &&other) noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#af12dc14d4d16b9f4f4602c738678cb0c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::document_stream() noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#a0ac2a6ad0393eb4330b440c8c09290f2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::document_stream(document_stream &&other) noexcept=default'],['../classsimdjson_1_1dom_1_1document__stream.html',1,'simdjson::dom::document_stream'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream']]], + ['dom_5fparser_5fimplementation_44',['dom_parser_implementation',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['double_45',['DOUBLE',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aafd3e4ece78a7d422280d5ed379482229',1,'simdjson::dom']]] ]; diff --git a/search/all_4.js b/search/all_4.js index 78d7e2ac7..1cfb2cabf 100644 --- a/search/all_4.js +++ b/search/all_4.js @@ -1,10 +1,11 @@ var searchData= [ - ['element_42',['element',['../classsimdjson_1_1dom_1_1element.html#a9dbf81ad662ad32168025e8e08686935',1,'simdjson::dom::element::element()'],['../classsimdjson_1_1dom_1_1element.html',1,'simdjson::dom::element']]], - ['empty_43',['EMPTY',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a7aed571b420dcdfe59742e0df97b415a',1,'simdjson']]], - ['end_44',['end',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a6ed00f1588087b2d0de926c4599366d6',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#a0a0d40ed80767c01232a6aacb6258b2b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a7a79c0e85c9d40b53f0d4daeeb24111a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#ae482e8f5fa3233babbcb9ccc29db5a15',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::end()'],['../classsimdjson_1_1dom_1_1object.html#a79cf291477bcaa1bf2328411b411587d',1,'simdjson::dom::object::end()'],['../classsimdjson_1_1dom_1_1element.html#a846a790e93c9bad6c40641239bd77b28',1,'simdjson::dom::element::end()'],['../classsimdjson_1_1dom_1_1document__stream.html#adec1e168e4188bf9c90ee87adbd72850',1,'simdjson::dom::document_stream::end()'],['../classsimdjson_1_1dom_1_1array.html#a378b3312cdf6f8fe04725b617b8cfcb9',1,'simdjson::dom::array::end()']]], - ['error_45',['error',['../structsimdjson_1_1simdjson__error.html#aa8143615e5f6f02474f6ab165682ab6e',1,'simdjson::simdjson_error::error()'],['../structsimdjson_1_1simdjson__result.html#a23470fcc7f01262019e96d3f3010b4a1',1,'simdjson::simdjson_result::error()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a20a01e401b72125b9b1acef9cfb5b9ea',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::error()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a4111757108422ffaf647024319205d5c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::error()']]], - ['error_5fcode_46',['error_code',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9',1,'simdjson']]], - ['error_5fmessage_47',['error_message',['../namespacesimdjson.html#a65b00a7a7a9c8fafe9eb3b9b413a36fa',1,'simdjson::error_message(error_code error) noexcept'],['../namespacesimdjson.html#a56e8e2fa6798b9e0da80bc51ae4a5f29',1,'simdjson::error_message(int error) noexcept']]], - ['errorvalues_48',['ErrorValues',['../namespacesimdjson.html#a63b494af834917af13120dcd57719bdb',1,'simdjson']]] + ['element_46',['element',['../classsimdjson_1_1dom_1_1element.html#a9dbf81ad662ad32168025e8e08686935',1,'simdjson::dom::element::element()'],['../classsimdjson_1_1dom_1_1element.html',1,'simdjson::dom::element']]], + ['element_5ftype_47',['element_type',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3a',1,'simdjson::dom']]], + ['empty_48',['EMPTY',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a7aed571b420dcdfe59742e0df97b415a',1,'simdjson']]], + ['end_49',['end',['../classsimdjson_1_1dom_1_1array.html#a378b3312cdf6f8fe04725b617b8cfcb9',1,'simdjson::dom::array::end()'],['../classsimdjson_1_1dom_1_1document__stream.html#adec1e168e4188bf9c90ee87adbd72850',1,'simdjson::dom::document_stream::end()'],['../classsimdjson_1_1dom_1_1element.html#a846a790e93c9bad6c40641239bd77b28',1,'simdjson::dom::element::end()'],['../classsimdjson_1_1dom_1_1object.html#a79cf291477bcaa1bf2328411b411587d',1,'simdjson::dom::object::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#ae482e8f5fa3233babbcb9ccc29db5a15',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a7a79c0e85c9d40b53f0d4daeeb24111a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#a0a0d40ed80767c01232a6aacb6258b2b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a6ed00f1588087b2d0de926c4599366d6',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::end()']]], + ['error_50',['error',['../structsimdjson_1_1simdjson__error.html#aa8143615e5f6f02474f6ab165682ab6e',1,'simdjson::simdjson_error::error()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a4111757108422ffaf647024319205d5c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::error()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a20a01e401b72125b9b1acef9cfb5b9ea',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::error()'],['../structsimdjson_1_1simdjson__result.html#a23470fcc7f01262019e96d3f3010b4a1',1,'simdjson::simdjson_result::error()']]], + ['error_5fcode_51',['error_code',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9',1,'simdjson']]], + ['error_5fmessage_52',['error_message',['../namespacesimdjson.html#a65b00a7a7a9c8fafe9eb3b9b413a36fa',1,'simdjson::error_message(error_code error) noexcept'],['../namespacesimdjson.html#a56e8e2fa6798b9e0da80bc51ae4a5f29',1,'simdjson::error_message(int error) noexcept']]], + ['errorvalues_53',['ErrorValues',['../namespacesimdjson.html#a63b494af834917af13120dcd57719bdb',1,'simdjson']]] ]; diff --git a/search/all_5.js b/search/all_5.js index cad584b1a..2de70afdb 100644 --- a/search/all_5.js +++ b/search/all_5.js @@ -1,12 +1,12 @@ var searchData= [ - ['f_5fatom_5ferror_49',['F_ATOM_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ae726a74b8a99e4bf802f3078436a2394',1,'simdjson']]], - ['field_50',['field',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#a9415aecf3526ad6081be495c9be61b43',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field::field()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field']]], - ['field_5fkey_51',['field_key',['../group__object.html#ga9fd0d39ec786f26b7ea86f9bc8380bdd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['field_5fvalue_52',['field_value',['../group__object.html#gaaaf58bcf25e6d30a3469848d36c65a05',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['find_5ffield_53',['find_field',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ab919032e611f7f4a1e8cc9eb47ad4dea',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::find_field()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aa25020165cc5a191026a243a10da6558',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::find_field()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a1588a173b15a20cacf77a24d07032d83',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::find_field()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a4ff908713e1eb6d6294706a235be8101',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::find_field()'],['../group__object.html#gacefcaf06811426a241ed97a6948a94ee',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::find_field(const std::string_view key) noexcept']]], - ['find_5ffield_5fraw_54',['find_field_raw',['../group__object.html#gab66bdaf2c97d2cbd2a94a5a3e67ffabc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['find_5ffield_5funordered_55',['find_field_unordered',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aa89d66d993d0bffcbb85e303ad3950c2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::find_field_unordered()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a55d8bd31e2f5e6b10986af2f48a544fc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::find_field_unordered()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#acb1514c00a87027c5eb3c81171a3b874',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::find_field_unordered()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a423064962ffe48495948c98afb0e556c',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::find_field_unordered()']]], - ['find_5ffield_5funordered_5fraw_56',['find_field_unordered_raw',['../group__object.html#ga678e53c38ebaf2323550e7f29e253df9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['first_57',['first',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#ae51247dce4e77f1e6067cfd4654cca30',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base']]] + ['f_5fatom_5ferror_54',['F_ATOM_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ae726a74b8a99e4bf802f3078436a2394',1,'simdjson']]], + ['field_55',['field',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#a9415aecf3526ad6081be495c9be61b43',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field::field()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field']]], + ['field_5fkey_56',['field_key',['../group__object.html#ga9fd0d39ec786f26b7ea86f9bc8380bdd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['field_5fvalue_57',['field_value',['../group__object.html#gaaaf58bcf25e6d30a3469848d36c65a05',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['find_5ffield_58',['find_field',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ab919032e611f7f4a1e8cc9eb47ad4dea',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::find_field()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aa25020165cc5a191026a243a10da6558',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::find_field()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a1588a173b15a20cacf77a24d07032d83',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::find_field()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a4ff908713e1eb6d6294706a235be8101',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::find_field()'],['../group__object.html#gacefcaf06811426a241ed97a6948a94ee',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::find_field(const std::string_view key) noexcept']]], + ['find_5ffield_5fraw_59',['find_field_raw',['../group__object.html#gab66bdaf2c97d2cbd2a94a5a3e67ffabc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['find_5ffield_5funordered_60',['find_field_unordered',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aa89d66d993d0bffcbb85e303ad3950c2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::find_field_unordered()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a55d8bd31e2f5e6b10986af2f48a544fc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::find_field_unordered()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#acb1514c00a87027c5eb3c81171a3b874',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::find_field_unordered()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a423064962ffe48495948c98afb0e556c',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::find_field_unordered()']]], + ['find_5ffield_5funordered_5fraw_61',['find_field_unordered_raw',['../group__object.html#ga678e53c38ebaf2323550e7f29e253df9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['first_62',['first',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#ae51247dce4e77f1e6067cfd4654cca30',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base']]] ]; diff --git a/search/all_6.js b/search/all_6.js index d1329625b..d83eb16d7 100644 --- a/search/all_6.js +++ b/search/all_6.js @@ -1,23 +1,23 @@ var searchData= [ - ['get_58',['get',['../classsimdjson_1_1dom_1_1element.html#a3474c8fc1b1cb06625a50dcb9a2c5269',1,'simdjson::dom::element::get()'],['../structsimdjson_1_1simdjson__result.html#ab0fafc6d63a14891788a9edaedff4b05',1,'simdjson::simdjson_result::get()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a96c905c44f3c53cb6cdb23b760d323b8',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::get()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a7fe39fb73b6a4d9b1c97742dc2ae7b98',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get() &noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#af0af8707b5623e17c3bc9a329b7c4fa3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get(T &out) &noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8d50c7c494ab9acc4a644cc77dd058f9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get() noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a40af3c6af7d18241c1c4017df8557d86',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get(T &out) noexcept'],['../classsimdjson_1_1dom_1_1element.html#a47663724b3a6bad8666ccd24cd598bd2',1,'simdjson::dom::element::get()']]], - ['get_5factive_5fimplementation_59',['get_active_implementation',['../namespacesimdjson.html#abd8b8fd009878125822fca9a2624f6a6',1,'simdjson']]], - ['get_5farray_60',['get_array',['../classsimdjson_1_1dom_1_1element.html#a87c75accdc0b35e06f3d554561ce8cd3',1,'simdjson::dom::element::get_array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aea545f106413a9bc01cd19e6630a580d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a2fdcc51cac791c3a2f4c970764bc0155',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_array()']]], - ['get_5favailable_5fimplementations_61',['get_available_implementations',['../namespacesimdjson.html#a7e4483a8ae684fdb5b2f1e7d4a8acc69',1,'simdjson']]], - ['get_5fbool_62',['get_bool',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aa0e07db099e651d3e5279872683cb7dd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_bool()'],['../classsimdjson_1_1dom_1_1element.html#a548e0fc369eb455ea477e20fb0793627',1,'simdjson::dom::element::get_bool()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a41eaac87582a465b4c9f9834701a837d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_bool()']]], - ['get_5fc_5fstr_63',['get_c_str',['../classsimdjson_1_1dom_1_1element.html#a29c21d70352c9b8af7144fd4f38baaa6',1,'simdjson::dom::element']]], - ['get_5fdouble_64',['get_double',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a9a5ebeb4a79fa1d997f9f3478370a57e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_double()'],['../classsimdjson_1_1dom_1_1element.html#a3e74a8a6ef8318e2de805359126c6d7b',1,'simdjson::dom::element::get_double()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a9909be358c78a64bc9ab7e11e3f2a47b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_double()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#ab261642a30f5e26b0769ce701cd5b9f8',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_double()']]], - ['get_5fdouble_5fin_5fstring_65',['get_double_in_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ac8b8d7d4bc7958363b7f0d380b248a4f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_double_in_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a85e4b5250e316cc602b1b05bd097f771',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_double_in_string()']]], - ['get_5fint64_66',['get_int64',['../classsimdjson_1_1dom_1_1element.html#aa954cda836a4748ec9937291a9250604',1,'simdjson::dom::element::get_int64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ab7e4b28c0d9637cf1b04554d99c0e3b3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_int64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a6abc08fb48868bdc5104c885c46ced82',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_int64()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a92b12b32ee177c2a818618d0595d2584',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_int64()']]], - ['get_5fint64_5fin_5fstring_67',['get_int64_in_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aac4a4837e66c8f1243722ab04ce45436',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_int64_in_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a547e99f2f430ca39bf4060d090f45ff7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_int64_in_string() noexcept']]], - ['get_5fnumber_68',['get_number',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aa89c4aceb7e052a1f7ff7e4058b651f1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_number()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a2b04a9cd8c4ff9b591dc3f2db95c69cf',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_number() noexcept']]], - ['get_5fnumber_5ftype_69',['get_number_type',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#abb3a7cc6f2391d26f27a28c16ca38c9c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_number_type()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a8c8d29d831635c958e87de0cc2dab8b4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_number_type()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a2f46079741d1ba316de32bb9765c5082',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_number_type()']]], - ['get_5fobject_70',['get_object',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a4620d364a637031ef38661f9fb215ebc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_object()'],['../classsimdjson_1_1dom_1_1element.html#ab4c2e35dc44664eb04038ad35efc64f9',1,'simdjson::dom::element::get_object()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a3bde0795cb309f3e51b8388fbafc1fe4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_object() noexcept']]], - ['get_5fraw_5fjson_5fstring_71',['get_raw_json_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aca8b183c4e674a5b4ade8f6d2780f815',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_raw_json_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#afa3370b930da937911cf61ec9b047c56',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_raw_json_string() noexcept']]], - ['get_5fstring_72',['get_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a2ae4c160def21463b0ab214a36c0a78e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a9d574e04d5dfde0bf99dea4926232fe4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_string()'],['../classsimdjson_1_1dom_1_1element.html#ae83652b5016ce4d4ff71f8f9bc05913e',1,'simdjson::dom::element::get_string() const noexcept']]], - ['get_5fstring_5flength_73',['get_string_length',['../classsimdjson_1_1dom_1_1element.html#a9d92145af64401654c20d2885dd4051d',1,'simdjson::dom::element']]], - ['get_5fuint64_74',['get_uint64',['../classsimdjson_1_1dom_1_1element.html#a9e5a750a066f17d5a9a31a24980e0b1d',1,'simdjson::dom::element::get_uint64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a4d221850d045f1e7ada4dfaaee0e145c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_uint64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html#a47b30548f71aca4317bdc4c6955cd719',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference::get_uint64()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#aff5939efdcb41c9d2b9a1997816f093f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_uint64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#adaa7bb2c9b3988476f3317ddda27e22d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_uint64()']]], - ['get_5fuint64_5fin_5fstring_75',['get_uint64_in_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5cb63d14a99509d751f4be45063fec95',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_uint64_in_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8bc2eb9eeeb7e2e0b82c23ed4d254933',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_uint64_in_string()']]], - ['get_5fvalue_76',['get_value',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ab89eda435b4a68be578fcb5c3da73980',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['get_5fwobbly_5fstring_77',['get_wobbly_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ae1db0154ef901ed1e8fb581bb9df6899',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_wobbly_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ab7bb6749f40bec70c8a1a31edad53c1d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_wobbly_string()']]] + ['get_63',['get',['../classsimdjson_1_1dom_1_1element.html#a3474c8fc1b1cb06625a50dcb9a2c5269',1,'simdjson::dom::element::get()'],['../structsimdjson_1_1simdjson__result.html#ab0fafc6d63a14891788a9edaedff4b05',1,'simdjson::simdjson_result::get()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a96c905c44f3c53cb6cdb23b760d323b8',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::get()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a7fe39fb73b6a4d9b1c97742dc2ae7b98',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get() &noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#af0af8707b5623e17c3bc9a329b7c4fa3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get(T &out) &noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8d50c7c494ab9acc4a644cc77dd058f9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get() noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a40af3c6af7d18241c1c4017df8557d86',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get(T &out) noexcept'],['../classsimdjson_1_1dom_1_1element.html#a47663724b3a6bad8666ccd24cd598bd2',1,'simdjson::dom::element::get()']]], + ['get_5factive_5fimplementation_64',['get_active_implementation',['../namespacesimdjson.html#abd8b8fd009878125822fca9a2624f6a6',1,'simdjson']]], + ['get_5farray_65',['get_array',['../classsimdjson_1_1dom_1_1element.html#a87c75accdc0b35e06f3d554561ce8cd3',1,'simdjson::dom::element::get_array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aea545f106413a9bc01cd19e6630a580d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a2fdcc51cac791c3a2f4c970764bc0155',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_array()']]], + ['get_5favailable_5fimplementations_66',['get_available_implementations',['../namespacesimdjson.html#a7e4483a8ae684fdb5b2f1e7d4a8acc69',1,'simdjson']]], + ['get_5fbool_67',['get_bool',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aa0e07db099e651d3e5279872683cb7dd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_bool()'],['../classsimdjson_1_1dom_1_1element.html#a548e0fc369eb455ea477e20fb0793627',1,'simdjson::dom::element::get_bool()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a41eaac87582a465b4c9f9834701a837d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_bool()']]], + ['get_5fc_5fstr_68',['get_c_str',['../classsimdjson_1_1dom_1_1element.html#a29c21d70352c9b8af7144fd4f38baaa6',1,'simdjson::dom::element']]], + ['get_5fdouble_69',['get_double',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a9a5ebeb4a79fa1d997f9f3478370a57e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_double()'],['../classsimdjson_1_1dom_1_1element.html#a3e74a8a6ef8318e2de805359126c6d7b',1,'simdjson::dom::element::get_double()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a9909be358c78a64bc9ab7e11e3f2a47b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_double()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#ab261642a30f5e26b0769ce701cd5b9f8',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_double()']]], + ['get_5fdouble_5fin_5fstring_70',['get_double_in_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ac8b8d7d4bc7958363b7f0d380b248a4f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_double_in_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a85e4b5250e316cc602b1b05bd097f771',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_double_in_string()']]], + ['get_5fint64_71',['get_int64',['../classsimdjson_1_1dom_1_1element.html#aa954cda836a4748ec9937291a9250604',1,'simdjson::dom::element::get_int64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ab7e4b28c0d9637cf1b04554d99c0e3b3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_int64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a6abc08fb48868bdc5104c885c46ced82',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_int64()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a92b12b32ee177c2a818618d0595d2584',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_int64()']]], + ['get_5fint64_5fin_5fstring_72',['get_int64_in_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aac4a4837e66c8f1243722ab04ce45436',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_int64_in_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a547e99f2f430ca39bf4060d090f45ff7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_int64_in_string() noexcept']]], + ['get_5fnumber_73',['get_number',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aa89c4aceb7e052a1f7ff7e4058b651f1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_number()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a2b04a9cd8c4ff9b591dc3f2db95c69cf',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_number() noexcept']]], + ['get_5fnumber_5ftype_74',['get_number_type',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#abb3a7cc6f2391d26f27a28c16ca38c9c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_number_type()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a8c8d29d831635c958e87de0cc2dab8b4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_number_type()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a2f46079741d1ba316de32bb9765c5082',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_number_type()']]], + ['get_5fobject_75',['get_object',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a4620d364a637031ef38661f9fb215ebc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_object()'],['../classsimdjson_1_1dom_1_1element.html#ab4c2e35dc44664eb04038ad35efc64f9',1,'simdjson::dom::element::get_object()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a3bde0795cb309f3e51b8388fbafc1fe4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_object() noexcept']]], + ['get_5fraw_5fjson_5fstring_76',['get_raw_json_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aca8b183c4e674a5b4ade8f6d2780f815',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_raw_json_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#afa3370b930da937911cf61ec9b047c56',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_raw_json_string() noexcept']]], + ['get_5fstring_77',['get_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a2ae4c160def21463b0ab214a36c0a78e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a9d574e04d5dfde0bf99dea4926232fe4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_string()'],['../classsimdjson_1_1dom_1_1element.html#ae83652b5016ce4d4ff71f8f9bc05913e',1,'simdjson::dom::element::get_string() const noexcept']]], + ['get_5fstring_5flength_78',['get_string_length',['../classsimdjson_1_1dom_1_1element.html#a9d92145af64401654c20d2885dd4051d',1,'simdjson::dom::element']]], + ['get_5fuint64_79',['get_uint64',['../classsimdjson_1_1dom_1_1element.html#a9e5a750a066f17d5a9a31a24980e0b1d',1,'simdjson::dom::element::get_uint64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a4d221850d045f1e7ada4dfaaee0e145c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_uint64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html#a47b30548f71aca4317bdc4c6955cd719',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference::get_uint64()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#aff5939efdcb41c9d2b9a1997816f093f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_uint64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#adaa7bb2c9b3988476f3317ddda27e22d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_uint64()']]], + ['get_5fuint64_5fin_5fstring_80',['get_uint64_in_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5cb63d14a99509d751f4be45063fec95',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_uint64_in_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8bc2eb9eeeb7e2e0b82c23ed4d254933',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_uint64_in_string()']]], + ['get_5fvalue_81',['get_value',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ab89eda435b4a68be578fcb5c3da73980',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['get_5fwobbly_5fstring_82',['get_wobbly_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ae1db0154ef901ed1e8fb581bb9df6899',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_wobbly_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ab7bb6749f40bec70c8a1a31edad53c1d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_wobbly_string()']]] ]; diff --git a/search/all_7.js b/search/all_7.js index 83bf7162f..f75e94503 100644 --- a/search/all_7.js +++ b/search/all_7.js @@ -1,5 +1,5 @@ var searchData= [ - ['has_5fnext_5felement_78',['has_next_element',['../group__array.html#ga31b0a8ce8734db9413cce31c4d9c8c8d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['has_5fnext_5ffield_79',['has_next_field',['../group__object.html#ga7956fe38cd8ecfbc8f709aa6f65c92b4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]] + ['has_5fnext_5felement_83',['has_next_element',['../group__array.html#ga31b0a8ce8734db9413cce31c4d9c8c8d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['has_5fnext_5ffield_84',['has_next_field',['../group__object.html#ga7956fe38cd8ecfbc8f709aa6f65c92b4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]] ]; diff --git a/search/all_8.js b/search/all_8.js index 4635ae1f2..a07543555 100644 --- a/search/all_8.js +++ b/search/all_8.js @@ -1,50 +1,50 @@ var searchData= [ - ['implementation_80',['implementation',['../classsimdjson_1_1implementation.html',1,'simdjson']]], - ['implementation_2dbase_2eh_81',['implementation-base.h',['../implementation-base_8h.html',1,'']]], - ['implementation_5fsimdjson_5fresult_5fbase_82',['implementation_simdjson_result_base',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a108dd35fd49314820106a21afa0fb2ea',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base() noexcept=default'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a4f59b204f1eddcdc2b36e6df0639a516',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#af8a436d40886a295f618311d3849d7e5',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a44ff65b6194c7c1cb74180b43e438619',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base< T >']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_20_3e_83',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::array >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_5fiterator_20_3e_84',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::array_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_20_3e_85',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::document >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5freference_20_3e_86',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::document_reference >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5fstream_20_3e_87',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::document_stream >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3afield_20_3e_88',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::field >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5fiterator_20_3e_89',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::json_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5ftype_20_3e_90',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::json_type >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_20_3e_91',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::object >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_5fiterator_20_3e_92',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::object_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aparser_20_3e_93',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::parser >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3araw_5fjson_5fstring_20_3e_94',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3atoken_5fiterator_20_3e_95',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::token_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_20_3e_96',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::value >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_5fiterator_20_3e_97',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::value_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['incomplete_5farray_5for_5fobject_98',['INCOMPLETE_ARRAY_OR_OBJECT',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab8a4df583110f900741d0b3f229f349a',1,'simdjson']]], - ['incorrect_5ftype_99',['INCORRECT_TYPE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a1de02af1d67e8350f612eee0dcf634b4',1,'simdjson']]], - ['index_5fout_5fof_5fbounds_100',['INDEX_OUT_OF_BOUNDS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a80bcf6820da38abe1a2e9abeaa0f0c49',1,'simdjson']]], - ['insufficient_5fpadding_101',['INSUFFICIENT_PADDING',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aee3335b961f2d0f732e95b359c16a69a',1,'simdjson']]], - ['invalid_5fjson_5fpointer_102',['INVALID_JSON_POINTER',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aeeaf930969566f76840224d64ee3a9a1',1,'simdjson']]], - ['invalid_5furi_5ffragment_103',['INVALID_URI_FRAGMENT',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a7b0467451dc0cecb41d3ea46c4a0005b',1,'simdjson']]], - ['io_5ferror_104',['IO_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9acaec8ffce84b1acf9e6833b0f930878e',1,'simdjson']]], - ['is_105',['is',['../classsimdjson_1_1dom_1_1element.html#a4c77063d766c7db197f8674407b504d7',1,'simdjson::dom::element']]], - ['is_5falive_106',['is_alive',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a3170300bc331577a1435bb238cf3faff',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['is_5farray_107',['is_array',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a9b82f3273bb2f2f83b8e085b7d9c6613',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation::is_array()'],['../classsimdjson_1_1dom_1_1element.html#afaaac6e2f58128a01a25b0a5f5abb856',1,'simdjson::dom::element::is_array() const noexcept']]], - ['is_5fbool_108',['is_bool',['../classsimdjson_1_1dom_1_1element.html#afde562c5aae1b85a03ab6d4b040e7d13',1,'simdjson::dom::element']]], - ['is_5fdouble_109',['is_double',['../classsimdjson_1_1dom_1_1element.html#a0d11f69ba87f55960be6f655e4e99aba',1,'simdjson::dom::element::is_double()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a48f9e54ebd40e1c060be0a4b1d4ff823',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::is_double()']]], - ['is_5fempty_110',['is_empty',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ad210f9115679a625ada433add55eff51',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::is_empty()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a371cf8909f04019606063e8538fd7109',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::is_empty()']]], - ['is_5fequal_111',['is_equal',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#aa3165ea813c4c15fb9cb282e67abe6af',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::is_equal(const char *target) const noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a0ddac0ab1c69022610d8051b989b5c95',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::is_equal(std::string_view target) const noexcept']]], - ['is_5ffree_5ffrom_5funescaped_5fquote_112',['is_free_from_unescaped_quote',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a671923a53cc070f65029698afeb9be7f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string']]], - ['is_5fint64_113',['is_int64',['../classsimdjson_1_1dom_1_1element.html#adadf66ec37675d5f3fac9816a8aacba2',1,'simdjson::dom::element::is_int64()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a38d6b4b4e91f30c8def71997d23454c2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::is_int64()']]], - ['is_5finteger_114',['is_integer',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a5ab2c9c7d29a7a6c09f78930b0100836',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_integer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#af47e11e9925fd5d3d8a43cf0f7773992',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_integer() noexcept']]], - ['is_5fnegative_115',['is_negative',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5083f65b71d7540ea785ec2b52604267',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_negative()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a2701c283de019e56624e930e936e0df0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_negative()']]], - ['is_5fnull_116',['is_null',['../classsimdjson_1_1dom_1_1element.html#ae38f84f4272ae3c32b32dd6d5007ffb9',1,'simdjson::dom::element::is_null()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5ed59f01a0d4ad253f0e1c1f995ed0a7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_null()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a04f1c591d93d834377a9cb916c90e09b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_null()']]], - ['is_5fnumber_117',['is_number',['../classsimdjson_1_1dom_1_1element.html#a1e3f78b3bee5ec3f33cc4b03dcc87981',1,'simdjson::dom::element']]], - ['is_5fobject_118',['is_object',['../classsimdjson_1_1dom_1_1element.html#a08c7dcebf9e96fe5e4dd6df2959c0024',1,'simdjson::dom::element']]], - ['is_5fscalar_119',['is_scalar',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ac2ea8f4340d02d9062f81419da47500b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_scalar()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8c2618e57ec26501dd93ff8fd5cc2191',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_scalar()']]], - ['is_5fstreaming_120',['is_streaming',['../namespacesimdjson.html#a6f306690d6d088d80b0cc2717040b2d0',1,'simdjson']]], - ['is_5fstring_121',['is_string',['../classsimdjson_1_1dom_1_1element.html#a65bd96042cc0f19dc3e0635937edded4',1,'simdjson::dom::element']]], - ['is_5fuint64_122',['is_uint64',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#af0e89976b80a7a7dedaf8c1a7cfd64a2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::is_uint64()'],['../classsimdjson_1_1dom_1_1element.html#ac5017726a573f59c3494b92bb66a3beb',1,'simdjson::dom::element::is_uint64()']]], - ['iter_123',['iter',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a969e1000319391cd2bee3aed88481500',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::iter()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a2d84851f9e4fc07b3e518ea957e2d9b6',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::iter()']]], - ['iterate_124',['iterate',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a0da712132ca4180a84907f2ca4ffbc5b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], - ['iterate_5fmany_125',['iterate_many',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#af996682250c05ca237fe6db234bb9179',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::iterate_many()'],['../md_doc_iterate_many.html',1,'(Global Namespace)']]], - ['iterator_126',['iterator',['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a6c3a5002801ab80b1c59422d7f3400d3',1,'simdjson::dom::document_stream::iterator::iterator()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a3b0ac5e3e64e53167a011afdd0b77345',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::iterator()'],['../classsimdjson_1_1dom_1_1array_1_1iterator.html',1,'simdjson::dom::array::iterator'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html',1,'simdjson::dom::document_stream::iterator'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html',1,'simdjson::dom::object::iterator'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator']]] + ['implementation_85',['implementation',['../classsimdjson_1_1implementation.html',1,'simdjson']]], + ['implementation_5fsimdjson_5fresult_5fbase_86',['implementation_simdjson_result_base',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a108dd35fd49314820106a21afa0fb2ea',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base() noexcept=default'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a4f59b204f1eddcdc2b36e6df0639a516',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#af8a436d40886a295f618311d3849d7e5',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a44ff65b6194c7c1cb74180b43e438619',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base< T >']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_20_3e_87',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::array >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_5fiterator_20_3e_88',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::array_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_20_3e_89',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::document >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5freference_20_3e_90',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::document_reference >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5fstream_20_3e_91',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::document_stream >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3afield_20_3e_92',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::field >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5fiterator_20_3e_93',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::json_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5ftype_20_3e_94',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::json_type >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_20_3e_95',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::object >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_5fiterator_20_3e_96',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::object_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aparser_20_3e_97',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::parser >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3araw_5fjson_5fstring_20_3e_98',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3atoken_5fiterator_20_3e_99',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::token_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_20_3e_100',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::value >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_5fiterator_20_3e_101',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::value_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['incomplete_5farray_5for_5fobject_102',['INCOMPLETE_ARRAY_OR_OBJECT',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab8a4df583110f900741d0b3f229f349a',1,'simdjson']]], + ['incorrect_5ftype_103',['INCORRECT_TYPE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a1de02af1d67e8350f612eee0dcf634b4',1,'simdjson']]], + ['index_5fout_5fof_5fbounds_104',['INDEX_OUT_OF_BOUNDS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a80bcf6820da38abe1a2e9abeaa0f0c49',1,'simdjson']]], + ['insufficient_5fpadding_105',['INSUFFICIENT_PADDING',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aee3335b961f2d0f732e95b359c16a69a',1,'simdjson']]], + ['int64_106',['INT64',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa4e866b275c85fbb439f6484251cfb31c',1,'simdjson::dom']]], + ['invalid_5fjson_5fpointer_107',['INVALID_JSON_POINTER',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aeeaf930969566f76840224d64ee3a9a1',1,'simdjson']]], + ['invalid_5furi_5ffragment_108',['INVALID_URI_FRAGMENT',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a7b0467451dc0cecb41d3ea46c4a0005b',1,'simdjson']]], + ['io_5ferror_109',['IO_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9acaec8ffce84b1acf9e6833b0f930878e',1,'simdjson']]], + ['is_110',['is',['../classsimdjson_1_1dom_1_1element.html#a4c77063d766c7db197f8674407b504d7',1,'simdjson::dom::element']]], + ['is_5falive_111',['is_alive',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a3170300bc331577a1435bb238cf3faff',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['is_5farray_112',['is_array',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a9b82f3273bb2f2f83b8e085b7d9c6613',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation::is_array()'],['../classsimdjson_1_1dom_1_1element.html#afaaac6e2f58128a01a25b0a5f5abb856',1,'simdjson::dom::element::is_array() const noexcept']]], + ['is_5fbool_113',['is_bool',['../classsimdjson_1_1dom_1_1element.html#afde562c5aae1b85a03ab6d4b040e7d13',1,'simdjson::dom::element']]], + ['is_5fdouble_114',['is_double',['../classsimdjson_1_1dom_1_1element.html#a0d11f69ba87f55960be6f655e4e99aba',1,'simdjson::dom::element::is_double()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a48f9e54ebd40e1c060be0a4b1d4ff823',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::is_double()']]], + ['is_5fempty_115',['is_empty',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ad210f9115679a625ada433add55eff51',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::is_empty()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a371cf8909f04019606063e8538fd7109',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::is_empty()']]], + ['is_5fequal_116',['is_equal',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a0ddac0ab1c69022610d8051b989b5c95',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::is_equal(std::string_view target) const noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#aa3165ea813c4c15fb9cb282e67abe6af',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::is_equal(const char *target) const noexcept']]], + ['is_5ffree_5ffrom_5funescaped_5fquote_117',['is_free_from_unescaped_quote',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a671923a53cc070f65029698afeb9be7f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string']]], + ['is_5fint64_118',['is_int64',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a38d6b4b4e91f30c8def71997d23454c2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::is_int64()'],['../classsimdjson_1_1dom_1_1element.html#adadf66ec37675d5f3fac9816a8aacba2',1,'simdjson::dom::element::is_int64()']]], + ['is_5finteger_119',['is_integer',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a5ab2c9c7d29a7a6c09f78930b0100836',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_integer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#af47e11e9925fd5d3d8a43cf0f7773992',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_integer()']]], + ['is_5fnegative_120',['is_negative',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a2701c283de019e56624e930e936e0df0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_negative()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5083f65b71d7540ea785ec2b52604267',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_negative()']]], + ['is_5fnull_121',['is_null',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a04f1c591d93d834377a9cb916c90e09b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_null()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5ed59f01a0d4ad253f0e1c1f995ed0a7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_null()'],['../classsimdjson_1_1dom_1_1element.html#ae38f84f4272ae3c32b32dd6d5007ffb9',1,'simdjson::dom::element::is_null() const noexcept']]], + ['is_5fnumber_122',['is_number',['../classsimdjson_1_1dom_1_1element.html#a1e3f78b3bee5ec3f33cc4b03dcc87981',1,'simdjson::dom::element']]], + ['is_5fobject_123',['is_object',['../classsimdjson_1_1dom_1_1element.html#a08c7dcebf9e96fe5e4dd6df2959c0024',1,'simdjson::dom::element']]], + ['is_5fscalar_124',['is_scalar',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ac2ea8f4340d02d9062f81419da47500b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_scalar()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8c2618e57ec26501dd93ff8fd5cc2191',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_scalar()']]], + ['is_5fstreaming_125',['is_streaming',['../namespacesimdjson.html#a6f306690d6d088d80b0cc2717040b2d0',1,'simdjson']]], + ['is_5fstring_126',['is_string',['../classsimdjson_1_1dom_1_1element.html#a65bd96042cc0f19dc3e0635937edded4',1,'simdjson::dom::element']]], + ['is_5fuint64_127',['is_uint64',['../classsimdjson_1_1dom_1_1element.html#ac5017726a573f59c3494b92bb66a3beb',1,'simdjson::dom::element::is_uint64()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#af0e89976b80a7a7dedaf8c1a7cfd64a2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::is_uint64()']]], + ['iter_128',['iter',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a969e1000319391cd2bee3aed88481500',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::iter()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a2d84851f9e4fc07b3e518ea957e2d9b6',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::iter()']]], + ['iterate_129',['iterate',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a0da712132ca4180a84907f2ca4ffbc5b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], + ['iterate_5fmany_130',['iterate_many',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#af996682250c05ca237fe6db234bb9179',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::iterate_many()'],['../md_doc_iterate_many.html',1,'(Global Namespace)']]], + ['iterator_131',['iterator',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a3b0ac5e3e64e53167a011afdd0b77345',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::iterator()'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a6c3a5002801ab80b1c59422d7f3400d3',1,'simdjson::dom::document_stream::iterator::iterator()'],['../classsimdjson_1_1dom_1_1array_1_1iterator.html',1,'simdjson::dom::array::iterator'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html',1,'simdjson::dom::document_stream::iterator'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html',1,'simdjson::dom::object::iterator'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator']]] ]; diff --git a/search/all_9.js b/search/all_9.js index 8509d2260..911bcee41 100644 --- a/search/all_9.js +++ b/search/all_9.js @@ -1,4 +1,4 @@ var searchData= [ - ['json_5ftype_127',['json_type',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] + ['json_5ftype_132',['json_type',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] ]; diff --git a/search/all_a.js b/search/all_a.js index d63cf5f71..e0bfb1cf2 100644 --- a/search/all_a.js +++ b/search/all_a.js @@ -1,9 +1,9 @@ var searchData= [ - ['key_128',['key',['../classsimdjson_1_1dom_1_1key__value__pair.html#a58c41d937401cfe88ceb6e71d7dbeb45',1,'simdjson::dom::key_value_pair::key()'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a951609ca7a164b499ff19adbe2de7983',1,'simdjson::dom::object::iterator::key()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#a4f49d8e89feb3ca69cf85ce2aea80c0f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field::key()']]], - ['key_5fc_5fstr_129',['key_c_str',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a54a99dcf9c422d5c24f3c570b6d9b6e4',1,'simdjson::dom::object::iterator']]], - ['key_5fequals_130',['key_equals',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a4807eeb1ed5f596b587d0b61dfb550e7',1,'simdjson::dom::object::iterator']]], - ['key_5fequals_5fcase_5finsensitive_131',['key_equals_case_insensitive',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a6d335de77b8c5b731566e48f6cacd95d',1,'simdjson::dom::object::iterator']]], - ['key_5flength_132',['key_length',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a5ad1b60fd5df56d9fdb8bce1e08de88f',1,'simdjson::dom::object::iterator']]], - ['key_5fvalue_5fpair_133',['key_value_pair',['../classsimdjson_1_1dom_1_1key__value__pair.html',1,'simdjson::dom']]] + ['key_133',['key',['../classsimdjson_1_1dom_1_1key__value__pair.html#a58c41d937401cfe88ceb6e71d7dbeb45',1,'simdjson::dom::key_value_pair::key()'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a951609ca7a164b499ff19adbe2de7983',1,'simdjson::dom::object::iterator::key()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#a4f49d8e89feb3ca69cf85ce2aea80c0f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field::key()']]], + ['key_5fc_5fstr_134',['key_c_str',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a54a99dcf9c422d5c24f3c570b6d9b6e4',1,'simdjson::dom::object::iterator']]], + ['key_5fequals_135',['key_equals',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a4807eeb1ed5f596b587d0b61dfb550e7',1,'simdjson::dom::object::iterator']]], + ['key_5fequals_5fcase_5finsensitive_136',['key_equals_case_insensitive',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a6d335de77b8c5b731566e48f6cacd95d',1,'simdjson::dom::object::iterator']]], + ['key_5flength_137',['key_length',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a5ad1b60fd5df56d9fdb8bce1e08de88f',1,'simdjson::dom::object::iterator']]], + ['key_5fvalue_5fpair_138',['key_value_pair',['../classsimdjson_1_1dom_1_1key__value__pair.html',1,'simdjson::dom']]] ]; diff --git a/search/all_b.js b/search/all_b.js index a7d0d9883..23416c71a 100644 --- a/search/all_b.js +++ b/search/all_b.js @@ -1,7 +1,7 @@ var searchData= [ - ['len_134',['len',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a132a95e1147b80c2533d1632185a6a09',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]], - ['length_135',['length',['../structsimdjson_1_1padded__string.html#a863fded7b347718299190ad3f501d38c',1,'simdjson::padded_string']]], - ['load_136',['load',['../classsimdjson_1_1dom_1_1parser.html#ab3e5bbb1974a1932aead90ad63883a23',1,'simdjson::dom::parser::load()'],['../structsimdjson_1_1padded__string.html#aaf017ffe731c738da5eb31c63b987d3a',1,'simdjson::padded_string::load()']]], - ['load_5fmany_137',['load_many',['../classsimdjson_1_1dom_1_1parser.html#a5300851ba21d0a0273a11510fd1c378a',1,'simdjson::dom::parser']]] + ['len_139',['len',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a132a95e1147b80c2533d1632185a6a09',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]], + ['length_140',['length',['../structsimdjson_1_1padded__string.html#a863fded7b347718299190ad3f501d38c',1,'simdjson::padded_string']]], + ['load_141',['load',['../classsimdjson_1_1dom_1_1parser.html#ab3e5bbb1974a1932aead90ad63883a23',1,'simdjson::dom::parser::load()'],['../structsimdjson_1_1padded__string.html#aaf017ffe731c738da5eb31c63b987d3a',1,'simdjson::padded_string::load()']]], + ['load_5fmany_142',['load_many',['../classsimdjson_1_1dom_1_1parser.html#a5300851ba21d0a0273a11510fd1c378a',1,'simdjson::dom::parser']]] ]; diff --git a/search/all_c.js b/search/all_c.js index 4e177a17f..9569cae8a 100644 --- a/search/all_c.js +++ b/search/all_c.js @@ -1,7 +1,7 @@ var searchData= [ - ['max_5fcapacity_138',['max_capacity',['../classsimdjson_1_1dom_1_1parser.html#a8bfde4193783adef9c5f12dfc4da3bc0',1,'simdjson::dom::parser::max_capacity()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a006ad62e81d1ffa0fa898b586095208b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::max_capacity()']]], - ['max_5fdepth_139',['max_depth',['../classsimdjson_1_1dom_1_1parser.html#a209d15b8f87ad69f5fbaccdd5b6b5441',1,'simdjson::dom::parser::max_depth()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a9dd8dfaa40f0faec56e31f976e4c2c94',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::max_depth()']]], - ['memalloc_140',['MEMALLOC',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aa0e71422c8ae80ebaa11d8d74d64737f',1,'simdjson']]], - ['minify_141',['minify',['../namespacesimdjson.html#aeb4ef5cab43d52da3fdd99cb689aff2c',1,'simdjson::minify(T x)'],['../namespacesimdjson.html#a94bb4244756d764cf0ed7de180ae6520',1,'simdjson::minify(const char *buf, size_t len, char *dst, size_t &dst_len) noexcept']]] + ['max_5fcapacity_143',['max_capacity',['../classsimdjson_1_1dom_1_1parser.html#a8bfde4193783adef9c5f12dfc4da3bc0',1,'simdjson::dom::parser::max_capacity()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a006ad62e81d1ffa0fa898b586095208b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::max_capacity()']]], + ['max_5fdepth_144',['max_depth',['../classsimdjson_1_1dom_1_1parser.html#a209d15b8f87ad69f5fbaccdd5b6b5441',1,'simdjson::dom::parser::max_depth()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a9dd8dfaa40f0faec56e31f976e4c2c94',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::max_depth()']]], + ['memalloc_145',['MEMALLOC',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aa0e71422c8ae80ebaa11d8d74d64737f',1,'simdjson']]], + ['minify_146',['minify',['../namespacesimdjson.html#aeb4ef5cab43d52da3fdd99cb689aff2c',1,'simdjson::minify(T x)'],['../namespacesimdjson.html#a94bb4244756d764cf0ed7de180ae6520',1,'simdjson::minify(const char *buf, size_t len, char *dst, size_t &dst_len) noexcept']]] ]; diff --git a/search/all_d.js b/search/all_d.js index 8f930cbe0..4974fd5cb 100644 --- a/search/all_d.js +++ b/search/all_d.js @@ -1,12 +1,13 @@ var searchData= [ - ['n_5fatom_5ferror_142',['N_ATOM_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4e161f7bd0b3ca10f41a220a75de8cde',1,'simdjson']]], - ['name_143',['name',['../classsimdjson_1_1implementation.html#a404c32ec6187ac0fb5b2ec6b5aea4abd',1,'simdjson::implementation']]], - ['no_5fsuch_5ffield_144',['NO_SUCH_FIELD',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4a2c71f8eca438b3f0553a2811bdab9a',1,'simdjson']]], - ['null_145',['null',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330a37a6259cc0c1dae299a7866489dff0bd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], - ['number_146',['number',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330ab1bc248a7ff2b2e95569f56de68615df',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], - ['number_5ferror_147',['NUMBER_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9adfcabbbd1ddb0843a0f320e062866ae8',1,'simdjson']]], - ['number_5fof_5fslots_148',['number_of_slots',['../classsimdjson_1_1dom_1_1array.html#a26e66312190e016c22093292974490ff',1,'simdjson::dom::array']]], - ['number_5fout_5fof_5frange_149',['NUMBER_OUT_OF_RANGE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a8c779dcc8fb73a4eb8891af3ef65eebb',1,'simdjson']]], - ['number_5ftype_150',['number_type',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ad1157b391ebf205df7e747d753746f93',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] + ['n_5fatom_5ferror_147',['N_ATOM_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4e161f7bd0b3ca10f41a220a75de8cde',1,'simdjson']]], + ['name_148',['name',['../classsimdjson_1_1implementation.html#a404c32ec6187ac0fb5b2ec6b5aea4abd',1,'simdjson::implementation']]], + ['no_5fsuch_5ffield_149',['NO_SUCH_FIELD',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4a2c71f8eca438b3f0553a2811bdab9a',1,'simdjson']]], + ['null_150',['null',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330a37a6259cc0c1dae299a7866489dff0bd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], + ['null_5fvalue_151',['NULL_VALUE',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aaa9f0aff2067f91437e50e4872b229e6a',1,'simdjson::dom']]], + ['number_152',['number',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330ab1bc248a7ff2b2e95569f56de68615df',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], + ['number_5ferror_153',['NUMBER_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9adfcabbbd1ddb0843a0f320e062866ae8',1,'simdjson']]], + ['number_5fof_5fslots_154',['number_of_slots',['../classsimdjson_1_1dom_1_1array.html#a26e66312190e016c22093292974490ff',1,'simdjson::dom::array']]], + ['number_5fout_5fof_5frange_155',['NUMBER_OUT_OF_RANGE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a8c779dcc8fb73a4eb8891af3ef65eebb',1,'simdjson']]], + ['number_5ftype_156',['number_type',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a6a2b39df6a1ac51d9fbb7b39a1fcf89c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] ]; diff --git a/search/all_e.js b/search/all_e.js index 29a58fe9f..06c25fae4 100644 --- a/search/all_e.js +++ b/search/all_e.js @@ -1,29 +1,30 @@ var searchData= [ - ['object_151',['object',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330aa8cfde6331bd59eb2ac96f8911c4b666',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object()'],['../classsimdjson_1_1dom_1_1object.html#ae2e1a8cbaab9d352495d1dc993407be3',1,'simdjson::dom::object::object()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a034b27d7ff75832a574c2069af267111',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::object()'],['../classsimdjson_1_1dom_1_1object.html',1,'simdjson::dom::object'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object']]], - ['object_20iteration_152',['Object iteration',['../group__object.html',1,'']]], - ['object_5fiterator_153',['object_iterator',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html#a9fce67dabeb5dcccd16fa531febec666',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object_iterator::object_iterator()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object_iterator']]], - ['open_5fcontainer_154',['open_container',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1open__container.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['open_5fcontainers_155',['open_containers',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a9c67c6c782f1296319a58ec1586f2329',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]], - ['operator_20array_156',['operator array',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a93756146a65e835b9358cc652dc53396',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator array()'],['../classsimdjson_1_1dom_1_1element.html#a71d6bfa627dd66e202f8b402f91a44ac',1,'simdjson::dom::element::operator array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a08307c0a5552cf8cb06613ed1de48eac',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator array()']]], - ['operator_20bool_157',['operator bool',['../classsimdjson_1_1dom_1_1element.html#ab036e52a73d5bd046e1f2650a31dab30',1,'simdjson::dom::element::operator bool()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a7df7ba140c9d6398fef2c6963da82230',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator bool()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#af7b51d9048d388235f3936c8fa30a2f7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator bool()']]], - ['operator_20const_20char_20_2a_158',['operator const char *',['../classsimdjson_1_1dom_1_1element.html#a8f9569b40dd2b23aab9fbf2229749589',1,'simdjson::dom::element']]], - ['operator_20double_159',['operator double',['../classsimdjson_1_1dom_1_1element.html#a743b5f1ef4202d8fb8fb317e612385f3',1,'simdjson::dom::element::operator double()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ae052e098bfbfde398845060a8d4f572f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator double()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a53f99cedf58e62c1382a4d5a585e05a0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator double()']]], - ['operator_20int64_5ft_160',['operator int64_t',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5d50aa0d396fc49855d3c0c571b07a25',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator int64_t()'],['../classsimdjson_1_1dom_1_1element.html#afb98fdfcb6ddf19071cd2300613218d3',1,'simdjson::dom::element::operator int64_t()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a30f182e71d3c13d2656ba5983862be57',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator int64_t()']]], - ['operator_20object_161',['operator object',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a6cd27fe6dc9062b5380db757d49c3f7b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator object()'],['../classsimdjson_1_1dom_1_1element.html#a23f4d8c38309b0184e658d8a9697a177',1,'simdjson::dom::element::operator object()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a89519c599fd938a6a750262111fc5757',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator object()']]], - ['operator_20padded_5fstring_5fview_162',['operator padded_string_view',['../structsimdjson_1_1padded__string.html#a0e5b8e8917478af4e82e023c2efa40e9',1,'simdjson::padded_string']]], - ['operator_20raw_5fjson_5fstring_163',['operator raw_json_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a78411bf36298e3468ac83f3562b75d83',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator raw_json_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a85d69a32b4b95f353abe6214ecc98619',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator raw_json_string()']]], - ['operator_20t_26_26_164',['operator T&&',['../structsimdjson_1_1simdjson__result.html#afcce23c64894ec135fe8c2d255d2121b',1,'simdjson::simdjson_result::operator T&&()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a11133790f4386ea4d11567a3a0806096',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::operator T&&()']]], - ['operator_20uint64_5ft_165',['operator uint64_t',['../classsimdjson_1_1dom_1_1element.html#ae3c0226046e29cfb0e868c5251a87e53',1,'simdjson::dom::element::operator uint64_t()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a847db7139319155ef5fa2d4af7063163',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator uint64_t()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#afb7be23d4f1006d5eae234d8c8c8d286',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator uint64_t()']]], - ['operator_20value_166',['operator value',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ad12185e1993ebcad73eb5ce82f5de8f7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['operator_21_3d_167',['operator!=',['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a56c69d73c7e424e008a28771661ab218',1,'simdjson::dom::document_stream::iterator::operator!=()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a05396b8e8322363b523b3bf9730a31f1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::operator!=()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#abbca17b48bd6c2b045b659076f1f64ce',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator!=()'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a1da5ce328cc2609432be961736c6e810',1,'simdjson::dom::object::iterator::operator!=()'],['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a2680a46eeece638bc352bcf6a169bcf6',1,'simdjson::dom::array::iterator::operator!=(const iterator &other) const noexcept']]], - ['operator_2a_168',['operator*',['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a90254656d4e7a8826246d1f931647eff',1,'simdjson::dom::array::iterator::operator*()'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a09b193fe348fa8a267b96edd96f7515e',1,'simdjson::dom::document_stream::iterator::operator*()'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a688f6c7f451602bb3385a93252c0828a',1,'simdjson::dom::object::iterator::operator*()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a1577fb5a95f92a4a1aaa8eee6440d572',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator*()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a5fe3ce985cc1921d5917667d6b25841b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::operator*() noexcept']]], - ['operator_2b_2b_169',['operator++',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a03e0c8d93b86a18b10370d51b99548ef',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::operator++()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a55e0ae33e5e5835c841fd082edab5937',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator++()'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a83b3c467632c017400f95ff05d2367b3',1,'simdjson::dom::object::iterator::operator++(int) noexcept'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#aa26738ad08b7de3be4621a75863118ab',1,'simdjson::dom::object::iterator::operator++() noexcept'],['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a46454681bd5e3a938c04eb89210e7966',1,'simdjson::dom::array::iterator::operator++(int) noexcept'],['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a6ec91111a2bcc9e378d30b47b613fac5',1,'simdjson::dom::array::iterator::operator++() noexcept'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a7b05ed75aa2b2a6d3a17204b9863956a',1,'simdjson::dom::document_stream::iterator::operator++()']]], - ['operator_3c_3c_170',['operator<<',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a386f80798c223c5fdbfc4dd9066a6b99',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson_result< json_type > &type) noexcept(false)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ab10943c6107de5337f376a6939f817af',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, json_type type) noexcept'],['../namespacesimdjson.html#a43514fe76c3095e45f30a050a9551d27',1,'simdjson::operator<<()'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac3a4f6af474f2b5f6d749f7452bb5477',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value x)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a24f9bbfe8b5a3017b4dd4b72dbccec4d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array value)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a6f753d5e1bc479321c51b54392a96a65',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document &value)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ae52a82c2f754a47eb9dac12223b3311d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object value)'],['../namespacesimdjson.html#a537445bb236ae76d2b5559b1851b7108',1,'simdjson::operator<<(std::ostream &out, const padded_string &s)'],['../namespacesimdjson.html#a39bbbf605c0068e4a65c2d8885727fc9',1,'simdjson::operator<<(std::ostream &out, simdjson_result< padded_string > &s) noexcept(false)'],['../namespacesimdjson.html#a61a74357c3e9313ad84c5f1243fdf581',1,'simdjson::operator<<(std::ostream &out, simdjson_result< padded_string_view > &s) noexcept(false)']]], - ['operator_3d_171',['operator=',['../structsimdjson_1_1padded__string.html#aa43b3a8e0df4edcf960f04441dd9b930',1,'simdjson::padded_string::operator=()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#ac3c10596a0934f4f5375b986a35f90db',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::operator=()'],['../classsimdjson_1_1dom_1_1parser.html#af5b61dda345cef1feba7c4529dfe0259',1,'simdjson::dom::parser::operator=()'],['../classsimdjson_1_1dom_1_1document__stream.html#a162d002972b41bbb7d8e4021341e15ba',1,'simdjson::dom::document_stream::operator=()'],['../classsimdjson_1_1dom_1_1document.html#a336814aa587d9ca605e1548b22b2b80c',1,'simdjson::dom::document::operator=()']]], - ['operator_3d_3d_172',['operator==',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#aab771b17058b0c93bdd0a8679c2c4d84',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator==()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a20cd55e63cf5bdc1561f771b4db1ac1b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator==()']]], - ['operator_5b_5d_173',['operator[]',['../classsimdjson_1_1dom_1_1object.html#a2691ceae488be203aac2d5ef5b67347f',1,'simdjson::dom::object::operator[](const char *key) const noexcept'],['../classsimdjson_1_1dom_1_1object.html#acc66a2f2eb74fbe359d4064531764f50',1,'simdjson::dom::object::operator[](std::string_view key) const noexcept'],['../classsimdjson_1_1dom_1_1element.html#a367d22eeabc1881a8eb18bae2f2ba3b8',1,'simdjson::dom::element::operator[](const char *key) const noexcept'],['../classsimdjson_1_1dom_1_1element.html#aca693f57d73a5ce95d1f7bedf67289b7',1,'simdjson::dom::element::operator[](std::string_view key) const noexcept']]], - ['out_5fof_5fbounds_174',['OUT_OF_BOUNDS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a3f94172e04ae52a978ea62157140b0de',1,'simdjson']]], - ['out_5fof_5forder_5fiteration_175',['OUT_OF_ORDER_ITERATION',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a351bcafefbbc80a6dadc1ea6c27a35e6',1,'simdjson']]], - ['string_5fview_176',['string_view',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8e5f2ff46639e6c1cffb73d4e071e491',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::string_view()'],['../classsimdjson_1_1dom_1_1element.html#a83adcf723abff34d7c1e8ec0e69d967b',1,'simdjson::dom::element::string_view()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a30e8df60ace82837a17e52d5e457ac52',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::string_view()'],['../structsimdjson_1_1padded__string.html#a4bf80c11155b8067a87bd76762bee23b',1,'simdjson::padded_string::string_view()']]] + ['object_157',['OBJECT',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa8eee8e217391199668cbac89472ace53',1,'simdjson::dom']]], + ['object_158',['object',['../classsimdjson_1_1dom_1_1object.html#ae2e1a8cbaab9d352495d1dc993407be3',1,'simdjson::dom::object::object()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a034b27d7ff75832a574c2069af267111',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::object()'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330aa8cfde6331bd59eb2ac96f8911c4b666',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object()'],['../classsimdjson_1_1dom_1_1object.html',1,'simdjson::dom::object'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object']]], + ['object_20iteration_159',['Object iteration',['../group__object.html',1,'']]], + ['object_5fiterator_160',['object_iterator',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html#a9fce67dabeb5dcccd16fa531febec666',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object_iterator::object_iterator()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object_iterator']]], + ['open_5fcontainer_161',['open_container',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1open__container.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['open_5fcontainers_162',['open_containers',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a9c67c6c782f1296319a58ec1586f2329',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]], + ['operator_20array_163',['operator array',['../classsimdjson_1_1dom_1_1element.html#a71d6bfa627dd66e202f8b402f91a44ac',1,'simdjson::dom::element::operator array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a08307c0a5552cf8cb06613ed1de48eac',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a93756146a65e835b9358cc652dc53396',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator array() noexcept(false)']]], + ['operator_20bool_164',['operator bool',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#af7b51d9048d388235f3936c8fa30a2f7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator bool()'],['../classsimdjson_1_1dom_1_1element.html#ab036e52a73d5bd046e1f2650a31dab30',1,'simdjson::dom::element::operator bool()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a7df7ba140c9d6398fef2c6963da82230',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator bool()']]], + ['operator_20const_20char_20_2a_165',['operator const char *',['../classsimdjson_1_1dom_1_1element.html#a8f9569b40dd2b23aab9fbf2229749589',1,'simdjson::dom::element']]], + ['operator_20double_166',['operator double',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a53f99cedf58e62c1382a4d5a585e05a0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator double()'],['../classsimdjson_1_1dom_1_1element.html#a743b5f1ef4202d8fb8fb317e612385f3',1,'simdjson::dom::element::operator double()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ae052e098bfbfde398845060a8d4f572f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator double()']]], + ['operator_20int64_5ft_167',['operator int64_t',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a30f182e71d3c13d2656ba5983862be57',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator int64_t()'],['../classsimdjson_1_1dom_1_1element.html#afb98fdfcb6ddf19071cd2300613218d3',1,'simdjson::dom::element::operator int64_t()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5d50aa0d396fc49855d3c0c571b07a25',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator int64_t()']]], + ['operator_20object_168',['operator object',['../classsimdjson_1_1dom_1_1element.html#a23f4d8c38309b0184e658d8a9697a177',1,'simdjson::dom::element::operator object()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a6cd27fe6dc9062b5380db757d49c3f7b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator object()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a89519c599fd938a6a750262111fc5757',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator object()']]], + ['operator_20padded_5fstring_5fview_169',['operator padded_string_view',['../structsimdjson_1_1padded__string.html#a0e5b8e8917478af4e82e023c2efa40e9',1,'simdjson::padded_string']]], + ['operator_20raw_5fjson_5fstring_170',['operator raw_json_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a85d69a32b4b95f353abe6214ecc98619',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator raw_json_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a78411bf36298e3468ac83f3562b75d83',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator raw_json_string()']]], + ['operator_20t_26_26_171',['operator T&&',['../structsimdjson_1_1simdjson__result.html#afcce23c64894ec135fe8c2d255d2121b',1,'simdjson::simdjson_result::operator T&&()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a11133790f4386ea4d11567a3a0806096',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::operator T&&()']]], + ['operator_20uint64_5ft_172',['operator uint64_t',['../classsimdjson_1_1dom_1_1element.html#ae3c0226046e29cfb0e868c5251a87e53',1,'simdjson::dom::element::operator uint64_t()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a847db7139319155ef5fa2d4af7063163',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator uint64_t()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#afb7be23d4f1006d5eae234d8c8c8d286',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator uint64_t()']]], + ['operator_20value_173',['operator value',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ad12185e1993ebcad73eb5ce82f5de8f7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['operator_21_3d_174',['operator!=',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a1da5ce328cc2609432be961736c6e810',1,'simdjson::dom::object::iterator::operator!=()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a05396b8e8322363b523b3bf9730a31f1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::operator!=()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#abbca17b48bd6c2b045b659076f1f64ce',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator!=()'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a56c69d73c7e424e008a28771661ab218',1,'simdjson::dom::document_stream::iterator::operator!=()'],['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a2680a46eeece638bc352bcf6a169bcf6',1,'simdjson::dom::array::iterator::operator!=(const iterator &other) const noexcept']]], + ['operator_2a_175',['operator*',['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a90254656d4e7a8826246d1f931647eff',1,'simdjson::dom::array::iterator::operator*()'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a09b193fe348fa8a267b96edd96f7515e',1,'simdjson::dom::document_stream::iterator::operator*()'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a688f6c7f451602bb3385a93252c0828a',1,'simdjson::dom::object::iterator::operator*()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a1577fb5a95f92a4a1aaa8eee6440d572',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator*()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a5fe3ce985cc1921d5917667d6b25841b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::operator*()']]], + ['operator_2b_2b_176',['operator++',['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a46454681bd5e3a938c04eb89210e7966',1,'simdjson::dom::array::iterator::operator++()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a03e0c8d93b86a18b10370d51b99548ef',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::operator++()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a55e0ae33e5e5835c841fd082edab5937',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator++()'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a83b3c467632c017400f95ff05d2367b3',1,'simdjson::dom::object::iterator::operator++()'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a7b05ed75aa2b2a6d3a17204b9863956a',1,'simdjson::dom::document_stream::iterator::operator++()'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#aa26738ad08b7de3be4621a75863118ab',1,'simdjson::dom::object::iterator::operator++()'],['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a6ec91111a2bcc9e378d30b47b613fac5',1,'simdjson::dom::array::iterator::operator++()']]], + ['operator_3c_3c_177',['operator<<',['../namespacesimdjson_1_1dom.html#aa5dbd189409df6b2672310006c92463f',1,'simdjson::dom::operator<<(std::ostream &out, simdjson::dom::element value)'],['../namespacesimdjson_1_1dom.html#a43347827393e037c8027ddccd6ec994b',1,'simdjson::dom::operator<<(std::ostream &out, simdjson::dom::array value)'],['../namespacesimdjson_1_1dom.html#a9b9af1992350587324412b3ee5b3347a',1,'simdjson::dom::operator<<(std::ostream &out, simdjson::dom::object value)'],['../namespacesimdjson.html#a43514fe76c3095e45f30a050a9551d27',1,'simdjson::operator<<()'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ab10943c6107de5337f376a6939f817af',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, json_type type) noexcept'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a386f80798c223c5fdbfc4dd9066a6b99',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson_result< json_type > &type) noexcept(false)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac3a4f6af474f2b5f6d749f7452bb5477',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value x)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a24f9bbfe8b5a3017b4dd4b72dbccec4d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array value)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a6f753d5e1bc479321c51b54392a96a65',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document &value)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ae52a82c2f754a47eb9dac12223b3311d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object value)'],['../namespacesimdjson.html#a537445bb236ae76d2b5559b1851b7108',1,'simdjson::operator<<(std::ostream &out, const padded_string &s)'],['../namespacesimdjson.html#a39bbbf605c0068e4a65c2d8885727fc9',1,'simdjson::operator<<(std::ostream &out, simdjson_result< padded_string > &s) noexcept(false)'],['../namespacesimdjson.html#a61a74357c3e9313ad84c5f1243fdf581',1,'simdjson::operator<<(std::ostream &out, simdjson_result< padded_string_view > &s) noexcept(false)']]], + ['operator_3d_178',['operator=',['../classsimdjson_1_1dom_1_1parser.html#af5b61dda345cef1feba7c4529dfe0259',1,'simdjson::dom::parser::operator=()'],['../structsimdjson_1_1padded__string.html#aa43b3a8e0df4edcf960f04441dd9b930',1,'simdjson::padded_string::operator=()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#ac3c10596a0934f4f5375b986a35f90db',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::operator=()'],['../classsimdjson_1_1dom_1_1document__stream.html#a162d002972b41bbb7d8e4021341e15ba',1,'simdjson::dom::document_stream::operator=()'],['../classsimdjson_1_1dom_1_1document.html#a336814aa587d9ca605e1548b22b2b80c',1,'simdjson::dom::document::operator=()']]], + ['operator_3d_3d_179',['operator==',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a20cd55e63cf5bdc1561f771b4db1ac1b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator==()'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#aab771b17058b0c93bdd0a8679c2c4d84',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator==()']]], + ['operator_5b_5d_180',['operator[]',['../classsimdjson_1_1dom_1_1object.html#a2691ceae488be203aac2d5ef5b67347f',1,'simdjson::dom::object::operator[](const char *key) const noexcept'],['../classsimdjson_1_1dom_1_1object.html#acc66a2f2eb74fbe359d4064531764f50',1,'simdjson::dom::object::operator[](std::string_view key) const noexcept'],['../classsimdjson_1_1dom_1_1element.html#a367d22eeabc1881a8eb18bae2f2ba3b8',1,'simdjson::dom::element::operator[](const char *key) const noexcept'],['../classsimdjson_1_1dom_1_1element.html#aca693f57d73a5ce95d1f7bedf67289b7',1,'simdjson::dom::element::operator[](std::string_view key) const noexcept']]], + ['out_5fof_5fbounds_181',['OUT_OF_BOUNDS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a3f94172e04ae52a978ea62157140b0de',1,'simdjson']]], + ['out_5fof_5forder_5fiteration_182',['OUT_OF_ORDER_ITERATION',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a351bcafefbbc80a6dadc1ea6c27a35e6',1,'simdjson']]], + ['string_5fview_183',['string_view',['../classsimdjson_1_1dom_1_1element.html#a83adcf723abff34d7c1e8ec0e69d967b',1,'simdjson::dom::element::string_view()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a30e8df60ace82837a17e52d5e457ac52',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::string_view()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8e5f2ff46639e6c1cffb73d4e071e491',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::string_view()'],['../structsimdjson_1_1padded__string.html#a4bf80c11155b8067a87bd76762bee23b',1,'simdjson::padded_string::string_view()']]] ]; diff --git a/search/all_f.js b/search/all_f.js index a8e6946e5..383fb7907 100644 --- a/search/all_f.js +++ b/search/all_f.js @@ -1,15 +1,15 @@ var searchData= [ - ['padded_5fstring_177',['padded_string',['../structsimdjson_1_1padded__string.html#a8e10a3a5a46a4d58459b052975b0bf66',1,'simdjson::padded_string::padded_string() noexcept'],['../structsimdjson_1_1padded__string.html#ac06ec74c78934565cdf50df163d35476',1,'simdjson::padded_string::padded_string(size_t length) noexcept'],['../structsimdjson_1_1padded__string.html#a1b15f9345c0215e7548df1aa0105de98',1,'simdjson::padded_string::padded_string(const char *data, size_t length) noexcept'],['../structsimdjson_1_1padded__string.html#a44fb0f219f05528e606f79dab7c32482',1,'simdjson::padded_string::padded_string(const std::string &str_) noexcept'],['../structsimdjson_1_1padded__string.html#a6199f5bf259fcac114addeef569cf5a5',1,'simdjson::padded_string::padded_string(std::string_view sv_) noexcept'],['../structsimdjson_1_1padded__string.html#a952eaf7ff8ddf252d9c00a693978a4da',1,'simdjson::padded_string::padded_string(padded_string &&o) noexcept'],['../structsimdjson_1_1padded__string.html',1,'simdjson::padded_string']]], - ['padded_5fstring_5fview_178',['padded_string_view',['../classsimdjson_1_1padded__string__view.html#a12b33830793e7ab1953b961088a83c3d',1,'simdjson::padded_string_view::padded_string_view(std::string_view s, size_t capacity) noexcept'],['../classsimdjson_1_1padded__string__view.html#aae57856a217294ac218b6372a5e37d9a',1,'simdjson::padded_string_view::padded_string_view(const std::string &s) noexcept'],['../classsimdjson_1_1padded__string__view.html#aa338ad56304bc79e6ca1fab64af41de0',1,'simdjson::padded_string_view::padded_string_view() noexcept=default'],['../classsimdjson_1_1padded__string__view.html#a47ac0063f7dd0ffd832c5e4439f2de30',1,'simdjson::padded_string_view::padded_string_view(const char *s, size_t len, size_t capacity) noexcept'],['../classsimdjson_1_1padded__string__view.html#a184b54acd28046a9c4f2a6cfa5419779',1,'simdjson::padded_string_view::padded_string_view(const uint8_t *s, size_t len, size_t capacity) noexcept'],['../classsimdjson_1_1padded__string__view.html',1,'simdjson::padded_string_view']]], - ['padding_179',['padding',['../classsimdjson_1_1padded__string__view.html#a934e7272d22d6024383eafe07b06773c',1,'simdjson::padded_string_view']]], - ['parse_180',['parse',['../classsimdjson_1_1dom_1_1parser.html#a16c7d1e28125ef7d5703244483f70984',1,'simdjson::dom::parser']]], - ['parse_5finto_5fdocument_181',['parse_into_document',['../classsimdjson_1_1dom_1_1parser.html#a1afc4d3b429363b503a5605d66081e30',1,'simdjson::dom::parser']]], - ['parse_5fmany_182',['parse_many',['../md_doc_parse_many.html',1,'(Global Namespace)'],['../classsimdjson_1_1dom_1_1parser.html#afb18710d2e2ef0fd40dda4887282bdb2',1,'simdjson::dom::parser::parse_many()']]], - ['parsedjson_183',['ParsedJson',['../namespacesimdjson.html#a9245ff68919610377256bb9b21070e2a',1,'simdjson']]], - ['parser_184',['parser',['../classsimdjson_1_1dom_1_1parser.html#a09370efac9e1b7d9b4a8349332e026c3',1,'simdjson::dom::parser::parser(size_t max_capacity=SIMDJSON_MAXSIZE_BYTES) noexcept'],['../classsimdjson_1_1dom_1_1parser.html#a3f3c80565fe63857e2901c48e7bed64d',1,'simdjson::dom::parser::parser(parser &&other) noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a76abd4d78f0c26d80d3bf436ce212e00',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::parser()'],['../classsimdjson_1_1dom_1_1parser.html',1,'simdjson::dom::parser'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], - ['parser_5fin_5fuse_185',['PARSER_IN_USE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ae9067bb5cb6283141b1c66466005ac0d',1,'simdjson']]], - ['payload_186',['payload',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#aa17e81138859bcef934d9502a9852049',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], - ['performance_20notes_187',['Performance Notes',['../md_doc_performance.html',1,'']]], - ['prettify_188',['prettify',['../namespacesimdjson.html#aed443864cc94c09c3f88eea39f8ce645',1,'simdjson']]] + ['padded_5fstring_184',['padded_string',['../structsimdjson_1_1padded__string.html#a8e10a3a5a46a4d58459b052975b0bf66',1,'simdjson::padded_string::padded_string() noexcept'],['../structsimdjson_1_1padded__string.html#ac06ec74c78934565cdf50df163d35476',1,'simdjson::padded_string::padded_string(size_t length) noexcept'],['../structsimdjson_1_1padded__string.html#a1b15f9345c0215e7548df1aa0105de98',1,'simdjson::padded_string::padded_string(const char *data, size_t length) noexcept'],['../structsimdjson_1_1padded__string.html#a44fb0f219f05528e606f79dab7c32482',1,'simdjson::padded_string::padded_string(const std::string &str_) noexcept'],['../structsimdjson_1_1padded__string.html#a6199f5bf259fcac114addeef569cf5a5',1,'simdjson::padded_string::padded_string(std::string_view sv_) noexcept'],['../structsimdjson_1_1padded__string.html#a952eaf7ff8ddf252d9c00a693978a4da',1,'simdjson::padded_string::padded_string(padded_string &&o) noexcept'],['../structsimdjson_1_1padded__string.html',1,'simdjson::padded_string']]], + ['padded_5fstring_5fview_185',['padded_string_view',['../classsimdjson_1_1padded__string__view.html#a12b33830793e7ab1953b961088a83c3d',1,'simdjson::padded_string_view::padded_string_view(std::string_view s, size_t capacity) noexcept'],['../classsimdjson_1_1padded__string__view.html#aae57856a217294ac218b6372a5e37d9a',1,'simdjson::padded_string_view::padded_string_view(const std::string &s) noexcept'],['../classsimdjson_1_1padded__string__view.html#aa338ad56304bc79e6ca1fab64af41de0',1,'simdjson::padded_string_view::padded_string_view() noexcept=default'],['../classsimdjson_1_1padded__string__view.html#a47ac0063f7dd0ffd832c5e4439f2de30',1,'simdjson::padded_string_view::padded_string_view(const char *s, size_t len, size_t capacity) noexcept'],['../classsimdjson_1_1padded__string__view.html#a184b54acd28046a9c4f2a6cfa5419779',1,'simdjson::padded_string_view::padded_string_view(const uint8_t *s, size_t len, size_t capacity) noexcept'],['../classsimdjson_1_1padded__string__view.html',1,'simdjson::padded_string_view']]], + ['padding_186',['padding',['../classsimdjson_1_1padded__string__view.html#a934e7272d22d6024383eafe07b06773c',1,'simdjson::padded_string_view']]], + ['parse_187',['parse',['../classsimdjson_1_1dom_1_1parser.html#a16c7d1e28125ef7d5703244483f70984',1,'simdjson::dom::parser']]], + ['parse_5finto_5fdocument_188',['parse_into_document',['../classsimdjson_1_1dom_1_1parser.html#a1afc4d3b429363b503a5605d66081e30',1,'simdjson::dom::parser']]], + ['parse_5fmany_189',['parse_many',['../md_doc_parse_many.html',1,'(Global Namespace)'],['../classsimdjson_1_1dom_1_1parser.html#afb18710d2e2ef0fd40dda4887282bdb2',1,'simdjson::dom::parser::parse_many()']]], + ['parsedjson_190',['ParsedJson',['../namespacesimdjson.html#a9245ff68919610377256bb9b21070e2a',1,'simdjson']]], + ['parser_191',['parser',['../classsimdjson_1_1dom_1_1parser.html#a09370efac9e1b7d9b4a8349332e026c3',1,'simdjson::dom::parser::parser(size_t max_capacity=SIMDJSON_MAXSIZE_BYTES) noexcept'],['../classsimdjson_1_1dom_1_1parser.html#a3f3c80565fe63857e2901c48e7bed64d',1,'simdjson::dom::parser::parser(parser &&other) noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a76abd4d78f0c26d80d3bf436ce212e00',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::parser()'],['../classsimdjson_1_1dom_1_1parser.html',1,'simdjson::dom::parser'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], + ['parser_5fin_5fuse_192',['PARSER_IN_USE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ae9067bb5cb6283141b1c66466005ac0d',1,'simdjson']]], + ['payload_193',['payload',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#aa17e81138859bcef934d9502a9852049',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], + ['performance_20notes_194',['Performance Notes',['../md_doc_performance.html',1,'']]], + ['prettify_195',['prettify',['../namespacesimdjson.html#aed443864cc94c09c3f88eea39f8ce645',1,'simdjson']]] ]; diff --git a/search/classes_0.js b/search/classes_0.js index 2f951ce66..df82cfbf6 100644 --- a/search/classes_0.js +++ b/search/classes_0.js @@ -1,5 +1,5 @@ var searchData= [ - ['array_279',['array',['../classsimdjson_1_1dom_1_1array.html',1,'simdjson::dom::array'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array']]], - ['array_5fiterator_280',['array_iterator',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] + ['array_295',['array',['../classsimdjson_1_1dom_1_1array.html',1,'simdjson::dom::array'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array']]], + ['array_5fiterator_296',['array_iterator',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] ]; diff --git a/search/classes_1.js b/search/classes_1.js index 1cc3f7e18..ca3e5147d 100644 --- a/search/classes_1.js +++ b/search/classes_1.js @@ -1,7 +1,7 @@ var searchData= [ - ['document_281',['document',['../classsimdjson_1_1dom_1_1document.html',1,'simdjson::dom::document'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['document_5freference_282',['document_reference',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], - ['document_5fstream_283',['document_stream',['../classsimdjson_1_1dom_1_1document__stream.html',1,'simdjson::dom::document_stream'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream']]], - ['dom_5fparser_5fimplementation_284',['dom_parser_implementation',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]] + ['document_297',['document',['../classsimdjson_1_1dom_1_1document.html',1,'simdjson::dom::document'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['document_5freference_298',['document_reference',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], + ['document_5fstream_299',['document_stream',['../classsimdjson_1_1dom_1_1document__stream.html',1,'simdjson::dom::document_stream'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream']]], + ['dom_5fparser_5fimplementation_300',['dom_parser_implementation',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]] ]; diff --git a/search/classes_2.js b/search/classes_2.js index 5c72bf549..e863eebad 100644 --- a/search/classes_2.js +++ b/search/classes_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['element_285',['element',['../classsimdjson_1_1dom_1_1element.html',1,'simdjson::dom']]] + ['element_301',['element',['../classsimdjson_1_1dom_1_1element.html',1,'simdjson::dom']]] ]; diff --git a/search/classes_3.js b/search/classes_3.js index 7b1fd5317..a94ae9204 100644 --- a/search/classes_3.js +++ b/search/classes_3.js @@ -1,4 +1,4 @@ var searchData= [ - ['field_286',['field',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] + ['field_302',['field',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] ]; diff --git a/search/classes_4.js b/search/classes_4.js index ae14e7d0d..50af48929 100644 --- a/search/classes_4.js +++ b/search/classes_4.js @@ -1,21 +1,21 @@ var searchData= [ - ['implementation_287',['implementation',['../classsimdjson_1_1implementation.html',1,'simdjson']]], - ['implementation_5fsimdjson_5fresult_5fbase_288',['implementation_simdjson_result_base',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_20_3e_289',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::array >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_5fiterator_20_3e_290',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::array_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_20_3e_291',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::document >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5freference_20_3e_292',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::document_reference >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5fstream_20_3e_293',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::document_stream >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3afield_20_3e_294',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::field >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5fiterator_20_3e_295',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::json_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5ftype_20_3e_296',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::json_type >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_20_3e_297',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::object >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_5fiterator_20_3e_298',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::object_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aparser_20_3e_299',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::parser >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3araw_5fjson_5fstring_20_3e_300',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3atoken_5fiterator_20_3e_301',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::token_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_20_3e_302',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::value >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_5fiterator_20_3e_303',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::value_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['iterator_304',['iterator',['../classsimdjson_1_1dom_1_1array_1_1iterator.html',1,'simdjson::dom::array::iterator'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html',1,'simdjson::dom::document_stream::iterator'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html',1,'simdjson::dom::object::iterator'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator']]] + ['implementation_303',['implementation',['../classsimdjson_1_1implementation.html',1,'simdjson']]], + ['implementation_5fsimdjson_5fresult_5fbase_304',['implementation_simdjson_result_base',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_20_3e_305',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::array >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_5fiterator_20_3e_306',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::array_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_20_3e_307',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::document >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5freference_20_3e_308',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::document_reference >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5fstream_20_3e_309',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::document_stream >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3afield_20_3e_310',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::field >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5fiterator_20_3e_311',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::json_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5ftype_20_3e_312',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::json_type >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_20_3e_313',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::object >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_5fiterator_20_3e_314',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::object_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aparser_20_3e_315',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::parser >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3araw_5fjson_5fstring_20_3e_316',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3atoken_5fiterator_20_3e_317',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::token_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_20_3e_318',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::value >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['implementation_5fsimdjson_5fresult_5fbase_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_5fiterator_20_3e_319',['implementation_simdjson_result_base< SIMDJSON_IMPLEMENTATION::ondemand::value_iterator >',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['iterator_320',['iterator',['../classsimdjson_1_1dom_1_1array_1_1iterator.html',1,'simdjson::dom::array::iterator'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html',1,'simdjson::dom::document_stream::iterator'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html',1,'simdjson::dom::object::iterator'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator']]] ]; diff --git a/search/classes_5.js b/search/classes_5.js index 9b998cc26..aa9cfee03 100644 --- a/search/classes_5.js +++ b/search/classes_5.js @@ -1,4 +1,4 @@ var searchData= [ - ['key_5fvalue_5fpair_305',['key_value_pair',['../classsimdjson_1_1dom_1_1key__value__pair.html',1,'simdjson::dom']]] + ['key_5fvalue_5fpair_321',['key_value_pair',['../classsimdjson_1_1dom_1_1key__value__pair.html',1,'simdjson::dom']]] ]; diff --git a/search/classes_6.js b/search/classes_6.js index 07c1c1a2e..d8d02b7ab 100644 --- a/search/classes_6.js +++ b/search/classes_6.js @@ -1,4 +1,4 @@ var searchData= [ - ['number_306',['number',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] + ['number_322',['number',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] ]; diff --git a/search/classes_7.js b/search/classes_7.js index 777db8d77..99c82f956 100644 --- a/search/classes_7.js +++ b/search/classes_7.js @@ -1,6 +1,6 @@ var searchData= [ - ['object_307',['object',['../classsimdjson_1_1dom_1_1object.html',1,'simdjson::dom::object'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object']]], - ['object_5fiterator_308',['object_iterator',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], - ['open_5fcontainer_309',['open_container',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1open__container.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]] + ['object_323',['object',['../classsimdjson_1_1dom_1_1object.html',1,'simdjson::dom::object'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object']]], + ['object_5fiterator_324',['object_iterator',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], + ['open_5fcontainer_325',['open_container',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1open__container.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]] ]; diff --git a/search/classes_8.js b/search/classes_8.js index a82646dca..1d184ff3e 100644 --- a/search/classes_8.js +++ b/search/classes_8.js @@ -1,6 +1,6 @@ var searchData= [ - ['padded_5fstring_310',['padded_string',['../structsimdjson_1_1padded__string.html',1,'simdjson']]], - ['padded_5fstring_5fview_311',['padded_string_view',['../classsimdjson_1_1padded__string__view.html',1,'simdjson']]], - ['parser_312',['parser',['../classsimdjson_1_1dom_1_1parser.html',1,'simdjson::dom::parser'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]] + ['padded_5fstring_326',['padded_string',['../structsimdjson_1_1padded__string.html',1,'simdjson']]], + ['padded_5fstring_5fview_327',['padded_string_view',['../classsimdjson_1_1padded__string__view.html',1,'simdjson']]], + ['parser_328',['parser',['../classsimdjson_1_1dom_1_1parser.html',1,'simdjson::dom::parser'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]] ]; diff --git a/search/classes_9.js b/search/classes_9.js index 5772a03e4..e967981d8 100644 --- a/search/classes_9.js +++ b/search/classes_9.js @@ -1,4 +1,4 @@ var searchData= [ - ['raw_5fjson_5fstring_313',['raw_json_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] + ['raw_5fjson_5fstring_329',['raw_json_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] ]; diff --git a/search/classes_a.js b/search/classes_a.js index 88ef7377a..60c4d2a6f 100644 --- a/search/classes_a.js +++ b/search/classes_a.js @@ -1,24 +1,24 @@ var searchData= [ - ['simdjson_5ferror_314',['simdjson_error',['../structsimdjson_1_1simdjson__error.html',1,'simdjson']]], - ['simdjson_5fresult_315',['simdjson_result',['../structsimdjson_1_1simdjson__result.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20dom_3a_3aarray_20_3e_316',['simdjson_result< dom::array >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1array_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20dom_3a_3adocument_5fstream_20_3e_317',['simdjson_result< dom::document_stream >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1document__stream_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20dom_3a_3aelement_20_3e_318',['simdjson_result< dom::element >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1element_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20dom_3a_3aobject_20_3e_319',['simdjson_result< dom::object >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1object_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_20_3e_320',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::array >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_5fiterator_20_3e_321',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::array_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_20_3e_322',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5freference_20_3e_323',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document_reference >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5fstream_20_3e_324',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document_stream >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3afield_20_3e_325',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::field >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5fiterator_20_3e_326',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::json_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__iterator_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5ftype_20_3e_327',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::json_type >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__type_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_20_3e_328',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::object >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_5fiterator_20_3e_329',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::object_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aparser_20_3e_330',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::parser >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3araw_5fjson_5fstring_20_3e_331',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3atoken_5fiterator_20_3e_332',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::token_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1token__iterator_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_20_3e_333',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html',1,'simdjson']]], - ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_5fiterator_20_3e_334',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value__iterator_01_4.html',1,'simdjson']]] + ['simdjson_5ferror_330',['simdjson_error',['../structsimdjson_1_1simdjson__error.html',1,'simdjson']]], + ['simdjson_5fresult_331',['simdjson_result',['../structsimdjson_1_1simdjson__result.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20dom_3a_3aarray_20_3e_332',['simdjson_result< dom::array >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1array_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20dom_3a_3adocument_5fstream_20_3e_333',['simdjson_result< dom::document_stream >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1document__stream_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20dom_3a_3aelement_20_3e_334',['simdjson_result< dom::element >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1element_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20dom_3a_3aobject_20_3e_335',['simdjson_result< dom::object >',['../structsimdjson_1_1simdjson__result_3_01dom_1_1object_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_20_3e_336',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::array >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aarray_5fiterator_20_3e_337',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::array_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_20_3e_338',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5freference_20_3e_339',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document_reference >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3adocument_5fstream_20_3e_340',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document_stream >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3afield_20_3e_341',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::field >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5fiterator_20_3e_342',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::json_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__iterator_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3ajson_5ftype_20_3e_343',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::json_type >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__type_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_20_3e_344',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::object >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aobject_5fiterator_20_3e_345',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::object_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3aparser_20_3e_346',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::parser >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3araw_5fjson_5fstring_20_3e_347',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3atoken_5fiterator_20_3e_348',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::token_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1token__iterator_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_20_3e_349',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html',1,'simdjson']]], + ['simdjson_5fresult_3c_20simdjson_5fimplementation_3a_3aondemand_3a_3avalue_5fiterator_20_3e_350',['simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value_iterator >',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value__iterator_01_4.html',1,'simdjson']]] ]; diff --git a/search/classes_b.js b/search/classes_b.js index d9c914dbc..845b1fe56 100644 --- a/search/classes_b.js +++ b/search/classes_b.js @@ -1,4 +1,4 @@ var searchData= [ - ['value_335',['value',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] + ['value_351',['value',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] ]; diff --git a/search/enums_0.js b/search/enums_0.js index 3bf2bbfab..1c8ae4a8a 100644 --- a/search/enums_0.js +++ b/search/enums_0.js @@ -1,4 +1,5 @@ var searchData= [ - ['error_5fcode_526',['error_code',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9',1,'simdjson']]] + ['element_5ftype_548',['element_type',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3a',1,'simdjson::dom']]], + ['error_5fcode_549',['error_code',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9',1,'simdjson']]] ]; diff --git a/search/enums_1.js b/search/enums_1.js index b8e66d9ec..afe6330b3 100644 --- a/search/enums_1.js +++ b/search/enums_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['json_5ftype_527',['json_type',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] + ['json_5ftype_550',['json_type',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] ]; diff --git a/search/enums_2.js b/search/enums_2.js index 23f796dab..937aea05f 100644 --- a/search/enums_2.js +++ b/search/enums_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['stage1_5fmode_528',['stage1_mode',['../namespacesimdjson.html#ae6ec9f0ce23fc51d87116b64fdbeb811',1,'simdjson']]] + ['stage1_5fmode_551',['stage1_mode',['../namespacesimdjson.html#ae6ec9f0ce23fc51d87116b64fdbeb811',1,'simdjson']]] ]; diff --git a/search/enumvalues_0.js b/search/enumvalues_0.js index 792cc1eec..12f9cc5ec 100644 --- a/search/enumvalues_0.js +++ b/search/enumvalues_0.js @@ -1,4 +1,5 @@ var searchData= [ - ['array_529',['array',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330af1f713c9e000f5d3f280adbd124df4f5',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] + ['array_552',['ARRAY',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aacb4fb1757fb37c43cded35d3eb857c43',1,'simdjson::dom']]], + ['array_553',['array',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330af1f713c9e000f5d3f280adbd124df4f5',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] ]; diff --git a/search/enumvalues_1.js b/search/enumvalues_1.js index a73eeb9f1..949e5e4e8 100644 --- a/search/enumvalues_1.js +++ b/search/enumvalues_1.js @@ -1,4 +1,5 @@ var searchData= [ - ['boolean_530',['boolean',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330a84e2c64f38f78ba3ea5c905ab5a2da27',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] + ['bool_554',['BOOL',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aaa97b2c144243b2b9d2c593ec268b62f5',1,'simdjson::dom']]], + ['boolean_555',['boolean',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330a84e2c64f38f78ba3ea5c905ab5a2da27',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] ]; diff --git a/search/enumvalues_2.js b/search/enumvalues_2.js index 2c9f82468..e10cf5cd3 100644 --- a/search/enumvalues_2.js +++ b/search/enumvalues_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['capacity_531',['CAPACITY',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a2d50048bbe409023df4e88f6ffe3bc71',1,'simdjson']]] + ['capacity_556',['CAPACITY',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a2d50048bbe409023df4e88f6ffe3bc71',1,'simdjson']]] ]; diff --git a/search/enumvalues_3.js b/search/enumvalues_3.js index 5c2dafa51..3b89d9bcf 100644 --- a/search/enumvalues_3.js +++ b/search/enumvalues_3.js @@ -1,4 +1,5 @@ var searchData= [ - ['depth_5ferror_532',['DEPTH_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a0c6b4af181d3d5f40a09182522c88681',1,'simdjson']]] + ['depth_5ferror_557',['DEPTH_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a0c6b4af181d3d5f40a09182522c88681',1,'simdjson']]], + ['double_558',['DOUBLE',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aafd3e4ece78a7d422280d5ed379482229',1,'simdjson::dom']]] ]; diff --git a/search/enumvalues_4.js b/search/enumvalues_4.js index 92e37d132..acfa07001 100644 --- a/search/enumvalues_4.js +++ b/search/enumvalues_4.js @@ -1,4 +1,4 @@ var searchData= [ - ['empty_533',['EMPTY',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a7aed571b420dcdfe59742e0df97b415a',1,'simdjson']]] + ['empty_559',['EMPTY',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a7aed571b420dcdfe59742e0df97b415a',1,'simdjson']]] ]; diff --git a/search/enumvalues_5.js b/search/enumvalues_5.js index a6375e6f2..64a190010 100644 --- a/search/enumvalues_5.js +++ b/search/enumvalues_5.js @@ -1,4 +1,4 @@ var searchData= [ - ['f_5fatom_5ferror_534',['F_ATOM_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ae726a74b8a99e4bf802f3078436a2394',1,'simdjson']]] + ['f_5fatom_5ferror_560',['F_ATOM_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ae726a74b8a99e4bf802f3078436a2394',1,'simdjson']]] ]; diff --git a/search/enumvalues_6.js b/search/enumvalues_6.js index cd893a0dc..70d95b711 100644 --- a/search/enumvalues_6.js +++ b/search/enumvalues_6.js @@ -1,10 +1,11 @@ var searchData= [ - ['incomplete_5farray_5for_5fobject_535',['INCOMPLETE_ARRAY_OR_OBJECT',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab8a4df583110f900741d0b3f229f349a',1,'simdjson']]], - ['incorrect_5ftype_536',['INCORRECT_TYPE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a1de02af1d67e8350f612eee0dcf634b4',1,'simdjson']]], - ['index_5fout_5fof_5fbounds_537',['INDEX_OUT_OF_BOUNDS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a80bcf6820da38abe1a2e9abeaa0f0c49',1,'simdjson']]], - ['insufficient_5fpadding_538',['INSUFFICIENT_PADDING',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aee3335b961f2d0f732e95b359c16a69a',1,'simdjson']]], - ['invalid_5fjson_5fpointer_539',['INVALID_JSON_POINTER',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aeeaf930969566f76840224d64ee3a9a1',1,'simdjson']]], - ['invalid_5furi_5ffragment_540',['INVALID_URI_FRAGMENT',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a7b0467451dc0cecb41d3ea46c4a0005b',1,'simdjson']]], - ['io_5ferror_541',['IO_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9acaec8ffce84b1acf9e6833b0f930878e',1,'simdjson']]] + ['incomplete_5farray_5for_5fobject_561',['INCOMPLETE_ARRAY_OR_OBJECT',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab8a4df583110f900741d0b3f229f349a',1,'simdjson']]], + ['incorrect_5ftype_562',['INCORRECT_TYPE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a1de02af1d67e8350f612eee0dcf634b4',1,'simdjson']]], + ['index_5fout_5fof_5fbounds_563',['INDEX_OUT_OF_BOUNDS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a80bcf6820da38abe1a2e9abeaa0f0c49',1,'simdjson']]], + ['insufficient_5fpadding_564',['INSUFFICIENT_PADDING',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aee3335b961f2d0f732e95b359c16a69a',1,'simdjson']]], + ['int64_565',['INT64',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa4e866b275c85fbb439f6484251cfb31c',1,'simdjson::dom']]], + ['invalid_5fjson_5fpointer_566',['INVALID_JSON_POINTER',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aeeaf930969566f76840224d64ee3a9a1',1,'simdjson']]], + ['invalid_5furi_5ffragment_567',['INVALID_URI_FRAGMENT',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a7b0467451dc0cecb41d3ea46c4a0005b',1,'simdjson']]], + ['io_5ferror_568',['IO_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9acaec8ffce84b1acf9e6833b0f930878e',1,'simdjson']]] ]; diff --git a/search/enumvalues_7.js b/search/enumvalues_7.js index 6f7f9f798..fcbe3f6a0 100644 --- a/search/enumvalues_7.js +++ b/search/enumvalues_7.js @@ -1,4 +1,4 @@ var searchData= [ - ['memalloc_542',['MEMALLOC',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aa0e71422c8ae80ebaa11d8d74d64737f',1,'simdjson']]] + ['memalloc_569',['MEMALLOC',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aa0e71422c8ae80ebaa11d8d74d64737f',1,'simdjson']]] ]; diff --git a/search/enumvalues_8.js b/search/enumvalues_8.js index 569be209d..58e0eba36 100644 --- a/search/enumvalues_8.js +++ b/search/enumvalues_8.js @@ -1,9 +1,10 @@ var searchData= [ - ['n_5fatom_5ferror_543',['N_ATOM_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4e161f7bd0b3ca10f41a220a75de8cde',1,'simdjson']]], - ['no_5fsuch_5ffield_544',['NO_SUCH_FIELD',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4a2c71f8eca438b3f0553a2811bdab9a',1,'simdjson']]], - ['null_545',['null',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330a37a6259cc0c1dae299a7866489dff0bd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], - ['number_546',['number',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330ab1bc248a7ff2b2e95569f56de68615df',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], - ['number_5ferror_547',['NUMBER_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9adfcabbbd1ddb0843a0f320e062866ae8',1,'simdjson']]], - ['number_5fout_5fof_5frange_548',['NUMBER_OUT_OF_RANGE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a8c779dcc8fb73a4eb8891af3ef65eebb',1,'simdjson']]] + ['n_5fatom_5ferror_570',['N_ATOM_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4e161f7bd0b3ca10f41a220a75de8cde',1,'simdjson']]], + ['no_5fsuch_5ffield_571',['NO_SUCH_FIELD',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4a2c71f8eca438b3f0553a2811bdab9a',1,'simdjson']]], + ['null_572',['null',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330a37a6259cc0c1dae299a7866489dff0bd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], + ['null_5fvalue_573',['NULL_VALUE',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aaa9f0aff2067f91437e50e4872b229e6a',1,'simdjson::dom']]], + ['number_574',['number',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330ab1bc248a7ff2b2e95569f56de68615df',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], + ['number_5ferror_575',['NUMBER_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9adfcabbbd1ddb0843a0f320e062866ae8',1,'simdjson']]], + ['number_5fout_5fof_5frange_576',['NUMBER_OUT_OF_RANGE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a8c779dcc8fb73a4eb8891af3ef65eebb',1,'simdjson']]] ]; diff --git a/search/enumvalues_9.js b/search/enumvalues_9.js index 174b81e20..fcf6a9ef2 100644 --- a/search/enumvalues_9.js +++ b/search/enumvalues_9.js @@ -1,6 +1,7 @@ var searchData= [ - ['object_549',['object',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330aa8cfde6331bd59eb2ac96f8911c4b666',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], - ['out_5fof_5fbounds_550',['OUT_OF_BOUNDS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a3f94172e04ae52a978ea62157140b0de',1,'simdjson']]], - ['out_5fof_5forder_5fiteration_551',['OUT_OF_ORDER_ITERATION',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a351bcafefbbc80a6dadc1ea6c27a35e6',1,'simdjson']]] + ['object_577',['object',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330aa8cfde6331bd59eb2ac96f8911c4b666',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], + ['object_578',['OBJECT',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa8eee8e217391199668cbac89472ace53',1,'simdjson::dom']]], + ['out_5fof_5fbounds_579',['OUT_OF_BOUNDS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a3f94172e04ae52a978ea62157140b0de',1,'simdjson']]], + ['out_5fof_5forder_5fiteration_580',['OUT_OF_ORDER_ITERATION',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a351bcafefbbc80a6dadc1ea6c27a35e6',1,'simdjson']]] ]; diff --git a/search/enumvalues_a.js b/search/enumvalues_a.js index d15fe2324..7d0dd15fb 100644 --- a/search/enumvalues_a.js +++ b/search/enumvalues_a.js @@ -1,4 +1,4 @@ var searchData= [ - ['parser_5fin_5fuse_552',['PARSER_IN_USE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ae9067bb5cb6283141b1c66466005ac0d',1,'simdjson']]] + ['parser_5fin_5fuse_581',['PARSER_IN_USE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ae9067bb5cb6283141b1c66466005ac0d',1,'simdjson']]] ]; diff --git a/search/enumvalues_b.js b/search/enumvalues_b.js index 716a2c527..954a2913e 100644 --- a/search/enumvalues_b.js +++ b/search/enumvalues_b.js @@ -1,10 +1,11 @@ var searchData= [ - ['scalar_5fdocument_5fas_5fvalue_553',['SCALAR_DOCUMENT_AS_VALUE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a00d7c038f551d9527ba8897f3cee907d',1,'simdjson']]], - ['simdjson_5fversion_5fmajor_554',['SIMDJSON_VERSION_MAJOR',['../namespacesimdjson.html#a44beb117a12abd0d8d18589dbc3dbe97ae36fce138c6f2f7a25e9ee06e7ed37ae',1,'simdjson']]], - ['simdjson_5fversion_5fminor_555',['SIMDJSON_VERSION_MINOR',['../namespacesimdjson.html#a44beb117a12abd0d8d18589dbc3dbe97ab442d4c66052c2f30b72a0d6f8dc8814',1,'simdjson']]], - ['simdjson_5fversion_5frevision_556',['SIMDJSON_VERSION_REVISION',['../namespacesimdjson.html#a44beb117a12abd0d8d18589dbc3dbe97a5537fa0bdb6b7345ea789c51f74b10ee',1,'simdjson']]], - ['string_557',['string',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330ab45cffe084dd3d20d928bee85e7b0f21',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], - ['string_5ferror_558',['STRING_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a8ef9cfdd78dd92d2b304249917638d12',1,'simdjson']]], - ['success_559',['SUCCESS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aa4ffc800804829a88c5b52ac3c4c6681',1,'simdjson']]] + ['scalar_5fdocument_5fas_5fvalue_582',['SCALAR_DOCUMENT_AS_VALUE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a00d7c038f551d9527ba8897f3cee907d',1,'simdjson']]], + ['simdjson_5fversion_5fmajor_583',['SIMDJSON_VERSION_MAJOR',['../namespacesimdjson.html#a44beb117a12abd0d8d18589dbc3dbe97ae36fce138c6f2f7a25e9ee06e7ed37ae',1,'simdjson']]], + ['simdjson_5fversion_5fminor_584',['SIMDJSON_VERSION_MINOR',['../namespacesimdjson.html#a44beb117a12abd0d8d18589dbc3dbe97ab442d4c66052c2f30b72a0d6f8dc8814',1,'simdjson']]], + ['simdjson_5fversion_5frevision_585',['SIMDJSON_VERSION_REVISION',['../namespacesimdjson.html#a44beb117a12abd0d8d18589dbc3dbe97a5537fa0bdb6b7345ea789c51f74b10ee',1,'simdjson']]], + ['string_586',['string',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac915f0c06e5ab0363e09593bba651330ab45cffe084dd3d20d928bee85e7b0f21',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]], + ['string_587',['STRING',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa63b588d5559f64f89a416e656880b949',1,'simdjson::dom']]], + ['string_5ferror_588',['STRING_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a8ef9cfdd78dd92d2b304249917638d12',1,'simdjson']]], + ['success_589',['SUCCESS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aa4ffc800804829a88c5b52ac3c4c6681',1,'simdjson']]] ]; diff --git a/search/enumvalues_c.js b/search/enumvalues_c.js index 411d94b63..9784edc76 100644 --- a/search/enumvalues_c.js +++ b/search/enumvalues_c.js @@ -1,6 +1,6 @@ var searchData= [ - ['t_5fatom_5ferror_560',['T_ATOM_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab6e8bfc242f7bea38657eaf61400077f',1,'simdjson']]], - ['tape_5ferror_561',['TAPE_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4005fbda56edc47e077e5cfd4e68cda9',1,'simdjson']]], - ['trailing_5fcontent_562',['TRAILING_CONTENT',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab70f5a6f0ac798d482e95a0fcc528676',1,'simdjson']]] + ['t_5fatom_5ferror_590',['T_ATOM_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab6e8bfc242f7bea38657eaf61400077f',1,'simdjson']]], + ['tape_5ferror_591',['TAPE_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4005fbda56edc47e077e5cfd4e68cda9',1,'simdjson']]], + ['trailing_5fcontent_592',['TRAILING_CONTENT',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ab70f5a6f0ac798d482e95a0fcc528676',1,'simdjson']]] ]; diff --git a/search/enumvalues_d.js b/search/enumvalues_d.js index 711ad8439..9475d35d5 100644 --- a/search/enumvalues_d.js +++ b/search/enumvalues_d.js @@ -1,9 +1,10 @@ var searchData= [ - ['unclosed_5fstring_563',['UNCLOSED_STRING',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a0f9ce97e85e7607e0f4d3811b818a013',1,'simdjson']]], - ['unescaped_5fchars_564',['UNESCAPED_CHARS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aca57917fc85c421aab3f2dd451519fa5',1,'simdjson']]], - ['unexpected_5ferror_565',['UNEXPECTED_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9abdd3905c91a152a01637a2946066db6b',1,'simdjson']]], - ['uninitialized_566',['UNINITIALIZED',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ac2aef8f0fc33187cc118c95fade925d2',1,'simdjson']]], - ['unsupported_5farchitecture_567',['UNSUPPORTED_ARCHITECTURE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4d768ac107473bceb91f8a0d1a824bc2',1,'simdjson']]], - ['utf8_5ferror_568',['UTF8_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a398a5389d6e20c39e8880b0101b66f56',1,'simdjson']]] + ['uint64_593',['UINT64',['../namespacesimdjson_1_1dom.html#a6e1dee3a823ecfee91086d3478bbab3aa6de7acf711860176ba606e9aa2b85d5f',1,'simdjson::dom']]], + ['unclosed_5fstring_594',['UNCLOSED_STRING',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a0f9ce97e85e7607e0f4d3811b818a013',1,'simdjson']]], + ['unescaped_5fchars_595',['UNESCAPED_CHARS',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9aca57917fc85c421aab3f2dd451519fa5',1,'simdjson']]], + ['unexpected_5ferror_596',['UNEXPECTED_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9abdd3905c91a152a01637a2946066db6b',1,'simdjson']]], + ['uninitialized_597',['UNINITIALIZED',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9ac2aef8f0fc33187cc118c95fade925d2',1,'simdjson']]], + ['unsupported_5farchitecture_598',['UNSUPPORTED_ARCHITECTURE',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a4d768ac107473bceb91f8a0d1a824bc2',1,'simdjson']]], + ['utf8_5ferror_599',['UTF8_ERROR',['../namespacesimdjson.html#a7b735a3a50ba79e3f7f14df5f77d8da9a398a5389d6e20c39e8880b0101b66f56',1,'simdjson']]] ]; diff --git a/search/files_0.js b/search/files_0.js index f24f9bace..ab178f757 100644 --- a/search/files_0.js +++ b/search/files_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['implementation_2dbase_2eh_338',['implementation-base.h',['../implementation-base_8h.html',1,'']]] + ['simdjson_2eh_361',['simdjson.h',['../simdjson_8h.html',1,'']]] ]; diff --git a/search/files_1.html b/search/files_1.html deleted file mode 100644 index 7050ef48a..000000000 --- a/search/files_1.html +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - -
      -
      Loading...
      -
      - -
      Searching...
      -
      No Matches
      - -
      - - diff --git a/search/files_1.js b/search/files_1.js deleted file mode 100644 index 9a7d18405..000000000 --- a/search/files_1.js +++ /dev/null @@ -1,4 +0,0 @@ -var searchData= -[ - ['simdjson_2eh_339',['simdjson.h',['../simdjson_8h.html',1,'']]] -]; diff --git a/search/functions_0.js b/search/functions_0.js index d637a5f59..58c921924 100644 --- a/search/functions_0.js +++ b/search/functions_0.js @@ -1,15 +1,15 @@ var searchData= [ - ['allocate_340',['allocate',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#ab6201f2eab41026e722a237d280b8fe1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::allocate()'],['../classsimdjson_1_1dom_1_1parser.html#af8f49755a335bc269cb02d24badfcdf9',1,'simdjson::dom::parser::allocate()']]], - ['append_5fdouble_341',['append_double',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#ae5b327f855878cba9b026059a1fc8a1b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], - ['append_5fs64_342',['append_s64',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#adb931b17ba9d4d41dd8111ad9288256c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], - ['append_5fu64_343',['append_u64',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#aa3481ec0d0726a732688b7fc64372049',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], - ['array_344',['array',['../classsimdjson_1_1dom_1_1array.html#a8b3d6eaec52a2b44965e53d874e367e9',1,'simdjson::dom::array::array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a8cc89dada9999c2ecc319954cc3fc90a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::array() noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a240a8118a5b6f76962425134cc284764',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::array(const value_iterator &iter) noexcept']]], - ['array_5fiterator_345',['array_iterator',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#aa330b23feb572f33d77516431572b643',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator']]], - ['as_5fdouble_346',['as_double',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a41dc1bfd660e0b9c86cb5a5171fd7c02',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], - ['at_347',['at',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a01c6bde0574654dc22ea219c3b3dbf51',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::at()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#acc369e813e7cf4a97564bb0d85f76db3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::at()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a1c97143f7637414d737d58daeec2eb84',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::at()'],['../classsimdjson_1_1dom_1_1element.html#aeb155c47ef7bebcad79e1b7449734030',1,'simdjson::dom::element::at(size_t index) const noexcept'],['../classsimdjson_1_1dom_1_1element.html#aa8b5798004a859bf922778226b8c1cce',1,'simdjson::dom::element::at(const std::string_view json_pointer) const noexcept'],['../classsimdjson_1_1dom_1_1array.html#a6a6373cc1542a7137b79978680a93d18',1,'simdjson::dom::array::at()']]], - ['at_5fend_348',['at_end',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ae896ac465551b036763e4465b3a16c7b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['at_5fkey_349',['at_key',['../classsimdjson_1_1dom_1_1element.html#a686a21f39c755dcbf95116757d2193bd',1,'simdjson::dom::element::at_key()'],['../classsimdjson_1_1dom_1_1object.html#a4fb3e04e0ea591132da90341bf9ed819',1,'simdjson::dom::object::at_key()']]], - ['at_5fkey_5fcase_5finsensitive_350',['at_key_case_insensitive',['../classsimdjson_1_1dom_1_1element.html#a5185447e6bf8949e7c5e9c22711e8764',1,'simdjson::dom::element::at_key_case_insensitive()'],['../classsimdjson_1_1dom_1_1object.html#ab075da9eb7678f6321cecf4cbd196039',1,'simdjson::dom::object::at_key_case_insensitive()']]], - ['at_5fpointer_351',['at_pointer',['../classsimdjson_1_1dom_1_1array.html#a8141c7d98672bc3ab69fea7b63afcfb2',1,'simdjson::dom::array::at_pointer()'],['../classsimdjson_1_1dom_1_1element.html#a3777fed88f37555f2d090aeb604a117c',1,'simdjson::dom::element::at_pointer()'],['../classsimdjson_1_1dom_1_1object.html#ace84581be0fee46d5128c49710522aba',1,'simdjson::dom::object::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a73c2fc4db0c0b4083fafe706412d3b26',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a74484485f4a3d8dce5943b0cb60ac815',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ae3d80f8e7f31c319fe6ee09c0860df83',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aadd2f646a3231d407948bf5f3da46528',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::at_pointer()']]] + ['allocate_362',['allocate',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#ab6201f2eab41026e722a237d280b8fe1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::allocate()'],['../classsimdjson_1_1dom_1_1parser.html#af8f49755a335bc269cb02d24badfcdf9',1,'simdjson::dom::parser::allocate()']]], + ['append_5fdouble_363',['append_double',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#ae5b327f855878cba9b026059a1fc8a1b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], + ['append_5fs64_364',['append_s64',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#adb931b17ba9d4d41dd8111ad9288256c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], + ['append_5fu64_365',['append_u64',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#aa3481ec0d0726a732688b7fc64372049',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], + ['array_366',['array',['../classsimdjson_1_1dom_1_1array.html#a8b3d6eaec52a2b44965e53d874e367e9',1,'simdjson::dom::array::array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a8cc89dada9999c2ecc319954cc3fc90a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::array() noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a240a8118a5b6f76962425134cc284764',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::array(const value_iterator &iter) noexcept']]], + ['array_5fiterator_367',['array_iterator',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#aa330b23feb572f33d77516431572b643',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator']]], + ['as_5fdouble_368',['as_double',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a41dc1bfd660e0b9c86cb5a5171fd7c02',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], + ['at_369',['at',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a01c6bde0574654dc22ea219c3b3dbf51',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::at()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#acc369e813e7cf4a97564bb0d85f76db3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::at()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a1c97143f7637414d737d58daeec2eb84',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::at()'],['../classsimdjson_1_1dom_1_1element.html#aeb155c47ef7bebcad79e1b7449734030',1,'simdjson::dom::element::at(size_t index) const noexcept'],['../classsimdjson_1_1dom_1_1element.html#aa8b5798004a859bf922778226b8c1cce',1,'simdjson::dom::element::at(const std::string_view json_pointer) const noexcept'],['../classsimdjson_1_1dom_1_1array.html#a6a6373cc1542a7137b79978680a93d18',1,'simdjson::dom::array::at()']]], + ['at_5fend_370',['at_end',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ae896ac465551b036763e4465b3a16c7b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['at_5fkey_371',['at_key',['../classsimdjson_1_1dom_1_1element.html#a686a21f39c755dcbf95116757d2193bd',1,'simdjson::dom::element::at_key()'],['../classsimdjson_1_1dom_1_1object.html#a4fb3e04e0ea591132da90341bf9ed819',1,'simdjson::dom::object::at_key()']]], + ['at_5fkey_5fcase_5finsensitive_372',['at_key_case_insensitive',['../classsimdjson_1_1dom_1_1element.html#a5185447e6bf8949e7c5e9c22711e8764',1,'simdjson::dom::element::at_key_case_insensitive()'],['../classsimdjson_1_1dom_1_1object.html#ab075da9eb7678f6321cecf4cbd196039',1,'simdjson::dom::object::at_key_case_insensitive()']]], + ['at_5fpointer_373',['at_pointer',['../classsimdjson_1_1dom_1_1array.html#a8141c7d98672bc3ab69fea7b63afcfb2',1,'simdjson::dom::array::at_pointer()'],['../classsimdjson_1_1dom_1_1element.html#a3777fed88f37555f2d090aeb604a117c',1,'simdjson::dom::element::at_pointer()'],['../classsimdjson_1_1dom_1_1object.html#ace84581be0fee46d5128c49710522aba',1,'simdjson::dom::object::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a73c2fc4db0c0b4083fafe706412d3b26',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a74484485f4a3d8dce5943b0cb60ac815',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ae3d80f8e7f31c319fe6ee09c0860df83',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::at_pointer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aadd2f646a3231d407948bf5f3da46528',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::at_pointer()']]] ]; diff --git a/search/functions_1.js b/search/functions_1.js index 00fdc47dd..d49d53c3a 100644 --- a/search/functions_1.js +++ b/search/functions_1.js @@ -1,5 +1,5 @@ var searchData= [ - ['begin_352',['begin',['../classsimdjson_1_1dom_1_1array.html#aebd2b7ca5e1d87476ea2cd4fc9239a74',1,'simdjson::dom::array::begin()'],['../classsimdjson_1_1dom_1_1document__stream.html#a9a51df3d81c9b7849bbbc8ae42096b76',1,'simdjson::dom::document_stream::begin()'],['../classsimdjson_1_1dom_1_1element.html#aa59ecf8e9ac7b1a9e977d2cd3f03aa7f',1,'simdjson::dom::element::begin()'],['../classsimdjson_1_1dom_1_1object.html#afe127a7e9ec8dab9ec76160525a68a83',1,'simdjson::dom::object::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a8cb4bf0ca1890a4a3c86f69be40f17f2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a1a450826deb3ba982c9f0ec6208cb246',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#ae88253d9f6cef0dfc0bd05c45cdfc06f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a88d1cdc3124965d707754af4fcfae7f9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::begin()']]], - ['builtin_5fimplementation_353',['builtin_implementation',['../namespacesimdjson.html#af63210cc51d5c99ad84958daf9812e63',1,'simdjson']]] + ['begin_374',['begin',['../classsimdjson_1_1dom_1_1array.html#aebd2b7ca5e1d87476ea2cd4fc9239a74',1,'simdjson::dom::array::begin()'],['../classsimdjson_1_1dom_1_1document__stream.html#a9a51df3d81c9b7849bbbc8ae42096b76',1,'simdjson::dom::document_stream::begin()'],['../classsimdjson_1_1dom_1_1element.html#aa59ecf8e9ac7b1a9e977d2cd3f03aa7f',1,'simdjson::dom::element::begin()'],['../classsimdjson_1_1dom_1_1object.html#afe127a7e9ec8dab9ec76160525a68a83',1,'simdjson::dom::object::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a8cb4bf0ca1890a4a3c86f69be40f17f2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a1a450826deb3ba982c9f0ec6208cb246',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#ae88253d9f6cef0dfc0bd05c45cdfc06f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::begin()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a88d1cdc3124965d707754af4fcfae7f9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::begin()']]], + ['builtin_5fimplementation_375',['builtin_implementation',['../namespacesimdjson.html#af63210cc51d5c99ad84958daf9812e63',1,'simdjson']]] ]; diff --git a/search/functions_10.js b/search/functions_10.js index da0de1e42..5e497423c 100644 --- a/search/functions_10.js +++ b/search/functions_10.js @@ -1,22 +1,22 @@ var searchData= [ - ['set_5fmax_5fcapacity_472',['set_max_capacity',['../classsimdjson_1_1dom_1_1parser.html#a6977b4586bc601070cf100e2973a4cbc',1,'simdjson::dom::parser']]], - ['simdjson_5ferror_473',['simdjson_error',['../structsimdjson_1_1simdjson__error.html#af5355b65f85b897251b3665086075f39',1,'simdjson::simdjson_error']]], - ['size_474',['size',['../classsimdjson_1_1dom_1_1array.html#a698f2f984d1a78a68962c06b2f047686',1,'simdjson::dom::array::size()'],['../classsimdjson_1_1dom_1_1object.html#a93ec5c36aae913f266f533b2e02bc873',1,'simdjson::dom::object::size()'],['../structsimdjson_1_1padded__string.html#a07d50795f042119ab848c37cb8911db4',1,'simdjson::padded_string::size()']]], - ['size_5fin_5fbytes_475',['size_in_bytes',['../classsimdjson_1_1dom_1_1document__stream.html#a2a08525ae815167b73b6393a8999e46b',1,'simdjson::dom::document_stream::size_in_bytes()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#a43723c86c43ee3533a3278b5cd2fe2d0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::size_in_bytes()']]], - ['skip_476',['skip',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ae75aa0d09a10682fd30dc4e8e25d0a73',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value']]], - ['skip_5fdouble_477',['skip_double',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#ac6b75b1d1af73c9ef8958e573c367e1c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], - ['start_478',['start',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a760c4d01ad03f18e09a93387de5de60e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::start()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a0126e4a8e02fa0a02481d3bdfd3965f7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::start()']]], - ['start_5farray_479',['start_array',['../group__array.html#ga14e69f9c4949805695e30a576bd9c964',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['start_5fobject_480',['start_object',['../group__object.html#ga46e677764da46ebbe4b0e4dea6672a5f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['start_5for_5fresume_5fobject_481',['start_or_resume_object',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a821e11bc3b6b3f16fa7d6b15c77c17d3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value']]], - ['start_5froot_482',['start_root',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#aac11a5e300a49531b3600a019cd89304',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array']]], - ['start_5froot_5farray_483',['start_root_array',['../group__array.html#ga334481c295286d926bb3bb912232e225',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['start_5froot_5fobject_484',['start_root_object',['../group__object.html#gab9563a58e164e9f5f75805cffb3582ec',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['started_485',['started',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#aca1c364caedac11edc78c64734013ce0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array']]], - ['started_5farray_486',['started_array',['../group__array.html#ga136e508ce46622b86cc901490c807578',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['started_5fobject_487',['started_object',['../group__object.html#ga192424d19b12648eea73e3d073d5fcac',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['started_5froot_5farray_488',['started_root_array',['../group__array.html#gaa3428f6c87e63d8a2ba93a3816721066',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['started_5froot_5fobject_489',['started_root_object',['../group__object.html#gaa0c31077aeadb6fc627d4c5750e58ecb',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['supported_5fby_5fruntime_5fsystem_490',['supported_by_runtime_system',['../classsimdjson_1_1implementation.html#adf77c9bc0869eff8fd46e942c4532135',1,'simdjson::implementation']]] + ['set_5fmax_5fcapacity_494',['set_max_capacity',['../classsimdjson_1_1dom_1_1parser.html#a6977b4586bc601070cf100e2973a4cbc',1,'simdjson::dom::parser']]], + ['simdjson_5ferror_495',['simdjson_error',['../structsimdjson_1_1simdjson__error.html#af5355b65f85b897251b3665086075f39',1,'simdjson::simdjson_error']]], + ['size_496',['size',['../classsimdjson_1_1dom_1_1array.html#a698f2f984d1a78a68962c06b2f047686',1,'simdjson::dom::array::size()'],['../classsimdjson_1_1dom_1_1object.html#a93ec5c36aae913f266f533b2e02bc873',1,'simdjson::dom::object::size()'],['../structsimdjson_1_1padded__string.html#a07d50795f042119ab848c37cb8911db4',1,'simdjson::padded_string::size()']]], + ['size_5fin_5fbytes_497',['size_in_bytes',['../classsimdjson_1_1dom_1_1document__stream.html#a2a08525ae815167b73b6393a8999e46b',1,'simdjson::dom::document_stream::size_in_bytes()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#a43723c86c43ee3533a3278b5cd2fe2d0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::size_in_bytes()']]], + ['skip_498',['skip',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ae75aa0d09a10682fd30dc4e8e25d0a73',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value']]], + ['skip_5fdouble_499',['skip_double',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#ac6b75b1d1af73c9ef8958e573c367e1c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]], + ['start_500',['start',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a760c4d01ad03f18e09a93387de5de60e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::start()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a0126e4a8e02fa0a02481d3bdfd3965f7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::start()']]], + ['start_5farray_501',['start_array',['../group__array.html#ga14e69f9c4949805695e30a576bd9c964',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['start_5fobject_502',['start_object',['../group__object.html#ga46e677764da46ebbe4b0e4dea6672a5f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['start_5for_5fresume_5fobject_503',['start_or_resume_object',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a821e11bc3b6b3f16fa7d6b15c77c17d3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value']]], + ['start_5froot_504',['start_root',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#aac11a5e300a49531b3600a019cd89304',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array']]], + ['start_5froot_5farray_505',['start_root_array',['../group__array.html#ga334481c295286d926bb3bb912232e225',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['start_5froot_5fobject_506',['start_root_object',['../group__object.html#gab9563a58e164e9f5f75805cffb3582ec',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['started_507',['started',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#aca1c364caedac11edc78c64734013ce0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array']]], + ['started_5farray_508',['started_array',['../group__array.html#ga136e508ce46622b86cc901490c807578',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['started_5fobject_509',['started_object',['../group__object.html#ga192424d19b12648eea73e3d073d5fcac',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['started_5froot_5farray_510',['started_root_array',['../group__array.html#gaa3428f6c87e63d8a2ba93a3816721066',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['started_5froot_5fobject_511',['started_root_object',['../group__object.html#gaa0c31077aeadb6fc627d4c5750e58ecb',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['supported_5fby_5fruntime_5fsystem_512',['supported_by_runtime_system',['../classsimdjson_1_1implementation.html#adf77c9bc0869eff8fd46e942c4532135',1,'simdjson::implementation']]] ]; diff --git a/search/functions_11.js b/search/functions_11.js index 5ad75fd02..3f9bd3d76 100644 --- a/search/functions_11.js +++ b/search/functions_11.js @@ -1,10 +1,10 @@ var searchData= [ - ['take_5fvalue_491',['take_value',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#affadf1e1f762248d60950e333b739820',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::take_value()'],['../structsimdjson_1_1simdjson__result.html#a815368a9e09fa675d0b6672595f5ad19',1,'simdjson::simdjson_result::take_value()']]], - ['tie_492',['tie',['../classsimdjson_1_1dom_1_1element.html#a5342161b8c52c78b2f5edac10e9d05ca',1,'simdjson::dom::element::tie()'],['../structsimdjson_1_1simdjson__result.html#a86dbcba063713c0e284dbde9fae17568',1,'simdjson::simdjson_result::tie()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#acd950d432e76a0bc1a7f3236cc7a1894',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::tie()']]], - ['to_5fdebug_5fstring_493',['to_debug_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a9afdfb30ac2aacabce09a5c9d7fd375a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['to_5fjson_5fstring_494',['to_json_string',['../namespacesimdjson.html#a598dd79ec46726de8a6d409ba1bae034',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::array &x) noexcept'],['../namespacesimdjson.html#afc529e3bcacb5b3c747b525fb443771f',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::object &x) noexcept'],['../namespacesimdjson.html#a4c998fcc6bf2bca2196b45a5c3e1967a',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::value &x) noexcept'],['../namespacesimdjson.html#a2cda17221b852e5c398bad5bf350d270',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document &x) noexcept']]], - ['to_5fstring_495',['to_string',['../namespacesimdjson.html#ade4516933f53705eacfaed65ed14962d',1,'simdjson']]], - ['truncated_5fbytes_496',['truncated_bytes',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#acd3fd372dfd30fcce1d6a103c6682d0e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::truncated_bytes()'],['../classsimdjson_1_1dom_1_1document__stream.html#a6c2a07e08213dc9a51754940942f9e69',1,'simdjson::dom::document_stream::truncated_bytes()']]], - ['type_497',['type',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#af3d0d03752d5e96d7ee5b83f29136b1b',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::type()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ac39965b3006b8f19ed576ce99b7534c5',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::type()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a77bdebf4d2105efdd123cbf0a4906b1e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::type()'],['../classsimdjson_1_1dom_1_1element.html#a19162bf6d94fb6c21bb2bf2e9b78ff0d',1,'simdjson::dom::element::type()']]] + ['take_5fvalue_513',['take_value',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#affadf1e1f762248d60950e333b739820',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::take_value()'],['../structsimdjson_1_1simdjson__result.html#a815368a9e09fa675d0b6672595f5ad19',1,'simdjson::simdjson_result::take_value()']]], + ['tie_514',['tie',['../classsimdjson_1_1dom_1_1element.html#a5342161b8c52c78b2f5edac10e9d05ca',1,'simdjson::dom::element::tie()'],['../structsimdjson_1_1simdjson__result.html#a86dbcba063713c0e284dbde9fae17568',1,'simdjson::simdjson_result::tie()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#acd950d432e76a0bc1a7f3236cc7a1894',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::tie()']]], + ['to_5fdebug_5fstring_515',['to_debug_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a9afdfb30ac2aacabce09a5c9d7fd375a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['to_5fjson_5fstring_516',['to_json_string',['../namespacesimdjson.html#a598dd79ec46726de8a6d409ba1bae034',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::array &x) noexcept'],['../namespacesimdjson.html#afc529e3bcacb5b3c747b525fb443771f',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::object &x) noexcept'],['../namespacesimdjson.html#a4c998fcc6bf2bca2196b45a5c3e1967a',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::value &x) noexcept'],['../namespacesimdjson.html#a2cda17221b852e5c398bad5bf350d270',1,'simdjson::to_json_string(SIMDJSON_IMPLEMENTATION::ondemand::document &x) noexcept']]], + ['to_5fstring_517',['to_string',['../namespacesimdjson.html#ade4516933f53705eacfaed65ed14962d',1,'simdjson']]], + ['truncated_5fbytes_518',['truncated_bytes',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#acd3fd372dfd30fcce1d6a103c6682d0e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::truncated_bytes()'],['../classsimdjson_1_1dom_1_1document__stream.html#a6c2a07e08213dc9a51754940942f9e69',1,'simdjson::dom::document_stream::truncated_bytes()']]], + ['type_519',['type',['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#af3d0d03752d5e96d7ee5b83f29136b1b',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::type()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ac39965b3006b8f19ed576ce99b7534c5',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::type()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a77bdebf4d2105efdd123cbf0a4906b1e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::type()'],['../classsimdjson_1_1dom_1_1element.html#a19162bf6d94fb6c21bb2bf2e9b78ff0d',1,'simdjson::dom::element::type()']]] ]; diff --git a/search/functions_12.js b/search/functions_12.js index bfb96989b..4995b9357 100644 --- a/search/functions_12.js +++ b/search/functions_12.js @@ -1,7 +1,7 @@ var searchData= [ - ['unescape_498',['unescape',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a27714b0095b036a169cabebdc1031937',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], - ['unescape_5fwobbly_499',['unescape_wobbly',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a926e145e3ffb2b1024646dd56bc938e4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], - ['unescaped_5fkey_500',['unescaped_key',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#a8e655ba1a0fd26809821f77aac355b7c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field']]], - ['unsafe_5fis_5fequal_501',['unsafe_is_equal',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#affa14023a66c65f906ee3e673443d943',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::unsafe_is_equal(size_t length, std::string_view target) const noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a11bccba8ede5e7dff56e2737fcb853c7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::unsafe_is_equal(std::string_view target) const noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a3d8f15d3b004acd695b6fff5ba94b515',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::unsafe_is_equal(const char *target) const noexcept']]] + ['unescape_520',['unescape',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a27714b0095b036a169cabebdc1031937',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], + ['unescape_5fwobbly_521',['unescape_wobbly',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a926e145e3ffb2b1024646dd56bc938e4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], + ['unescaped_5fkey_522',['unescaped_key',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#a8e655ba1a0fd26809821f77aac355b7c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field']]], + ['unsafe_5fis_5fequal_523',['unsafe_is_equal',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#affa14023a66c65f906ee3e673443d943',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::unsafe_is_equal(size_t length, std::string_view target) const noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a11bccba8ede5e7dff56e2737fcb853c7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::unsafe_is_equal(std::string_view target) const noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a3d8f15d3b004acd695b6fff5ba94b515',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::unsafe_is_equal(const char *target) const noexcept']]] ]; diff --git a/search/functions_13.js b/search/functions_13.js index bd45cffaa..0ad1e3a00 100644 --- a/search/functions_13.js +++ b/search/functions_13.js @@ -1,6 +1,6 @@ var searchData= [ - ['validate_5futf8_502',['validate_utf8',['../namespacesimdjson.html#a04edabca6d128b8b31592e1e2e331ae0',1,'simdjson::validate_utf8(const std::string &s) noexcept'],['../namespacesimdjson.html#a28a847c4b31fc804bec2987b171dbd07',1,'simdjson::validate_utf8(const std::string_view sv) noexcept'],['../namespacesimdjson.html#a53546f3af0ed6840ffbeefcbefd305a1',1,'simdjson::validate_utf8(const char *buf, size_t len) noexcept'],['../classsimdjson_1_1implementation.html#aa3a7b818d56a54cca272191ec176f8f1',1,'simdjson::implementation::validate_utf8()']]], - ['value_503',['value',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a7188b9843c2b3b3050c54b52d5b6886f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::value(const value_iterator &iter) noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ab96f6c19a1866863a110e8bcc93e0392',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::value() noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#ad5f688629f86f80dff49cab2270b1967',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field::value()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a934c09eb8db55277d2d7190f1bbc1a84',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value() &&noexcept(false)'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a78c5842bded486846c816eb01ff439fc',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value() &noexcept(false)'],['../structsimdjson_1_1simdjson__result.html#ae52c2cc66e62e47b05f29e342ad5078a',1,'simdjson::simdjson_result::value() &&noexcept(false)'],['../structsimdjson_1_1simdjson__result.html#af7f6d5a5e979b60d5231449d53dcd9be',1,'simdjson::simdjson_result::value() &noexcept(false)'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a2049ae539dca6999cc33300d212a5014',1,'simdjson::dom::object::iterator::value()']]], - ['value_5funsafe_504',['value_unsafe',['../structsimdjson_1_1simdjson__result.html#a3c25e74570144de48ef71ae490def85f',1,'simdjson::simdjson_result::value_unsafe() const &noexcept'],['../structsimdjson_1_1simdjson__result.html#a67ac8535dcf368fed604549a07e423e2',1,'simdjson::simdjson_result::value_unsafe() &&noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a92e1c9ffc7a854b4b33fa48fe2d95709',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value_unsafe() const &noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a5d412981bc3cee0f0bcf3bfb53ae83e1',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value_unsafe() &noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#ad06c8e25c44d091eb3757a65ccd9f57f',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value_unsafe() &&noexcept']]] + ['validate_5futf8_524',['validate_utf8',['../namespacesimdjson.html#a04edabca6d128b8b31592e1e2e331ae0',1,'simdjson::validate_utf8(const std::string &s) noexcept'],['../namespacesimdjson.html#a28a847c4b31fc804bec2987b171dbd07',1,'simdjson::validate_utf8(const std::string_view sv) noexcept'],['../namespacesimdjson.html#a53546f3af0ed6840ffbeefcbefd305a1',1,'simdjson::validate_utf8(const char *buf, size_t len) noexcept'],['../classsimdjson_1_1implementation.html#aa3a7b818d56a54cca272191ec176f8f1',1,'simdjson::implementation::validate_utf8()']]], + ['value_525',['value',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a7188b9843c2b3b3050c54b52d5b6886f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::value(const value_iterator &iter) noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ab96f6c19a1866863a110e8bcc93e0392',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::value() noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#ad5f688629f86f80dff49cab2270b1967',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field::value()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a934c09eb8db55277d2d7190f1bbc1a84',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value() &&noexcept(false)'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a78c5842bded486846c816eb01ff439fc',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value() &noexcept(false)'],['../structsimdjson_1_1simdjson__result.html#ae52c2cc66e62e47b05f29e342ad5078a',1,'simdjson::simdjson_result::value() &&noexcept(false)'],['../structsimdjson_1_1simdjson__result.html#af7f6d5a5e979b60d5231449d53dcd9be',1,'simdjson::simdjson_result::value() &noexcept(false)'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a2049ae539dca6999cc33300d212a5014',1,'simdjson::dom::object::iterator::value()']]], + ['value_5funsafe_526',['value_unsafe',['../structsimdjson_1_1simdjson__result.html#a3c25e74570144de48ef71ae490def85f',1,'simdjson::simdjson_result::value_unsafe() const &noexcept'],['../structsimdjson_1_1simdjson__result.html#a67ac8535dcf368fed604549a07e423e2',1,'simdjson::simdjson_result::value_unsafe() &&noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a92e1c9ffc7a854b4b33fa48fe2d95709',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value_unsafe() const &noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a5d412981bc3cee0f0bcf3bfb53ae83e1',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value_unsafe() &noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#ad06c8e25c44d091eb3757a65ccd9f57f',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::value_unsafe() &&noexcept']]] ]; diff --git a/search/functions_14.js b/search/functions_14.js index fda6b46b6..eefc7b2e9 100644 --- a/search/functions_14.js +++ b/search/functions_14.js @@ -1,4 +1,4 @@ var searchData= [ - ['what_505',['what',['../structsimdjson_1_1simdjson__error.html#a73b15aae33a4eef105d0735e03d83a49',1,'simdjson::simdjson_error']]] + ['what_527',['what',['../structsimdjson_1_1simdjson__error.html#a73b15aae33a4eef105d0735e03d83a49',1,'simdjson::simdjson_error']]] ]; diff --git a/search/functions_15.js b/search/functions_15.js index ee46b41c4..0c95ec22b 100644 --- a/search/functions_15.js +++ b/search/functions_15.js @@ -1,4 +1,4 @@ var searchData= [ - ['_7eparser_506',['~parser',['../classsimdjson_1_1dom_1_1parser.html#aeb48211f320af02b58dc3d0505059844',1,'simdjson::dom::parser::~parser()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a4a144d96ad06a2295137dd0e5b7dcc1d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::~parser()']]] + ['_7eparser_528',['~parser',['../classsimdjson_1_1dom_1_1parser.html#aeb48211f320af02b58dc3d0505059844',1,'simdjson::dom::parser::~parser()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a4a144d96ad06a2295137dd0e5b7dcc1d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::~parser()']]] ]; diff --git a/search/functions_2.js b/search/functions_2.js index 107d36f65..37ba6a357 100644 --- a/search/functions_2.js +++ b/search/functions_2.js @@ -1,12 +1,12 @@ var searchData= [ - ['capacity_354',['capacity',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#aec2c883af898053ab8e5eca8e9e870ae',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::capacity()'],['../classsimdjson_1_1padded__string__view.html#a9d98e1984b893116d8bb7123d84d75b8',1,'simdjson::padded_string_view::capacity()'],['../classsimdjson_1_1dom_1_1parser.html#aedf495a6e090929be23473e8a29f2fe2',1,'simdjson::dom::parser::capacity()']]], - ['check_5froot_5farray_355',['check_root_array',['../group__array.html#ga1e023cb72adae168dc7157776976ad75',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['check_5froot_5fobject_356',['check_root_object',['../group__object.html#ga262c7a1f9320fefb1711fec7b69ef6b1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['child_357',['child',['../group__array.html#gaba7c4e5787c7295da3a0d73b0db1c890',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['consume_358',['consume',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a96aeba1fb4eac299260937b78e346ee8',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::consume()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ac16e0e51de3ce97fbd3fd0b1f947d552',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::consume()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#add102ee85423a75e22e4d7ca9a3eaacd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::consume()']]], - ['count_5felements_359',['count_elements',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ab408c2ea4be8874e3514b389c70a5667',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::count_elements()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a481e2b0b216d29038ddca3242a7047ad',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::count_elements()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a9f23e6ab13ad93c43e705ce7fe6134c9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::count_elements()']]], - ['count_5ffields_360',['count_fields',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a24fd6a8aa158b80d851e3a57c9fef642',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::count_fields()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aef6872e07743217fe2e2abe790a21d4c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::count_fields()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a55f04607ee4e718294a572f9b6ad94cc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::count_fields()']]], - ['current_5fdepth_361',['current_depth',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a1919a4ca6418c94ed54f026fbbda6f1d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::current_depth()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8bcd64ae6b4d204c4b6b2a8420e0270c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::current_depth()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a3bfd36dafc82c212f165b434ab5378b3',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::current_depth()']]], - ['current_5flocation_362',['current_location',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#af4c151ba820f579e149b4bf98e644a49',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::current_location()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a06258e49f2dbb910beeaf6814ff7e071',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::current_location()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a78b9e4e22a89050c9f911f1878165e88',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::current_location()']]] + ['capacity_376',['capacity',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#aec2c883af898053ab8e5eca8e9e870ae',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::capacity()'],['../classsimdjson_1_1padded__string__view.html#a9d98e1984b893116d8bb7123d84d75b8',1,'simdjson::padded_string_view::capacity()'],['../classsimdjson_1_1dom_1_1parser.html#aedf495a6e090929be23473e8a29f2fe2',1,'simdjson::dom::parser::capacity()']]], + ['check_5froot_5farray_377',['check_root_array',['../group__array.html#ga1e023cb72adae168dc7157776976ad75',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['check_5froot_5fobject_378',['check_root_object',['../group__object.html#ga262c7a1f9320fefb1711fec7b69ef6b1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['child_379',['child',['../group__array.html#gaba7c4e5787c7295da3a0d73b0db1c890',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['consume_380',['consume',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a96aeba1fb4eac299260937b78e346ee8',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::consume()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ac16e0e51de3ce97fbd3fd0b1f947d552',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::consume()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#add102ee85423a75e22e4d7ca9a3eaacd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::consume()']]], + ['count_5felements_381',['count_elements',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ab408c2ea4be8874e3514b389c70a5667',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::count_elements()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a481e2b0b216d29038ddca3242a7047ad',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::count_elements()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a9f23e6ab13ad93c43e705ce7fe6134c9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::count_elements()']]], + ['count_5ffields_382',['count_fields',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a24fd6a8aa158b80d851e3a57c9fef642',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::count_fields()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aef6872e07743217fe2e2abe790a21d4c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::count_fields()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a55f04607ee4e718294a572f9b6ad94cc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::count_fields()']]], + ['current_5fdepth_383',['current_depth',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a1919a4ca6418c94ed54f026fbbda6f1d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::current_depth()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8bcd64ae6b4d204c4b6b2a8420e0270c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::current_depth()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a3bfd36dafc82c212f165b434ab5378b3',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::current_depth()']]], + ['current_5flocation_384',['current_location',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#af4c151ba820f579e149b4bf98e644a49',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::current_location()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a06258e49f2dbb910beeaf6814ff7e071',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::current_location()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a78b9e4e22a89050c9f911f1878165e88',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::current_location()']]] ]; diff --git a/search/functions_3.js b/search/functions_3.js index e15b659f5..c09ec77c1 100644 --- a/search/functions_3.js +++ b/search/functions_3.js @@ -1,7 +1,7 @@ var searchData= [ - ['data_363',['data',['../structsimdjson_1_1padded__string.html#aadd3bb268cbba43012c5d17a8c1ab7ef',1,'simdjson::padded_string::data() const noexcept'],['../structsimdjson_1_1padded__string.html#aa833ecdbe40c220c5baf7a29c472c972',1,'simdjson::padded_string::data() noexcept']]], - ['description_364',['description',['../classsimdjson_1_1implementation.html#a4f41daefefc573e20fccd591b158e063',1,'simdjson::implementation']]], - ['document_365',['document',['../classsimdjson_1_1dom_1_1document.html#a6947c9d79453071ca73d06e398bcdd2a',1,'simdjson::dom::document::document() noexcept=default'],['../classsimdjson_1_1dom_1_1document.html#af34f108b46f82428bfe4ea33869358f0',1,'simdjson::dom::document::document(document &&other) noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a54cd729a715a09bc9e706b7640233427',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::document()']]], - ['document_5fstream_366',['document_stream',['../classsimdjson_1_1dom_1_1document__stream.html#ae6ee894790448145e11a456f12253364',1,'simdjson::dom::document_stream::document_stream() noexcept'],['../classsimdjson_1_1dom_1_1document__stream.html#a9d6bb44a7d8f818c401d65fb80f6a523',1,'simdjson::dom::document_stream::document_stream(document_stream &&other) noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#af12dc14d4d16b9f4f4602c738678cb0c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::document_stream() noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#a0ac2a6ad0393eb4330b440c8c09290f2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::document_stream(document_stream &&other) noexcept=default']]] + ['data_385',['data',['../structsimdjson_1_1padded__string.html#aadd3bb268cbba43012c5d17a8c1ab7ef',1,'simdjson::padded_string::data() const noexcept'],['../structsimdjson_1_1padded__string.html#aa833ecdbe40c220c5baf7a29c472c972',1,'simdjson::padded_string::data() noexcept']]], + ['description_386',['description',['../classsimdjson_1_1implementation.html#a4f41daefefc573e20fccd591b158e063',1,'simdjson::implementation']]], + ['document_387',['document',['../classsimdjson_1_1dom_1_1document.html#a6947c9d79453071ca73d06e398bcdd2a',1,'simdjson::dom::document::document() noexcept=default'],['../classsimdjson_1_1dom_1_1document.html#af34f108b46f82428bfe4ea33869358f0',1,'simdjson::dom::document::document(document &&other) noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a54cd729a715a09bc9e706b7640233427',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::document()']]], + ['document_5fstream_388',['document_stream',['../classsimdjson_1_1dom_1_1document__stream.html#ae6ee894790448145e11a456f12253364',1,'simdjson::dom::document_stream::document_stream() noexcept'],['../classsimdjson_1_1dom_1_1document__stream.html#a9d6bb44a7d8f818c401d65fb80f6a523',1,'simdjson::dom::document_stream::document_stream(document_stream &&other) noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#af12dc14d4d16b9f4f4602c738678cb0c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::document_stream() noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#a0ac2a6ad0393eb4330b440c8c09290f2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::document_stream(document_stream &&other) noexcept=default']]] ]; diff --git a/search/functions_4.js b/search/functions_4.js index c61314445..05b32b87b 100644 --- a/search/functions_4.js +++ b/search/functions_4.js @@ -1,7 +1,7 @@ var searchData= [ - ['element_367',['element',['../classsimdjson_1_1dom_1_1element.html#a9dbf81ad662ad32168025e8e08686935',1,'simdjson::dom::element']]], - ['end_368',['end',['../classsimdjson_1_1dom_1_1array.html#a378b3312cdf6f8fe04725b617b8cfcb9',1,'simdjson::dom::array::end()'],['../classsimdjson_1_1dom_1_1document__stream.html#adec1e168e4188bf9c90ee87adbd72850',1,'simdjson::dom::document_stream::end()'],['../classsimdjson_1_1dom_1_1element.html#a846a790e93c9bad6c40641239bd77b28',1,'simdjson::dom::element::end()'],['../classsimdjson_1_1dom_1_1object.html#a79cf291477bcaa1bf2328411b411587d',1,'simdjson::dom::object::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#ae482e8f5fa3233babbcb9ccc29db5a15',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a7a79c0e85c9d40b53f0d4daeeb24111a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#a0a0d40ed80767c01232a6aacb6258b2b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a6ed00f1588087b2d0de926c4599366d6',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::end()']]], - ['error_369',['error',['../structsimdjson_1_1simdjson__error.html#aa8143615e5f6f02474f6ab165682ab6e',1,'simdjson::simdjson_error::error()'],['../structsimdjson_1_1simdjson__result.html#a23470fcc7f01262019e96d3f3010b4a1',1,'simdjson::simdjson_result::error()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a20a01e401b72125b9b1acef9cfb5b9ea',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::error()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a4111757108422ffaf647024319205d5c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::error()']]], - ['error_5fmessage_370',['error_message',['../namespacesimdjson.html#a65b00a7a7a9c8fafe9eb3b9b413a36fa',1,'simdjson::error_message(error_code error) noexcept'],['../namespacesimdjson.html#a56e8e2fa6798b9e0da80bc51ae4a5f29',1,'simdjson::error_message(int error) noexcept']]] + ['element_389',['element',['../classsimdjson_1_1dom_1_1element.html#a9dbf81ad662ad32168025e8e08686935',1,'simdjson::dom::element']]], + ['end_390',['end',['../classsimdjson_1_1dom_1_1array.html#a378b3312cdf6f8fe04725b617b8cfcb9',1,'simdjson::dom::array::end()'],['../classsimdjson_1_1dom_1_1document__stream.html#adec1e168e4188bf9c90ee87adbd72850',1,'simdjson::dom::document_stream::end()'],['../classsimdjson_1_1dom_1_1element.html#a846a790e93c9bad6c40641239bd77b28',1,'simdjson::dom::element::end()'],['../classsimdjson_1_1dom_1_1object.html#a79cf291477bcaa1bf2328411b411587d',1,'simdjson::dom::object::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#ae482e8f5fa3233babbcb9ccc29db5a15',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a7a79c0e85c9d40b53f0d4daeeb24111a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#a0a0d40ed80767c01232a6aacb6258b2b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::end()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a6ed00f1588087b2d0de926c4599366d6',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::end()']]], + ['error_391',['error',['../structsimdjson_1_1simdjson__error.html#aa8143615e5f6f02474f6ab165682ab6e',1,'simdjson::simdjson_error::error()'],['../structsimdjson_1_1simdjson__result.html#a23470fcc7f01262019e96d3f3010b4a1',1,'simdjson::simdjson_result::error()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a20a01e401b72125b9b1acef9cfb5b9ea',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::error()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a4111757108422ffaf647024319205d5c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::error()']]], + ['error_5fmessage_392',['error_message',['../namespacesimdjson.html#a65b00a7a7a9c8fafe9eb3b9b413a36fa',1,'simdjson::error_message(error_code error) noexcept'],['../namespacesimdjson.html#a56e8e2fa6798b9e0da80bc51ae4a5f29',1,'simdjson::error_message(int error) noexcept']]] ]; diff --git a/search/functions_5.js b/search/functions_5.js index 0bf2e2223..addb5c965 100644 --- a/search/functions_5.js +++ b/search/functions_5.js @@ -1,10 +1,10 @@ var searchData= [ - ['field_371',['field',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#a9415aecf3526ad6081be495c9be61b43',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field']]], - ['field_5fkey_372',['field_key',['../group__object.html#ga9fd0d39ec786f26b7ea86f9bc8380bdd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['field_5fvalue_373',['field_value',['../group__object.html#gaaaf58bcf25e6d30a3469848d36c65a05',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['find_5ffield_374',['find_field',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ab919032e611f7f4a1e8cc9eb47ad4dea',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::find_field()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aa25020165cc5a191026a243a10da6558',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::find_field()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a1588a173b15a20cacf77a24d07032d83',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::find_field()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a4ff908713e1eb6d6294706a235be8101',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::find_field()'],['../group__object.html#gacefcaf06811426a241ed97a6948a94ee',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::find_field(const std::string_view key) noexcept']]], - ['find_5ffield_5fraw_375',['find_field_raw',['../group__object.html#gab66bdaf2c97d2cbd2a94a5a3e67ffabc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['find_5ffield_5funordered_376',['find_field_unordered',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aa89d66d993d0bffcbb85e303ad3950c2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::find_field_unordered()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a55d8bd31e2f5e6b10986af2f48a544fc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::find_field_unordered()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#acb1514c00a87027c5eb3c81171a3b874',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::find_field_unordered()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a423064962ffe48495948c98afb0e556c',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::find_field_unordered()']]], - ['find_5ffield_5funordered_5fraw_377',['find_field_unordered_raw',['../group__object.html#ga678e53c38ebaf2323550e7f29e253df9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]] + ['field_393',['field',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#a9415aecf3526ad6081be495c9be61b43',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field']]], + ['field_5fkey_394',['field_key',['../group__object.html#ga9fd0d39ec786f26b7ea86f9bc8380bdd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['field_5fvalue_395',['field_value',['../group__object.html#gaaaf58bcf25e6d30a3469848d36c65a05',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['find_5ffield_396',['find_field',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ab919032e611f7f4a1e8cc9eb47ad4dea',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::find_field()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#aa25020165cc5a191026a243a10da6558',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::find_field()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a1588a173b15a20cacf77a24d07032d83',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::find_field()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a4ff908713e1eb6d6294706a235be8101',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::find_field()'],['../group__object.html#gacefcaf06811426a241ed97a6948a94ee',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator::find_field(const std::string_view key) noexcept']]], + ['find_5ffield_5fraw_397',['find_field_raw',['../group__object.html#gab66bdaf2c97d2cbd2a94a5a3e67ffabc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['find_5ffield_5funordered_398',['find_field_unordered',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aa89d66d993d0bffcbb85e303ad3950c2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::find_field_unordered()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a55d8bd31e2f5e6b10986af2f48a544fc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::find_field_unordered()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#acb1514c00a87027c5eb3c81171a3b874',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::find_field_unordered()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a423064962ffe48495948c98afb0e556c',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::find_field_unordered()']]], + ['find_5ffield_5funordered_5fraw_399',['find_field_unordered_raw',['../group__object.html#ga678e53c38ebaf2323550e7f29e253df9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]] ]; diff --git a/search/functions_6.js b/search/functions_6.js index a30158b19..9c3b536b0 100644 --- a/search/functions_6.js +++ b/search/functions_6.js @@ -1,23 +1,23 @@ var searchData= [ - ['get_378',['get',['../classsimdjson_1_1dom_1_1element.html#a3474c8fc1b1cb06625a50dcb9a2c5269',1,'simdjson::dom::element::get()'],['../structsimdjson_1_1simdjson__result.html#ab0fafc6d63a14891788a9edaedff4b05',1,'simdjson::simdjson_result::get()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a96c905c44f3c53cb6cdb23b760d323b8',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::get()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a7fe39fb73b6a4d9b1c97742dc2ae7b98',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get() &noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#af0af8707b5623e17c3bc9a329b7c4fa3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get(T &out) &noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8d50c7c494ab9acc4a644cc77dd058f9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get() noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a40af3c6af7d18241c1c4017df8557d86',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get(T &out) noexcept'],['../classsimdjson_1_1dom_1_1element.html#a47663724b3a6bad8666ccd24cd598bd2',1,'simdjson::dom::element::get()']]], - ['get_5factive_5fimplementation_379',['get_active_implementation',['../namespacesimdjson.html#abd8b8fd009878125822fca9a2624f6a6',1,'simdjson']]], - ['get_5farray_380',['get_array',['../classsimdjson_1_1dom_1_1element.html#a87c75accdc0b35e06f3d554561ce8cd3',1,'simdjson::dom::element::get_array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aea545f106413a9bc01cd19e6630a580d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a2fdcc51cac791c3a2f4c970764bc0155',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_array()']]], - ['get_5favailable_5fimplementations_381',['get_available_implementations',['../namespacesimdjson.html#a7e4483a8ae684fdb5b2f1e7d4a8acc69',1,'simdjson']]], - ['get_5fbool_382',['get_bool',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aa0e07db099e651d3e5279872683cb7dd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_bool()'],['../classsimdjson_1_1dom_1_1element.html#a548e0fc369eb455ea477e20fb0793627',1,'simdjson::dom::element::get_bool()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a41eaac87582a465b4c9f9834701a837d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_bool()']]], - ['get_5fc_5fstr_383',['get_c_str',['../classsimdjson_1_1dom_1_1element.html#a29c21d70352c9b8af7144fd4f38baaa6',1,'simdjson::dom::element']]], - ['get_5fdouble_384',['get_double',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a9a5ebeb4a79fa1d997f9f3478370a57e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_double()'],['../classsimdjson_1_1dom_1_1element.html#a3e74a8a6ef8318e2de805359126c6d7b',1,'simdjson::dom::element::get_double()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a9909be358c78a64bc9ab7e11e3f2a47b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_double()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#ab261642a30f5e26b0769ce701cd5b9f8',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_double()']]], - ['get_5fdouble_5fin_5fstring_385',['get_double_in_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ac8b8d7d4bc7958363b7f0d380b248a4f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_double_in_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a85e4b5250e316cc602b1b05bd097f771',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_double_in_string()']]], - ['get_5fint64_386',['get_int64',['../classsimdjson_1_1dom_1_1element.html#aa954cda836a4748ec9937291a9250604',1,'simdjson::dom::element::get_int64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ab7e4b28c0d9637cf1b04554d99c0e3b3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_int64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a6abc08fb48868bdc5104c885c46ced82',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_int64()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a92b12b32ee177c2a818618d0595d2584',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_int64()']]], - ['get_5fint64_5fin_5fstring_387',['get_int64_in_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aac4a4837e66c8f1243722ab04ce45436',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_int64_in_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a547e99f2f430ca39bf4060d090f45ff7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_int64_in_string() noexcept']]], - ['get_5fnumber_388',['get_number',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aa89c4aceb7e052a1f7ff7e4058b651f1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_number()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a2b04a9cd8c4ff9b591dc3f2db95c69cf',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_number() noexcept']]], - ['get_5fnumber_5ftype_389',['get_number_type',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#abb3a7cc6f2391d26f27a28c16ca38c9c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_number_type()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a8c8d29d831635c958e87de0cc2dab8b4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_number_type()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a2f46079741d1ba316de32bb9765c5082',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_number_type()']]], - ['get_5fobject_390',['get_object',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a4620d364a637031ef38661f9fb215ebc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_object()'],['../classsimdjson_1_1dom_1_1element.html#ab4c2e35dc44664eb04038ad35efc64f9',1,'simdjson::dom::element::get_object()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a3bde0795cb309f3e51b8388fbafc1fe4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_object() noexcept']]], - ['get_5fraw_5fjson_5fstring_391',['get_raw_json_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aca8b183c4e674a5b4ade8f6d2780f815',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_raw_json_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#afa3370b930da937911cf61ec9b047c56',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_raw_json_string() noexcept']]], - ['get_5fstring_392',['get_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a2ae4c160def21463b0ab214a36c0a78e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a9d574e04d5dfde0bf99dea4926232fe4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_string()'],['../classsimdjson_1_1dom_1_1element.html#ae83652b5016ce4d4ff71f8f9bc05913e',1,'simdjson::dom::element::get_string() const noexcept']]], - ['get_5fstring_5flength_393',['get_string_length',['../classsimdjson_1_1dom_1_1element.html#a9d92145af64401654c20d2885dd4051d',1,'simdjson::dom::element']]], - ['get_5fuint64_394',['get_uint64',['../classsimdjson_1_1dom_1_1element.html#a9e5a750a066f17d5a9a31a24980e0b1d',1,'simdjson::dom::element::get_uint64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a4d221850d045f1e7ada4dfaaee0e145c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_uint64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html#a47b30548f71aca4317bdc4c6955cd719',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference::get_uint64()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#aff5939efdcb41c9d2b9a1997816f093f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_uint64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#adaa7bb2c9b3988476f3317ddda27e22d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_uint64()']]], - ['get_5fuint64_5fin_5fstring_395',['get_uint64_in_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5cb63d14a99509d751f4be45063fec95',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_uint64_in_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8bc2eb9eeeb7e2e0b82c23ed4d254933',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_uint64_in_string()']]], - ['get_5fvalue_396',['get_value',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ab89eda435b4a68be578fcb5c3da73980',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['get_5fwobbly_5fstring_397',['get_wobbly_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ae1db0154ef901ed1e8fb581bb9df6899',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_wobbly_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ab7bb6749f40bec70c8a1a31edad53c1d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_wobbly_string()']]] + ['get_400',['get',['../classsimdjson_1_1dom_1_1element.html#a3474c8fc1b1cb06625a50dcb9a2c5269',1,'simdjson::dom::element::get()'],['../structsimdjson_1_1simdjson__result.html#ab0fafc6d63a14891788a9edaedff4b05',1,'simdjson::simdjson_result::get()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a96c905c44f3c53cb6cdb23b760d323b8',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::get()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a7fe39fb73b6a4d9b1c97742dc2ae7b98',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get() &noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#af0af8707b5623e17c3bc9a329b7c4fa3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get(T &out) &noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8d50c7c494ab9acc4a644cc77dd058f9',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get() noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a40af3c6af7d18241c1c4017df8557d86',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get(T &out) noexcept'],['../classsimdjson_1_1dom_1_1element.html#a47663724b3a6bad8666ccd24cd598bd2',1,'simdjson::dom::element::get()']]], + ['get_5factive_5fimplementation_401',['get_active_implementation',['../namespacesimdjson.html#abd8b8fd009878125822fca9a2624f6a6',1,'simdjson']]], + ['get_5farray_402',['get_array',['../classsimdjson_1_1dom_1_1element.html#a87c75accdc0b35e06f3d554561ce8cd3',1,'simdjson::dom::element::get_array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aea545f106413a9bc01cd19e6630a580d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a2fdcc51cac791c3a2f4c970764bc0155',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_array()']]], + ['get_5favailable_5fimplementations_403',['get_available_implementations',['../namespacesimdjson.html#a7e4483a8ae684fdb5b2f1e7d4a8acc69',1,'simdjson']]], + ['get_5fbool_404',['get_bool',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aa0e07db099e651d3e5279872683cb7dd',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_bool()'],['../classsimdjson_1_1dom_1_1element.html#a548e0fc369eb455ea477e20fb0793627',1,'simdjson::dom::element::get_bool()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a41eaac87582a465b4c9f9834701a837d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_bool()']]], + ['get_5fc_5fstr_405',['get_c_str',['../classsimdjson_1_1dom_1_1element.html#a29c21d70352c9b8af7144fd4f38baaa6',1,'simdjson::dom::element']]], + ['get_5fdouble_406',['get_double',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a9a5ebeb4a79fa1d997f9f3478370a57e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_double()'],['../classsimdjson_1_1dom_1_1element.html#a3e74a8a6ef8318e2de805359126c6d7b',1,'simdjson::dom::element::get_double()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a9909be358c78a64bc9ab7e11e3f2a47b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_double()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#ab261642a30f5e26b0769ce701cd5b9f8',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_double()']]], + ['get_5fdouble_5fin_5fstring_407',['get_double_in_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ac8b8d7d4bc7958363b7f0d380b248a4f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_double_in_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a85e4b5250e316cc602b1b05bd097f771',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_double_in_string()']]], + ['get_5fint64_408',['get_int64',['../classsimdjson_1_1dom_1_1element.html#aa954cda836a4748ec9937291a9250604',1,'simdjson::dom::element::get_int64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ab7e4b28c0d9637cf1b04554d99c0e3b3',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_int64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a6abc08fb48868bdc5104c885c46ced82',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_int64()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a92b12b32ee177c2a818618d0595d2584',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_int64()']]], + ['get_5fint64_5fin_5fstring_409',['get_int64_in_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aac4a4837e66c8f1243722ab04ce45436',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_int64_in_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a547e99f2f430ca39bf4060d090f45ff7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_int64_in_string() noexcept']]], + ['get_5fnumber_410',['get_number',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aa89c4aceb7e052a1f7ff7e4058b651f1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_number()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a2b04a9cd8c4ff9b591dc3f2db95c69cf',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_number() noexcept']]], + ['get_5fnumber_5ftype_411',['get_number_type',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#abb3a7cc6f2391d26f27a28c16ca38c9c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_number_type()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a8c8d29d831635c958e87de0cc2dab8b4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_number_type()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a2f46079741d1ba316de32bb9765c5082',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_number_type()']]], + ['get_5fobject_412',['get_object',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a4620d364a637031ef38661f9fb215ebc',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_object()'],['../classsimdjson_1_1dom_1_1element.html#ab4c2e35dc44664eb04038ad35efc64f9',1,'simdjson::dom::element::get_object()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a3bde0795cb309f3e51b8388fbafc1fe4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_object() noexcept']]], + ['get_5fraw_5fjson_5fstring_413',['get_raw_json_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#aca8b183c4e674a5b4ade8f6d2780f815',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_raw_json_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#afa3370b930da937911cf61ec9b047c56',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_raw_json_string() noexcept']]], + ['get_5fstring_414',['get_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a2ae4c160def21463b0ab214a36c0a78e',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a9d574e04d5dfde0bf99dea4926232fe4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_string()'],['../classsimdjson_1_1dom_1_1element.html#ae83652b5016ce4d4ff71f8f9bc05913e',1,'simdjson::dom::element::get_string() const noexcept']]], + ['get_5fstring_5flength_415',['get_string_length',['../classsimdjson_1_1dom_1_1element.html#a9d92145af64401654c20d2885dd4051d',1,'simdjson::dom::element']]], + ['get_5fuint64_416',['get_uint64',['../classsimdjson_1_1dom_1_1element.html#a9e5a750a066f17d5a9a31a24980e0b1d',1,'simdjson::dom::element::get_uint64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a4d221850d045f1e7ada4dfaaee0e145c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_uint64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference.html#a47b30548f71aca4317bdc4c6955cd719',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_reference::get_uint64()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#aff5939efdcb41c9d2b9a1997816f093f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_uint64()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#adaa7bb2c9b3988476f3317ddda27e22d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_uint64()']]], + ['get_5fuint64_5fin_5fstring_417',['get_uint64_in_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5cb63d14a99509d751f4be45063fec95',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_uint64_in_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8bc2eb9eeeb7e2e0b82c23ed4d254933',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_uint64_in_string()']]], + ['get_5fvalue_418',['get_value',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ab89eda435b4a68be578fcb5c3da73980',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['get_5fwobbly_5fstring_419',['get_wobbly_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ae1db0154ef901ed1e8fb581bb9df6899',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::get_wobbly_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#ab7bb6749f40bec70c8a1a31edad53c1d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::get_wobbly_string()']]] ]; diff --git a/search/functions_7.js b/search/functions_7.js index 3d477a5f9..5d1cdb8c9 100644 --- a/search/functions_7.js +++ b/search/functions_7.js @@ -1,5 +1,5 @@ var searchData= [ - ['has_5fnext_5felement_398',['has_next_element',['../group__array.html#ga31b0a8ce8734db9413cce31c4d9c8c8d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], - ['has_5fnext_5ffield_399',['has_next_field',['../group__object.html#ga7956fe38cd8ecfbc8f709aa6f65c92b4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]] + ['has_5fnext_5felement_420',['has_next_element',['../group__array.html#ga31b0a8ce8734db9413cce31c4d9c8c8d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]], + ['has_5fnext_5ffield_421',['has_next_field',['../group__object.html#ga7956fe38cd8ecfbc8f709aa6f65c92b4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value_iterator']]] ]; diff --git a/search/functions_8.js b/search/functions_8.js index 1d6ba199d..32797d3df 100644 --- a/search/functions_8.js +++ b/search/functions_8.js @@ -1,25 +1,25 @@ var searchData= [ - ['implementation_5fsimdjson_5fresult_5fbase_400',['implementation_simdjson_result_base',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a4f59b204f1eddcdc2b36e6df0639a516',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a108dd35fd49314820106a21afa0fb2ea',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base() noexcept=default'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a44ff65b6194c7c1cb74180b43e438619',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#af8a436d40886a295f618311d3849d7e5',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept']]], - ['is_401',['is',['../classsimdjson_1_1dom_1_1element.html#a4c77063d766c7db197f8674407b504d7',1,'simdjson::dom::element']]], - ['is_5falive_402',['is_alive',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a3170300bc331577a1435bb238cf3faff',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['is_5farray_403',['is_array',['../classsimdjson_1_1dom_1_1element.html#afaaac6e2f58128a01a25b0a5f5abb856',1,'simdjson::dom::element']]], - ['is_5fbool_404',['is_bool',['../classsimdjson_1_1dom_1_1element.html#afde562c5aae1b85a03ab6d4b040e7d13',1,'simdjson::dom::element']]], - ['is_5fdouble_405',['is_double',['../classsimdjson_1_1dom_1_1element.html#a0d11f69ba87f55960be6f655e4e99aba',1,'simdjson::dom::element::is_double()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a48f9e54ebd40e1c060be0a4b1d4ff823',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::is_double()']]], - ['is_5fempty_406',['is_empty',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a371cf8909f04019606063e8538fd7109',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::is_empty()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ad210f9115679a625ada433add55eff51',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::is_empty()']]], - ['is_5fequal_407',['is_equal',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a0ddac0ab1c69022610d8051b989b5c95',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::is_equal(std::string_view target) const noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#aa3165ea813c4c15fb9cb282e67abe6af',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::is_equal(const char *target) const noexcept']]], - ['is_5ffree_5ffrom_5funescaped_5fquote_408',['is_free_from_unescaped_quote',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a671923a53cc070f65029698afeb9be7f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string']]], - ['is_5fint64_409',['is_int64',['../classsimdjson_1_1dom_1_1element.html#adadf66ec37675d5f3fac9816a8aacba2',1,'simdjson::dom::element::is_int64()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a38d6b4b4e91f30c8def71997d23454c2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::is_int64()']]], - ['is_5finteger_410',['is_integer',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a5ab2c9c7d29a7a6c09f78930b0100836',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_integer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#af47e11e9925fd5d3d8a43cf0f7773992',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_integer() noexcept']]], - ['is_5fnegative_411',['is_negative',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5083f65b71d7540ea785ec2b52604267',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_negative()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a2701c283de019e56624e930e936e0df0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_negative()']]], - ['is_5fnull_412',['is_null',['../classsimdjson_1_1dom_1_1element.html#ae38f84f4272ae3c32b32dd6d5007ffb9',1,'simdjson::dom::element::is_null()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5ed59f01a0d4ad253f0e1c1f995ed0a7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_null()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a04f1c591d93d834377a9cb916c90e09b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_null()']]], - ['is_5fnumber_413',['is_number',['../classsimdjson_1_1dom_1_1element.html#a1e3f78b3bee5ec3f33cc4b03dcc87981',1,'simdjson::dom::element']]], - ['is_5fobject_414',['is_object',['../classsimdjson_1_1dom_1_1element.html#a08c7dcebf9e96fe5e4dd6df2959c0024',1,'simdjson::dom::element']]], - ['is_5fscalar_415',['is_scalar',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8c2618e57ec26501dd93ff8fd5cc2191',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_scalar()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ac2ea8f4340d02d9062f81419da47500b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_scalar()']]], - ['is_5fstreaming_416',['is_streaming',['../namespacesimdjson.html#a6f306690d6d088d80b0cc2717040b2d0',1,'simdjson']]], - ['is_5fstring_417',['is_string',['../classsimdjson_1_1dom_1_1element.html#a65bd96042cc0f19dc3e0635937edded4',1,'simdjson::dom::element']]], - ['is_5fuint64_418',['is_uint64',['../classsimdjson_1_1dom_1_1element.html#ac5017726a573f59c3494b92bb66a3beb',1,'simdjson::dom::element::is_uint64()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#af0e89976b80a7a7dedaf8c1a7cfd64a2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::is_uint64()']]], - ['iterate_419',['iterate',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a0da712132ca4180a84907f2ca4ffbc5b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], - ['iterate_5fmany_420',['iterate_many',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#af996682250c05ca237fe6db234bb9179',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], - ['iterator_421',['iterator',['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a6c3a5002801ab80b1c59422d7f3400d3',1,'simdjson::dom::document_stream::iterator::iterator()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a3b0ac5e3e64e53167a011afdd0b77345',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::iterator()']]] + ['implementation_5fsimdjson_5fresult_5fbase_422',['implementation_simdjson_result_base',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a4f59b204f1eddcdc2b36e6df0639a516',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a108dd35fd49314820106a21afa0fb2ea',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base() noexcept=default'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a44ff65b6194c7c1cb74180b43e438619',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#af8a436d40886a295f618311d3849d7e5',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept']]], + ['is_423',['is',['../classsimdjson_1_1dom_1_1element.html#a4c77063d766c7db197f8674407b504d7',1,'simdjson::dom::element']]], + ['is_5falive_424',['is_alive',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a3170300bc331577a1435bb238cf3faff',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['is_5farray_425',['is_array',['../classsimdjson_1_1dom_1_1element.html#afaaac6e2f58128a01a25b0a5f5abb856',1,'simdjson::dom::element']]], + ['is_5fbool_426',['is_bool',['../classsimdjson_1_1dom_1_1element.html#afde562c5aae1b85a03ab6d4b040e7d13',1,'simdjson::dom::element']]], + ['is_5fdouble_427',['is_double',['../classsimdjson_1_1dom_1_1element.html#a0d11f69ba87f55960be6f655e4e99aba',1,'simdjson::dom::element::is_double()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a48f9e54ebd40e1c060be0a4b1d4ff823',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::is_double()']]], + ['is_5fempty_428',['is_empty',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a371cf8909f04019606063e8538fd7109',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::is_empty()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ad210f9115679a625ada433add55eff51',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::is_empty()']]], + ['is_5fequal_429',['is_equal',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a0ddac0ab1c69022610d8051b989b5c95',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::is_equal(std::string_view target) const noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#aa3165ea813c4c15fb9cb282e67abe6af',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::is_equal(const char *target) const noexcept']]], + ['is_5ffree_5ffrom_5funescaped_5fquote_430',['is_free_from_unescaped_quote',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a671923a53cc070f65029698afeb9be7f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string']]], + ['is_5fint64_431',['is_int64',['../classsimdjson_1_1dom_1_1element.html#adadf66ec37675d5f3fac9816a8aacba2',1,'simdjson::dom::element::is_int64()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#a38d6b4b4e91f30c8def71997d23454c2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::is_int64()']]], + ['is_5finteger_432',['is_integer',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a5ab2c9c7d29a7a6c09f78930b0100836',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_integer()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#af47e11e9925fd5d3d8a43cf0f7773992',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_integer() noexcept']]], + ['is_5fnegative_433',['is_negative',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5083f65b71d7540ea785ec2b52604267',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_negative()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a2701c283de019e56624e930e936e0df0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_negative()']]], + ['is_5fnull_434',['is_null',['../classsimdjson_1_1dom_1_1element.html#ae38f84f4272ae3c32b32dd6d5007ffb9',1,'simdjson::dom::element::is_null()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5ed59f01a0d4ad253f0e1c1f995ed0a7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_null()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a04f1c591d93d834377a9cb916c90e09b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_null()']]], + ['is_5fnumber_435',['is_number',['../classsimdjson_1_1dom_1_1element.html#a1e3f78b3bee5ec3f33cc4b03dcc87981',1,'simdjson::dom::element']]], + ['is_5fobject_436',['is_object',['../classsimdjson_1_1dom_1_1element.html#a08c7dcebf9e96fe5e4dd6df2959c0024',1,'simdjson::dom::element']]], + ['is_5fscalar_437',['is_scalar',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8c2618e57ec26501dd93ff8fd5cc2191',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::is_scalar()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ac2ea8f4340d02d9062f81419da47500b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::is_scalar()']]], + ['is_5fstreaming_438',['is_streaming',['../namespacesimdjson.html#a6f306690d6d088d80b0cc2717040b2d0',1,'simdjson']]], + ['is_5fstring_439',['is_string',['../classsimdjson_1_1dom_1_1element.html#a65bd96042cc0f19dc3e0635937edded4',1,'simdjson::dom::element']]], + ['is_5fuint64_440',['is_uint64',['../classsimdjson_1_1dom_1_1element.html#ac5017726a573f59c3494b92bb66a3beb',1,'simdjson::dom::element::is_uint64()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#af0e89976b80a7a7dedaf8c1a7cfd64a2',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::is_uint64()']]], + ['iterate_441',['iterate',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a0da712132ca4180a84907f2ca4ffbc5b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], + ['iterate_5fmany_442',['iterate_many',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#af996682250c05ca237fe6db234bb9179',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser']]], + ['iterator_443',['iterator',['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a6c3a5002801ab80b1c59422d7f3400d3',1,'simdjson::dom::document_stream::iterator::iterator()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a3b0ac5e3e64e53167a011afdd0b77345',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::iterator()']]] ]; diff --git a/search/functions_9.js b/search/functions_9.js index c45ab123a..c0891e1e4 100644 --- a/search/functions_9.js +++ b/search/functions_9.js @@ -1,8 +1,8 @@ var searchData= [ - ['key_422',['key',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a951609ca7a164b499ff19adbe2de7983',1,'simdjson::dom::object::iterator::key()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#a4f49d8e89feb3ca69cf85ce2aea80c0f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field::key()']]], - ['key_5fc_5fstr_423',['key_c_str',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a54a99dcf9c422d5c24f3c570b6d9b6e4',1,'simdjson::dom::object::iterator']]], - ['key_5fequals_424',['key_equals',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a4807eeb1ed5f596b587d0b61dfb550e7',1,'simdjson::dom::object::iterator']]], - ['key_5fequals_5fcase_5finsensitive_425',['key_equals_case_insensitive',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a6d335de77b8c5b731566e48f6cacd95d',1,'simdjson::dom::object::iterator']]], - ['key_5flength_426',['key_length',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a5ad1b60fd5df56d9fdb8bce1e08de88f',1,'simdjson::dom::object::iterator']]] + ['key_444',['key',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a951609ca7a164b499ff19adbe2de7983',1,'simdjson::dom::object::iterator::key()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field.html#a4f49d8e89feb3ca69cf85ce2aea80c0f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::field::key()']]], + ['key_5fc_5fstr_445',['key_c_str',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a54a99dcf9c422d5c24f3c570b6d9b6e4',1,'simdjson::dom::object::iterator']]], + ['key_5fequals_446',['key_equals',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a4807eeb1ed5f596b587d0b61dfb550e7',1,'simdjson::dom::object::iterator']]], + ['key_5fequals_5fcase_5finsensitive_447',['key_equals_case_insensitive',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a6d335de77b8c5b731566e48f6cacd95d',1,'simdjson::dom::object::iterator']]], + ['key_5flength_448',['key_length',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a5ad1b60fd5df56d9fdb8bce1e08de88f',1,'simdjson::dom::object::iterator']]] ]; diff --git a/search/functions_a.js b/search/functions_a.js index a4250da1d..7ac806080 100644 --- a/search/functions_a.js +++ b/search/functions_a.js @@ -1,6 +1,6 @@ var searchData= [ - ['length_427',['length',['../structsimdjson_1_1padded__string.html#a863fded7b347718299190ad3f501d38c',1,'simdjson::padded_string']]], - ['load_428',['load',['../classsimdjson_1_1dom_1_1parser.html#ab3e5bbb1974a1932aead90ad63883a23',1,'simdjson::dom::parser::load()'],['../structsimdjson_1_1padded__string.html#aaf017ffe731c738da5eb31c63b987d3a',1,'simdjson::padded_string::load()']]], - ['load_5fmany_429',['load_many',['../classsimdjson_1_1dom_1_1parser.html#a5300851ba21d0a0273a11510fd1c378a',1,'simdjson::dom::parser']]] + ['length_449',['length',['../structsimdjson_1_1padded__string.html#a863fded7b347718299190ad3f501d38c',1,'simdjson::padded_string']]], + ['load_450',['load',['../classsimdjson_1_1dom_1_1parser.html#ab3e5bbb1974a1932aead90ad63883a23',1,'simdjson::dom::parser::load()'],['../structsimdjson_1_1padded__string.html#aaf017ffe731c738da5eb31c63b987d3a',1,'simdjson::padded_string::load()']]], + ['load_5fmany_451',['load_many',['../classsimdjson_1_1dom_1_1parser.html#a5300851ba21d0a0273a11510fd1c378a',1,'simdjson::dom::parser']]] ]; diff --git a/search/functions_b.js b/search/functions_b.js index fb0ecce46..961d8aeaa 100644 --- a/search/functions_b.js +++ b/search/functions_b.js @@ -1,6 +1,6 @@ var searchData= [ - ['max_5fcapacity_430',['max_capacity',['../classsimdjson_1_1dom_1_1parser.html#a8bfde4193783adef9c5f12dfc4da3bc0',1,'simdjson::dom::parser::max_capacity()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a006ad62e81d1ffa0fa898b586095208b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::max_capacity()']]], - ['max_5fdepth_431',['max_depth',['../classsimdjson_1_1dom_1_1parser.html#a209d15b8f87ad69f5fbaccdd5b6b5441',1,'simdjson::dom::parser::max_depth()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a9dd8dfaa40f0faec56e31f976e4c2c94',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::max_depth()']]], - ['minify_432',['minify',['../namespacesimdjson.html#aeb4ef5cab43d52da3fdd99cb689aff2c',1,'simdjson::minify(T x)'],['../namespacesimdjson.html#a94bb4244756d764cf0ed7de180ae6520',1,'simdjson::minify(const char *buf, size_t len, char *dst, size_t &dst_len) noexcept']]] + ['max_5fcapacity_452',['max_capacity',['../classsimdjson_1_1dom_1_1parser.html#a8bfde4193783adef9c5f12dfc4da3bc0',1,'simdjson::dom::parser::max_capacity()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a006ad62e81d1ffa0fa898b586095208b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::max_capacity()']]], + ['max_5fdepth_453',['max_depth',['../classsimdjson_1_1dom_1_1parser.html#a209d15b8f87ad69f5fbaccdd5b6b5441',1,'simdjson::dom::parser::max_depth()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a9dd8dfaa40f0faec56e31f976e4c2c94',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::max_depth()']]], + ['minify_454',['minify',['../namespacesimdjson.html#aeb4ef5cab43d52da3fdd99cb689aff2c',1,'simdjson::minify(T x)'],['../namespacesimdjson.html#a94bb4244756d764cf0ed7de180ae6520',1,'simdjson::minify(const char *buf, size_t len, char *dst, size_t &dst_len) noexcept']]] ]; diff --git a/search/functions_c.js b/search/functions_c.js index 1b4bcfb7d..39794190d 100644 --- a/search/functions_c.js +++ b/search/functions_c.js @@ -1,5 +1,5 @@ var searchData= [ - ['name_433',['name',['../classsimdjson_1_1implementation.html#a404c32ec6187ac0fb5b2ec6b5aea4abd',1,'simdjson::implementation']]], - ['number_5fof_5fslots_434',['number_of_slots',['../classsimdjson_1_1dom_1_1array.html#a26e66312190e016c22093292974490ff',1,'simdjson::dom::array']]] + ['name_455',['name',['../classsimdjson_1_1implementation.html#a404c32ec6187ac0fb5b2ec6b5aea4abd',1,'simdjson::implementation']]], + ['number_5fof_5fslots_456',['number_of_slots',['../classsimdjson_1_1dom_1_1array.html#a26e66312190e016c22093292974490ff',1,'simdjson::dom::array']]] ]; diff --git a/search/functions_d.js b/search/functions_d.js index 0a0f1d453..83164e690 100644 --- a/search/functions_d.js +++ b/search/functions_d.js @@ -1,24 +1,24 @@ var searchData= [ - ['object_435',['object',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a034b27d7ff75832a574c2069af267111',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::object()'],['../classsimdjson_1_1dom_1_1object.html#ae2e1a8cbaab9d352495d1dc993407be3',1,'simdjson::dom::object::object()']]], - ['object_5fiterator_436',['object_iterator',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html#a9fce67dabeb5dcccd16fa531febec666',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object_iterator']]], - ['operator_20array_437',['operator array',['../classsimdjson_1_1dom_1_1element.html#a71d6bfa627dd66e202f8b402f91a44ac',1,'simdjson::dom::element::operator array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a08307c0a5552cf8cb06613ed1de48eac',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a93756146a65e835b9358cc652dc53396',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator array()']]], - ['operator_20bool_438',['operator bool',['../classsimdjson_1_1dom_1_1element.html#ab036e52a73d5bd046e1f2650a31dab30',1,'simdjson::dom::element::operator bool()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a7df7ba140c9d6398fef2c6963da82230',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator bool()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#af7b51d9048d388235f3936c8fa30a2f7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator bool()']]], - ['operator_20const_20char_20_2a_439',['operator const char *',['../classsimdjson_1_1dom_1_1element.html#a8f9569b40dd2b23aab9fbf2229749589',1,'simdjson::dom::element']]], - ['operator_20double_440',['operator double',['../classsimdjson_1_1dom_1_1element.html#a743b5f1ef4202d8fb8fb317e612385f3',1,'simdjson::dom::element::operator double()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ae052e098bfbfde398845060a8d4f572f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator double()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a53f99cedf58e62c1382a4d5a585e05a0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator double()']]], - ['operator_20int64_5ft_441',['operator int64_t',['../classsimdjson_1_1dom_1_1element.html#afb98fdfcb6ddf19071cd2300613218d3',1,'simdjson::dom::element::operator int64_t()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5d50aa0d396fc49855d3c0c571b07a25',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator int64_t()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a30f182e71d3c13d2656ba5983862be57',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator int64_t()']]], - ['operator_20object_442',['operator object',['../classsimdjson_1_1dom_1_1element.html#a23f4d8c38309b0184e658d8a9697a177',1,'simdjson::dom::element::operator object()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a89519c599fd938a6a750262111fc5757',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator object()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a6cd27fe6dc9062b5380db757d49c3f7b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator object()']]], - ['operator_20padded_5fstring_5fview_443',['operator padded_string_view',['../structsimdjson_1_1padded__string.html#a0e5b8e8917478af4e82e023c2efa40e9',1,'simdjson::padded_string']]], - ['operator_20raw_5fjson_5fstring_444',['operator raw_json_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a78411bf36298e3468ac83f3562b75d83',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator raw_json_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a85d69a32b4b95f353abe6214ecc98619',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator raw_json_string()']]], - ['operator_20t_26_26_445',['operator T&&',['../structsimdjson_1_1simdjson__result.html#afcce23c64894ec135fe8c2d255d2121b',1,'simdjson::simdjson_result::operator T&&()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a11133790f4386ea4d11567a3a0806096',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::operator T&&()']]], - ['operator_20uint64_5ft_446',['operator uint64_t',['../classsimdjson_1_1dom_1_1element.html#ae3c0226046e29cfb0e868c5251a87e53',1,'simdjson::dom::element::operator uint64_t()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a847db7139319155ef5fa2d4af7063163',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator uint64_t()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#afb7be23d4f1006d5eae234d8c8c8d286',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator uint64_t()']]], - ['operator_20value_447',['operator value',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ad12185e1993ebcad73eb5ce82f5de8f7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['operator_21_3d_448',['operator!=',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a05396b8e8322363b523b3bf9730a31f1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::operator!=()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#abbca17b48bd6c2b045b659076f1f64ce',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator!=()'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a1da5ce328cc2609432be961736c6e810',1,'simdjson::dom::object::iterator::operator!=()'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a56c69d73c7e424e008a28771661ab218',1,'simdjson::dom::document_stream::iterator::operator!=()'],['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a2680a46eeece638bc352bcf6a169bcf6',1,'simdjson::dom::array::iterator::operator!=(const iterator &other) const noexcept']]], - ['operator_2a_449',['operator*',['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a90254656d4e7a8826246d1f931647eff',1,'simdjson::dom::array::iterator::operator*()'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a09b193fe348fa8a267b96edd96f7515e',1,'simdjson::dom::document_stream::iterator::operator*()'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a688f6c7f451602bb3385a93252c0828a',1,'simdjson::dom::object::iterator::operator*()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a1577fb5a95f92a4a1aaa8eee6440d572',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator*()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a5fe3ce985cc1921d5917667d6b25841b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::operator*()']]], - ['operator_2b_2b_450',['operator++',['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a83b3c467632c017400f95ff05d2367b3',1,'simdjson::dom::object::iterator::operator++()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a03e0c8d93b86a18b10370d51b99548ef',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::operator++()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a55e0ae33e5e5835c841fd082edab5937',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator++()'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#aa26738ad08b7de3be4621a75863118ab',1,'simdjson::dom::object::iterator::operator++()'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a7b05ed75aa2b2a6d3a17204b9863956a',1,'simdjson::dom::document_stream::iterator::operator++()'],['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a6ec91111a2bcc9e378d30b47b613fac5',1,'simdjson::dom::array::iterator::operator++() noexcept'],['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a46454681bd5e3a938c04eb89210e7966',1,'simdjson::dom::array::iterator::operator++(int) noexcept']]], - ['operator_3c_3c_451',['operator<<',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ab10943c6107de5337f376a6939f817af',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<()'],['../namespacesimdjson.html#a43514fe76c3095e45f30a050a9551d27',1,'simdjson::operator<<()'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a386f80798c223c5fdbfc4dd9066a6b99',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson_result< json_type > &type) noexcept(false)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac3a4f6af474f2b5f6d749f7452bb5477',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value x)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a24f9bbfe8b5a3017b4dd4b72dbccec4d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array value)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a6f753d5e1bc479321c51b54392a96a65',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document &value)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ae52a82c2f754a47eb9dac12223b3311d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object value)'],['../namespacesimdjson.html#a61a74357c3e9313ad84c5f1243fdf581',1,'simdjson::operator<<(std::ostream &out, simdjson_result< padded_string_view > &s) noexcept(false)'],['../namespacesimdjson.html#a39bbbf605c0068e4a65c2d8885727fc9',1,'simdjson::operator<<(std::ostream &out, simdjson_result< padded_string > &s) noexcept(false)'],['../namespacesimdjson.html#a537445bb236ae76d2b5559b1851b7108',1,'simdjson::operator<<(std::ostream &out, const padded_string &s)']]], - ['operator_3d_452',['operator=',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#ac3c10596a0934f4f5375b986a35f90db',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::operator=()'],['../structsimdjson_1_1padded__string.html#aa43b3a8e0df4edcf960f04441dd9b930',1,'simdjson::padded_string::operator=()'],['../classsimdjson_1_1dom_1_1parser.html#af5b61dda345cef1feba7c4529dfe0259',1,'simdjson::dom::parser::operator=()'],['../classsimdjson_1_1dom_1_1document__stream.html#a162d002972b41bbb7d8e4021341e15ba',1,'simdjson::dom::document_stream::operator=()'],['../classsimdjson_1_1dom_1_1document.html#a336814aa587d9ca605e1548b22b2b80c',1,'simdjson::dom::document::operator=()']]], - ['operator_3d_3d_453',['operator==',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#aab771b17058b0c93bdd0a8679c2c4d84',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator==()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a20cd55e63cf5bdc1561f771b4db1ac1b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator==()']]], - ['operator_5b_5d_454',['operator[]',['../classsimdjson_1_1dom_1_1object.html#a2691ceae488be203aac2d5ef5b67347f',1,'simdjson::dom::object::operator[](const char *key) const noexcept'],['../classsimdjson_1_1dom_1_1object.html#acc66a2f2eb74fbe359d4064531764f50',1,'simdjson::dom::object::operator[](std::string_view key) const noexcept'],['../classsimdjson_1_1dom_1_1element.html#a367d22eeabc1881a8eb18bae2f2ba3b8',1,'simdjson::dom::element::operator[](const char *key) const noexcept'],['../classsimdjson_1_1dom_1_1element.html#aca693f57d73a5ce95d1f7bedf67289b7',1,'simdjson::dom::element::operator[](std::string_view key) const noexcept']]], - ['string_5fview_455',['string_view',['../classsimdjson_1_1dom_1_1element.html#a83adcf723abff34d7c1e8ec0e69d967b',1,'simdjson::dom::element::string_view()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a30e8df60ace82837a17e52d5e457ac52',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::string_view()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8e5f2ff46639e6c1cffb73d4e071e491',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::string_view()'],['../structsimdjson_1_1padded__string.html#a4bf80c11155b8067a87bd76762bee23b',1,'simdjson::padded_string::string_view()']]] + ['object_457',['object',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a034b27d7ff75832a574c2069af267111',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::object()'],['../classsimdjson_1_1dom_1_1object.html#ae2e1a8cbaab9d352495d1dc993407be3',1,'simdjson::dom::object::object()']]], + ['object_5fiterator_458',['object_iterator',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator.html#a9fce67dabeb5dcccd16fa531febec666',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object_iterator']]], + ['operator_20array_459',['operator array',['../classsimdjson_1_1dom_1_1element.html#a71d6bfa627dd66e202f8b402f91a44ac',1,'simdjson::dom::element::operator array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a08307c0a5552cf8cb06613ed1de48eac',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator array()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a93756146a65e835b9358cc652dc53396',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator array()']]], + ['operator_20bool_460',['operator bool',['../classsimdjson_1_1dom_1_1element.html#ab036e52a73d5bd046e1f2650a31dab30',1,'simdjson::dom::element::operator bool()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a7df7ba140c9d6398fef2c6963da82230',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator bool()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#af7b51d9048d388235f3936c8fa30a2f7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator bool()']]], + ['operator_20const_20char_20_2a_461',['operator const char *',['../classsimdjson_1_1dom_1_1element.html#a8f9569b40dd2b23aab9fbf2229749589',1,'simdjson::dom::element']]], + ['operator_20double_462',['operator double',['../classsimdjson_1_1dom_1_1element.html#a743b5f1ef4202d8fb8fb317e612385f3',1,'simdjson::dom::element::operator double()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ae052e098bfbfde398845060a8d4f572f',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator double()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a53f99cedf58e62c1382a4d5a585e05a0',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator double()']]], + ['operator_20int64_5ft_463',['operator int64_t',['../classsimdjson_1_1dom_1_1element.html#afb98fdfcb6ddf19071cd2300613218d3',1,'simdjson::dom::element::operator int64_t()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a5d50aa0d396fc49855d3c0c571b07a25',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator int64_t()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a30f182e71d3c13d2656ba5983862be57',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator int64_t()']]], + ['operator_20object_464',['operator object',['../classsimdjson_1_1dom_1_1element.html#a23f4d8c38309b0184e658d8a9697a177',1,'simdjson::dom::element::operator object()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a89519c599fd938a6a750262111fc5757',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator object()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a6cd27fe6dc9062b5380db757d49c3f7b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator object()']]], + ['operator_20padded_5fstring_5fview_465',['operator padded_string_view',['../structsimdjson_1_1padded__string.html#a0e5b8e8917478af4e82e023c2efa40e9',1,'simdjson::padded_string']]], + ['operator_20raw_5fjson_5fstring_466',['operator raw_json_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a78411bf36298e3468ac83f3562b75d83',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator raw_json_string()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a85d69a32b4b95f353abe6214ecc98619',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator raw_json_string()']]], + ['operator_20t_26_26_467',['operator T&&',['../structsimdjson_1_1simdjson__result.html#afcce23c64894ec135fe8c2d255d2121b',1,'simdjson::simdjson_result::operator T&&()'],['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a11133790f4386ea4d11567a3a0806096',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base::operator T&&()']]], + ['operator_20uint64_5ft_468',['operator uint64_t',['../classsimdjson_1_1dom_1_1element.html#ae3c0226046e29cfb0e868c5251a87e53',1,'simdjson::dom::element::operator uint64_t()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a847db7139319155ef5fa2d4af7063163',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::operator uint64_t()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#afb7be23d4f1006d5eae234d8c8c8d286',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::operator uint64_t()']]], + ['operator_20value_469',['operator value',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#ad12185e1993ebcad73eb5ce82f5de8f7',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['operator_21_3d_470',['operator!=',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a05396b8e8322363b523b3bf9730a31f1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::operator!=()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#abbca17b48bd6c2b045b659076f1f64ce',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator!=()'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a1da5ce328cc2609432be961736c6e810',1,'simdjson::dom::object::iterator::operator!=()'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a56c69d73c7e424e008a28771661ab218',1,'simdjson::dom::document_stream::iterator::operator!=()'],['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a2680a46eeece638bc352bcf6a169bcf6',1,'simdjson::dom::array::iterator::operator!=(const iterator &other) const noexcept']]], + ['operator_2a_471',['operator*',['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a90254656d4e7a8826246d1f931647eff',1,'simdjson::dom::array::iterator::operator*()'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a09b193fe348fa8a267b96edd96f7515e',1,'simdjson::dom::document_stream::iterator::operator*()'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a688f6c7f451602bb3385a93252c0828a',1,'simdjson::dom::object::iterator::operator*()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a1577fb5a95f92a4a1aaa8eee6440d572',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator*()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a5fe3ce985cc1921d5917667d6b25841b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::operator*() noexcept']]], + ['operator_2b_2b_472',['operator++',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_1_1iterator.html#a03e0c8d93b86a18b10370d51b99548ef',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::iterator::operator++()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a55e0ae33e5e5835c841fd082edab5937',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator++()'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#a83b3c467632c017400f95ff05d2367b3',1,'simdjson::dom::object::iterator::operator++(int) noexcept'],['../classsimdjson_1_1dom_1_1object_1_1iterator.html#aa26738ad08b7de3be4621a75863118ab',1,'simdjson::dom::object::iterator::operator++() noexcept'],['../classsimdjson_1_1dom_1_1document__stream_1_1iterator.html#a7b05ed75aa2b2a6d3a17204b9863956a',1,'simdjson::dom::document_stream::iterator::operator++()'],['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a6ec91111a2bcc9e378d30b47b613fac5',1,'simdjson::dom::array::iterator::operator++() noexcept'],['../classsimdjson_1_1dom_1_1array_1_1iterator.html#a46454681bd5e3a938c04eb89210e7966',1,'simdjson::dom::array::iterator::operator++(int) noexcept']]], + ['operator_3c_3c_473',['operator<<',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ab10943c6107de5337f376a6939f817af',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<()'],['../namespacesimdjson.html#a43514fe76c3095e45f30a050a9551d27',1,'simdjson::operator<<()'],['../namespacesimdjson_1_1dom.html#a9b9af1992350587324412b3ee5b3347a',1,'simdjson::dom::operator<<(std::ostream &out, simdjson::dom::object value)'],['../namespacesimdjson_1_1dom.html#a43347827393e037c8027ddccd6ec994b',1,'simdjson::dom::operator<<(std::ostream &out, simdjson::dom::array value)'],['../namespacesimdjson_1_1dom.html#aa5dbd189409df6b2672310006c92463f',1,'simdjson::dom::operator<<(std::ostream &out, simdjson::dom::element value)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a386f80798c223c5fdbfc4dd9066a6b99',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson_result< json_type > &type) noexcept(false)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ac3a4f6af474f2b5f6d749f7452bb5477',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value x)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a24f9bbfe8b5a3017b4dd4b72dbccec4d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array value)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a6f753d5e1bc479321c51b54392a96a65',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document &value)'],['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ae52a82c2f754a47eb9dac12223b3311d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator<<(std::ostream &out, simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object value)'],['../namespacesimdjson.html#a61a74357c3e9313ad84c5f1243fdf581',1,'simdjson::operator<<(std::ostream &out, simdjson_result< padded_string_view > &s) noexcept(false)'],['../namespacesimdjson.html#a39bbbf605c0068e4a65c2d8885727fc9',1,'simdjson::operator<<(std::ostream &out, simdjson_result< padded_string > &s) noexcept(false)'],['../namespacesimdjson.html#a537445bb236ae76d2b5559b1851b7108',1,'simdjson::operator<<(std::ostream &out, const padded_string &s)']]], + ['operator_3d_474',['operator=',['../structsimdjson_1_1padded__string.html#aa43b3a8e0df4edcf960f04441dd9b930',1,'simdjson::padded_string::operator=()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream.html#ac3c10596a0934f4f5375b986a35f90db',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document_stream::operator=()'],['../classsimdjson_1_1dom_1_1parser.html#af5b61dda345cef1feba7c4529dfe0259',1,'simdjson::dom::parser::operator=()'],['../classsimdjson_1_1dom_1_1document__stream.html#a162d002972b41bbb7d8e4021341e15ba',1,'simdjson::dom::document_stream::operator=()'],['../classsimdjson_1_1dom_1_1document.html#a336814aa587d9ca605e1548b22b2b80c',1,'simdjson::dom::document::operator=()']]], + ['operator_3d_3d_475',['operator==',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#aab771b17058b0c93bdd0a8679c2c4d84',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::operator==()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator.html#a20cd55e63cf5bdc1561f771b4db1ac1b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array_iterator::operator==()']]], + ['operator_5b_5d_476',['operator[]',['../classsimdjson_1_1dom_1_1object.html#a2691ceae488be203aac2d5ef5b67347f',1,'simdjson::dom::object::operator[](const char *key) const noexcept'],['../classsimdjson_1_1dom_1_1object.html#acc66a2f2eb74fbe359d4064531764f50',1,'simdjson::dom::object::operator[](std::string_view key) const noexcept'],['../classsimdjson_1_1dom_1_1element.html#a367d22eeabc1881a8eb18bae2f2ba3b8',1,'simdjson::dom::element::operator[](const char *key) const noexcept'],['../classsimdjson_1_1dom_1_1element.html#aca693f57d73a5ce95d1f7bedf67289b7',1,'simdjson::dom::element::operator[](std::string_view key) const noexcept']]], + ['string_5fview_477',['string_view',['../classsimdjson_1_1dom_1_1element.html#a83adcf723abff34d7c1e8ec0e69d967b',1,'simdjson::dom::element::string_view()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a30e8df60ace82837a17e52d5e457ac52',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::string_view()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a8e5f2ff46639e6c1cffb73d4e071e491',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::string_view()'],['../structsimdjson_1_1padded__string.html#a4bf80c11155b8067a87bd76762bee23b',1,'simdjson::padded_string::string_view()']]] ]; diff --git a/search/functions_e.js b/search/functions_e.js index 2272e62e3..b0bc7d285 100644 --- a/search/functions_e.js +++ b/search/functions_e.js @@ -1,11 +1,11 @@ var searchData= [ - ['padded_5fstring_456',['padded_string',['../structsimdjson_1_1padded__string.html#ac06ec74c78934565cdf50df163d35476',1,'simdjson::padded_string::padded_string(size_t length) noexcept'],['../structsimdjson_1_1padded__string.html#a1b15f9345c0215e7548df1aa0105de98',1,'simdjson::padded_string::padded_string(const char *data, size_t length) noexcept'],['../structsimdjson_1_1padded__string.html#a44fb0f219f05528e606f79dab7c32482',1,'simdjson::padded_string::padded_string(const std::string &str_) noexcept'],['../structsimdjson_1_1padded__string.html#a6199f5bf259fcac114addeef569cf5a5',1,'simdjson::padded_string::padded_string(std::string_view sv_) noexcept'],['../structsimdjson_1_1padded__string.html#a952eaf7ff8ddf252d9c00a693978a4da',1,'simdjson::padded_string::padded_string(padded_string &&o) noexcept'],['../structsimdjson_1_1padded__string.html#a8e10a3a5a46a4d58459b052975b0bf66',1,'simdjson::padded_string::padded_string() noexcept']]], - ['padded_5fstring_5fview_457',['padded_string_view',['../classsimdjson_1_1padded__string__view.html#aae57856a217294ac218b6372a5e37d9a',1,'simdjson::padded_string_view::padded_string_view(const std::string &s) noexcept'],['../classsimdjson_1_1padded__string__view.html#a12b33830793e7ab1953b961088a83c3d',1,'simdjson::padded_string_view::padded_string_view(std::string_view s, size_t capacity) noexcept'],['../classsimdjson_1_1padded__string__view.html#a184b54acd28046a9c4f2a6cfa5419779',1,'simdjson::padded_string_view::padded_string_view(const uint8_t *s, size_t len, size_t capacity) noexcept'],['../classsimdjson_1_1padded__string__view.html#a47ac0063f7dd0ffd832c5e4439f2de30',1,'simdjson::padded_string_view::padded_string_view(const char *s, size_t len, size_t capacity) noexcept'],['../classsimdjson_1_1padded__string__view.html#aa338ad56304bc79e6ca1fab64af41de0',1,'simdjson::padded_string_view::padded_string_view() noexcept=default']]], - ['padding_458',['padding',['../classsimdjson_1_1padded__string__view.html#a934e7272d22d6024383eafe07b06773c',1,'simdjson::padded_string_view']]], - ['parse_459',['parse',['../classsimdjson_1_1dom_1_1parser.html#a16c7d1e28125ef7d5703244483f70984',1,'simdjson::dom::parser']]], - ['parse_5finto_5fdocument_460',['parse_into_document',['../classsimdjson_1_1dom_1_1parser.html#a1afc4d3b429363b503a5605d66081e30',1,'simdjson::dom::parser']]], - ['parse_5fmany_461',['parse_many',['../classsimdjson_1_1dom_1_1parser.html#afb18710d2e2ef0fd40dda4887282bdb2',1,'simdjson::dom::parser']]], - ['parser_462',['parser',['../classsimdjson_1_1dom_1_1parser.html#a09370efac9e1b7d9b4a8349332e026c3',1,'simdjson::dom::parser::parser(size_t max_capacity=SIMDJSON_MAXSIZE_BYTES) noexcept'],['../classsimdjson_1_1dom_1_1parser.html#a3f3c80565fe63857e2901c48e7bed64d',1,'simdjson::dom::parser::parser(parser &&other) noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a76abd4d78f0c26d80d3bf436ce212e00',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::parser()']]], - ['prettify_463',['prettify',['../namespacesimdjson.html#aed443864cc94c09c3f88eea39f8ce645',1,'simdjson']]] + ['padded_5fstring_478',['padded_string',['../structsimdjson_1_1padded__string.html#ac06ec74c78934565cdf50df163d35476',1,'simdjson::padded_string::padded_string(size_t length) noexcept'],['../structsimdjson_1_1padded__string.html#a1b15f9345c0215e7548df1aa0105de98',1,'simdjson::padded_string::padded_string(const char *data, size_t length) noexcept'],['../structsimdjson_1_1padded__string.html#a44fb0f219f05528e606f79dab7c32482',1,'simdjson::padded_string::padded_string(const std::string &str_) noexcept'],['../structsimdjson_1_1padded__string.html#a6199f5bf259fcac114addeef569cf5a5',1,'simdjson::padded_string::padded_string(std::string_view sv_) noexcept'],['../structsimdjson_1_1padded__string.html#a952eaf7ff8ddf252d9c00a693978a4da',1,'simdjson::padded_string::padded_string(padded_string &&o) noexcept'],['../structsimdjson_1_1padded__string.html#a8e10a3a5a46a4d58459b052975b0bf66',1,'simdjson::padded_string::padded_string() noexcept']]], + ['padded_5fstring_5fview_479',['padded_string_view',['../classsimdjson_1_1padded__string__view.html#aae57856a217294ac218b6372a5e37d9a',1,'simdjson::padded_string_view::padded_string_view(const std::string &s) noexcept'],['../classsimdjson_1_1padded__string__view.html#a12b33830793e7ab1953b961088a83c3d',1,'simdjson::padded_string_view::padded_string_view(std::string_view s, size_t capacity) noexcept'],['../classsimdjson_1_1padded__string__view.html#a184b54acd28046a9c4f2a6cfa5419779',1,'simdjson::padded_string_view::padded_string_view(const uint8_t *s, size_t len, size_t capacity) noexcept'],['../classsimdjson_1_1padded__string__view.html#a47ac0063f7dd0ffd832c5e4439f2de30',1,'simdjson::padded_string_view::padded_string_view(const char *s, size_t len, size_t capacity) noexcept'],['../classsimdjson_1_1padded__string__view.html#aa338ad56304bc79e6ca1fab64af41de0',1,'simdjson::padded_string_view::padded_string_view() noexcept=default']]], + ['padding_480',['padding',['../classsimdjson_1_1padded__string__view.html#a934e7272d22d6024383eafe07b06773c',1,'simdjson::padded_string_view']]], + ['parse_481',['parse',['../classsimdjson_1_1dom_1_1parser.html#a16c7d1e28125ef7d5703244483f70984',1,'simdjson::dom::parser']]], + ['parse_5finto_5fdocument_482',['parse_into_document',['../classsimdjson_1_1dom_1_1parser.html#a1afc4d3b429363b503a5605d66081e30',1,'simdjson::dom::parser']]], + ['parse_5fmany_483',['parse_many',['../classsimdjson_1_1dom_1_1parser.html#afb18710d2e2ef0fd40dda4887282bdb2',1,'simdjson::dom::parser']]], + ['parser_484',['parser',['../classsimdjson_1_1dom_1_1parser.html#a09370efac9e1b7d9b4a8349332e026c3',1,'simdjson::dom::parser::parser(size_t max_capacity=SIMDJSON_MAXSIZE_BYTES) noexcept'],['../classsimdjson_1_1dom_1_1parser.html#a3f3c80565fe63857e2901c48e7bed64d',1,'simdjson::dom::parser::parser(parser &&other) noexcept'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1parser.html#a76abd4d78f0c26d80d3bf436ce212e00',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::parser::parser()']]], + ['prettify_485',['prettify',['../namespacesimdjson.html#aed443864cc94c09c3f88eea39f8ce645',1,'simdjson']]] ]; diff --git a/search/functions_f.js b/search/functions_f.js index c2383558a..628e73a15 100644 --- a/search/functions_f.js +++ b/search/functions_f.js @@ -1,11 +1,11 @@ var searchData= [ - ['raw_464',['raw',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a8736f5e397a3e0a55090aadee0596214',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string']]], - ['raw_5fjson_465',['raw_json',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#ad8a7f0b418fae60160e403f71a5a8088',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::raw_json()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aa3a27654a19c386ad0c775cff258cf0c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::raw_json()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a71600033791f9c6bbc9f40fb2f82fdc8',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::raw_json()']]], - ['raw_5fjson_5fstring_466',['raw_json_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a78b420ddb8a0570ee973cdfbccd31c9a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::raw_json_string() noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#acf64001cc9961cd01712211b778e760b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::raw_json_string(const uint8_t *_buf) noexcept']]], - ['raw_5fjson_5ftoken_467',['raw_json_token',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a58802e77b6fb25a3d2ec8a4d2482f9bf',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::raw_json_token()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a0bcbee63db869ac122bed75000b54d46',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document >::raw_json_token()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ac1bcd8afb10742d6f18b8f2f07ba0392',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document_reference >::raw_json_token()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a37427e768435aafef5af097b8cc3cfec',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::raw_json_token()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a442b2e5803e69d4845b5b7f7bd51a0ed',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::raw_json_token()']]], - ['reset_468',['reset',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#ae7248918b09cb4cb1d866605c641679d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::reset()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ae0bc6b9803e0c989e9defaf3edcaaae4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::reset()']]], - ['resume_469',['resume',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a970f5c3f3e668a399765d52c7426764d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value']]], - ['rewind_470',['rewind',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a9cc053001e8246e6e65bbcbf3db035c4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], - ['root_471',['root',['../classsimdjson_1_1dom_1_1document.html#ae19dced0eee5f63b9d1591ef51dcda4e',1,'simdjson::dom::document']]] + ['raw_486',['raw',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a8736f5e397a3e0a55090aadee0596214',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string']]], + ['raw_5fjson_487',['raw_json',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#ad8a7f0b418fae60160e403f71a5a8088',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::raw_json()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#aa3a27654a19c386ad0c775cff258cf0c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::raw_json()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#a71600033791f9c6bbc9f40fb2f82fdc8',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::raw_json()']]], + ['raw_5fjson_5fstring_488',['raw_json_string',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#a78b420ddb8a0570ee973cdfbccd31c9a',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::raw_json_string() noexcept=default'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string.html#acf64001cc9961cd01712211b778e760b',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string::raw_json_string(const uint8_t *_buf) noexcept']]], + ['raw_5fjson_5ftoken_489',['raw_json_token',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a58802e77b6fb25a3d2ec8a4d2482f9bf',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::raw_json_token()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a0bcbee63db869ac122bed75000b54d46',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document >::raw_json_token()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ac1bcd8afb10742d6f18b8f2f07ba0392',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::document_reference >::raw_json_token()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a37427e768435aafef5af097b8cc3cfec',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value::raw_json_token()'],['../structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a442b2e5803e69d4845b5b7f7bd51a0ed',1,'simdjson::simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::value >::raw_json_token()']]], + ['reset_490',['reset',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#ae7248918b09cb4cb1d866605c641679d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::reset()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object.html#ae0bc6b9803e0c989e9defaf3edcaaae4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::object::reset()']]], + ['resume_491',['resume',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value.html#a970f5c3f3e668a399765d52c7426764d',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::value']]], + ['rewind_492',['rewind',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a9cc053001e8246e6e65bbcbf3db035c4',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]], + ['root_493',['root',['../classsimdjson_1_1dom_1_1document.html#ae19dced0eee5f63b9d1591ef51dcda4e',1,'simdjson::dom::document']]] ]; diff --git a/search/groups_0.js b/search/groups_0.js index 39cce4ca4..10cbefbdf 100644 --- a/search/groups_0.js +++ b/search/groups_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['array_20iteration_569',['Array iteration',['../group__array.html',1,'']]] + ['array_20iteration_600',['Array iteration',['../group__array.html',1,'']]] ]; diff --git a/search/groups_1.js b/search/groups_1.js index a0d16203c..d7af42340 100644 --- a/search/groups_1.js +++ b/search/groups_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['object_20iteration_570',['Object iteration',['../group__object.html',1,'']]] + ['object_20iteration_601',['Object iteration',['../group__object.html',1,'']]] ]; diff --git a/search/groups_2.js b/search/groups_2.js index d8313c640..8c3b9cdab 100644 --- a/search/groups_2.js +++ b/search/groups_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['scalar_20values_571',['Scalar values',['../group__scalar.html',1,'']]] + ['scalar_20values_602',['Scalar values',['../group__scalar.html',1,'']]] ]; diff --git a/search/namespaces_0.js b/search/namespaces_0.js index 0de47b660..2b1f6b740 100644 --- a/search/namespaces_0.js +++ b/search/namespaces_0.js @@ -1,5 +1,12 @@ var searchData= [ - ['ondemand_336',['ondemand',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], - ['simdjson_337',['simdjson',['../namespacesimdjson.html',1,'']]] + ['arm64_352',['arm64',['../namespacesimdjson_1_1arm64.html',1,'simdjson']]], + ['dom_353',['dom',['../namespacesimdjson_1_1dom.html',1,'simdjson']]], + ['fallback_354',['fallback',['../namespacesimdjson_1_1fallback.html',1,'simdjson']]], + ['haswell_355',['haswell',['../namespacesimdjson_1_1haswell.html',1,'simdjson']]], + ['icelake_356',['icelake',['../namespacesimdjson_1_1icelake.html',1,'simdjson']]], + ['ondemand_357',['ondemand',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html',1,'simdjson::SIMDJSON_IMPLEMENTATION']]], + ['ppc64_358',['ppc64',['../namespacesimdjson_1_1ppc64.html',1,'simdjson']]], + ['simdjson_359',['simdjson',['../namespacesimdjson.html',1,'']]], + ['westmere_360',['westmere',['../namespacesimdjson_1_1westmere.html',1,'simdjson']]] ]; diff --git a/search/pages_0.js b/search/pages_0.js index a87f509fd..0ed9cfeba 100644 --- a/search/pages_0.js +++ b/search/pages_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['a_20better_20way_20to_20parse_20documents_3f_572',['A Better Way to Parse Documents?',['../md_doc_ondemand_design.html',1,'']]] + ['a_20better_20way_20to_20parse_20documents_3f_603',['A Better Way to Parse Documents?',['../md_doc_ondemand_design.html',1,'']]] ]; diff --git a/search/pages_1.js b/search/pages_1.js index 55a0570bc..ab7d48661 100644 --- a/search/pages_1.js +++ b/search/pages_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['cpu_20architecture_2dspecific_20implementations_573',['CPU Architecture-Specific Implementations',['../md_doc_implementation_selection.html',1,'']]] + ['cpu_20architecture_2dspecific_20implementations_604',['CPU Architecture-Specific Implementations',['../md_doc_implementation_selection.html',1,'']]] ]; diff --git a/search/pages_2.js b/search/pages_2.js index fd6d58dba..83f84e533 100644 --- a/search/pages_2.js +++ b/search/pages_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['deprecated_20list_574',['Deprecated List',['../deprecated.html',1,'']]] + ['deprecated_20list_605',['Deprecated List',['../deprecated.html',1,'']]] ]; diff --git a/search/pages_3.js b/search/pages_3.js index 8f0038d08..1c24fdd2f 100644 --- a/search/pages_3.js +++ b/search/pages_3.js @@ -1,4 +1,4 @@ var searchData= [ - ['iterate_5fmany_575',['iterate_many',['../md_doc_iterate_many.html',1,'']]] + ['iterate_5fmany_606',['iterate_many',['../md_doc_iterate_many.html',1,'']]] ]; diff --git a/search/pages_4.js b/search/pages_4.js index eaae4bf9c..18bfa7eee 100644 --- a/search/pages_4.js +++ b/search/pages_4.js @@ -1,5 +1,5 @@ var searchData= [ - ['parse_5fmany_576',['parse_many',['../md_doc_parse_many.html',1,'']]], - ['performance_20notes_577',['Performance Notes',['../md_doc_performance.html',1,'']]] + ['parse_5fmany_607',['parse_many',['../md_doc_parse_many.html',1,'']]], + ['performance_20notes_608',['Performance Notes',['../md_doc_performance.html',1,'']]] ]; diff --git a/search/pages_5.js b/search/pages_5.js index 260037b2e..7d9307a80 100644 --- a/search/pages_5.js +++ b/search/pages_5.js @@ -1,6 +1,6 @@ var searchData= [ - ['tape_20structure_20in_20simdjson_578',['Tape structure in simdjson',['../md_doc_tape.html',1,'']]], - ['the_20basics_579',['The Basics',['../md_doc_basics.html',1,'']]], - ['the_20document_2dobject_2dmodel_20_28dom_29_20front_2dend_580',['The Document-Object-Model (DOM) front-end',['../md_doc_dom.html',1,'']]] + ['tape_20structure_20in_20simdjson_609',['Tape structure in simdjson',['../md_doc_tape.html',1,'']]], + ['the_20basics_610',['The Basics',['../md_doc_basics.html',1,'']]], + ['the_20document_2dobject_2dmodel_20_28dom_29_20front_2dend_611',['The Document-Object-Model (DOM) front-end',['../md_doc_dom.html',1,'']]] ]; diff --git a/search/searchdata.js b/search/searchdata.js index 0b1d684bc..21c304990 100644 --- a/search/searchdata.js +++ b/search/searchdata.js @@ -3,7 +3,7 @@ var indexSectionsWithContent = 0: "abcdefghijklmnoprstuvw~", 1: "adefiknoprsv", 2: "s", - 3: "is", + 3: "s", 4: "abcdefghiklmnoprstuvw~", 5: "bdfiklopsv", 6: "denp", diff --git a/search/typedefs_0.js b/search/typedefs_0.js index aa89eec9e..eb2a8655f 100644 --- a/search/typedefs_0.js +++ b/search/typedefs_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['depth_5ft_522',['depth_t',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#af941be7ff0cfaeb30d15d2fb52e76dd1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] + ['depth_5ft_544',['depth_t',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#af941be7ff0cfaeb30d15d2fb52e76dd1',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] ]; diff --git a/search/typedefs_1.js b/search/typedefs_1.js index dfab88919..bc6e50bfc 100644 --- a/search/typedefs_1.js +++ b/search/typedefs_1.js @@ -1,4 +1,4 @@ var searchData= [ - ['errorvalues_523',['ErrorValues',['../namespacesimdjson.html#a63b494af834917af13120dcd57719bdb',1,'simdjson']]] + ['errorvalues_545',['ErrorValues',['../namespacesimdjson.html#a63b494af834917af13120dcd57719bdb',1,'simdjson']]] ]; diff --git a/search/typedefs_2.js b/search/typedefs_2.js index 4d6603270..c257ec6e1 100644 --- a/search/typedefs_2.js +++ b/search/typedefs_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['number_5ftype_524',['number_type',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#ad1157b391ebf205df7e747d753746f93',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] + ['number_5ftype_546',['number_type',['../namespacesimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand.html#a6a2b39df6a1ac51d9fbb7b39a1fcf89c',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand']]] ]; diff --git a/search/typedefs_3.js b/search/typedefs_3.js index 475fd7a14..d905bd2e7 100644 --- a/search/typedefs_3.js +++ b/search/typedefs_3.js @@ -1,4 +1,4 @@ var searchData= [ - ['parsedjson_525',['ParsedJson',['../namespacesimdjson.html#a9245ff68919610377256bb9b21070e2a',1,'simdjson']]] + ['parsedjson_547',['ParsedJson',['../namespacesimdjson.html#a9245ff68919610377256bb9b21070e2a',1,'simdjson']]] ]; diff --git a/search/variables_0.js b/search/variables_0.js index e141e727b..f5d87646b 100644 --- a/search/variables_0.js +++ b/search/variables_0.js @@ -1,4 +1,4 @@ var searchData= [ - ['buf_507',['buf',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a961b4870710d5ee1da938c4923d6f68d',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]] + ['buf_529',['buf',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a961b4870710d5ee1da938c4923d6f68d',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]] ]; diff --git a/search/variables_1.js b/search/variables_1.js index 2baf7d443..ca2f50817 100644 --- a/search/variables_1.js +++ b/search/variables_1.js @@ -1,6 +1,6 @@ var searchData= [ - ['default_5fmax_5fdepth_508',['DEFAULT_MAX_DEPTH',['../namespacesimdjson.html#a6df2598eb1d4e1ea669c41831cc7325d',1,'simdjson']]], - ['doc_509',['doc',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a4089d6265ec845fd85acd2db0973b858',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]], - ['document_5fdepth_510',['DOCUMENT_DEPTH',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a18847ef30e5800f1c628a344c23ec968',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]] + ['default_5fmax_5fdepth_530',['DEFAULT_MAX_DEPTH',['../namespacesimdjson.html#a6df2598eb1d4e1ea669c41831cc7325d',1,'simdjson']]], + ['doc_531',['doc',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a4089d6265ec845fd85acd2db0973b858',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]], + ['document_5fdepth_532',['DOCUMENT_DEPTH',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a18847ef30e5800f1c628a344c23ec968',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document']]] ]; diff --git a/search/variables_2.js b/search/variables_2.js index 57b0bbedd..3d4a8a7cd 100644 --- a/search/variables_2.js +++ b/search/variables_2.js @@ -1,4 +1,4 @@ var searchData= [ - ['first_511',['first',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#ae51247dce4e77f1e6067cfd4654cca30',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base']]] + ['first_533',['first',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#ae51247dce4e77f1e6067cfd4654cca30',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base']]] ]; diff --git a/search/variables_3.js b/search/variables_3.js index 3c277c82d..66ed18cca 100644 --- a/search/variables_3.js +++ b/search/variables_3.js @@ -1,5 +1,5 @@ var searchData= [ - ['is_5farray_512',['is_array',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a9b82f3273bb2f2f83b8e085b7d9c6613',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]], - ['iter_513',['iter',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a2d84851f9e4fc07b3e518ea957e2d9b6',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::iter()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a969e1000319391cd2bee3aed88481500',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::iter()']]] + ['is_5farray_534',['is_array',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a9b82f3273bb2f2f83b8e085b7d9c6613',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]], + ['iter_535',['iter',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array.html#a2d84851f9e4fc07b3e518ea957e2d9b6',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::array::iter()'],['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document.html#a969e1000319391cd2bee3aed88481500',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::document::iter()']]] ]; diff --git a/search/variables_4.js b/search/variables_4.js index 9f6b923e8..8d738f1d5 100644 --- a/search/variables_4.js +++ b/search/variables_4.js @@ -1,4 +1,4 @@ var searchData= [ - ['key_514',['key',['../classsimdjson_1_1dom_1_1key__value__pair.html#a58c41d937401cfe88ceb6e71d7dbeb45',1,'simdjson::dom::key_value_pair']]] + ['key_536',['key',['../classsimdjson_1_1dom_1_1key__value__pair.html#a58c41d937401cfe88ceb6e71d7dbeb45',1,'simdjson::dom::key_value_pair']]] ]; diff --git a/search/variables_5.js b/search/variables_5.js index c94b51d70..b9ecc4d04 100644 --- a/search/variables_5.js +++ b/search/variables_5.js @@ -1,4 +1,4 @@ var searchData= [ - ['len_515',['len',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a132a95e1147b80c2533d1632185a6a09',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]] + ['len_537',['len',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a132a95e1147b80c2533d1632185a6a09',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]] ]; diff --git a/search/variables_6.js b/search/variables_6.js index 6bbc4adc9..bf86b1a78 100644 --- a/search/variables_6.js +++ b/search/variables_6.js @@ -1,4 +1,4 @@ var searchData= [ - ['open_5fcontainers_516',['open_containers',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a9c67c6c782f1296319a58ec1586f2329',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]] + ['open_5fcontainers_538',['open_containers',['../classsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1dom__parser__implementation.html#a9c67c6c782f1296319a58ec1586f2329',1,'simdjson::SIMDJSON_IMPLEMENTATION::dom_parser_implementation']]] ]; diff --git a/search/variables_7.js b/search/variables_7.js index 406ea756a..4bfbe00a3 100644 --- a/search/variables_7.js +++ b/search/variables_7.js @@ -1,4 +1,4 @@ var searchData= [ - ['payload_517',['payload',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#aa17e81138859bcef934d9502a9852049',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]] + ['payload_539',['payload',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html#aa17e81138859bcef934d9502a9852049',1,'simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number']]] ]; diff --git a/search/variables_8.js b/search/variables_8.js index 8e3cb89fb..f7128c4e6 100644 --- a/search/variables_8.js +++ b/search/variables_8.js @@ -1,6 +1,6 @@ var searchData= [ - ['second_518',['second',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a25289df3eaabd14f029e9872a6db3dfb',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base']]], - ['simdjson_5fmaxsize_5fbytes_519',['SIMDJSON_MAXSIZE_BYTES',['../namespacesimdjson.html#ac66973a7111dc4aa96ba7b3434344347',1,'simdjson']]], - ['simdjson_5fpadding_520',['SIMDJSON_PADDING',['../namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf',1,'simdjson']]] + ['second_540',['second',['../structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html#a25289df3eaabd14f029e9872a6db3dfb',1,'simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base']]], + ['simdjson_5fmaxsize_5fbytes_541',['SIMDJSON_MAXSIZE_BYTES',['../namespacesimdjson.html#a32d36effa0943f5006e9d4151f5de0e4',1,'simdjson']]], + ['simdjson_5fpadding_542',['SIMDJSON_PADDING',['../namespacesimdjson.html#aecdd750132f0eb123a6d61113b4197bf',1,'simdjson']]] ]; diff --git a/search/variables_9.js b/search/variables_9.js index 11a35796f..326c448de 100644 --- a/search/variables_9.js +++ b/search/variables_9.js @@ -1,4 +1,4 @@ var searchData= [ - ['value_521',['value',['../classsimdjson_1_1dom_1_1key__value__pair.html#af7e38d9eb63a40256c9f936e45edf703',1,'simdjson::dom::key_value_pair']]] + ['value_543',['value',['../classsimdjson_1_1dom_1_1key__value__pair.html#af7e38d9eb63a40256c9f936e45edf703',1,'simdjson::dom::key_value_pair']]] ]; diff --git a/simdjson__version_8h_source.html b/simdjson__version_8h_source.html index 6d90fa91c..443e9e453 100644 --- a/simdjson__version_8h_source.html +++ b/simdjson__version_8h_source.html @@ -107,7 +107,7 @@ $(document).ready(function(){initNavTree('simdjson__version_8h_source.html','');
      24 } // namespace simdjson
      25 
      26 #endif // SIMDJSON_SIMDJSON_VERSION_H
      -
      We want to support argument-dependent lookup (ADL).
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      @ SIMDJSON_VERSION_REVISION
      The revision (major.minor.REVISION) of simdjson being used.
      @ SIMDJSON_VERSION_MINOR
      The minor version (major.MINOR.revision) of simdjson being used.
      @ SIMDJSON_VERSION_MAJOR
      The major version (MAJOR.minor.revision) of simdjson being used.
      diff --git a/simdprune__tables_8h_source.html b/simdprune__tables_8h_source.html index 9fd3e9df6..3b7981a75 100644 --- a/simdprune__tables_8h_source.html +++ b/simdprune__tables_8h_source.html @@ -94,23 +94,25 @@ $(document).ready(function(){initNavTree('simdprune__tables_8h_source.html','');
      1 #ifndef SIMDJSON_INTERNAL_SIMDPRUNE_TABLES_H
      2 #define SIMDJSON_INTERNAL_SIMDPRUNE_TABLES_H
      3 
      -
      4 #include <cstdint>
      +
      4 #include "simdjson/base.h"
      5 
      -
      6 namespace simdjson { // table modified and copied from
      -
      7 namespace internal { // http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetTable
      -
      8 
      -
      9 extern SIMDJSON_DLLIMPORTEXPORT const unsigned char BitsSetTable256mul2[256];
      +
      6 #include <cstdint>
      +
      7 
      +
      8 namespace simdjson { // table modified and copied from
      +
      9 namespace internal { // http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetTable
      10 
      -
      11 extern SIMDJSON_DLLIMPORTEXPORT const uint8_t pshufb_combine_table[272];
      +
      11 extern SIMDJSON_DLLIMPORTEXPORT const unsigned char BitsSetTable256mul2[256];
      12 
      -
      13 // 256 * 8 bytes = 2kB, easily fits in cache.
      -
      14 extern SIMDJSON_DLLIMPORTEXPORT const uint64_t thintable_epi8[256];
      -
      15 
      -
      16 } // namespace internal
      -
      17 } // namespace simdjson
      -
      18 
      -
      19 #endif // SIMDJSON_INTERNAL_SIMDPRUNE_TABLES_H
      -
      We want to support argument-dependent lookup (ADL).
      +
      13 extern SIMDJSON_DLLIMPORTEXPORT const uint8_t pshufb_combine_table[272];
      +
      14 
      +
      15 // 256 * 8 bytes = 2kB, easily fits in cache.
      +
      16 extern SIMDJSON_DLLIMPORTEXPORT const uint64_t thintable_epi8[256];
      +
      17 
      +
      18 } // namespace internal
      +
      19 } // namespace simdjson
      +
      20 
      +
      21 #endif // SIMDJSON_INTERNAL_SIMDPRUNE_TABLES_H
      +
      The top level simdjson namespace, containing everything the library provides.
      Definition: base.h:8
      diff --git a/string__view_8hpp_source.html b/string__view_8hpp_source.html index 6d4ea5fb2..d23e9b584 100644 --- a/string__view_8hpp_source.html +++ b/string__view_8hpp_source.html @@ -1775,8 +1775,8 @@ $(document).ready(function(){initNavTree('string__view_8hpp_source.html',''); in
      1682 
      1683 #endif // nssv_HAVE_STD_STRING_VIEW
      1684 #endif // NONSTD_SV_LITE_H_INCLUDED
      -
      simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
      Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
      -
      std::string to_string(T x)
      Converts JSON to a string.
      +
      simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
      Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
      +
      std::string to_string(T x)
      Converts JSON to a string.
      diff --git a/structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html b/structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html index 55df5104d..68ad7fa4b 100644 --- a/structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html +++ b/structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1implementation__simdjson__result__base.html @@ -171,7 +171,7 @@ struct simdjson::SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<

      struct simdjson_result<T> : public internal::implementation_simdjson_result_base<T> { simdjson_result() noexcept : internal::implementation_simdjson_result_base<T>() {} simdjson_result(error_code error) noexcept : internal::implementation_simdjson_result_base<T>(error) {} simdjson_result(T &&value) noexcept : internal::implementation_simdjson_result_base<T>(std::forward(value)) {} simdjson_result(T &&value, error_code error) noexcept : internal::implementation_simdjson_result_base<T>(value, error) {} // Your extra methods here }

      Then any method returning simdjson_result<T> will be chainable with your methods.

      -

      Definition at line 28 of file implementation_simdjson_result_base.h.

      +

      Definition at line 35 of file implementation_simdjson_result_base.h.

      Member Function Documentation

      ◆ get()

      @@ -207,7 +207,7 @@ template<typename T > -

      Definition at line 17 of file implementation_simdjson_result_base-inl.h.

      +

      Definition at line 25 of file implementation_simdjson_result_base-inl.h.

      @@ -244,7 +244,7 @@ template<typename T > -

      Definition at line 48 of file implementation_simdjson_result_base-inl.h.

      +

      Definition at line 56 of file implementation_simdjson_result_base-inl.h.

      @@ -281,7 +281,7 @@ template<typename T > -

      Definition at line 42 of file implementation_simdjson_result_base-inl.h.

      +

      Definition at line 50 of file implementation_simdjson_result_base-inl.h.

      @@ -330,7 +330,7 @@ template<typename T > -

      Definition at line 9 of file implementation_simdjson_result_base-inl.h.

      +

      Definition at line 17 of file implementation_simdjson_result_base-inl.h.

      diff --git a/structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html b/structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html index a9fb20570..f132b5e33 100644 --- a/structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html +++ b/structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1number.html @@ -102,7 +102,7 @@ $(document).ready(function(){initNavTree('structsimdjson_1_1_s_i_m_d_j_s_o_n___i - + +number_type 

      Public Member Functions

      simdjson_inline number_type get_number_type () const noexcept
      simdjson_inline ondemand::number_type get_number_type () const noexcept
       return the automatically determined type of the number: number_type::floating_point_number, number_type::signed_integer or number_type::unsigned_integer. More...
       
      @@ -177,14 +177,14 @@ Protected Attributes
       End of friend declarations. More...
       
      -number_type type {number_type::signed_integer}
      type {number_type::signed_integer}
       

      Detailed Description

      A type representing a JSON number.

      The design of the struct is deliberately straight-forward. All functions return standard values with no error check.

      -

      Definition at line 24 of file json_type.h.

      +

      Definition at line 32 of file json_type.h.

      Member Function Documentation

      ◆ as_double()

      @@ -212,7 +212,7 @@ Protected Attributes

      Convert the number to a double.

      Though it always succeed, the conversion may be lossy if the number cannot be represented exactly.

      -

      Definition at line 67 of file json_type-inl.h.

      +

      Definition at line 76 of file json_type-inl.h.

      @@ -226,7 +226,7 @@ Protected Attributes - + @@ -242,7 +242,7 @@ Protected Attributes

      return the automatically determined type of the number: number_type::floating_point_number, number_type::signed_integer or number_type::unsigned_integer.

      enum class number_type { floating_point_number=1, /// a binary64 number signed_integer, /// a signed integer that fits in a 64-bit word using two's complement unsigned_integer /// a positive integer larger or equal to 1<<63 };

      -

      Definition at line 26 of file json_type-inl.h.

      +

      Definition at line 35 of file json_type-inl.h.

      diff --git a/structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1open__container.html b/structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1open__container.html index 8dbb040a6..e10bb5bde 100644 --- a/structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1open__container.html +++ b/structsimdjson_1_1_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1open__container.html @@ -106,7 +106,7 @@ uint32_t 

      Detailed Description

      -

      Definition at line 8 of file dom_parser_implementation.h.

      +

      Definition at line 13 of file dom_parser_implementation.h.


      The documentation for this struct was generated from the following file: diff --git a/structsimdjson_1_1padded__string.html b/structsimdjson_1_1padded__string.html index b820bd313..be4707d1e 100644 --- a/structsimdjson_1_1padded__string.html +++ b/structsimdjson_1_1padded__string.html @@ -196,7 +196,7 @@ Static Public Member Functions -

      Definition at line 48 of file padded_string-inl.h.

      +

      Definition at line 45 of file padded_string-inl.h.

      @@ -243,7 +243,7 @@ Static Public Member Functions -

      Definition at line 51 of file padded_string-inl.h.

      +

      Definition at line 48 of file padded_string-inl.h.

      @@ -279,7 +279,7 @@ Static Public Member Functions -

      Definition at line 58 of file padded_string-inl.h.

      +

      Definition at line 55 of file padded_string-inl.h.

      @@ -315,7 +315,7 @@ Static Public Member Functions -

      Definition at line 65 of file padded_string-inl.h.

      +

      Definition at line 62 of file padded_string-inl.h.

      @@ -352,7 +352,7 @@ Static Public Member Functions -

      Definition at line 76 of file padded_string-inl.h.

      +

      Definition at line 73 of file padded_string-inl.h.

      @@ -383,7 +383,7 @@ Static Public Member Functions

      The length of the string.

      Does not include padding.

      -

      Definition at line 105 of file padded_string-inl.h.

      +

      Definition at line 102 of file padded_string-inl.h.

      @@ -420,7 +420,7 @@ Static Public Member Functions -

      Definition at line 117 of file padded_string-inl.h.

      +

      Definition at line 114 of file padded_string-inl.h.

      @@ -457,7 +457,7 @@ Static Public Member Functions -

      Definition at line 81 of file padded_string-inl.h.

      +

      Definition at line 78 of file padded_string-inl.h.

      @@ -487,7 +487,7 @@ Static Public Member Functions

      The length of the string.

      Does not include padding.

      -

      Definition at line 103 of file padded_string-inl.h.

      +

      Definition at line 100 of file padded_string-inl.h.

      diff --git a/structsimdjson_1_1simdjson__result.html b/structsimdjson_1_1simdjson__result.html index b5f1f3b58..94152dd66 100644 --- a/structsimdjson_1_1simdjson__result.html +++ b/structsimdjson_1_1simdjson__result.html @@ -178,7 +178,7 @@ template<typename T > -

      Definition at line 127 of file error-inl.h.

      +

      Definition at line 126 of file error-inl.h.

      @@ -215,7 +215,7 @@ template<typename T > -

      Definition at line 154 of file error-inl.h.

      +

      Definition at line 153 of file error-inl.h.

      @@ -252,7 +252,7 @@ template<typename T > -

      Definition at line 149 of file error-inl.h.

      +

      Definition at line 148 of file error-inl.h.

      @@ -302,7 +302,7 @@ template<typename T > -

      Definition at line 122 of file error-inl.h.

      +

      Definition at line 121 of file error-inl.h.

      diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array_01_4.html b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array_01_4.html index a62c0c81e..320abbd50 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array_01_4.html @@ -193,7 +193,7 @@ Additional Inherited Members
      simdjson_inline number_type simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_number_type simdjson_inline number_type simdjson::SIMDJSON_IMPLEMENTATION::ondemand::number::get_number_type ( ) const
      count

      Detailed Description

      -

      Definition at line 176 of file array.h.

      +

      Definition at line 180 of file array.h.


      The documentation for this struct was generated from the following files:
      • include/simdjson/generic/ondemand/array.h
      • include/simdjson/generic/ondemand/array-inl.h
      • diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_01_4.html b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_01_4.html index 8686a91ab..2f01b5ed3 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1array__iterator_01_4.html @@ -181,7 +181,7 @@ Additional Inherited Members

        Detailed Description

        -

        Definition at line 74 of file array_iterator.h.

        +

        Definition at line 78 of file array_iterator.h.


        The documentation for this struct was generated from the following files:
        • include/simdjson/generic/ondemand/array_iterator.h
        • include/simdjson/generic/ondemand/array_iterator-inl.h
        • diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html index 5caf5b6f6..143710a9b 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html @@ -248,9 +248,9 @@ simdjson_inline bool is_ne simdjson_inline simdjson_result< bool > is_integer () noexcept   - -simdjson_inline simdjson_result< SIMDJSON_IMPLEMENTATION::numberparsing::number_type > get_number_type () noexcept -  + +simdjson_inline simdjson_result< SIMDJSON_IMPLEMENTATION::number_type > get_number_type () noexcept +  simdjson_inline simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::numberget_number () noexcept   @@ -355,7 +355,7 @@ Additional Inherited Members

          Detailed Description

          -

          Definition at line 676 of file document.h.

          +

          Definition at line 674 of file document.h.

          Member Function Documentation

          ◆ raw_json_token()

          @@ -383,7 +383,7 @@ Additional Inherited Members

          std::string_view document::raw_json_token() const noexcept

          std::string_view document::raw_json_token() const noexcept

          -

          Definition at line 526 of file document-inl.h.

          +

          Definition at line 542 of file document-inl.h.

          diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.js b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.js index a101efd46..fb3b9cb1a 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.js +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.js @@ -33,7 +33,7 @@ var structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_ [ "get_int64", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a1c2749aea938f6f00eec37d098b4a102", null ], [ "get_int64_in_string", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#abcb0825900ad9b8ed77b5e8c11b553b1", null ], [ "get_number", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#ac0e966ea81b5a86485e82bcadbad4903", null ], - [ "get_number_type", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a453fe08b006f752013c80158594971ba", null ], + [ "get_number_type", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a97cf6c1bf360c6570649afdb97b9c25d", null ], [ "get_object", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a52332b6ab6b8098fca5d73c575b8f3e7", null ], [ "get_raw_json_string", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a458029a37b519f4594dc78812fee8657", null ], [ "get_string", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document_01_4.html#a7c2a11edb53792f1a4c6fe2654060380", null ], diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html index 50f39c480..67d51792a 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html @@ -232,9 +232,9 @@ simdjson_inline sim simdjson_inline simdjson_result< bool > is_integer () noexcept   - -simdjson_inline simdjson_result< SIMDJSON_IMPLEMENTATION::numberparsing::number_type > get_number_type () noexcept -  + +simdjson_inline simdjson_result< SIMDJSON_IMPLEMENTATION::number_type > get_number_type () noexcept +  simdjson_inline simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::numberget_number () noexcept   @@ -307,7 +307,7 @@ Additional Inherited Members

          Detailed Description

          -

          Definition at line 749 of file document.h.

          +

          Definition at line 747 of file document.h.

          Member Function Documentation

          ◆ raw_json_token()

          @@ -335,7 +335,7 @@ Additional Inherited Members

          std::string_view document_reference::raw_json_token() const noexcept

          std::string_view document_reference::raw_json_token() const noexcept

          -

          Definition at line 794 of file document-inl.h.

          +

          Definition at line 810 of file document-inl.h.

          diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.js b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.js index a4348be82..66ed4b0bc 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.js +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.js @@ -21,7 +21,7 @@ var structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_ [ "get_int64", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#a65c07706275a3f7c5518afbfd30ce394", null ], [ "get_int64_in_string", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#a51ffc1d04fedd7493820f1d5371f2cca", null ], [ "get_number", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#aca433867baaffeff86367c88bf192572", null ], - [ "get_number_type", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#ac191bf126c9e388b902a67cfbdd30013", null ], + [ "get_number_type", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#acb01db7785909e8040f9c4425c0bd42a", null ], [ "get_object", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#a6cdc33399794644363a720d6f271dd8d", null ], [ "get_raw_json_string", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#a90ecb32d9f0c497568d4de9b9affcb04", null ], [ "get_string", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__reference_01_4.html#a67dfd1cb54a3a739aeac8571f8a5d1b5", null ], diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_01_4.html b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_01_4.html index bd4127694..f80091c1f 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1document__stream_01_4.html @@ -165,7 +165,7 @@ simdjson_inline

          Detailed Description

          -

          Definition at line 325 of file document_stream.h.

          +

          Definition at line 330 of file document_stream.h.


          The documentation for this struct was generated from the following files:
          • include/simdjson/generic/ondemand/document_stream.h
          • include/simdjson/generic/ondemand/document_stream-inl.h
          • diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html index c59765957..4a5af87c8 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1field_01_4.html @@ -178,7 +178,7 @@ Additional Inherited Members

            Detailed Description

            -

            Definition at line 61 of file field.h.

            +

            Definition at line 69 of file field.h.


            The documentation for this struct was generated from the following files:
            • include/simdjson/generic/ondemand/field.h
            • include/simdjson/generic/ondemand/field-inl.h
            • diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__iterator_01_4.html b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__iterator_01_4.html index ab2e40a4c..2c54e00d0 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__iterator_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__iterator_01_4.html @@ -165,7 +165,7 @@ SIMDJSON_IMPLEMENTATION::ondemand::json_iterator 

              Detailed Description

              -

              Definition at line 314 of file json_iterator.h.

              +

              Definition at line 315 of file json_iterator.h.


              The documentation for this struct was generated from the following files:
              • include/simdjson/generic/ondemand/json_iterator.h
              • include/simdjson/generic/ondemand/json_iterator-inl.h
              • diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__type_01_4.html b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__type_01_4.html index 4bf77d0ac..1eb460a67 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__type_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1json__type_01_4.html @@ -165,7 +165,7 @@ simdjson_inline

                Detailed Description

                -

                Definition at line 144 of file json_type.h.

                +

                Definition at line 152 of file json_type.h.


                The documentation for this struct was generated from the following files:
                • include/simdjson/generic/ondemand/json_type.h
                • include/simdjson/generic/ondemand/json_type-inl.h
                • diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html index 750806e8a..bb97d26ec 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object_01_4.html @@ -208,7 +208,7 @@ Additional Inherited Members

                  Detailed Description

                  -

                  Definition at line 208 of file object.h.

                  +

                  Definition at line 215 of file object.h.


                  The documentation for this struct was generated from the following files:
                  • include/simdjson/generic/ondemand/object.h
                  • include/simdjson/generic/ondemand/object-inl.h
                  • diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator_01_4.html b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator_01_4.html index 68b1bfbbe..5bd99b302 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1object__iterator_01_4.html @@ -181,7 +181,7 @@ Additional Inherited Members

                    Detailed Description

                    -

                    Definition at line 53 of file object_iterator.h.

                    +

                    Definition at line 58 of file object_iterator.h.


                    The documentation for this struct was generated from the following files:
                    • include/simdjson/generic/ondemand/object_iterator.h
                    • include/simdjson/generic/ondemand/object_iterator-inl.h
                    • diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string_01_4.html b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string_01_4.html index d97e6b820..def0523ff 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1raw__json__string_01_4.html @@ -178,7 +178,7 @@ Additional Inherited Members

                      Detailed Description

                      -

                      Definition at line 190 of file raw_json_string.h.

                      +

                      Definition at line 192 of file raw_json_string.h.


                      The documentation for this struct was generated from the following files:
                      • include/simdjson/generic/ondemand/raw_json_string.h
                      • include/simdjson/generic/ondemand/raw_json_string-inl.h
                      • diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1token__iterator_01_4.html b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1token__iterator_01_4.html index a3a937ac9..b7448fba6 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1token__iterator_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1token__iterator_01_4.html @@ -165,7 +165,7 @@ SIMDJSON_IMPLEMENTATION::ondemand::token_iterator 

                        Detailed Description

                        -

                        Definition at line 132 of file token_iterator.h.

                        +

                        Definition at line 141 of file token_iterator.h.


                        The documentation for this struct was generated from the following files:
                        • include/simdjson/generic/ondemand/token_iterator.h
                        • include/simdjson/generic/ondemand/token_iterator-inl.h
                        • diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html index d85c7c194..c45fa3d57 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html @@ -222,9 +222,9 @@ simdjson_inline sim simdjson_inline simdjson_result< bool > is_integer () noexcept   - -simdjson_inline simdjson_result< SIMDJSON_IMPLEMENTATION::numberparsing::number_type > get_number_type () noexcept -  + +simdjson_inline simdjson_result< SIMDJSON_IMPLEMENTATION::number_type > get_number_type () noexcept +  simdjson_inline simdjson_result< SIMDJSON_IMPLEMENTATION::ondemand::numberget_number () noexcept   @@ -311,7 +311,7 @@ Additional Inherited Members

                          Detailed Description

                          -

                          Definition at line 588 of file value.h.

                          +

                          Definition at line 589 of file value.h.

                          Member Function Documentation

                          ◆ current_depth()

                          @@ -339,7 +339,7 @@ Additional Inherited Members

                          int32_t current_depth() const noexcept

                          int32_t current_depth() const noexcept

                          -

                          Definition at line 413 of file value-inl.h.

                          +

                          Definition at line 427 of file value-inl.h.

                          @@ -369,7 +369,7 @@ Additional Inherited Members

                          simdjson_result<const char *> current_location() noexcept

                          simdjson_result<const char *> current_location() noexcept

                          -

                          Definition at line 408 of file value-inl.h.

                          +

                          Definition at line 422 of file value-inl.h.

                          @@ -415,7 +415,7 @@ Additional Inherited Members
                          Returns
                          The value of the field, or NO_SUCH_FIELD if the field is not in the object.

                          This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

                          -

                          Definition at line 245 of file value-inl.h.

                          +

                          Definition at line 259 of file value-inl.h.

                          @@ -456,7 +456,7 @@ Additional Inherited Members
                          Returns
                          The value of the field, or NO_SUCH_FIELD if the field is not in the object.

                          This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

                          -

                          Definition at line 254 of file value-inl.h.

                          +

                          Definition at line 268 of file value-inl.h.

                          @@ -486,7 +486,7 @@ Additional Inherited Members

                          std::string_view value::raw_json_token() const noexcept

                          std::string_view value::raw_json_token() const noexcept

                          -

                          Definition at line 403 of file value-inl.h.

                          +

                          Definition at line 417 of file value-inl.h.

                          @@ -516,7 +516,7 @@ Additional Inherited Members

                          Get the type of this JSON value.

                          NOTE: If you're only expecting a value to be one type (a typical case), it's generally better to just call .get_double, .get_string, etc. and check for INCORRECT_TYPE (or just let it throw an exception).

                          -

                          Definition at line 344 of file value-inl.h.

                          +

                          Definition at line 358 of file value-inl.h.

                          diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.js b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.js index 54c573596..0b7036caa 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.js +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.js @@ -24,7 +24,7 @@ var structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_ [ "get_int64", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#aebb4d644ca41465a53c315bb8ef232f5", null ], [ "get_int64_in_string", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a3d5eaab352993f6e864956e5c2b82fe3", null ], [ "get_number", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a4db54bcbf1e10848c60c395a1cb5ab9b", null ], - [ "get_number_type", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a395b30558e63186017bea5f42091c14c", null ], + [ "get_number_type", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a62daeccca10fae7551156ce3dfbfbcda", null ], [ "get_object", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#af7ff134d2ada5aae0a95f12bbfd7f088", null ], [ "get_raw_json_string", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#ad496791bbbd9af86d1998d474e2d9298", null ], [ "get_string", "structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value_01_4.html#a75f550801092d5c38f48308b03b7f3ba", null ], diff --git a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value__iterator_01_4.html b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value__iterator_01_4.html index 1a64ade32..48a95696f 100644 --- a/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value__iterator_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01_s_i_m_d_j_s_o_n___i_m_p_l_e_m_e_n_t_a_t_i_o_n_1_1ondemand_1_1value__iterator_01_4.html @@ -165,7 +165,7 @@ SIMDJSON_IMPLEMENTATION::ondemand::value_iterator 

                          Detailed Description

                          -

                          Definition at line 476 of file value_iterator.h.

                          +

                          Definition at line 477 of file value_iterator.h.


                          The documentation for this struct was generated from the following files:
                          • include/simdjson/generic/ondemand/value_iterator.h
                          • include/simdjson/generic/ondemand/value_iterator-inl.h
                          • diff --git a/structsimdjson_1_1simdjson__result_3_01dom_1_1array_01_4.html b/structsimdjson_1_1simdjson__result_3_01dom_1_1array_01_4.html index 8ec0c19d5..52c3df84b 100644 --- a/structsimdjson_1_1simdjson__result_3_01dom_1_1array_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01dom_1_1array_01_4.html @@ -125,7 +125,7 @@ size_t size () const n

                            Detailed Description

                            The result of a JSON conversion that may fail.

                            -

                            Definition at line 149 of file array.h.

                            +

                            Definition at line 140 of file array.h.


                            The documentation for this struct was generated from the following files:
                            • include/simdjson/dom/array.h
                            • include/simdjson/dom/array-inl.h
                            • diff --git a/structsimdjson_1_1simdjson__result_3_01dom_1_1document__stream_01_4.html b/structsimdjson_1_1simdjson__result_3_01dom_1_1document__stream_01_4.html index b0dcd1ab2..a38170823 100644 --- a/structsimdjson_1_1simdjson__result_3_01dom_1_1document__stream_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01dom_1_1document__stream_01_4.html @@ -112,7 +112,7 @@ simdjson_inline

                              Detailed Description

                              -

                              Definition at line 303 of file document_stream.h.

                              +

                              Definition at line 302 of file document_stream.h.


                              The documentation for this struct was generated from the following files:
                              • include/simdjson/dom/document_stream.h
                              • include/simdjson/dom/document_stream-inl.h
                              • diff --git a/structsimdjson_1_1simdjson__result_3_01dom_1_1element_01_4.html b/structsimdjson_1_1simdjson__result_3_01dom_1_1element_01_4.html index e3fa1bf62..b57b49c94 100644 --- a/structsimdjson_1_1simdjson__result_3_01dom_1_1element_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01dom_1_1element_01_4.html @@ -107,7 +107,7 @@ Inheritance diagram for simdjson::simdjson_result< dom::element >:

                                Public Member Functions

                                -simdjson_inline simdjson_result< dom::element_type > type () const noexcept +simdjson_inline simdjson_result< dom::element_typetype () const noexcept   template<typename T > @@ -230,7 +230,7 @@ simdjson_inline

                                Detailed Description

                                The result of a JSON navigation that may fail.

                                -

                                Definition at line 482 of file element.h.

                                +

                                Definition at line 473 of file element.h.


                                The documentation for this struct was generated from the following files:
                                • include/simdjson/dom/element.h
                                • include/simdjson/dom/element-inl.h
                                • diff --git a/structsimdjson_1_1simdjson__result_3_01dom_1_1object_01_4.html b/structsimdjson_1_1simdjson__result_3_01dom_1_1object_01_4.html index 74006e899..a929aa1d8 100644 --- a/structsimdjson_1_1simdjson__result_3_01dom_1_1object_01_4.html +++ b/structsimdjson_1_1simdjson__result_3_01dom_1_1object_01_4.html @@ -134,7 +134,7 @@ size_t size () const n

                                  Detailed Description

                                  The result of a JSON conversion that may fail.

                                  -

                                  Definition at line 238 of file object.h.

                                  +

                                  Definition at line 230 of file object.h.


                                  The documentation for this struct was generated from the following files:
                                  • include/simdjson/dom/object.h
                                  • include/simdjson/dom/object-inl.h
                                  • diff --git a/tape__ref-inl_8h_source.html b/tape__ref-inl_8h_source.html index 9c4802e60..4b11093c6 100644 --- a/tape__ref-inl_8h_source.html +++ b/tape__ref-inl_8h_source.html @@ -94,116 +94,120 @@ $(document).ready(function(){initNavTree('tape__ref-inl_8h_source.html',''); ini
                                    1 #ifndef SIMDJSON_INLINE_TAPE_REF_H
                                    2 #define SIMDJSON_INLINE_TAPE_REF_H
                                    3 
                                    -
                                    4 #include "simdjson/internal/tape_ref.h"
                                    -
                                    5 #include <cstring>
                                    -
                                    6 
                                    -
                                    7 namespace simdjson {
                                    -
                                    8 namespace internal {
                                    -
                                    9 
                                    -
                                    10 //
                                    -
                                    11 // tape_ref inline implementation
                                    -
                                    12 //
                                    -
                                    13 simdjson_inline tape_ref::tape_ref() noexcept : doc{nullptr}, json_index{0} {}
                                    -
                                    14 simdjson_inline tape_ref::tape_ref(const dom::document *_doc, size_t _json_index) noexcept : doc{_doc}, json_index{_json_index} {}
                                    -
                                    15 
                                    -
                                    16 
                                    -
                                    17 simdjson_inline bool tape_ref::is_document_root() const noexcept {
                                    -
                                    18  return json_index == 1; // should we ever change the structure of the tape, this should get updated.
                                    -
                                    19 }
                                    -
                                    20 simdjson_inline bool tape_ref::usable() const noexcept {
                                    -
                                    21  return doc != nullptr; // when the document pointer is null, this tape_ref is uninitialized (should not be accessed).
                                    -
                                    22 }
                                    -
                                    23 // Some value types have a specific on-tape word value. It can be faster
                                    -
                                    24 // to check the type by doing a word-to-word comparison instead of extracting the
                                    -
                                    25 // most significant 8 bits.
                                    -
                                    26 
                                    -
                                    27 simdjson_inline bool tape_ref::is_double() const noexcept {
                                    -
                                    28  constexpr uint64_t tape_double = uint64_t(tape_type::DOUBLE)<<56;
                                    -
                                    29  return doc->tape[json_index] == tape_double;
                                    -
                                    30 }
                                    -
                                    31 simdjson_inline bool tape_ref::is_int64() const noexcept {
                                    -
                                    32  constexpr uint64_t tape_int64 = uint64_t(tape_type::INT64)<<56;
                                    -
                                    33  return doc->tape[json_index] == tape_int64;
                                    +
                                    4 #include "simdjson/dom/document.h"
                                    +
                                    5 #include "simdjson/internal/tape_ref.h"
                                    +
                                    6 #include "simdjson/internal/tape_type.h"
                                    +
                                    7 
                                    +
                                    8 namespace simdjson {
                                    +
                                    9 namespace internal {
                                    +
                                    10 
                                    +
                                    11 constexpr const uint64_t JSON_VALUE_MASK = 0x00FFFFFFFFFFFFFF;
                                    +
                                    12 constexpr const uint32_t JSON_COUNT_MASK = 0xFFFFFF;
                                    +
                                    13 
                                    +
                                    14 //
                                    +
                                    15 // tape_ref inline implementation
                                    +
                                    16 //
                                    +
                                    17 simdjson_inline tape_ref::tape_ref() noexcept : doc{nullptr}, json_index{0} {}
                                    +
                                    18 simdjson_inline tape_ref::tape_ref(const dom::document *_doc, size_t _json_index) noexcept : doc{_doc}, json_index{_json_index} {}
                                    +
                                    19 
                                    +
                                    20 
                                    +
                                    21 simdjson_inline bool tape_ref::is_document_root() const noexcept {
                                    +
                                    22  return json_index == 1; // should we ever change the structure of the tape, this should get updated.
                                    +
                                    23 }
                                    +
                                    24 simdjson_inline bool tape_ref::usable() const noexcept {
                                    +
                                    25  return doc != nullptr; // when the document pointer is null, this tape_ref is uninitialized (should not be accessed).
                                    +
                                    26 }
                                    +
                                    27 // Some value types have a specific on-tape word value. It can be faster
                                    +
                                    28 // to check the type by doing a word-to-word comparison instead of extracting the
                                    +
                                    29 // most significant 8 bits.
                                    +
                                    30 
                                    +
                                    31 simdjson_inline bool tape_ref::is_double() const noexcept {
                                    +
                                    32  constexpr uint64_t tape_double = uint64_t(tape_type::DOUBLE)<<56;
                                    +
                                    33  return doc->tape[json_index] == tape_double;
                                    34 }
                                    -
                                    35 simdjson_inline bool tape_ref::is_uint64() const noexcept {
                                    -
                                    36  constexpr uint64_t tape_uint64 = uint64_t(tape_type::UINT64)<<56;
                                    -
                                    37  return doc->tape[json_index] == tape_uint64;
                                    +
                                    35 simdjson_inline bool tape_ref::is_int64() const noexcept {
                                    +
                                    36  constexpr uint64_t tape_int64 = uint64_t(tape_type::INT64)<<56;
                                    +
                                    37  return doc->tape[json_index] == tape_int64;
                                    38 }
                                    -
                                    39 simdjson_inline bool tape_ref::is_false() const noexcept {
                                    -
                                    40  constexpr uint64_t tape_false = uint64_t(tape_type::FALSE_VALUE)<<56;
                                    -
                                    41  return doc->tape[json_index] == tape_false;
                                    +
                                    39 simdjson_inline bool tape_ref::is_uint64() const noexcept {
                                    +
                                    40  constexpr uint64_t tape_uint64 = uint64_t(tape_type::UINT64)<<56;
                                    +
                                    41  return doc->tape[json_index] == tape_uint64;
                                    42 }
                                    -
                                    43 simdjson_inline bool tape_ref::is_true() const noexcept {
                                    -
                                    44  constexpr uint64_t tape_true = uint64_t(tape_type::TRUE_VALUE)<<56;
                                    -
                                    45  return doc->tape[json_index] == tape_true;
                                    +
                                    43 simdjson_inline bool tape_ref::is_false() const noexcept {
                                    +
                                    44  constexpr uint64_t tape_false = uint64_t(tape_type::FALSE_VALUE)<<56;
                                    +
                                    45  return doc->tape[json_index] == tape_false;
                                    46 }
                                    -
                                    47 simdjson_inline bool tape_ref::is_null_on_tape() const noexcept {
                                    -
                                    48  constexpr uint64_t tape_null = uint64_t(tape_type::NULL_VALUE)<<56;
                                    -
                                    49  return doc->tape[json_index] == tape_null;
                                    +
                                    47 simdjson_inline bool tape_ref::is_true() const noexcept {
                                    +
                                    48  constexpr uint64_t tape_true = uint64_t(tape_type::TRUE_VALUE)<<56;
                                    +
                                    49  return doc->tape[json_index] == tape_true;
                                    50 }
                                    -
                                    51 
                                    -
                                    52 inline size_t tape_ref::after_element() const noexcept {
                                    -
                                    53  switch (tape_ref_type()) {
                                    -
                                    54  case tape_type::START_ARRAY:
                                    -
                                    55  case tape_type::START_OBJECT:
                                    -
                                    56  return matching_brace_index();
                                    -
                                    57  case tape_type::UINT64:
                                    -
                                    58  case tape_type::INT64:
                                    -
                                    59  case tape_type::DOUBLE:
                                    -
                                    60  return json_index + 2;
                                    -
                                    61  default:
                                    -
                                    62  return json_index + 1;
                                    -
                                    63  }
                                    -
                                    64 }
                                    -
                                    65 simdjson_inline tape_type tape_ref::tape_ref_type() const noexcept {
                                    -
                                    66  return static_cast<tape_type>(doc->tape[json_index] >> 56);
                                    -
                                    67 }
                                    -
                                    68 simdjson_inline uint64_t internal::tape_ref::tape_value() const noexcept {
                                    -
                                    69  return doc->tape[json_index] & internal::JSON_VALUE_MASK;
                                    -
                                    70 }
                                    -
                                    71 simdjson_inline uint32_t internal::tape_ref::matching_brace_index() const noexcept {
                                    -
                                    72  return uint32_t(doc->tape[json_index]);
                                    -
                                    73 }
                                    -
                                    74 simdjson_inline uint32_t internal::tape_ref::scope_count() const noexcept {
                                    -
                                    75  return uint32_t((doc->tape[json_index] >> 32) & internal::JSON_COUNT_MASK);
                                    -
                                    76 }
                                    -
                                    77 
                                    -
                                    78 template<typename T>
                                    -
                                    79 simdjson_inline T tape_ref::next_tape_value() const noexcept {
                                    -
                                    80  static_assert(sizeof(T) == sizeof(uint64_t), "next_tape_value() template parameter must be 64-bit");
                                    -
                                    81  // Though the following is tempting...
                                    -
                                    82  // return *reinterpret_cast<const T*>(&doc->tape[json_index + 1]);
                                    -
                                    83  // It is not generally safe. It is safer, and often faster to rely
                                    -
                                    84  // on memcpy. Yes, it is uglier, but it is also encapsulated.
                                    -
                                    85  T x;
                                    -
                                    86  std::memcpy(&x,&doc->tape[json_index + 1],sizeof(uint64_t));
                                    -
                                    87  return x;
                                    -
                                    88 }
                                    -
                                    89 
                                    -
                                    90 simdjson_inline uint32_t internal::tape_ref::get_string_length() const noexcept {
                                    -
                                    91  size_t string_buf_index = size_t(tape_value());
                                    -
                                    92  uint32_t len;
                                    -
                                    93  std::memcpy(&len, &doc->string_buf[string_buf_index], sizeof(len));
                                    -
                                    94  return len;
                                    -
                                    95 }
                                    -
                                    96 
                                    -
                                    97 simdjson_inline const char * internal::tape_ref::get_c_str() const noexcept {
                                    -
                                    98  size_t string_buf_index = size_t(tape_value());
                                    -
                                    99  return reinterpret_cast<const char *>(&doc->string_buf[string_buf_index + sizeof(uint32_t)]);
                                    -
                                    100 }
                                    -
                                    101 
                                    -
                                    102 inline std::string_view internal::tape_ref::get_string_view() const noexcept {
                                    -
                                    103  return std::string_view(
                                    -
                                    104  get_c_str(),
                                    -
                                    105  get_string_length()
                                    -
                                    106  );
                                    -
                                    107 }
                                    -
                                    108 
                                    -
                                    109 } // namespace internal
                                    -
                                    110 } // namespace simdjson
                                    -
                                    111 
                                    -
                                    112 #endif // SIMDJSON_INLINE_TAPE_REF_H
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    +
                                    51 simdjson_inline bool tape_ref::is_null_on_tape() const noexcept {
                                    +
                                    52  constexpr uint64_t tape_null = uint64_t(tape_type::NULL_VALUE)<<56;
                                    +
                                    53  return doc->tape[json_index] == tape_null;
                                    +
                                    54 }
                                    +
                                    55 
                                    +
                                    56 inline size_t tape_ref::after_element() const noexcept {
                                    +
                                    57  switch (tape_ref_type()) {
                                    +
                                    58  case tape_type::START_ARRAY:
                                    +
                                    59  case tape_type::START_OBJECT:
                                    +
                                    60  return matching_brace_index();
                                    +
                                    61  case tape_type::UINT64:
                                    +
                                    62  case tape_type::INT64:
                                    +
                                    63  case tape_type::DOUBLE:
                                    +
                                    64  return json_index + 2;
                                    +
                                    65  default:
                                    +
                                    66  return json_index + 1;
                                    +
                                    67  }
                                    +
                                    68 }
                                    +
                                    69 simdjson_inline tape_type tape_ref::tape_ref_type() const noexcept {
                                    +
                                    70  return static_cast<tape_type>(doc->tape[json_index] >> 56);
                                    +
                                    71 }
                                    +
                                    72 simdjson_inline uint64_t internal::tape_ref::tape_value() const noexcept {
                                    +
                                    73  return doc->tape[json_index] & internal::JSON_VALUE_MASK;
                                    +
                                    74 }
                                    +
                                    75 simdjson_inline uint32_t internal::tape_ref::matching_brace_index() const noexcept {
                                    +
                                    76  return uint32_t(doc->tape[json_index]);
                                    +
                                    77 }
                                    +
                                    78 simdjson_inline uint32_t internal::tape_ref::scope_count() const noexcept {
                                    +
                                    79  return uint32_t((doc->tape[json_index] >> 32) & internal::JSON_COUNT_MASK);
                                    +
                                    80 }
                                    +
                                    81 
                                    +
                                    82 template<typename T>
                                    +
                                    83 simdjson_inline T tape_ref::next_tape_value() const noexcept {
                                    +
                                    84  static_assert(sizeof(T) == sizeof(uint64_t), "next_tape_value() template parameter must be 64-bit");
                                    +
                                    85  // Though the following is tempting...
                                    +
                                    86  // return *reinterpret_cast<const T*>(&doc->tape[json_index + 1]);
                                    +
                                    87  // It is not generally safe. It is safer, and often faster to rely
                                    +
                                    88  // on memcpy. Yes, it is uglier, but it is also encapsulated.
                                    +
                                    89  T x;
                                    +
                                    90  std::memcpy(&x,&doc->tape[json_index + 1],sizeof(uint64_t));
                                    +
                                    91  return x;
                                    +
                                    92 }
                                    +
                                    93 
                                    +
                                    94 simdjson_inline uint32_t internal::tape_ref::get_string_length() const noexcept {
                                    +
                                    95  size_t string_buf_index = size_t(tape_value());
                                    +
                                    96  uint32_t len;
                                    +
                                    97  std::memcpy(&len, &doc->string_buf[string_buf_index], sizeof(len));
                                    +
                                    98  return len;
                                    +
                                    99 }
                                    +
                                    100 
                                    +
                                    101 simdjson_inline const char * internal::tape_ref::get_c_str() const noexcept {
                                    +
                                    102  size_t string_buf_index = size_t(tape_value());
                                    +
                                    103  return reinterpret_cast<const char *>(&doc->string_buf[string_buf_index + sizeof(uint32_t)]);
                                    +
                                    104 }
                                    +
                                    105 
                                    +
                                    106 inline std::string_view internal::tape_ref::get_string_view() const noexcept {
                                    +
                                    107  return std::string_view(
                                    +
                                    108  get_c_str(),
                                    +
                                    109  get_string_length()
                                    +
                                    110  );
                                    +
                                    111 }
                                    +
                                    112 
                                    +
                                    113 } // namespace internal
                                    +
                                    114 } // namespace simdjson
                                    +
                                    115 
                                    +
                                    116 #endif // SIMDJSON_INLINE_TAPE_REF_H
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    diff --git a/tape__ref_8h_source.html b/tape__ref_8h_source.html index e73be3c1c..40f460524 100644 --- a/tape__ref_8h_source.html +++ b/tape__ref_8h_source.html @@ -94,52 +94,48 @@ $(document).ready(function(){initNavTree('tape__ref_8h_source.html',''); initRes
                                    1 #ifndef SIMDJSON_INTERNAL_TAPE_REF_H
                                    2 #define SIMDJSON_INTERNAL_TAPE_REF_H
                                    3 
                                    -
                                    4 #include "simdjson/internal/tape_type.h"
                                    +
                                    4 #include "simdjson/base.h"
                                    5 
                                    6 namespace simdjson {
                                    -
                                    7 
                                    -
                                    8 namespace dom {
                                    -
                                    9  class document;
                                    -
                                    10 }
                                    -
                                    11 
                                    -
                                    12 namespace internal {
                                    -
                                    13 
                                    -
                                    14 constexpr const uint64_t JSON_VALUE_MASK = 0x00FFFFFFFFFFFFFF;
                                    -
                                    15 constexpr const uint32_t JSON_COUNT_MASK = 0xFFFFFF;
                                    -
                                    16 
                                    -
                                    20 class tape_ref {
                                    -
                                    21 public:
                                    -
                                    22  simdjson_inline tape_ref() noexcept;
                                    -
                                    23  simdjson_inline tape_ref(const dom::document *doc, size_t json_index) noexcept;
                                    -
                                    24  inline size_t after_element() const noexcept;
                                    -
                                    25  simdjson_inline tape_type tape_ref_type() const noexcept;
                                    -
                                    26  simdjson_inline uint64_t tape_value() const noexcept;
                                    -
                                    27  simdjson_inline bool is_double() const noexcept;
                                    -
                                    28  simdjson_inline bool is_int64() const noexcept;
                                    -
                                    29  simdjson_inline bool is_uint64() const noexcept;
                                    -
                                    30  simdjson_inline bool is_false() const noexcept;
                                    -
                                    31  simdjson_inline bool is_true() const noexcept;
                                    -
                                    32  simdjson_inline bool is_null_on_tape() const noexcept;// different name to avoid clash with is_null.
                                    -
                                    33  simdjson_inline uint32_t matching_brace_index() const noexcept;
                                    -
                                    34  simdjson_inline uint32_t scope_count() const noexcept;
                                    -
                                    35  template<typename T>
                                    -
                                    36  simdjson_inline T next_tape_value() const noexcept;
                                    -
                                    37  simdjson_inline uint32_t get_string_length() const noexcept;
                                    -
                                    38  simdjson_inline const char * get_c_str() const noexcept;
                                    -
                                    39  inline std::string_view get_string_view() const noexcept;
                                    -
                                    40  simdjson_inline bool is_document_root() const noexcept;
                                    -
                                    41  simdjson_inline bool usable() const noexcept;
                                    -
                                    42 
                                    -
                                    44  const dom::document *doc;
                                    +
                                    7 namespace dom {
                                    +
                                    8 class document;
                                    +
                                    9 } // namespace dom
                                    +
                                    10 
                                    +
                                    11 namespace internal {
                                    +
                                    12 
                                    +
                                    16 class tape_ref {
                                    +
                                    17 public:
                                    +
                                    18  simdjson_inline tape_ref() noexcept;
                                    +
                                    19  simdjson_inline tape_ref(const dom::document *doc, size_t json_index) noexcept;
                                    +
                                    20  inline size_t after_element() const noexcept;
                                    +
                                    21  simdjson_inline tape_type tape_ref_type() const noexcept;
                                    +
                                    22  simdjson_inline uint64_t tape_value() const noexcept;
                                    +
                                    23  simdjson_inline bool is_double() const noexcept;
                                    +
                                    24  simdjson_inline bool is_int64() const noexcept;
                                    +
                                    25  simdjson_inline bool is_uint64() const noexcept;
                                    +
                                    26  simdjson_inline bool is_false() const noexcept;
                                    +
                                    27  simdjson_inline bool is_true() const noexcept;
                                    +
                                    28  simdjson_inline bool is_null_on_tape() const noexcept;// different name to avoid clash with is_null.
                                    +
                                    29  simdjson_inline uint32_t matching_brace_index() const noexcept;
                                    +
                                    30  simdjson_inline uint32_t scope_count() const noexcept;
                                    +
                                    31  template<typename T>
                                    +
                                    32  simdjson_inline T next_tape_value() const noexcept;
                                    +
                                    33  simdjson_inline uint32_t get_string_length() const noexcept;
                                    +
                                    34  simdjson_inline const char * get_c_str() const noexcept;
                                    +
                                    35  inline std::string_view get_string_view() const noexcept;
                                    +
                                    36  simdjson_inline bool is_document_root() const noexcept;
                                    +
                                    37  simdjson_inline bool usable() const noexcept;
                                    +
                                    38 
                                    +
                                    40  const dom::document *doc;
                                    +
                                    41 
                                    +
                                    43  size_t json_index;
                                    +
                                    44 };
                                    45 
                                    -
                                    47  size_t json_index;
                                    -
                                    48 };
                                    -
                                    49 
                                    -
                                    50 } // namespace internal
                                    -
                                    51 } // namespace simdjson
                                    -
                                    52 
                                    -
                                    53 #endif // SIMDJSON_INTERNAL_TAPE_REF_H
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    +
                                    46 } // namespace internal
                                    +
                                    47 } // namespace simdjson
                                    +
                                    48 
                                    +
                                    49 #endif // SIMDJSON_INTERNAL_TAPE_REF_H
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    diff --git a/tape__type_8h_source.html b/tape__type_8h_source.html index e41e2f553..d91ab8548 100644 --- a/tape__type_8h_source.html +++ b/tape__type_8h_source.html @@ -103,20 +103,25 @@ $(document).ready(function(){initNavTree('tape__type_8h_source.html',''); initRe
                                    13  START_OBJECT = '{',
                                    14  END_ARRAY = ']',
                                    15  END_OBJECT = '}',
                                    -
                                    16  STRING = '"',
                                    -
                                    17  INT64 = 'l',
                                    -
                                    18  UINT64 = 'u',
                                    -
                                    19  DOUBLE = 'd',
                                    +
                                    16  STRING = '"',
                                    +
                                    17  INT64 = 'l',
                                    +
                                    18  UINT64 = 'u',
                                    +
                                    19  DOUBLE = 'd',
                                    20  TRUE_VALUE = 't',
                                    21  FALSE_VALUE = 'f',
                                    -
                                    22  NULL_VALUE = 'n'
                                    +
                                    22  NULL_VALUE = 'n'
                                    23 }; // enum class tape_type
                                    24 
                                    25 } // namespace internal
                                    26 } // namespace simdjson
                                    27 
                                    28 #endif // SIMDJSON_INTERNAL_TAPE_TYPE_H
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    + +
                                    @ STRING
                                    std::string_view
                                    +
                                    @ UINT64
                                    uint64_t: any integer that fits in uint64_t but not int64_t
                                    + +
                                    @ DOUBLE
                                    double: Any number with a "." or "e" that fits in double.
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    diff --git a/token__iterator-inl_8h_source.html b/token__iterator-inl_8h_source.html index 38f245a0e..e72390e9f 100644 --- a/token__iterator-inl_8h_source.html +++ b/token__iterator-inl_8h_source.html @@ -91,85 +91,96 @@ $(document).ready(function(){initNavTree('token__iterator-inl_8h_source.html',''
                                    token_iterator-inl.h
                                    -
                                    1 namespace simdjson {
                                    -
                                    2 namespace SIMDJSON_IMPLEMENTATION {
                                    -
                                    3 namespace ondemand {
                                    -
                                    4 
                                    -
                                    5 simdjson_inline token_iterator::token_iterator(
                                    -
                                    6  const uint8_t *_buf,
                                    -
                                    7  token_position position
                                    -
                                    8 ) noexcept : buf{_buf}, _position{position}
                                    -
                                    9 {
                                    -
                                    10 }
                                    -
                                    11 
                                    -
                                    12 simdjson_inline uint32_t token_iterator::current_offset() const noexcept {
                                    -
                                    13  return *(_position);
                                    -
                                    14 }
                                    -
                                    15 
                                    -
                                    16 
                                    -
                                    17 simdjson_inline const uint8_t *token_iterator::return_current_and_advance() noexcept {
                                    -
                                    18  return &buf[*(_position++)];
                                    +
                                    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H
                                    +
                                    2 
                                    +
                                    3 #ifndef SIMDJSON_AMALGAMATED
                                    +
                                    4 #define SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H
                                    +
                                    5 #include "simdjson/generic/ondemand/base.h"
                                    +
                                    6 #include "simdjson/generic/ondemand/token_iterator.h"
                                    +
                                    7 #include "simdjson/generic/implementation_simdjson_result_base-inl.h"
                                    +
                                    8 #endif // SIMDJSON_AMALGAMATED
                                    +
                                    9 
                                    +
                                    10 namespace simdjson {
                                    +
                                    11 namespace SIMDJSON_IMPLEMENTATION {
                                    +
                                    12 namespace ondemand {
                                    +
                                    13 
                                    +
                                    14 simdjson_inline token_iterator::token_iterator(
                                    +
                                    15  const uint8_t *_buf,
                                    +
                                    16  token_position position
                                    +
                                    17 ) noexcept : buf{_buf}, _position{position}
                                    +
                                    18 {
                                    19 }
                                    20 
                                    -
                                    21 simdjson_inline const uint8_t *token_iterator::peek(token_position position) const noexcept {
                                    -
                                    22  return &buf[*position];
                                    +
                                    21 simdjson_inline uint32_t token_iterator::current_offset() const noexcept {
                                    +
                                    22  return *(_position);
                                    23 }
                                    -
                                    24 simdjson_inline uint32_t token_iterator::peek_index(token_position position) const noexcept {
                                    -
                                    25  return *position;
                                    -
                                    26 }
                                    -
                                    27 simdjson_inline uint32_t token_iterator::peek_length(token_position position) const noexcept {
                                    -
                                    28  return *(position+1) - *position;
                                    -
                                    29 }
                                    -
                                    30 
                                    -
                                    31 simdjson_inline const uint8_t *token_iterator::peek(int32_t delta) const noexcept {
                                    -
                                    32  return &buf[*(_position+delta)];
                                    -
                                    33 }
                                    -
                                    34 simdjson_inline uint32_t token_iterator::peek_index(int32_t delta) const noexcept {
                                    -
                                    35  return *(_position+delta);
                                    -
                                    36 }
                                    -
                                    37 simdjson_inline uint32_t token_iterator::peek_length(int32_t delta) const noexcept {
                                    -
                                    38  return *(_position+delta+1) - *(_position+delta);
                                    -
                                    39 }
                                    -
                                    40 
                                    -
                                    41 simdjson_inline token_position token_iterator::position() const noexcept {
                                    -
                                    42  return _position;
                                    -
                                    43 }
                                    -
                                    44 simdjson_inline void token_iterator::set_position(token_position target_position) noexcept {
                                    -
                                    45  _position = target_position;
                                    -
                                    46 }
                                    -
                                    47 
                                    -
                                    48 simdjson_inline bool token_iterator::operator==(const token_iterator &other) const noexcept {
                                    -
                                    49  return _position == other._position;
                                    -
                                    50 }
                                    -
                                    51 simdjson_inline bool token_iterator::operator!=(const token_iterator &other) const noexcept {
                                    -
                                    52  return _position != other._position;
                                    -
                                    53 }
                                    -
                                    54 simdjson_inline bool token_iterator::operator>(const token_iterator &other) const noexcept {
                                    -
                                    55  return _position > other._position;
                                    -
                                    56 }
                                    -
                                    57 simdjson_inline bool token_iterator::operator>=(const token_iterator &other) const noexcept {
                                    -
                                    58  return _position >= other._position;
                                    +
                                    24 
                                    +
                                    25 
                                    +
                                    26 simdjson_inline const uint8_t *token_iterator::return_current_and_advance() noexcept {
                                    +
                                    27  return &buf[*(_position++)];
                                    +
                                    28 }
                                    +
                                    29 
                                    +
                                    30 simdjson_inline const uint8_t *token_iterator::peek(token_position position) const noexcept {
                                    +
                                    31  return &buf[*position];
                                    +
                                    32 }
                                    +
                                    33 simdjson_inline uint32_t token_iterator::peek_index(token_position position) const noexcept {
                                    +
                                    34  return *position;
                                    +
                                    35 }
                                    +
                                    36 simdjson_inline uint32_t token_iterator::peek_length(token_position position) const noexcept {
                                    +
                                    37  return *(position+1) - *position;
                                    +
                                    38 }
                                    +
                                    39 
                                    +
                                    40 simdjson_inline const uint8_t *token_iterator::peek(int32_t delta) const noexcept {
                                    +
                                    41  return &buf[*(_position+delta)];
                                    +
                                    42 }
                                    +
                                    43 simdjson_inline uint32_t token_iterator::peek_index(int32_t delta) const noexcept {
                                    +
                                    44  return *(_position+delta);
                                    +
                                    45 }
                                    +
                                    46 simdjson_inline uint32_t token_iterator::peek_length(int32_t delta) const noexcept {
                                    +
                                    47  return *(_position+delta+1) - *(_position+delta);
                                    +
                                    48 }
                                    +
                                    49 
                                    +
                                    50 simdjson_inline token_position token_iterator::position() const noexcept {
                                    +
                                    51  return _position;
                                    +
                                    52 }
                                    +
                                    53 simdjson_inline void token_iterator::set_position(token_position target_position) noexcept {
                                    +
                                    54  _position = target_position;
                                    +
                                    55 }
                                    +
                                    56 
                                    +
                                    57 simdjson_inline bool token_iterator::operator==(const token_iterator &other) const noexcept {
                                    +
                                    58  return _position == other._position;
                                    59 }
                                    -
                                    60 simdjson_inline bool token_iterator::operator<(const token_iterator &other) const noexcept {
                                    -
                                    61  return _position < other._position;
                                    +
                                    60 simdjson_inline bool token_iterator::operator!=(const token_iterator &other) const noexcept {
                                    +
                                    61  return _position != other._position;
                                    62 }
                                    -
                                    63 simdjson_inline bool token_iterator::operator<=(const token_iterator &other) const noexcept {
                                    -
                                    64  return _position <= other._position;
                                    +
                                    63 simdjson_inline bool token_iterator::operator>(const token_iterator &other) const noexcept {
                                    +
                                    64  return _position > other._position;
                                    65 }
                                    -
                                    66 
                                    -
                                    67 } // namespace ondemand
                                    -
                                    68 } // namespace SIMDJSON_IMPLEMENTATION
                                    -
                                    69 } // namespace simdjson
                                    -
                                    70 
                                    -
                                    71 namespace simdjson {
                                    -
                                    72 
                                    -
                                    73 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::token_iterator>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::token_iterator &&value) noexcept
                                    -
                                    74  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::token_iterator>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::token_iterator>(value)) {}
                                    -
                                    75 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::token_iterator>::simdjson_result(error_code error) noexcept
                                    -
                                    76  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::token_iterator>(error) {}
                                    -
                                    77 
                                    +
                                    66 simdjson_inline bool token_iterator::operator>=(const token_iterator &other) const noexcept {
                                    +
                                    67  return _position >= other._position;
                                    +
                                    68 }
                                    +
                                    69 simdjson_inline bool token_iterator::operator<(const token_iterator &other) const noexcept {
                                    +
                                    70  return _position < other._position;
                                    +
                                    71 }
                                    +
                                    72 simdjson_inline bool token_iterator::operator<=(const token_iterator &other) const noexcept {
                                    +
                                    73  return _position <= other._position;
                                    +
                                    74 }
                                    +
                                    75 
                                    +
                                    76 } // namespace ondemand
                                    +
                                    77 } // namespace SIMDJSON_IMPLEMENTATION
                                    78 } // namespace simdjson
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    +
                                    79 
                                    +
                                    80 namespace simdjson {
                                    +
                                    81 
                                    +
                                    82 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::token_iterator>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::token_iterator &&value) noexcept
                                    +
                                    83  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::token_iterator>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::token_iterator>(value)) {}
                                    +
                                    84 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::token_iterator>::simdjson_result(error_code error) noexcept
                                    +
                                    85  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::token_iterator>(error) {}
                                    +
                                    86 
                                    +
                                    87 } // namespace simdjson
                                    +
                                    88 
                                    +
                                    89 #endif // SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    error_code
                                    All possible errors returned by simdjson.
                                    Definition: error.h:17
                                    diff --git a/token__iterator_8h_source.html b/token__iterator_8h_source.html index 60b7c18e7..bbe55cbdc 100644 --- a/token__iterator_8h_source.html +++ b/token__iterator_8h_source.html @@ -91,80 +91,91 @@ $(document).ready(function(){initNavTree('token__iterator_8h_source.html',''); i
                                    token_iterator.h
                                    -
                                    1 namespace simdjson {
                                    -
                                    2 namespace SIMDJSON_IMPLEMENTATION {
                                    -
                                    3 namespace ondemand {
                                    -
                                    4 
                                    -
                                    11 class token_iterator {
                                    -
                                    12 public:
                                    -
                                    18  simdjson_inline token_iterator() noexcept = default;
                                    -
                                    19  simdjson_inline token_iterator(token_iterator &&other) noexcept = default;
                                    -
                                    20  simdjson_inline token_iterator &operator=(token_iterator &&other) noexcept = default;
                                    -
                                    21  simdjson_inline token_iterator(const token_iterator &other) noexcept = default;
                                    -
                                    22  simdjson_inline token_iterator &operator=(const token_iterator &other) noexcept = default;
                                    -
                                    23 
                                    -
                                    27  simdjson_inline const uint8_t *return_current_and_advance() noexcept;
                                    -
                                    31  simdjson_inline uint32_t current_offset() const noexcept;
                                    -
                                    43  simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept;
                                    -
                                    52  simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept;
                                    -
                                    53 
                                    -
                                    62  simdjson_inline const uint8_t *peek(token_position position) const noexcept;
                                    -
                                    70  simdjson_inline uint32_t peek_length(token_position position) const noexcept;
                                    -
                                    71 
                                    -
                                    75  simdjson_inline token_position position() const noexcept;
                                    -
                                    79  simdjson_inline void set_position(token_position target_position) noexcept;
                                    +
                                    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H
                                    +
                                    2 
                                    +
                                    3 #ifndef SIMDJSON_AMALGAMATED
                                    +
                                    4 #define SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H
                                    +
                                    5 #include "simdjson/generic/ondemand/base.h"
                                    +
                                    6 #include "simdjson/generic/implementation_simdjson_result_base.h"
                                    +
                                    7 #include "simdjson/generic/ondemand/logger.h"
                                    +
                                    8 #endif // SIMDJSON_AMALGAMATED
                                    +
                                    9 
                                    +
                                    10 namespace simdjson {
                                    +
                                    11 namespace SIMDJSON_IMPLEMENTATION {
                                    +
                                    12 namespace ondemand {
                                    +
                                    13 
                                    +
                                    20 class token_iterator {
                                    +
                                    21 public:
                                    +
                                    27  simdjson_inline token_iterator() noexcept = default;
                                    +
                                    28  simdjson_inline token_iterator(token_iterator &&other) noexcept = default;
                                    +
                                    29  simdjson_inline token_iterator &operator=(token_iterator &&other) noexcept = default;
                                    +
                                    30  simdjson_inline token_iterator(const token_iterator &other) noexcept = default;
                                    +
                                    31  simdjson_inline token_iterator &operator=(const token_iterator &other) noexcept = default;
                                    +
                                    32 
                                    +
                                    36  simdjson_inline const uint8_t *return_current_and_advance() noexcept;
                                    +
                                    40  simdjson_inline uint32_t current_offset() const noexcept;
                                    +
                                    52  simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept;
                                    +
                                    61  simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept;
                                    +
                                    62 
                                    +
                                    71  simdjson_inline const uint8_t *peek(token_position position) const noexcept;
                                    +
                                    79  simdjson_inline uint32_t peek_length(token_position position) const noexcept;
                                    80 
                                    -
                                    81  // NOTE: we don't support a full C++ iterator interface, because we expect people to make
                                    -
                                    82  // different calls to advance the iterator based on *their own* state.
                                    -
                                    83 
                                    -
                                    84  simdjson_inline bool operator==(const token_iterator &other) const noexcept;
                                    -
                                    85  simdjson_inline bool operator!=(const token_iterator &other) const noexcept;
                                    -
                                    86  simdjson_inline bool operator>(const token_iterator &other) const noexcept;
                                    -
                                    87  simdjson_inline bool operator>=(const token_iterator &other) const noexcept;
                                    -
                                    88  simdjson_inline bool operator<(const token_iterator &other) const noexcept;
                                    -
                                    89  simdjson_inline bool operator<=(const token_iterator &other) const noexcept;
                                    -
                                    90 
                                    -
                                    91 protected:
                                    -
                                    92  simdjson_inline token_iterator(const uint8_t *buf, token_position position) noexcept;
                                    -
                                    93 
                                    -
                                    102  simdjson_inline uint32_t peek_index(int32_t delta=0) const noexcept;
                                    -
                                    111  simdjson_inline uint32_t peek_index(token_position position) const noexcept;
                                    -
                                    112 
                                    -
                                    113  const uint8_t *buf{};
                                    -
                                    114  token_position _position{};
                                    -
                                    115 
                                    -
                                    116  friend class json_iterator;
                                    -
                                    117  friend class value_iterator;
                                    -
                                    118  friend class object;
                                    -
                                    119  template <typename... Args>
                                    -
                                    120  friend simdjson_inline void logger::log_line(const json_iterator &iter, const char *title_prefix, const char *title, std::string_view detail, int delta, int depth_delta, logger::log_level level, Args&&... args) noexcept;
                                    -
                                    121  template <typename... Args>
                                    -
                                    122  friend simdjson_inline void logger::log_line(const json_iterator &iter, token_position index, depth_t depth, const char *title_prefix, const char *title, std::string_view detail, logger::log_level level, Args&&... args) noexcept;
                                    -
                                    123 };
                                    +
                                    84  simdjson_inline token_position position() const noexcept;
                                    +
                                    88  simdjson_inline void set_position(token_position target_position) noexcept;
                                    +
                                    89 
                                    +
                                    90  // NOTE: we don't support a full C++ iterator interface, because we expect people to make
                                    +
                                    91  // different calls to advance the iterator based on *their own* state.
                                    +
                                    92 
                                    +
                                    93  simdjson_inline bool operator==(const token_iterator &other) const noexcept;
                                    +
                                    94  simdjson_inline bool operator!=(const token_iterator &other) const noexcept;
                                    +
                                    95  simdjson_inline bool operator>(const token_iterator &other) const noexcept;
                                    +
                                    96  simdjson_inline bool operator>=(const token_iterator &other) const noexcept;
                                    +
                                    97  simdjson_inline bool operator<(const token_iterator &other) const noexcept;
                                    +
                                    98  simdjson_inline bool operator<=(const token_iterator &other) const noexcept;
                                    +
                                    99 
                                    +
                                    100 protected:
                                    +
                                    101  simdjson_inline token_iterator(const uint8_t *buf, token_position position) noexcept;
                                    +
                                    102 
                                    +
                                    111  simdjson_inline uint32_t peek_index(int32_t delta=0) const noexcept;
                                    +
                                    120  simdjson_inline uint32_t peek_index(token_position position) const noexcept;
                                    +
                                    121 
                                    +
                                    122  const uint8_t *buf{};
                                    +
                                    123  token_position _position{};
                                    124 
                                    -
                                    125 } // namespace ondemand
                                    -
                                    126 } // namespace SIMDJSON_IMPLEMENTATION
                                    -
                                    127 } // namespace simdjson
                                    -
                                    128 
                                    -
                                    129 namespace simdjson {
                                    -
                                    130 
                                    -
                                    131 template<>
                                    -
                                    132 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::token_iterator> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::token_iterator> {
                                    -
                                    133 public:
                                    -
                                    134  simdjson_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::token_iterator &&value) noexcept;
                                    -
                                    135  simdjson_inline simdjson_result(error_code error) noexcept;
                                    -
                                    136  simdjson_inline simdjson_result() noexcept = default;
                                    -
                                    137  simdjson_inline ~simdjson_result() noexcept = default;
                                    -
                                    138 };
                                    +
                                    125  friend class json_iterator;
                                    +
                                    126  friend class value_iterator;
                                    +
                                    127  friend class object;
                                    +
                                    128  template <typename... Args>
                                    +
                                    129  friend simdjson_inline void logger::log_line(const json_iterator &iter, const char *title_prefix, const char *title, std::string_view detail, int delta, int depth_delta, logger::log_level level, Args&&... args) noexcept;
                                    +
                                    130  template <typename... Args>
                                    +
                                    131  friend simdjson_inline void logger::log_line(const json_iterator &iter, token_position index, depth_t depth, const char *title_prefix, const char *title, std::string_view detail, logger::log_level level, Args&&... args) noexcept;
                                    +
                                    132 };
                                    +
                                    133 
                                    +
                                    134 } // namespace ondemand
                                    +
                                    135 } // namespace SIMDJSON_IMPLEMENTATION
                                    +
                                    136 } // namespace simdjson
                                    +
                                    137 
                                    +
                                    138 namespace simdjson {
                                    139 
                                    -
                                    140 } // namespace simdjson
                                    +
                                    140 template<>
                                    +
                                    141 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::token_iterator> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::token_iterator> {
                                    +
                                    142 public:
                                    +
                                    143  simdjson_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::token_iterator &&value) noexcept;
                                    +
                                    144  simdjson_inline simdjson_result(error_code error) noexcept;
                                    +
                                    145  simdjson_inline simdjson_result() noexcept = default;
                                    +
                                    146  simdjson_inline ~simdjson_result() noexcept = default;
                                    +
                                    147 };
                                    +
                                    148 
                                    +
                                    149 } // namespace simdjson
                                    +
                                    150 
                                    +
                                    151 #endif // SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H
                                    @ object
                                    A JSON object ( { "a": 1, "b" 2, ... } )
                                    -
                                    int32_t depth_t
                                    Represents the depth of a JSON value (number of nested arrays/objects).
                                    Definition: ondemand.h:11
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    +
                                    int32_t depth_t
                                    Represents the depth of a JSON value (number of nested arrays/objects).
                                    Definition: base.h:18
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    error_code
                                    All possible errors returned by simdjson.
                                    Definition: error.h:17
                                    - +
                                    The result of a simdjson operation that could fail.
                                    Definition: error.h:205
                                    -
                                    simdjson_inline error_code error() const noexcept
                                    The error.
                                    Definition: error-inl.h:132
                                    +
                                    simdjson_inline error_code error() const noexcept
                                    The error.
                                    Definition: error-inl.h:131
                                    simdjson_inline T & value() &noexcept(false)
                                    Get the result value.
                                    diff --git a/value-inl_8h_source.html b/value-inl_8h_source.html index b5c7c1f09..c1b13d68a 100644 --- a/value-inl_8h_source.html +++ b/value-inl_8h_source.html @@ -91,481 +91,497 @@ $(document).ready(function(){initNavTree('value-inl_8h_source.html',''); initRes
                                    value-inl.h
                                    -
                                    1 namespace simdjson {
                                    -
                                    2 namespace SIMDJSON_IMPLEMENTATION {
                                    -
                                    3 namespace ondemand {
                                    -
                                    4 
                                    -
                                    5 simdjson_inline value::value(const value_iterator &_iter) noexcept
                                    -
                                    6  : iter{_iter}
                                    -
                                    7 {
                                    -
                                    8 }
                                    -
                                    9 simdjson_inline value value::start(const value_iterator &iter) noexcept {
                                    -
                                    10  return iter;
                                    -
                                    11 }
                                    -
                                    12 simdjson_inline value value::resume(const value_iterator &iter) noexcept {
                                    -
                                    13  return iter;
                                    -
                                    14 }
                                    -
                                    15 
                                    -
                                    16 simdjson_inline simdjson_result<array> value::get_array() noexcept {
                                    -
                                    17  return array::start(iter);
                                    -
                                    18 }
                                    -
                                    19 simdjson_inline simdjson_result<object> value::get_object() noexcept {
                                    -
                                    20  return object::start(iter);
                                    -
                                    21 }
                                    - -
                                    23  if (iter.at_start()) {
                                    -
                                    24  return get_object();
                                    -
                                    25  } else {
                                    -
                                    26  return object::resume(iter);
                                    -
                                    27  }
                                    +
                                    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H
                                    +
                                    2 
                                    +
                                    3 #ifndef SIMDJSON_AMALGAMATED
                                    +
                                    4 #define SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H
                                    +
                                    5 #include "simdjson/generic/ondemand/base.h"
                                    +
                                    6 #include "simdjson/generic/ondemand/array.h"
                                    +
                                    7 #include "simdjson/generic/ondemand/array_iterator.h"
                                    +
                                    8 #include "simdjson/generic/ondemand/json_iterator.h"
                                    +
                                    9 #include "simdjson/generic/ondemand/json_type.h"
                                    +
                                    10 #include "simdjson/generic/ondemand/object.h"
                                    +
                                    11 #include "simdjson/generic/ondemand/raw_json_string.h"
                                    +
                                    12 #include "simdjson/generic/ondemand/value.h"
                                    +
                                    13 #endif // SIMDJSON_AMALGAMATED
                                    +
                                    14 
                                    +
                                    15 namespace simdjson {
                                    +
                                    16 namespace SIMDJSON_IMPLEMENTATION {
                                    +
                                    17 namespace ondemand {
                                    +
                                    18 
                                    +
                                    19 simdjson_inline value::value(const value_iterator &_iter) noexcept
                                    +
                                    20  : iter{_iter}
                                    +
                                    21 {
                                    +
                                    22 }
                                    +
                                    23 simdjson_inline value value::start(const value_iterator &iter) noexcept {
                                    +
                                    24  return iter;
                                    +
                                    25 }
                                    +
                                    26 simdjson_inline value value::resume(const value_iterator &iter) noexcept {
                                    +
                                    27  return iter;
                                    28 }
                                    29 
                                    - -
                                    31  return iter.get_raw_json_string();
                                    +
                                    30 simdjson_inline simdjson_result<array> value::get_array() noexcept {
                                    +
                                    31  return array::start(iter);
                                    32 }
                                    -
                                    33 simdjson_inline simdjson_result<std::string_view> value::get_string(bool allow_replacement) noexcept {
                                    -
                                    34  return iter.get_string(allow_replacement);
                                    +
                                    33 simdjson_inline simdjson_result<object> value::get_object() noexcept {
                                    +
                                    34  return object::start(iter);
                                    35 }
                                    - -
                                    37  return iter.get_wobbly_string();
                                    -
                                    38 }
                                    -
                                    39 simdjson_inline simdjson_result<double> value::get_double() noexcept {
                                    -
                                    40  return iter.get_double();
                                    -
                                    41 }
                                    - -
                                    43  return iter.get_double_in_string();
                                    -
                                    44 }
                                    -
                                    45 simdjson_inline simdjson_result<uint64_t> value::get_uint64() noexcept {
                                    -
                                    46  return iter.get_uint64();
                                    -
                                    47 }
                                    - -
                                    49  return iter.get_uint64_in_string();
                                    -
                                    50 }
                                    -
                                    51 simdjson_inline simdjson_result<int64_t> value::get_int64() noexcept {
                                    -
                                    52  return iter.get_int64();
                                    -
                                    53 }
                                    - -
                                    55  return iter.get_int64_in_string();
                                    -
                                    56 }
                                    -
                                    57 simdjson_inline simdjson_result<bool> value::get_bool() noexcept {
                                    -
                                    58  return iter.get_bool();
                                    -
                                    59 }
                                    -
                                    60 simdjson_inline simdjson_result<bool> value::is_null() noexcept {
                                    -
                                    61  return iter.is_null();
                                    -
                                    62 }
                                    -
                                    63 template<> simdjson_inline simdjson_result<array> value::get() noexcept { return get_array(); }
                                    -
                                    64 template<> simdjson_inline simdjson_result<object> value::get() noexcept { return get_object(); }
                                    -
                                    65 template<> simdjson_inline simdjson_result<raw_json_string> value::get() noexcept { return get_raw_json_string(); }
                                    -
                                    66 template<> simdjson_inline simdjson_result<std::string_view> value::get() noexcept { return get_string(false); }
                                    -
                                    67 template<> simdjson_inline simdjson_result<number> value::get() noexcept { return get_number(); }
                                    -
                                    68 template<> simdjson_inline simdjson_result<double> value::get() noexcept { return get_double(); }
                                    -
                                    69 template<> simdjson_inline simdjson_result<uint64_t> value::get() noexcept { return get_uint64(); }
                                    -
                                    70 template<> simdjson_inline simdjson_result<int64_t> value::get() noexcept { return get_int64(); }
                                    -
                                    71 template<> simdjson_inline simdjson_result<bool> value::get() noexcept { return get_bool(); }
                                    -
                                    72 
                                    -
                                    73 template<typename T> simdjson_inline error_code value::get(T &out) noexcept {
                                    -
                                    74  return get<T>().get(out);
                                    -
                                    75 }
                                    -
                                    76 
                                    -
                                    77 #if SIMDJSON_EXCEPTIONS
                                    -
                                    78 simdjson_inline value::operator array() noexcept(false) {
                                    -
                                    79  return get_array();
                                    -
                                    80 }
                                    -
                                    81 simdjson_inline value::operator object() noexcept(false) {
                                    -
                                    82  return get_object();
                                    -
                                    83 }
                                    -
                                    84 simdjson_inline value::operator uint64_t() noexcept(false) {
                                    -
                                    85  return get_uint64();
                                    -
                                    86 }
                                    -
                                    87 simdjson_inline value::operator int64_t() noexcept(false) {
                                    -
                                    88  return get_int64();
                                    + +
                                    37  if (iter.at_start()) {
                                    +
                                    38  return get_object();
                                    +
                                    39  } else {
                                    +
                                    40  return object::resume(iter);
                                    +
                                    41  }
                                    +
                                    42 }
                                    +
                                    43 
                                    + +
                                    45  return iter.get_raw_json_string();
                                    +
                                    46 }
                                    +
                                    47 simdjson_inline simdjson_result<std::string_view> value::get_string(bool allow_replacement) noexcept {
                                    +
                                    48  return iter.get_string(allow_replacement);
                                    +
                                    49 }
                                    + +
                                    51  return iter.get_wobbly_string();
                                    +
                                    52 }
                                    +
                                    53 simdjson_inline simdjson_result<double> value::get_double() noexcept {
                                    +
                                    54  return iter.get_double();
                                    +
                                    55 }
                                    + +
                                    57  return iter.get_double_in_string();
                                    +
                                    58 }
                                    +
                                    59 simdjson_inline simdjson_result<uint64_t> value::get_uint64() noexcept {
                                    +
                                    60  return iter.get_uint64();
                                    +
                                    61 }
                                    + +
                                    63  return iter.get_uint64_in_string();
                                    +
                                    64 }
                                    +
                                    65 simdjson_inline simdjson_result<int64_t> value::get_int64() noexcept {
                                    +
                                    66  return iter.get_int64();
                                    +
                                    67 }
                                    + +
                                    69  return iter.get_int64_in_string();
                                    +
                                    70 }
                                    +
                                    71 simdjson_inline simdjson_result<bool> value::get_bool() noexcept {
                                    +
                                    72  return iter.get_bool();
                                    +
                                    73 }
                                    +
                                    74 simdjson_inline simdjson_result<bool> value::is_null() noexcept {
                                    +
                                    75  return iter.is_null();
                                    +
                                    76 }
                                    +
                                    77 template<> simdjson_inline simdjson_result<array> value::get() noexcept { return get_array(); }
                                    +
                                    78 template<> simdjson_inline simdjson_result<object> value::get() noexcept { return get_object(); }
                                    +
                                    79 template<> simdjson_inline simdjson_result<raw_json_string> value::get() noexcept { return get_raw_json_string(); }
                                    +
                                    80 template<> simdjson_inline simdjson_result<std::string_view> value::get() noexcept { return get_string(false); }
                                    +
                                    81 template<> simdjson_inline simdjson_result<number> value::get() noexcept { return get_number(); }
                                    +
                                    82 template<> simdjson_inline simdjson_result<double> value::get() noexcept { return get_double(); }
                                    +
                                    83 template<> simdjson_inline simdjson_result<uint64_t> value::get() noexcept { return get_uint64(); }
                                    +
                                    84 template<> simdjson_inline simdjson_result<int64_t> value::get() noexcept { return get_int64(); }
                                    +
                                    85 template<> simdjson_inline simdjson_result<bool> value::get() noexcept { return get_bool(); }
                                    +
                                    86 
                                    +
                                    87 template<typename T> simdjson_inline error_code value::get(T &out) noexcept {
                                    +
                                    88  return get<T>().get(out);
                                    89 }
                                    -
                                    90 simdjson_inline value::operator double() noexcept(false) {
                                    -
                                    91  return get_double();
                                    -
                                    92 }
                                    -
                                    93 simdjson_inline value::operator std::string_view() noexcept(false) {
                                    -
                                    94  return get_string(false);
                                    -
                                    95 }
                                    -
                                    96 simdjson_inline value::operator raw_json_string() noexcept(false) {
                                    -
                                    97  return get_raw_json_string();
                                    -
                                    98 }
                                    -
                                    99 simdjson_inline value::operator bool() noexcept(false) {
                                    -
                                    100  return get_bool();
                                    -
                                    101 }
                                    -
                                    102 #endif
                                    -
                                    103 
                                    -
                                    104 simdjson_inline simdjson_result<array_iterator> value::begin() & noexcept {
                                    -
                                    105  return get_array().begin();
                                    +
                                    90 
                                    +
                                    91 #if SIMDJSON_EXCEPTIONS
                                    +
                                    92 simdjson_inline value::operator array() noexcept(false) {
                                    +
                                    93  return get_array();
                                    +
                                    94 }
                                    +
                                    95 simdjson_inline value::operator object() noexcept(false) {
                                    +
                                    96  return get_object();
                                    +
                                    97 }
                                    +
                                    98 simdjson_inline value::operator uint64_t() noexcept(false) {
                                    +
                                    99  return get_uint64();
                                    +
                                    100 }
                                    +
                                    101 simdjson_inline value::operator int64_t() noexcept(false) {
                                    +
                                    102  return get_int64();
                                    +
                                    103 }
                                    +
                                    104 simdjson_inline value::operator double() noexcept(false) {
                                    +
                                    105  return get_double();
                                    106 }
                                    -
                                    107 simdjson_inline simdjson_result<array_iterator> value::end() & noexcept {
                                    -
                                    108  return {};
                                    +
                                    107 simdjson_inline value::operator std::string_view() noexcept(false) {
                                    +
                                    108  return get_string(false);
                                    109 }
                                    -
                                    110 simdjson_inline simdjson_result<size_t> value::count_elements() & noexcept {
                                    - -
                                    112  auto a = get_array();
                                    -
                                    113  answer = a.count_elements();
                                    -
                                    114  // count_elements leaves you pointing inside the array, at the first element.
                                    -
                                    115  // We need to move back so that the user can create a new array (which requires that
                                    -
                                    116  // we point at '[').
                                    -
                                    117  iter.move_at_start();
                                    -
                                    118  return answer;
                                    -
                                    119 }
                                    -
                                    120 simdjson_inline simdjson_result<size_t> value::count_fields() & noexcept {
                                    - -
                                    122  auto a = get_object();
                                    -
                                    123  answer = a.count_fields();
                                    -
                                    124  iter.move_at_start();
                                    -
                                    125  return answer;
                                    -
                                    126 }
                                    -
                                    127 simdjson_inline simdjson_result<value> value::at(size_t index) noexcept {
                                    -
                                    128  auto a = get_array();
                                    -
                                    129  return a.at(index);
                                    -
                                    130 }
                                    -
                                    131 
                                    -
                                    132 simdjson_inline simdjson_result<value> value::find_field(std::string_view key) noexcept {
                                    -
                                    133  return start_or_resume_object().find_field(key);
                                    -
                                    134 }
                                    -
                                    135 simdjson_inline simdjson_result<value> value::find_field(const char *key) noexcept {
                                    -
                                    136  return start_or_resume_object().find_field(key);
                                    -
                                    137 }
                                    -
                                    138 
                                    -
                                    139 simdjson_inline simdjson_result<value> value::find_field_unordered(std::string_view key) noexcept {
                                    -
                                    140  return start_or_resume_object().find_field_unordered(key);
                                    -
                                    141 }
                                    -
                                    142 simdjson_inline simdjson_result<value> value::find_field_unordered(const char *key) noexcept {
                                    -
                                    143  return start_or_resume_object().find_field_unordered(key);
                                    +
                                    110 simdjson_inline value::operator raw_json_string() noexcept(false) {
                                    +
                                    111  return get_raw_json_string();
                                    +
                                    112 }
                                    +
                                    113 simdjson_inline value::operator bool() noexcept(false) {
                                    +
                                    114  return get_bool();
                                    +
                                    115 }
                                    +
                                    116 #endif
                                    +
                                    117 
                                    +
                                    118 simdjson_inline simdjson_result<array_iterator> value::begin() & noexcept {
                                    +
                                    119  return get_array().begin();
                                    +
                                    120 }
                                    +
                                    121 simdjson_inline simdjson_result<array_iterator> value::end() & noexcept {
                                    +
                                    122  return {};
                                    +
                                    123 }
                                    +
                                    124 simdjson_inline simdjson_result<size_t> value::count_elements() & noexcept {
                                    + +
                                    126  auto a = get_array();
                                    +
                                    127  answer = a.count_elements();
                                    +
                                    128  // count_elements leaves you pointing inside the array, at the first element.
                                    +
                                    129  // We need to move back so that the user can create a new array (which requires that
                                    +
                                    130  // we point at '[').
                                    +
                                    131  iter.move_at_start();
                                    +
                                    132  return answer;
                                    +
                                    133 }
                                    +
                                    134 simdjson_inline simdjson_result<size_t> value::count_fields() & noexcept {
                                    + +
                                    136  auto a = get_object();
                                    +
                                    137  answer = a.count_fields();
                                    +
                                    138  iter.move_at_start();
                                    +
                                    139  return answer;
                                    +
                                    140 }
                                    +
                                    141 simdjson_inline simdjson_result<value> value::at(size_t index) noexcept {
                                    +
                                    142  auto a = get_array();
                                    +
                                    143  return a.at(index);
                                    144 }
                                    145 
                                    -
                                    146 simdjson_inline simdjson_result<value> value::operator[](std::string_view key) noexcept {
                                    -
                                    147  return start_or_resume_object()[key];
                                    +
                                    146 simdjson_inline simdjson_result<value> value::find_field(std::string_view key) noexcept {
                                    +
                                    147  return start_or_resume_object().find_field(key);
                                    148 }
                                    -
                                    149 simdjson_inline simdjson_result<value> value::operator[](const char *key) noexcept {
                                    -
                                    150  return start_or_resume_object()[key];
                                    +
                                    149 simdjson_inline simdjson_result<value> value::find_field(const char *key) noexcept {
                                    +
                                    150  return start_or_resume_object().find_field(key);
                                    151 }
                                    152 
                                    -
                                    153 simdjson_inline simdjson_result<json_type> value::type() noexcept {
                                    -
                                    154  return iter.type();
                                    +
                                    153 simdjson_inline simdjson_result<value> value::find_field_unordered(std::string_view key) noexcept {
                                    +
                                    154  return start_or_resume_object().find_field_unordered(key);
                                    155 }
                                    -
                                    156 
                                    -
                                    157 simdjson_inline simdjson_result<bool> value::is_scalar() noexcept {
                                    -
                                    158  json_type this_type;
                                    -
                                    159  auto error = type().get(this_type);
                                    -
                                    160  if(error) { return error; }
                                    -
                                    161  return ! ((this_type == json_type::array) || (this_type == json_type::object));
                                    +
                                    156 simdjson_inline simdjson_result<value> value::find_field_unordered(const char *key) noexcept {
                                    +
                                    157  return start_or_resume_object().find_field_unordered(key);
                                    +
                                    158 }
                                    +
                                    159 
                                    +
                                    160 simdjson_inline simdjson_result<value> value::operator[](std::string_view key) noexcept {
                                    +
                                    161  return start_or_resume_object()[key];
                                    162 }
                                    -
                                    163 
                                    -
                                    164 simdjson_inline bool value::is_negative() noexcept {
                                    -
                                    165  return iter.is_negative();
                                    -
                                    166 }
                                    -
                                    167 
                                    -
                                    168 simdjson_inline simdjson_result<bool> value::is_integer() noexcept {
                                    -
                                    169  return iter.is_integer();
                                    -
                                    170 }
                                    -
                                    171 simdjson_warn_unused simdjson_inline simdjson_result<number_type> value::get_number_type() noexcept {
                                    -
                                    172  return iter.get_number_type();
                                    -
                                    173 }
                                    -
                                    174 simdjson_warn_unused simdjson_inline simdjson_result<number> value::get_number() noexcept {
                                    -
                                    175  return iter.get_number();
                                    +
                                    163 simdjson_inline simdjson_result<value> value::operator[](const char *key) noexcept {
                                    +
                                    164  return start_or_resume_object()[key];
                                    +
                                    165 }
                                    +
                                    166 
                                    +
                                    167 simdjson_inline simdjson_result<json_type> value::type() noexcept {
                                    +
                                    168  return iter.type();
                                    +
                                    169 }
                                    +
                                    170 
                                    +
                                    171 simdjson_inline simdjson_result<bool> value::is_scalar() noexcept {
                                    +
                                    172  json_type this_type;
                                    +
                                    173  auto error = type().get(this_type);
                                    +
                                    174  if(error) { return error; }
                                    +
                                    175  return ! ((this_type == json_type::array) || (this_type == json_type::object));
                                    176 }
                                    177 
                                    -
                                    178 simdjson_inline std::string_view value::raw_json_token() noexcept {
                                    -
                                    179  return std::string_view(reinterpret_cast<const char*>(iter.peek_start()), iter.peek_start_length());
                                    +
                                    178 simdjson_inline bool value::is_negative() noexcept {
                                    +
                                    179  return iter.is_negative();
                                    180 }
                                    181 
                                    - -
                                    183  return iter.json_iter().current_location();
                                    +
                                    182 simdjson_inline simdjson_result<bool> value::is_integer() noexcept {
                                    +
                                    183  return iter.is_integer();
                                    184 }
                                    -
                                    185 
                                    -
                                    186 simdjson_inline int32_t value::current_depth() const noexcept{
                                    -
                                    187  return iter.json_iter().depth();
                                    -
                                    188 }
                                    -
                                    189 
                                    -
                                    190 simdjson_inline simdjson_result<value> value::at_pointer(std::string_view json_pointer) noexcept {
                                    -
                                    191  json_type t;
                                    -
                                    192  SIMDJSON_TRY(type().get(t));
                                    -
                                    193  switch (t)
                                    -
                                    194  {
                                    -
                                    195  case json_type::array:
                                    -
                                    196  return (*this).get_array().at_pointer(json_pointer);
                                    -
                                    197  case json_type::object:
                                    -
                                    198  return (*this).get_object().at_pointer(json_pointer);
                                    -
                                    199  default:
                                    -
                                    200  return INVALID_JSON_POINTER;
                                    -
                                    201  }
                                    +
                                    185 simdjson_warn_unused simdjson_inline simdjson_result<number_type> value::get_number_type() noexcept {
                                    +
                                    186  return iter.get_number_type();
                                    +
                                    187 }
                                    +
                                    188 simdjson_warn_unused simdjson_inline simdjson_result<number> value::get_number() noexcept {
                                    +
                                    189  return iter.get_number();
                                    +
                                    190 }
                                    +
                                    191 
                                    +
                                    192 simdjson_inline std::string_view value::raw_json_token() noexcept {
                                    +
                                    193  return std::string_view(reinterpret_cast<const char*>(iter.peek_start()), iter.peek_start_length());
                                    +
                                    194 }
                                    +
                                    195 
                                    + +
                                    197  return iter.json_iter().current_location();
                                    +
                                    198 }
                                    +
                                    199 
                                    +
                                    200 simdjson_inline int32_t value::current_depth() const noexcept{
                                    +
                                    201  return iter.json_iter().depth();
                                    202 }
                                    203 
                                    -
                                    204 } // namespace ondemand
                                    -
                                    205 } // namespace SIMDJSON_IMPLEMENTATION
                                    -
                                    206 } // namespace simdjson
                                    -
                                    207 
                                    -
                                    208 namespace simdjson {
                                    -
                                    209 
                                    -
                                    210 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::simdjson_result(
                                    -
                                    211  SIMDJSON_IMPLEMENTATION::ondemand::value &&value
                                    -
                                    212 ) noexcept :
                                    -
                                    213  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value>(
                                    -
                                    214  std::forward<SIMDJSON_IMPLEMENTATION::ondemand::value>(value)
                                    -
                                    215  )
                                    -
                                    216 {
                                    -
                                    217 }
                                    -
                                    218 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::simdjson_result(
                                    -
                                    219  error_code error
                                    -
                                    220 ) noexcept :
                                    -
                                    221  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value>(error)
                                    -
                                    222 {
                                    -
                                    223 }
                                    -
                                    224 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::count_elements() & noexcept {
                                    -
                                    225  if (error()) { return error(); }
                                    -
                                    226  return first.count_elements();
                                    -
                                    227 }
                                    -
                                    228 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::count_fields() & noexcept {
                                    -
                                    229  if (error()) { return error(); }
                                    -
                                    230  return first.count_fields();
                                    +
                                    204 simdjson_inline simdjson_result<value> value::at_pointer(std::string_view json_pointer) noexcept {
                                    +
                                    205  json_type t;
                                    +
                                    206  SIMDJSON_TRY(type().get(t));
                                    +
                                    207  switch (t)
                                    +
                                    208  {
                                    +
                                    209  case json_type::array:
                                    +
                                    210  return (*this).get_array().at_pointer(json_pointer);
                                    +
                                    211  case json_type::object:
                                    +
                                    212  return (*this).get_object().at_pointer(json_pointer);
                                    +
                                    213  default:
                                    +
                                    214  return INVALID_JSON_POINTER;
                                    +
                                    215  }
                                    +
                                    216 }
                                    +
                                    217 
                                    +
                                    218 } // namespace ondemand
                                    +
                                    219 } // namespace SIMDJSON_IMPLEMENTATION
                                    +
                                    220 } // namespace simdjson
                                    +
                                    221 
                                    +
                                    222 namespace simdjson {
                                    +
                                    223 
                                    +
                                    224 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::simdjson_result(
                                    +
                                    225  SIMDJSON_IMPLEMENTATION::ondemand::value &&value
                                    +
                                    226 ) noexcept :
                                    +
                                    227  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value>(
                                    +
                                    228  std::forward<SIMDJSON_IMPLEMENTATION::ondemand::value>(value)
                                    +
                                    229  )
                                    +
                                    230 {
                                    231 }
                                    -
                                    232 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::at(size_t index) noexcept {
                                    -
                                    233  if (error()) { return error(); }
                                    -
                                    234  return first.at(index);
                                    -
                                    235 }
                                    -
                                    236 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::begin() & noexcept {
                                    -
                                    237  if (error()) { return error(); }
                                    -
                                    238  return first.begin();
                                    -
                                    239 }
                                    -
                                    240 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::end() & noexcept {
                                    -
                                    241  if (error()) { return error(); }
                                    -
                                    242  return {};
                                    -
                                    243 }
                                    -
                                    244 
                                    - -
                                    246  if (error()) { return error(); }
                                    -
                                    247  return first.find_field(key);
                                    -
                                    248 }
                                    - -
                                    250  if (error()) { return error(); }
                                    -
                                    251  return first.find_field(key);
                                    -
                                    252 }
                                    -
                                    253 
                                    - +
                                    232 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::simdjson_result(
                                    +
                                    233  error_code error
                                    +
                                    234 ) noexcept :
                                    +
                                    235  implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value>(error)
                                    +
                                    236 {
                                    +
                                    237 }
                                    +
                                    238 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::count_elements() & noexcept {
                                    +
                                    239  if (error()) { return error(); }
                                    +
                                    240  return first.count_elements();
                                    +
                                    241 }
                                    +
                                    242 simdjson_inline simdjson_result<size_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::count_fields() & noexcept {
                                    +
                                    243  if (error()) { return error(); }
                                    +
                                    244  return first.count_fields();
                                    +
                                    245 }
                                    +
                                    246 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::at(size_t index) noexcept {
                                    +
                                    247  if (error()) { return error(); }
                                    +
                                    248  return first.at(index);
                                    +
                                    249 }
                                    +
                                    250 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::begin() & noexcept {
                                    +
                                    251  if (error()) { return error(); }
                                    +
                                    252  return first.begin();
                                    +
                                    253 }
                                    +
                                    254 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array_iterator> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::end() & noexcept {
                                    255  if (error()) { return error(); }
                                    -
                                    256  return first.find_field_unordered(key);
                                    +
                                    256  return {};
                                    257 }
                                    - -
                                    259  if (error()) { return error(); }
                                    -
                                    260  return first.find_field_unordered(key);
                                    -
                                    261 }
                                    -
                                    262 
                                    -
                                    263 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator[](std::string_view key) noexcept {
                                    +
                                    258 
                                    + +
                                    260  if (error()) { return error(); }
                                    +
                                    261  return first.find_field(key);
                                    +
                                    262 }
                                    +
                                    264  if (error()) { return error(); }
                                    -
                                    265  return first[key];
                                    +
                                    265  return first.find_field(key);
                                    266 }
                                    -
                                    267 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator[](const char *key) noexcept {
                                    -
                                    268  if (error()) { return error(); }
                                    -
                                    269  return first[key];
                                    -
                                    270 }
                                    -
                                    271 
                                    -
                                    272 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_array() noexcept {
                                    -
                                    273  if (error()) { return error(); }
                                    -
                                    274  return first.get_array();
                                    +
                                    267 
                                    + +
                                    269  if (error()) { return error(); }
                                    +
                                    270  return first.find_field_unordered(key);
                                    +
                                    271 }
                                    + +
                                    273  if (error()) { return error(); }
                                    +
                                    274  return first.find_field_unordered(key);
                                    275 }
                                    -
                                    276 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_object() noexcept {
                                    -
                                    277  if (error()) { return error(); }
                                    -
                                    278  return first.get_object();
                                    -
                                    279 }
                                    -
                                    280 simdjson_inline simdjson_result<uint64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_uint64() noexcept {
                                    -
                                    281  if (error()) { return error(); }
                                    -
                                    282  return first.get_uint64();
                                    -
                                    283 }
                                    -
                                    284 simdjson_inline simdjson_result<uint64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_uint64_in_string() noexcept {
                                    -
                                    285  if (error()) { return error(); }
                                    -
                                    286  return first.get_uint64_in_string();
                                    -
                                    287 }
                                    -
                                    288 simdjson_inline simdjson_result<int64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_int64() noexcept {
                                    -
                                    289  if (error()) { return error(); }
                                    -
                                    290  return first.get_int64();
                                    -
                                    291 }
                                    -
                                    292 simdjson_inline simdjson_result<int64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_int64_in_string() noexcept {
                                    -
                                    293  if (error()) { return error(); }
                                    -
                                    294  return first.get_int64_in_string();
                                    -
                                    295 }
                                    -
                                    296 simdjson_inline simdjson_result<double> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_double() noexcept {
                                    -
                                    297  if (error()) { return error(); }
                                    -
                                    298  return first.get_double();
                                    -
                                    299 }
                                    -
                                    300 simdjson_inline simdjson_result<double> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_double_in_string() noexcept {
                                    -
                                    301  if (error()) { return error(); }
                                    -
                                    302  return first.get_double_in_string();
                                    -
                                    303 }
                                    -
                                    304 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_string(bool allow_replacement) noexcept {
                                    -
                                    305  if (error()) { return error(); }
                                    -
                                    306  return first.get_string(allow_replacement);
                                    -
                                    307 }
                                    -
                                    308 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_wobbly_string() noexcept {
                                    -
                                    309  if (error()) { return error(); }
                                    -
                                    310  return first.get_wobbly_string();
                                    -
                                    311 }
                                    -
                                    312 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_raw_json_string() noexcept {
                                    -
                                    313  if (error()) { return error(); }
                                    -
                                    314  return first.get_raw_json_string();
                                    -
                                    315 }
                                    -
                                    316 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_bool() noexcept {
                                    -
                                    317  if (error()) { return error(); }
                                    -
                                    318  return first.get_bool();
                                    -
                                    319 }
                                    -
                                    320 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::is_null() noexcept {
                                    -
                                    321  if (error()) { return error(); }
                                    -
                                    322  return first.is_null();
                                    -
                                    323 }
                                    -
                                    324 
                                    -
                                    325 template<typename T> simdjson_inline simdjson_result<T> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get() noexcept {
                                    -
                                    326  if (error()) { return error(); }
                                    -
                                    327  return first.get<T>();
                                    -
                                    328 }
                                    -
                                    329 template<typename T> simdjson_inline error_code simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get(T &out) noexcept {
                                    -
                                    330  if (error()) { return error(); }
                                    -
                                    331  return first.get<T>(out);
                                    -
                                    332 }
                                    -
                                    333 
                                    -
                                    334 template<> simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get<SIMDJSON_IMPLEMENTATION::ondemand::value>() noexcept {
                                    -
                                    335  if (error()) { return error(); }
                                    -
                                    336  return std::move(first);
                                    +
                                    276 
                                    +
                                    277 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator[](std::string_view key) noexcept {
                                    +
                                    278  if (error()) { return error(); }
                                    +
                                    279  return first[key];
                                    +
                                    280 }
                                    +
                                    281 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator[](const char *key) noexcept {
                                    +
                                    282  if (error()) { return error(); }
                                    +
                                    283  return first[key];
                                    +
                                    284 }
                                    +
                                    285 
                                    +
                                    286 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_array() noexcept {
                                    +
                                    287  if (error()) { return error(); }
                                    +
                                    288  return first.get_array();
                                    +
                                    289 }
                                    +
                                    290 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_object() noexcept {
                                    +
                                    291  if (error()) { return error(); }
                                    +
                                    292  return first.get_object();
                                    +
                                    293 }
                                    +
                                    294 simdjson_inline simdjson_result<uint64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_uint64() noexcept {
                                    +
                                    295  if (error()) { return error(); }
                                    +
                                    296  return first.get_uint64();
                                    +
                                    297 }
                                    +
                                    298 simdjson_inline simdjson_result<uint64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_uint64_in_string() noexcept {
                                    +
                                    299  if (error()) { return error(); }
                                    +
                                    300  return first.get_uint64_in_string();
                                    +
                                    301 }
                                    +
                                    302 simdjson_inline simdjson_result<int64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_int64() noexcept {
                                    +
                                    303  if (error()) { return error(); }
                                    +
                                    304  return first.get_int64();
                                    +
                                    305 }
                                    +
                                    306 simdjson_inline simdjson_result<int64_t> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_int64_in_string() noexcept {
                                    +
                                    307  if (error()) { return error(); }
                                    +
                                    308  return first.get_int64_in_string();
                                    +
                                    309 }
                                    +
                                    310 simdjson_inline simdjson_result<double> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_double() noexcept {
                                    +
                                    311  if (error()) { return error(); }
                                    +
                                    312  return first.get_double();
                                    +
                                    313 }
                                    +
                                    314 simdjson_inline simdjson_result<double> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_double_in_string() noexcept {
                                    +
                                    315  if (error()) { return error(); }
                                    +
                                    316  return first.get_double_in_string();
                                    +
                                    317 }
                                    +
                                    318 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_string(bool allow_replacement) noexcept {
                                    +
                                    319  if (error()) { return error(); }
                                    +
                                    320  return first.get_string(allow_replacement);
                                    +
                                    321 }
                                    +
                                    322 simdjson_inline simdjson_result<std::string_view> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_wobbly_string() noexcept {
                                    +
                                    323  if (error()) { return error(); }
                                    +
                                    324  return first.get_wobbly_string();
                                    +
                                    325 }
                                    +
                                    326 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_raw_json_string() noexcept {
                                    +
                                    327  if (error()) { return error(); }
                                    +
                                    328  return first.get_raw_json_string();
                                    +
                                    329 }
                                    +
                                    330 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_bool() noexcept {
                                    +
                                    331  if (error()) { return error(); }
                                    +
                                    332  return first.get_bool();
                                    +
                                    333 }
                                    +
                                    334 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::is_null() noexcept {
                                    +
                                    335  if (error()) { return error(); }
                                    +
                                    336  return first.is_null();
                                    337 }
                                    -
                                    338 template<> simdjson_inline error_code simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get<SIMDJSON_IMPLEMENTATION::ondemand::value>(SIMDJSON_IMPLEMENTATION::ondemand::value &out) noexcept {
                                    -
                                    339  if (error()) { return error(); }
                                    -
                                    340  out = first;
                                    -
                                    341  return SUCCESS;
                                    +
                                    338 
                                    +
                                    339 template<typename T> simdjson_inline simdjson_result<T> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get() noexcept {
                                    +
                                    340  if (error()) { return error(); }
                                    +
                                    341  return first.get<T>();
                                    342 }
                                    -
                                    343 
                                    - -
                                    345  if (error()) { return error(); }
                                    -
                                    346  return first.type();
                                    -
                                    347 }
                                    - -
                                    349  if (error()) { return error(); }
                                    -
                                    350  return first.is_scalar();
                                    +
                                    343 template<typename T> simdjson_inline error_code simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get(T &out) noexcept {
                                    +
                                    344  if (error()) { return error(); }
                                    +
                                    345  return first.get<T>(out);
                                    +
                                    346 }
                                    +
                                    347 
                                    +
                                    348 template<> simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get<SIMDJSON_IMPLEMENTATION::ondemand::value>() noexcept {
                                    +
                                    349  if (error()) { return error(); }
                                    +
                                    350  return std::move(first);
                                    351 }
                                    -
                                    352 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::is_negative() noexcept {
                                    -
                                    353  if (error()) { return error(); }
                                    -
                                    354  return first.is_negative();
                                    -
                                    355 }
                                    -
                                    356 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::is_integer() noexcept {
                                    -
                                    357  if (error()) { return error(); }
                                    -
                                    358  return first.is_integer();
                                    -
                                    359 }
                                    -
                                    360 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::numberparsing::number_type> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_number_type() noexcept {
                                    -
                                    361  if (error()) { return error(); }
                                    -
                                    362  return first.get_number_type();
                                    -
                                    363 }
                                    -
                                    364 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::number> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_number() noexcept {
                                    -
                                    365  if (error()) { return error(); }
                                    -
                                    366  return first.get_number();
                                    -
                                    367 }
                                    -
                                    368 #if SIMDJSON_EXCEPTIONS
                                    -
                                    369 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator SIMDJSON_IMPLEMENTATION::ondemand::array() noexcept(false) {
                                    -
                                    370  if (error()) { throw simdjson_error(error()); }
                                    -
                                    371  return first;
                                    -
                                    372 }
                                    -
                                    373 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator SIMDJSON_IMPLEMENTATION::ondemand::object() noexcept(false) {
                                    -
                                    374  if (error()) { throw simdjson_error(error()); }
                                    -
                                    375  return first;
                                    -
                                    376 }
                                    -
                                    377 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator uint64_t() noexcept(false) {
                                    -
                                    378  if (error()) { throw simdjson_error(error()); }
                                    -
                                    379  return first;
                                    -
                                    380 }
                                    -
                                    381 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator int64_t() noexcept(false) {
                                    -
                                    382  if (error()) { throw simdjson_error(error()); }
                                    -
                                    383  return first;
                                    -
                                    384 }
                                    -
                                    385 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator double() noexcept(false) {
                                    -
                                    386  if (error()) { throw simdjson_error(error()); }
                                    -
                                    387  return first;
                                    -
                                    388 }
                                    -
                                    389 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator std::string_view() noexcept(false) {
                                    -
                                    390  if (error()) { throw simdjson_error(error()); }
                                    -
                                    391  return first;
                                    -
                                    392 }
                                    -
                                    393 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string() noexcept(false) {
                                    -
                                    394  if (error()) { throw simdjson_error(error()); }
                                    -
                                    395  return first;
                                    -
                                    396 }
                                    -
                                    397 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator bool() noexcept(false) {
                                    -
                                    398  if (error()) { throw simdjson_error(error()); }
                                    -
                                    399  return first;
                                    -
                                    400 }
                                    -
                                    401 #endif
                                    -
                                    402 
                                    - -
                                    404  if (error()) { return error(); }
                                    -
                                    405  return first.raw_json_token();
                                    +
                                    352 template<> simdjson_inline error_code simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get<SIMDJSON_IMPLEMENTATION::ondemand::value>(SIMDJSON_IMPLEMENTATION::ondemand::value &out) noexcept {
                                    +
                                    353  if (error()) { return error(); }
                                    +
                                    354  out = first;
                                    +
                                    355  return SUCCESS;
                                    +
                                    356 }
                                    +
                                    357 
                                    + +
                                    359  if (error()) { return error(); }
                                    +
                                    360  return first.type();
                                    +
                                    361 }
                                    + +
                                    363  if (error()) { return error(); }
                                    +
                                    364  return first.is_scalar();
                                    +
                                    365 }
                                    +
                                    366 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::is_negative() noexcept {
                                    +
                                    367  if (error()) { return error(); }
                                    +
                                    368  return first.is_negative();
                                    +
                                    369 }
                                    +
                                    370 simdjson_inline simdjson_result<bool> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::is_integer() noexcept {
                                    +
                                    371  if (error()) { return error(); }
                                    +
                                    372  return first.is_integer();
                                    +
                                    373 }
                                    +
                                    374 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::number_type> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_number_type() noexcept {
                                    +
                                    375  if (error()) { return error(); }
                                    +
                                    376  return first.get_number_type();
                                    +
                                    377 }
                                    +
                                    378 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::number> simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::get_number() noexcept {
                                    +
                                    379  if (error()) { return error(); }
                                    +
                                    380  return first.get_number();
                                    +
                                    381 }
                                    +
                                    382 #if SIMDJSON_EXCEPTIONS
                                    +
                                    383 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator SIMDJSON_IMPLEMENTATION::ondemand::array() noexcept(false) {
                                    +
                                    384  if (error()) { throw simdjson_error(error()); }
                                    +
                                    385  return first;
                                    +
                                    386 }
                                    +
                                    387 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator SIMDJSON_IMPLEMENTATION::ondemand::object() noexcept(false) {
                                    +
                                    388  if (error()) { throw simdjson_error(error()); }
                                    +
                                    389  return first;
                                    +
                                    390 }
                                    +
                                    391 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator uint64_t() noexcept(false) {
                                    +
                                    392  if (error()) { throw simdjson_error(error()); }
                                    +
                                    393  return first;
                                    +
                                    394 }
                                    +
                                    395 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator int64_t() noexcept(false) {
                                    +
                                    396  if (error()) { throw simdjson_error(error()); }
                                    +
                                    397  return first;
                                    +
                                    398 }
                                    +
                                    399 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator double() noexcept(false) {
                                    +
                                    400  if (error()) { throw simdjson_error(error()); }
                                    +
                                    401  return first;
                                    +
                                    402 }
                                    +
                                    403 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator std::string_view() noexcept(false) {
                                    +
                                    404  if (error()) { throw simdjson_error(error()); }
                                    +
                                    405  return first;
                                    406 }
                                    -
                                    407 
                                    - -
                                    409  if (error()) { return error(); }
                                    -
                                    410  return first.current_location();
                                    -
                                    411 }
                                    -
                                    412 
                                    - -
                                    414  if (error()) { return error(); }
                                    -
                                    415  return first.current_depth();
                                    -
                                    416 }
                                    -
                                    417 
                                    - -
                                    419  if (error()) { return error(); }
                                    -
                                    420  return first.at_pointer(json_pointer);
                                    -
                                    421 }
                                    -
                                    422 
                                    -
                                    423 } // namespace simdjson
                                    - -
                                    static simdjson_inline simdjson_result< array > start(value_iterator &iter) noexcept
                                    Begin array iteration.
                                    Definition: array-inl.h:48
                                    -
                                    A forward-only JSON object field iterator.
                                    Definition: object.h:10
                                    -
                                    A string escaped per JSON rules, terminated with quote (").
                                    -
                                    An ephemeral JSON value returned during iteration.
                                    Definition: value.h:17
                                    -
                                    static simdjson_inline value start(const value_iterator &iter) noexcept
                                    Start a value at the current position.
                                    Definition: value-inl.h:9
                                    -
                                    simdjson_inline simdjson_result< bool > is_null() noexcept
                                    Checks if this JSON value is null.
                                    Definition: value-inl.h:60
                                    -
                                    simdjson_inline simdjson_result< const char * > current_location() noexcept
                                    Returns the current location in the document if in bounds.
                                    Definition: value-inl.h:182
                                    -
                                    simdjson_inline simdjson_result< value > find_field(std::string_view key) noexcept
                                    Look up a field by name on an object (order-sensitive).
                                    Definition: value-inl.h:132
                                    -
                                    simdjson_inline bool is_negative() noexcept
                                    Checks whether the value is a negative number.
                                    Definition: value-inl.h:164
                                    -
                                    simdjson_inline simdjson_result< number_type > get_number_type() noexcept
                                    Determine the number type (integer or floating-point number) as quickly as possible.
                                    Definition: value-inl.h:171
                                    -
                                    simdjson_inline simdjson_result< array > get_array() noexcept
                                    Cast this JSON value to an array.
                                    Definition: value-inl.h:16
                                    -
                                    simdjson_inline std::string_view raw_json_token() noexcept
                                    Get the raw JSON for this token.
                                    Definition: value-inl.h:178
                                    -
                                    simdjson_inline simdjson_result< object > get_object() noexcept
                                    Cast this JSON value to an object.
                                    Definition: value-inl.h:19
                                    -
                                    simdjson_inline simdjson_result< size_t > count_elements() &noexcept
                                    This method scans the array and counts the number of elements.
                                    Definition: value-inl.h:110
                                    -
                                    simdjson_inline simdjson_result< int64_t > get_int64_in_string() noexcept
                                    Cast this JSON value (inside string) to a signed integer.
                                    Definition: value-inl.h:54
                                    -
                                    simdjson_inline simdjson_result< size_t > count_fields() &noexcept
                                    This method scans the object and counts the number of key-value pairs.
                                    Definition: value-inl.h:120
                                    -
                                    simdjson_inline simdjson_result< bool > is_integer() noexcept
                                    Checks whether the value is an integer number.
                                    Definition: value-inl.h:168
                                    -
                                    simdjson_inline simdjson_result< array_iterator > end() &noexcept
                                    Sentinel representing the end of the array.
                                    Definition: value-inl.h:107
                                    -
                                    simdjson_inline simdjson_result< object > start_or_resume_object() noexcept
                                    Get the object, starting or resuming it as necessary.
                                    Definition: value-inl.h:22
                                    -
                                    simdjson_inline simdjson_result< array_iterator > begin() &noexcept
                                    Begin array iteration.
                                    Definition: value-inl.h:104
                                    -
                                    simdjson_inline simdjson_result< uint64_t > get_uint64_in_string() noexcept
                                    Cast this JSON value (inside string) to a unsigned integer.
                                    Definition: value-inl.h:48
                                    -
                                    simdjson_inline int32_t current_depth() const noexcept
                                    Returns the current depth in the document if in bounds.
                                    Definition: value-inl.h:186
                                    -
                                    simdjson_inline simdjson_result< bool > is_scalar() noexcept
                                    Checks whether the value is a scalar (string, number, null, Boolean).
                                    Definition: value-inl.h:157
                                    -
                                    simdjson_inline simdjson_result< T > get() noexcept
                                    Get this value as the given type.
                                    Definition: value.h:37
                                    -
                                    static simdjson_inline value resume(const value_iterator &iter) noexcept
                                    Resume a value.
                                    Definition: value-inl.h:12
                                    -
                                    simdjson_inline simdjson_result< double > get_double() noexcept
                                    Cast this JSON value to a double.
                                    Definition: value-inl.h:39
                                    -
                                    simdjson_inline simdjson_result< std::string_view > get_string(bool allow_replacement=false) noexcept
                                    Cast this JSON value to a string.
                                    Definition: value-inl.h:33
                                    -
                                    simdjson_inline simdjson_result< bool > get_bool() noexcept
                                    Cast this JSON value to a bool.
                                    Definition: value-inl.h:57
                                    -
                                    simdjson_warn_unused simdjson_inline simdjson_result< number > get_number() noexcept
                                    Attempt to parse an ondemand::number.
                                    Definition: value-inl.h:174
                                    -
                                    simdjson_inline simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
                                    Get the value associated with the given JSON pointer.
                                    Definition: value-inl.h:190
                                    -
                                    simdjson_inline simdjson_result< std::string_view > get_wobbly_string() noexcept
                                    Cast this JSON value to a "wobbly" string.
                                    Definition: value-inl.h:36
                                    -
                                    simdjson_inline simdjson_result< int64_t > get_int64() noexcept
                                    Cast this JSON value to a signed integer.
                                    Definition: value-inl.h:51
                                    +
                                    407 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string() noexcept(false) {
                                    +
                                    408  if (error()) { throw simdjson_error(error()); }
                                    +
                                    409  return first;
                                    +
                                    410 }
                                    +
                                    411 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value>::operator bool() noexcept(false) {
                                    +
                                    412  if (error()) { throw simdjson_error(error()); }
                                    +
                                    413  return first;
                                    +
                                    414 }
                                    +
                                    415 #endif
                                    +
                                    416 
                                    + +
                                    418  if (error()) { return error(); }
                                    +
                                    419  return first.raw_json_token();
                                    +
                                    420 }
                                    +
                                    421 
                                    + +
                                    423  if (error()) { return error(); }
                                    +
                                    424  return first.current_location();
                                    +
                                    425 }
                                    +
                                    426 
                                    + +
                                    428  if (error()) { return error(); }
                                    +
                                    429  return first.current_depth();
                                    +
                                    430 }
                                    +
                                    431 
                                    + +
                                    433  if (error()) { return error(); }
                                    +
                                    434  return first.at_pointer(json_pointer);
                                    +
                                    435 }
                                    +
                                    436 
                                    +
                                    437 } // namespace simdjson
                                    +
                                    438 
                                    +
                                    439 #endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H
                                    + +
                                    static simdjson_inline simdjson_result< array > start(value_iterator &iter) noexcept
                                    Begin array iteration.
                                    Definition: array-inl.h:60
                                    +
                                    A forward-only JSON object field iterator.
                                    Definition: object.h:17
                                    +
                                    A string escaped per JSON rules, terminated with quote (").
                                    +
                                    An ephemeral JSON value returned during iteration.
                                    Definition: value.h:18
                                    +
                                    static simdjson_inline value start(const value_iterator &iter) noexcept
                                    Start a value at the current position.
                                    Definition: value-inl.h:23
                                    +
                                    simdjson_inline simdjson_result< bool > is_null() noexcept
                                    Checks if this JSON value is null.
                                    Definition: value-inl.h:74
                                    +
                                    simdjson_inline simdjson_result< const char * > current_location() noexcept
                                    Returns the current location in the document if in bounds.
                                    Definition: value-inl.h:196
                                    +
                                    simdjson_inline simdjson_result< value > find_field(std::string_view key) noexcept
                                    Look up a field by name on an object (order-sensitive).
                                    Definition: value-inl.h:146
                                    +
                                    simdjson_inline bool is_negative() noexcept
                                    Checks whether the value is a negative number.
                                    Definition: value-inl.h:178
                                    +
                                    simdjson_inline simdjson_result< number_type > get_number_type() noexcept
                                    Determine the number type (integer or floating-point number) as quickly as possible.
                                    Definition: value-inl.h:185
                                    +
                                    simdjson_inline simdjson_result< array > get_array() noexcept
                                    Cast this JSON value to an array.
                                    Definition: value-inl.h:30
                                    +
                                    simdjson_inline std::string_view raw_json_token() noexcept
                                    Get the raw JSON for this token.
                                    Definition: value-inl.h:192
                                    +
                                    simdjson_inline simdjson_result< object > get_object() noexcept
                                    Cast this JSON value to an object.
                                    Definition: value-inl.h:33
                                    +
                                    simdjson_inline simdjson_result< size_t > count_elements() &noexcept
                                    This method scans the array and counts the number of elements.
                                    Definition: value-inl.h:124
                                    +
                                    simdjson_inline simdjson_result< int64_t > get_int64_in_string() noexcept
                                    Cast this JSON value (inside string) to a signed integer.
                                    Definition: value-inl.h:68
                                    +
                                    simdjson_inline simdjson_result< size_t > count_fields() &noexcept
                                    This method scans the object and counts the number of key-value pairs.
                                    Definition: value-inl.h:134
                                    +
                                    simdjson_inline simdjson_result< bool > is_integer() noexcept
                                    Checks whether the value is an integer number.
                                    Definition: value-inl.h:182
                                    +
                                    simdjson_inline simdjson_result< array_iterator > end() &noexcept
                                    Sentinel representing the end of the array.
                                    Definition: value-inl.h:121
                                    +
                                    simdjson_inline simdjson_result< object > start_or_resume_object() noexcept
                                    Get the object, starting or resuming it as necessary.
                                    Definition: value-inl.h:36
                                    +
                                    simdjson_inline simdjson_result< array_iterator > begin() &noexcept
                                    Begin array iteration.
                                    Definition: value-inl.h:118
                                    +
                                    simdjson_inline simdjson_result< uint64_t > get_uint64_in_string() noexcept
                                    Cast this JSON value (inside string) to a unsigned integer.
                                    Definition: value-inl.h:62
                                    +
                                    simdjson_inline int32_t current_depth() const noexcept
                                    Returns the current depth in the document if in bounds.
                                    Definition: value-inl.h:200
                                    +
                                    simdjson_inline simdjson_result< bool > is_scalar() noexcept
                                    Checks whether the value is a scalar (string, number, null, Boolean).
                                    Definition: value-inl.h:171
                                    +
                                    simdjson_inline simdjson_result< T > get() noexcept
                                    Get this value as the given type.
                                    Definition: value.h:38
                                    +
                                    static simdjson_inline value resume(const value_iterator &iter) noexcept
                                    Resume a value.
                                    Definition: value-inl.h:26
                                    +
                                    simdjson_inline simdjson_result< double > get_double() noexcept
                                    Cast this JSON value to a double.
                                    Definition: value-inl.h:53
                                    +
                                    simdjson_inline simdjson_result< std::string_view > get_string(bool allow_replacement=false) noexcept
                                    Cast this JSON value to a string.
                                    Definition: value-inl.h:47
                                    +
                                    simdjson_inline simdjson_result< bool > get_bool() noexcept
                                    Cast this JSON value to a bool.
                                    Definition: value-inl.h:71
                                    +
                                    simdjson_warn_unused simdjson_inline simdjson_result< number > get_number() noexcept
                                    Attempt to parse an ondemand::number.
                                    Definition: value-inl.h:188
                                    +
                                    simdjson_inline simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
                                    Get the value associated with the given JSON pointer.
                                    Definition: value-inl.h:204
                                    +
                                    simdjson_inline simdjson_result< std::string_view > get_wobbly_string() noexcept
                                    Cast this JSON value to a "wobbly" string.
                                    Definition: value-inl.h:50
                                    +
                                    simdjson_inline simdjson_result< int64_t > get_int64() noexcept
                                    Cast this JSON value to a signed integer.
                                    Definition: value-inl.h:65
                                    simdjson_inline value() noexcept=default
                                    Create a new invalid value.
                                    -
                                    simdjson_inline simdjson_result< json_type > type() noexcept
                                    Get the type of this JSON value.
                                    Definition: value-inl.h:153
                                    -
                                    simdjson_inline simdjson_result< double > get_double_in_string() noexcept
                                    Cast this JSON value (inside string) to a double.
                                    Definition: value-inl.h:42
                                    -
                                    simdjson_inline simdjson_result< raw_json_string > get_raw_json_string() noexcept
                                    Cast this JSON value to a raw_json_string.
                                    Definition: value-inl.h:30
                                    -
                                    simdjson_inline simdjson_result< value > find_field_unordered(std::string_view key) noexcept
                                    Look up a field by name on an object, without regard to key order.
                                    Definition: value-inl.h:139
                                    -
                                    simdjson_inline simdjson_result< value > at(size_t index) noexcept
                                    Get the value at the given index in the array.
                                    Definition: value-inl.h:127
                                    -
                                    simdjson_inline simdjson_result< uint64_t > get_uint64() noexcept
                                    Cast this JSON value to an unsigned integer.
                                    Definition: value-inl.h:45
                                    -
                                    json_type
                                    The type of a JSON value.
                                    Definition: json_type.h:7
                                    +
                                    simdjson_inline simdjson_result< json_type > type() noexcept
                                    Get the type of this JSON value.
                                    Definition: value-inl.h:167
                                    +
                                    simdjson_inline simdjson_result< double > get_double_in_string() noexcept
                                    Cast this JSON value (inside string) to a double.
                                    Definition: value-inl.h:56
                                    +
                                    simdjson_inline simdjson_result< raw_json_string > get_raw_json_string() noexcept
                                    Cast this JSON value to a raw_json_string.
                                    Definition: value-inl.h:44
                                    +
                                    simdjson_inline simdjson_result< value > find_field_unordered(std::string_view key) noexcept
                                    Look up a field by name on an object, without regard to key order.
                                    Definition: value-inl.h:153
                                    +
                                    simdjson_inline simdjson_result< value > at(size_t index) noexcept
                                    Get the value at the given index in the array.
                                    Definition: value-inl.h:141
                                    +
                                    simdjson_inline simdjson_result< uint64_t > get_uint64() noexcept
                                    Cast this JSON value to an unsigned integer.
                                    Definition: value-inl.h:59
                                    +
                                    json_type
                                    The type of a JSON value.
                                    Definition: json_type.h:17
                                    @ object
                                    A JSON object ( { "a": 1, "b" 2, ... } )
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    error_code
                                    All possible errors returned by simdjson.
                                    Definition: error.h:17
                                    @ SUCCESS
                                    No error.
                                    Definition: error.h:18
                                    @ INVALID_JSON_POINTER
                                    Invalid JSON pointer reference.
                                    Definition: error.h:39
                                    - - + +
                                    The result of a simdjson operation that could fail.
                                    Definition: error.h:205
                                    -
                                    simdjson_inline error_code error() const noexcept
                                    The error.
                                    Definition: error-inl.h:132
                                    -
                                    simdjson_warn_unused simdjson_inline error_code get(T &value) &&noexcept
                                    Move the value to the provided variable.
                                    Definition: error-inl.h:127
                                    +
                                    simdjson_inline error_code error() const noexcept
                                    The error.
                                    Definition: error-inl.h:131
                                    +
                                    simdjson_warn_unused simdjson_inline error_code get(T &value) &&noexcept
                                    Move the value to the provided variable.
                                    Definition: error-inl.h:126
                                    diff --git a/value_8h_source.html b/value_8h_source.html index abb60b30c..65eafab20 100644 --- a/value_8h_source.html +++ b/value_8h_source.html @@ -91,252 +91,253 @@ $(document).ready(function(){initNavTree('value_8h_source.html',''); initResizab
                                    value.h
                                    -
                                    1 #include "simdjson/error.h"
                                    +
                                    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_H
                                    2 
                                    -
                                    3 namespace simdjson {
                                    -
                                    4 namespace SIMDJSON_IMPLEMENTATION {
                                    -
                                    5 namespace ondemand {
                                    -
                                    6 
                                    -
                                    7 class array;
                                    -
                                    8 class document;
                                    -
                                    9 class field;
                                    -
                                    10 class object;
                                    -
                                    11 class raw_json_string;
                                    -
                                    12 
                                    -
                                    17 class value {
                                    -
                                    18 public:
                                    -
                                    24  simdjson_inline value() noexcept = default;
                                    -
                                    25 
                                    -
                                    37  template<typename T> simdjson_inline simdjson_result<T> get() noexcept {
                                    -
                                    38  // Unless the simdjson library provides an inline implementation, calling this method should
                                    -
                                    39  // immediately fail.
                                    -
                                    40  static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library.");
                                    -
                                    41  }
                                    -
                                    42 
                                    -
                                    52  template<typename T> simdjson_inline error_code get(T &out) noexcept;
                                    -
                                    53 
                                    -
                                    60  simdjson_inline simdjson_result<array> get_array() noexcept;
                                    -
                                    61 
                                    -
                                    68  simdjson_inline simdjson_result<object> get_object() noexcept;
                                    -
                                    69 
                                    -
                                    76  simdjson_inline simdjson_result<uint64_t> get_uint64() noexcept;
                                    -
                                    77 
                                    -
                                    84  simdjson_inline simdjson_result<uint64_t> get_uint64_in_string() noexcept;
                                    -
                                    85 
                                    -
                                    92  simdjson_inline simdjson_result<int64_t> get_int64() noexcept;
                                    -
                                    93 
                                    -
                                    100  simdjson_inline simdjson_result<int64_t> get_int64_in_string() noexcept;
                                    -
                                    101 
                                    -
                                    108  simdjson_inline simdjson_result<double> get_double() noexcept;
                                    -
                                    109 
                                    -
                                    116  simdjson_inline simdjson_result<double> get_double_in_string() noexcept;
                                    -
                                    117 
                                    -
                                    132  simdjson_inline simdjson_result<std::string_view> get_string(bool allow_replacement = false) noexcept;
                                    -
                                    133 
                                    +
                                    3 #ifndef SIMDJSON_AMALGAMATED
                                    +
                                    4 #define SIMDJSON_GENERIC_ONDEMAND_VALUE_H
                                    +
                                    5 #include "simdjson/generic/ondemand/base.h"
                                    +
                                    6 #include "simdjson/generic/implementation_simdjson_result_base.h"
                                    +
                                    7 #include "simdjson/generic/ondemand/value_iterator.h"
                                    +
                                    8 #endif // SIMDJSON_AMALGAMATED
                                    +
                                    9 
                                    +
                                    10 namespace simdjson {
                                    +
                                    11 namespace SIMDJSON_IMPLEMENTATION {
                                    +
                                    12 namespace ondemand {
                                    +
                                    13 
                                    +
                                    18 class value {
                                    +
                                    19 public:
                                    +
                                    25  simdjson_inline value() noexcept = default;
                                    +
                                    26 
                                    +
                                    38  template<typename T> simdjson_inline simdjson_result<T> get() noexcept {
                                    +
                                    39  // Unless the simdjson library provides an inline implementation, calling this method should
                                    +
                                    40  // immediately fail.
                                    +
                                    41  static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library.");
                                    +
                                    42  }
                                    +
                                    43 
                                    +
                                    53  template<typename T> simdjson_inline error_code get(T &out) noexcept;
                                    +
                                    54 
                                    +
                                    61  simdjson_inline simdjson_result<array> get_array() noexcept;
                                    +
                                    62 
                                    +
                                    69  simdjson_inline simdjson_result<object> get_object() noexcept;
                                    +
                                    70 
                                    +
                                    77  simdjson_inline simdjson_result<uint64_t> get_uint64() noexcept;
                                    +
                                    78 
                                    +
                                    85  simdjson_inline simdjson_result<uint64_t> get_uint64_in_string() noexcept;
                                    +
                                    86 
                                    +
                                    93  simdjson_inline simdjson_result<int64_t> get_int64() noexcept;
                                    +
                                    94 
                                    +
                                    101  simdjson_inline simdjson_result<int64_t> get_int64_in_string() noexcept;
                                    +
                                    102 
                                    +
                                    109  simdjson_inline simdjson_result<double> get_double() noexcept;
                                    +
                                    110 
                                    +
                                    117  simdjson_inline simdjson_result<double> get_double_in_string() noexcept;
                                    +
                                    118 
                                    +
                                    133  simdjson_inline simdjson_result<std::string_view> get_string(bool allow_replacement = false) noexcept;
                                    134 
                                    -
                                    148  simdjson_inline simdjson_result<std::string_view> get_wobbly_string() noexcept;
                                    -
                                    157  simdjson_inline simdjson_result<raw_json_string> get_raw_json_string() noexcept;
                                    -
                                    158 
                                    -
                                    165  simdjson_inline simdjson_result<bool> get_bool() noexcept;
                                    -
                                    166 
                                    -
                                    175  simdjson_inline simdjson_result<bool> is_null() noexcept;
                                    -
                                    176 
                                    -
                                    177 #if SIMDJSON_EXCEPTIONS
                                    -
                                    184  simdjson_inline operator array() noexcept(false);
                                    -
                                    191  simdjson_inline operator object() noexcept(false);
                                    -
                                    198  simdjson_inline operator uint64_t() noexcept(false);
                                    -
                                    205  simdjson_inline operator int64_t() noexcept(false);
                                    -
                                    212  simdjson_inline operator double() noexcept(false);
                                    -
                                    224  simdjson_inline operator std::string_view() noexcept(false);
                                    -
                                    233  simdjson_inline operator raw_json_string() noexcept(false);
                                    -
                                    240  simdjson_inline operator bool() noexcept(false);
                                    -
                                    241 #endif
                                    -
                                    242 
                                    -
                                    250  simdjson_inline simdjson_result<array_iterator> begin() & noexcept;
                                    -
                                    256  simdjson_inline simdjson_result<array_iterator> end() & noexcept;
                                    -
                                    271  simdjson_inline simdjson_result<size_t> count_elements() & noexcept;
                                    -
                                    289  simdjson_inline simdjson_result<size_t> count_fields() & noexcept;
                                    -
                                    297  simdjson_inline simdjson_result<value> at(size_t index) noexcept;
                                    -
                                    320  simdjson_inline simdjson_result<value> find_field(std::string_view key) noexcept;
                                    -
                                    322  simdjson_inline simdjson_result<value> find_field(const char *key) noexcept;
                                    -
                                    323 
                                    -
                                    346  simdjson_inline simdjson_result<value> find_field_unordered(std::string_view key) noexcept;
                                    -
                                    348  simdjson_inline simdjson_result<value> find_field_unordered(const char *key) noexcept;
                                    -
                                    350  simdjson_inline simdjson_result<value> operator[](std::string_view key) noexcept;
                                    -
                                    352  simdjson_inline simdjson_result<value> operator[](const char *key) noexcept;
                                    -
                                    353 
                                    -
                                    367  simdjson_inline simdjson_result<json_type> type() noexcept;
                                    -
                                    368 
                                    -
                                    376  simdjson_inline simdjson_result<bool> is_scalar() noexcept;
                                    -
                                    377 
                                    -
                                    383  simdjson_inline bool is_negative() noexcept;
                                    -
                                    397  simdjson_inline simdjson_result<bool> is_integer() noexcept;
                                    -
                                    420  simdjson_inline simdjson_result<number_type> get_number_type() noexcept;
                                    -
                                    421 
                                    -
                                    452  simdjson_warn_unused simdjson_inline simdjson_result<number> get_number() noexcept;
                                    -
                                    453 
                                    +
                                    135 
                                    +
                                    149  simdjson_inline simdjson_result<std::string_view> get_wobbly_string() noexcept;
                                    +
                                    158  simdjson_inline simdjson_result<raw_json_string> get_raw_json_string() noexcept;
                                    +
                                    159 
                                    +
                                    166  simdjson_inline simdjson_result<bool> get_bool() noexcept;
                                    +
                                    167 
                                    +
                                    176  simdjson_inline simdjson_result<bool> is_null() noexcept;
                                    +
                                    177 
                                    +
                                    178 #if SIMDJSON_EXCEPTIONS
                                    +
                                    185  simdjson_inline operator array() noexcept(false);
                                    +
                                    192  simdjson_inline operator object() noexcept(false);
                                    +
                                    199  simdjson_inline operator uint64_t() noexcept(false);
                                    +
                                    206  simdjson_inline operator int64_t() noexcept(false);
                                    +
                                    213  simdjson_inline operator double() noexcept(false);
                                    +
                                    225  simdjson_inline operator std::string_view() noexcept(false);
                                    +
                                    234  simdjson_inline operator raw_json_string() noexcept(false);
                                    +
                                    241  simdjson_inline operator bool() noexcept(false);
                                    +
                                    242 #endif
                                    +
                                    243 
                                    +
                                    251  simdjson_inline simdjson_result<array_iterator> begin() & noexcept;
                                    +
                                    257  simdjson_inline simdjson_result<array_iterator> end() & noexcept;
                                    +
                                    272  simdjson_inline simdjson_result<size_t> count_elements() & noexcept;
                                    +
                                    290  simdjson_inline simdjson_result<size_t> count_fields() & noexcept;
                                    +
                                    298  simdjson_inline simdjson_result<value> at(size_t index) noexcept;
                                    +
                                    321  simdjson_inline simdjson_result<value> find_field(std::string_view key) noexcept;
                                    +
                                    323  simdjson_inline simdjson_result<value> find_field(const char *key) noexcept;
                                    +
                                    324 
                                    +
                                    347  simdjson_inline simdjson_result<value> find_field_unordered(std::string_view key) noexcept;
                                    +
                                    349  simdjson_inline simdjson_result<value> find_field_unordered(const char *key) noexcept;
                                    +
                                    351  simdjson_inline simdjson_result<value> operator[](std::string_view key) noexcept;
                                    +
                                    353  simdjson_inline simdjson_result<value> operator[](const char *key) noexcept;
                                    +
                                    354 
                                    +
                                    368  simdjson_inline simdjson_result<json_type> type() noexcept;
                                    +
                                    369 
                                    +
                                    377  simdjson_inline simdjson_result<bool> is_scalar() noexcept;
                                    +
                                    378 
                                    +
                                    384  simdjson_inline bool is_negative() noexcept;
                                    +
                                    398  simdjson_inline simdjson_result<bool> is_integer() noexcept;
                                    +
                                    421  simdjson_inline simdjson_result<number_type> get_number_type() noexcept;
                                    +
                                    422 
                                    +
                                    453  simdjson_warn_unused simdjson_inline simdjson_result<number> get_number() noexcept;
                                    454 
                                    -
                                    478  simdjson_inline std::string_view raw_json_token() noexcept;
                                    -
                                    479 
                                    -
                                    483  simdjson_inline simdjson_result<const char *> current_location() noexcept;
                                    -
                                    484 
                                    -
                                    494  simdjson_inline int32_t current_depth() const noexcept;
                                    -
                                    495 
                                    -
                                    538  simdjson_inline simdjson_result<value> at_pointer(std::string_view json_pointer) noexcept;
                                    -
                                    539 
                                    -
                                    540 protected:
                                    -
                                    544  simdjson_inline value(const value_iterator &iter) noexcept;
                                    -
                                    545 
                                    -
                                    549  simdjson_inline void skip() noexcept;
                                    -
                                    550 
                                    -
                                    556  static simdjson_inline value start(const value_iterator &iter) noexcept;
                                    -
                                    557 
                                    -
                                    561  static simdjson_inline value resume(const value_iterator &iter) noexcept;
                                    -
                                    562 
                                    -
                                    566  simdjson_inline simdjson_result<object> start_or_resume_object() noexcept;
                                    -
                                    567 
                                    -
                                    568  // simdjson_inline void log_value(const char *type) const noexcept;
                                    -
                                    569  // simdjson_inline void log_error(const char *message) const noexcept;
                                    -
                                    570 
                                    -
                                    571  value_iterator iter{};
                                    -
                                    572 
                                    -
                                    573  friend class document;
                                    -
                                    574  friend class array_iterator;
                                    -
                                    575  friend class field;
                                    -
                                    576  friend class object;
                                    -
                                    577  friend struct simdjson_result<value>;
                                    -
                                    578  friend struct simdjson_result<field>;
                                    -
                                    579 };
                                    -
                                    580 
                                    -
                                    581 } // namespace ondemand
                                    -
                                    582 } // namespace SIMDJSON_IMPLEMENTATION
                                    -
                                    583 } // namespace simdjson
                                    -
                                    584 
                                    -
                                    585 namespace simdjson {
                                    -
                                    586 
                                    -
                                    587 template<>
                                    -
                                    588 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value> {
                                    -
                                    589 public:
                                    - -
                                    591  simdjson_inline simdjson_result(error_code error) noexcept;
                                    -
                                    592  simdjson_inline simdjson_result() noexcept = default;
                                    -
                                    593 
                                    -
                                    594  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> get_array() noexcept;
                                    -
                                    595  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> get_object() noexcept;
                                    -
                                    596 
                                    -
                                    597  simdjson_inline simdjson_result<uint64_t> get_uint64() noexcept;
                                    -
                                    598  simdjson_inline simdjson_result<uint64_t> get_uint64_in_string() noexcept;
                                    -
                                    599  simdjson_inline simdjson_result<int64_t> get_int64() noexcept;
                                    -
                                    600  simdjson_inline simdjson_result<int64_t> get_int64_in_string() noexcept;
                                    -
                                    601  simdjson_inline simdjson_result<double> get_double() noexcept;
                                    -
                                    602  simdjson_inline simdjson_result<double> get_double_in_string() noexcept;
                                    -
                                    603  simdjson_inline simdjson_result<std::string_view> get_string(bool allow_replacement = false) noexcept;
                                    -
                                    604  simdjson_inline simdjson_result<std::string_view> get_wobbly_string() noexcept;
                                    -
                                    605  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> get_raw_json_string() noexcept;
                                    -
                                    606  simdjson_inline simdjson_result<bool> get_bool() noexcept;
                                    -
                                    607  simdjson_inline simdjson_result<bool> is_null() noexcept;
                                    -
                                    608 
                                    -
                                    609  template<typename T> simdjson_inline simdjson_result<T> get() noexcept;
                                    -
                                    610 
                                    -
                                    611  template<typename T> simdjson_inline error_code get(T &out) noexcept;
                                    -
                                    612 
                                    -
                                    613 #if SIMDJSON_EXCEPTIONS
                                    -
                                    614  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::array() noexcept(false);
                                    -
                                    615  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::object() noexcept(false);
                                    -
                                    616  simdjson_inline operator uint64_t() noexcept(false);
                                    -
                                    617  simdjson_inline operator int64_t() noexcept(false);
                                    -
                                    618  simdjson_inline operator double() noexcept(false);
                                    -
                                    619  simdjson_inline operator std::string_view() noexcept(false);
                                    -
                                    620  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string() noexcept(false);
                                    -
                                    621  simdjson_inline operator bool() noexcept(false);
                                    -
                                    622 #endif
                                    -
                                    623  simdjson_inline simdjson_result<size_t> count_elements() & noexcept;
                                    -
                                    624  simdjson_inline simdjson_result<size_t> count_fields() & noexcept;
                                    -
                                    625  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at(size_t index) noexcept;
                                    - - -
                                    628 
                                    -
                                    649  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(std::string_view key) noexcept;
                                    -
                                    651  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(const char *key) noexcept;
                                    -
                                    652 
                                    -
                                    672  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(std::string_view key) noexcept;
                                    -
                                    674  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(const char *key) noexcept;
                                    -
                                    676  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](std::string_view key) noexcept;
                                    -
                                    678  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](const char *key) noexcept;
                                    -
                                    679 
                                    - -
                                    688  simdjson_inline simdjson_result<bool> is_scalar() noexcept;
                                    -
                                    689  simdjson_inline simdjson_result<bool> is_negative() noexcept;
                                    -
                                    690  simdjson_inline simdjson_result<bool> is_integer() noexcept;
                                    -
                                    691  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::numberparsing::number_type> get_number_type() noexcept;
                                    -
                                    692  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::number> get_number() noexcept;
                                    -
                                    693 
                                    -
                                    695  simdjson_inline simdjson_result<std::string_view> raw_json_token() noexcept;
                                    -
                                    696 
                                    -
                                    698  simdjson_inline simdjson_result<const char *> current_location() noexcept;
                                    -
                                    700  simdjson_inline simdjson_result<int32_t> current_depth() const noexcept;
                                    -
                                    701  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at_pointer(std::string_view json_pointer) noexcept;
                                    -
                                    702 };
                                    -
                                    703 
                                    -
                                    704 } // namespace simdjson
                                    - - - -
                                    A JSON field (key/value pair) in an object.
                                    Definition: field.h:14
                                    -
                                    A forward-only JSON object field iterator.
                                    Definition: object.h:10
                                    -
                                    A string escaped per JSON rules, terminated with quote (").
                                    -
                                    An ephemeral JSON value returned during iteration.
                                    Definition: value.h:17
                                    -
                                    static simdjson_inline value start(const value_iterator &iter) noexcept
                                    Start a value at the current position.
                                    Definition: value-inl.h:9
                                    -
                                    simdjson_inline simdjson_result< bool > is_null() noexcept
                                    Checks if this JSON value is null.
                                    Definition: value-inl.h:60
                                    -
                                    simdjson_inline simdjson_result< const char * > current_location() noexcept
                                    Returns the current location in the document if in bounds.
                                    Definition: value-inl.h:182
                                    -
                                    simdjson_inline simdjson_result< value > find_field(std::string_view key) noexcept
                                    Look up a field by name on an object (order-sensitive).
                                    Definition: value-inl.h:132
                                    -
                                    simdjson_inline bool is_negative() noexcept
                                    Checks whether the value is a negative number.
                                    Definition: value-inl.h:164
                                    -
                                    simdjson_inline simdjson_result< number_type > get_number_type() noexcept
                                    Determine the number type (integer or floating-point number) as quickly as possible.
                                    Definition: value-inl.h:171
                                    -
                                    simdjson_inline simdjson_result< array > get_array() noexcept
                                    Cast this JSON value to an array.
                                    Definition: value-inl.h:16
                                    -
                                    simdjson_inline std::string_view raw_json_token() noexcept
                                    Get the raw JSON for this token.
                                    Definition: value-inl.h:178
                                    -
                                    simdjson_inline simdjson_result< object > get_object() noexcept
                                    Cast this JSON value to an object.
                                    Definition: value-inl.h:19
                                    -
                                    simdjson_inline simdjson_result< size_t > count_elements() &noexcept
                                    This method scans the array and counts the number of elements.
                                    Definition: value-inl.h:110
                                    -
                                    simdjson_inline simdjson_result< int64_t > get_int64_in_string() noexcept
                                    Cast this JSON value (inside string) to a signed integer.
                                    Definition: value-inl.h:54
                                    -
                                    simdjson_inline simdjson_result< size_t > count_fields() &noexcept
                                    This method scans the object and counts the number of key-value pairs.
                                    Definition: value-inl.h:120
                                    -
                                    simdjson_inline simdjson_result< bool > is_integer() noexcept
                                    Checks whether the value is an integer number.
                                    Definition: value-inl.h:168
                                    -
                                    simdjson_inline simdjson_result< array_iterator > end() &noexcept
                                    Sentinel representing the end of the array.
                                    Definition: value-inl.h:107
                                    -
                                    simdjson_inline simdjson_result< object > start_or_resume_object() noexcept
                                    Get the object, starting or resuming it as necessary.
                                    Definition: value-inl.h:22
                                    -
                                    simdjson_inline simdjson_result< array_iterator > begin() &noexcept
                                    Begin array iteration.
                                    Definition: value-inl.h:104
                                    -
                                    simdjson_inline simdjson_result< uint64_t > get_uint64_in_string() noexcept
                                    Cast this JSON value (inside string) to a unsigned integer.
                                    Definition: value-inl.h:48
                                    -
                                    simdjson_inline int32_t current_depth() const noexcept
                                    Returns the current depth in the document if in bounds.
                                    Definition: value-inl.h:186
                                    -
                                    simdjson_inline simdjson_result< bool > is_scalar() noexcept
                                    Checks whether the value is a scalar (string, number, null, Boolean).
                                    Definition: value-inl.h:157
                                    -
                                    simdjson_inline simdjson_result< T > get() noexcept
                                    Get this value as the given type.
                                    Definition: value.h:37
                                    -
                                    static simdjson_inline value resume(const value_iterator &iter) noexcept
                                    Resume a value.
                                    Definition: value-inl.h:12
                                    -
                                    simdjson_inline simdjson_result< double > get_double() noexcept
                                    Cast this JSON value to a double.
                                    Definition: value-inl.h:39
                                    -
                                    simdjson_inline simdjson_result< std::string_view > get_string(bool allow_replacement=false) noexcept
                                    Cast this JSON value to a string.
                                    Definition: value-inl.h:33
                                    -
                                    simdjson_inline simdjson_result< bool > get_bool() noexcept
                                    Cast this JSON value to a bool.
                                    Definition: value-inl.h:57
                                    -
                                    simdjson_warn_unused simdjson_inline simdjson_result< number > get_number() noexcept
                                    Attempt to parse an ondemand::number.
                                    Definition: value-inl.h:174
                                    -
                                    simdjson_inline simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
                                    Get the value associated with the given JSON pointer.
                                    Definition: value-inl.h:190
                                    -
                                    simdjson_inline simdjson_result< std::string_view > get_wobbly_string() noexcept
                                    Cast this JSON value to a "wobbly" string.
                                    Definition: value-inl.h:36
                                    -
                                    simdjson_inline simdjson_result< int64_t > get_int64() noexcept
                                    Cast this JSON value to a signed integer.
                                    Definition: value-inl.h:51
                                    +
                                    455 
                                    +
                                    479  simdjson_inline std::string_view raw_json_token() noexcept;
                                    +
                                    480 
                                    +
                                    484  simdjson_inline simdjson_result<const char *> current_location() noexcept;
                                    +
                                    485 
                                    +
                                    495  simdjson_inline int32_t current_depth() const noexcept;
                                    +
                                    496 
                                    +
                                    539  simdjson_inline simdjson_result<value> at_pointer(std::string_view json_pointer) noexcept;
                                    +
                                    540 
                                    +
                                    541 protected:
                                    +
                                    545  simdjson_inline value(const value_iterator &iter) noexcept;
                                    +
                                    546 
                                    +
                                    550  simdjson_inline void skip() noexcept;
                                    +
                                    551 
                                    +
                                    557  static simdjson_inline value start(const value_iterator &iter) noexcept;
                                    +
                                    558 
                                    +
                                    562  static simdjson_inline value resume(const value_iterator &iter) noexcept;
                                    +
                                    563 
                                    +
                                    567  simdjson_inline simdjson_result<object> start_or_resume_object() noexcept;
                                    +
                                    568 
                                    +
                                    569  // simdjson_inline void log_value(const char *type) const noexcept;
                                    +
                                    570  // simdjson_inline void log_error(const char *message) const noexcept;
                                    +
                                    571 
                                    +
                                    572  value_iterator iter{};
                                    +
                                    573 
                                    +
                                    574  friend class document;
                                    +
                                    575  friend class array_iterator;
                                    +
                                    576  friend class field;
                                    +
                                    577  friend class object;
                                    +
                                    578  friend struct simdjson_result<value>;
                                    +
                                    579  friend struct simdjson_result<field>;
                                    +
                                    580 };
                                    +
                                    581 
                                    +
                                    582 } // namespace ondemand
                                    +
                                    583 } // namespace SIMDJSON_IMPLEMENTATION
                                    +
                                    584 } // namespace simdjson
                                    +
                                    585 
                                    +
                                    586 namespace simdjson {
                                    +
                                    587 
                                    +
                                    588 template<>
                                    +
                                    589 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value> {
                                    +
                                    590 public:
                                    + +
                                    592  simdjson_inline simdjson_result(error_code error) noexcept;
                                    +
                                    593  simdjson_inline simdjson_result() noexcept = default;
                                    +
                                    594 
                                    +
                                    595  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::array> get_array() noexcept;
                                    +
                                    596  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::object> get_object() noexcept;
                                    +
                                    597 
                                    +
                                    598  simdjson_inline simdjson_result<uint64_t> get_uint64() noexcept;
                                    +
                                    599  simdjson_inline simdjson_result<uint64_t> get_uint64_in_string() noexcept;
                                    +
                                    600  simdjson_inline simdjson_result<int64_t> get_int64() noexcept;
                                    +
                                    601  simdjson_inline simdjson_result<int64_t> get_int64_in_string() noexcept;
                                    +
                                    602  simdjson_inline simdjson_result<double> get_double() noexcept;
                                    +
                                    603  simdjson_inline simdjson_result<double> get_double_in_string() noexcept;
                                    +
                                    604  simdjson_inline simdjson_result<std::string_view> get_string(bool allow_replacement = false) noexcept;
                                    +
                                    605  simdjson_inline simdjson_result<std::string_view> get_wobbly_string() noexcept;
                                    +
                                    606  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string> get_raw_json_string() noexcept;
                                    +
                                    607  simdjson_inline simdjson_result<bool> get_bool() noexcept;
                                    +
                                    608  simdjson_inline simdjson_result<bool> is_null() noexcept;
                                    +
                                    609 
                                    +
                                    610  template<typename T> simdjson_inline simdjson_result<T> get() noexcept;
                                    +
                                    611 
                                    +
                                    612  template<typename T> simdjson_inline error_code get(T &out) noexcept;
                                    +
                                    613 
                                    +
                                    614 #if SIMDJSON_EXCEPTIONS
                                    +
                                    615  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::array() noexcept(false);
                                    +
                                    616  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::object() noexcept(false);
                                    +
                                    617  simdjson_inline operator uint64_t() noexcept(false);
                                    +
                                    618  simdjson_inline operator int64_t() noexcept(false);
                                    +
                                    619  simdjson_inline operator double() noexcept(false);
                                    +
                                    620  simdjson_inline operator std::string_view() noexcept(false);
                                    +
                                    621  simdjson_inline operator SIMDJSON_IMPLEMENTATION::ondemand::raw_json_string() noexcept(false);
                                    +
                                    622  simdjson_inline operator bool() noexcept(false);
                                    +
                                    623 #endif
                                    +
                                    624  simdjson_inline simdjson_result<size_t> count_elements() & noexcept;
                                    +
                                    625  simdjson_inline simdjson_result<size_t> count_fields() & noexcept;
                                    +
                                    626  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at(size_t index) noexcept;
                                    + + +
                                    629 
                                    +
                                    650  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(std::string_view key) noexcept;
                                    +
                                    652  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field(const char *key) noexcept;
                                    +
                                    653 
                                    +
                                    673  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(std::string_view key) noexcept;
                                    +
                                    675  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> find_field_unordered(const char *key) noexcept;
                                    +
                                    677  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](std::string_view key) noexcept;
                                    +
                                    679  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> operator[](const char *key) noexcept;
                                    +
                                    680 
                                    + +
                                    689  simdjson_inline simdjson_result<bool> is_scalar() noexcept;
                                    +
                                    690  simdjson_inline simdjson_result<bool> is_negative() noexcept;
                                    +
                                    691  simdjson_inline simdjson_result<bool> is_integer() noexcept;
                                    +
                                    692  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::number_type> get_number_type() noexcept;
                                    +
                                    693  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::number> get_number() noexcept;
                                    +
                                    694 
                                    +
                                    696  simdjson_inline simdjson_result<std::string_view> raw_json_token() noexcept;
                                    +
                                    697 
                                    +
                                    699  simdjson_inline simdjson_result<const char *> current_location() noexcept;
                                    +
                                    701  simdjson_inline simdjson_result<int32_t> current_depth() const noexcept;
                                    +
                                    702  simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value> at_pointer(std::string_view json_pointer) noexcept;
                                    +
                                    703 };
                                    +
                                    704 
                                    +
                                    705 } // namespace simdjson
                                    +
                                    706 
                                    +
                                    707 #endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_H
                                    + + + +
                                    A JSON field (key/value pair) in an object.
                                    Definition: field.h:22
                                    +
                                    A forward-only JSON object field iterator.
                                    Definition: object.h:17
                                    +
                                    A string escaped per JSON rules, terminated with quote (").
                                    +
                                    An ephemeral JSON value returned during iteration.
                                    Definition: value.h:18
                                    +
                                    static simdjson_inline value start(const value_iterator &iter) noexcept
                                    Start a value at the current position.
                                    Definition: value-inl.h:23
                                    +
                                    simdjson_inline simdjson_result< bool > is_null() noexcept
                                    Checks if this JSON value is null.
                                    Definition: value-inl.h:74
                                    +
                                    simdjson_inline simdjson_result< const char * > current_location() noexcept
                                    Returns the current location in the document if in bounds.
                                    Definition: value-inl.h:196
                                    +
                                    simdjson_inline simdjson_result< value > find_field(std::string_view key) noexcept
                                    Look up a field by name on an object (order-sensitive).
                                    Definition: value-inl.h:146
                                    +
                                    simdjson_inline bool is_negative() noexcept
                                    Checks whether the value is a negative number.
                                    Definition: value-inl.h:178
                                    +
                                    simdjson_inline simdjson_result< number_type > get_number_type() noexcept
                                    Determine the number type (integer or floating-point number) as quickly as possible.
                                    Definition: value-inl.h:185
                                    +
                                    simdjson_inline simdjson_result< array > get_array() noexcept
                                    Cast this JSON value to an array.
                                    Definition: value-inl.h:30
                                    +
                                    simdjson_inline std::string_view raw_json_token() noexcept
                                    Get the raw JSON for this token.
                                    Definition: value-inl.h:192
                                    +
                                    simdjson_inline simdjson_result< object > get_object() noexcept
                                    Cast this JSON value to an object.
                                    Definition: value-inl.h:33
                                    +
                                    simdjson_inline simdjson_result< size_t > count_elements() &noexcept
                                    This method scans the array and counts the number of elements.
                                    Definition: value-inl.h:124
                                    +
                                    simdjson_inline simdjson_result< int64_t > get_int64_in_string() noexcept
                                    Cast this JSON value (inside string) to a signed integer.
                                    Definition: value-inl.h:68
                                    +
                                    simdjson_inline simdjson_result< size_t > count_fields() &noexcept
                                    This method scans the object and counts the number of key-value pairs.
                                    Definition: value-inl.h:134
                                    +
                                    simdjson_inline simdjson_result< bool > is_integer() noexcept
                                    Checks whether the value is an integer number.
                                    Definition: value-inl.h:182
                                    +
                                    simdjson_inline simdjson_result< array_iterator > end() &noexcept
                                    Sentinel representing the end of the array.
                                    Definition: value-inl.h:121
                                    +
                                    simdjson_inline simdjson_result< object > start_or_resume_object() noexcept
                                    Get the object, starting or resuming it as necessary.
                                    Definition: value-inl.h:36
                                    +
                                    simdjson_inline simdjson_result< array_iterator > begin() &noexcept
                                    Begin array iteration.
                                    Definition: value-inl.h:118
                                    +
                                    simdjson_inline simdjson_result< uint64_t > get_uint64_in_string() noexcept
                                    Cast this JSON value (inside string) to a unsigned integer.
                                    Definition: value-inl.h:62
                                    +
                                    simdjson_inline int32_t current_depth() const noexcept
                                    Returns the current depth in the document if in bounds.
                                    Definition: value-inl.h:200
                                    +
                                    simdjson_inline simdjson_result< bool > is_scalar() noexcept
                                    Checks whether the value is a scalar (string, number, null, Boolean).
                                    Definition: value-inl.h:171
                                    +
                                    simdjson_inline simdjson_result< T > get() noexcept
                                    Get this value as the given type.
                                    Definition: value.h:38
                                    +
                                    static simdjson_inline value resume(const value_iterator &iter) noexcept
                                    Resume a value.
                                    Definition: value-inl.h:26
                                    +
                                    simdjson_inline simdjson_result< double > get_double() noexcept
                                    Cast this JSON value to a double.
                                    Definition: value-inl.h:53
                                    +
                                    simdjson_inline simdjson_result< std::string_view > get_string(bool allow_replacement=false) noexcept
                                    Cast this JSON value to a string.
                                    Definition: value-inl.h:47
                                    +
                                    simdjson_inline simdjson_result< bool > get_bool() noexcept
                                    Cast this JSON value to a bool.
                                    Definition: value-inl.h:71
                                    +
                                    simdjson_warn_unused simdjson_inline simdjson_result< number > get_number() noexcept
                                    Attempt to parse an ondemand::number.
                                    Definition: value-inl.h:188
                                    +
                                    simdjson_inline simdjson_result< value > at_pointer(std::string_view json_pointer) noexcept
                                    Get the value associated with the given JSON pointer.
                                    Definition: value-inl.h:204
                                    +
                                    simdjson_inline simdjson_result< std::string_view > get_wobbly_string() noexcept
                                    Cast this JSON value to a "wobbly" string.
                                    Definition: value-inl.h:50
                                    +
                                    simdjson_inline simdjson_result< int64_t > get_int64() noexcept
                                    Cast this JSON value to a signed integer.
                                    Definition: value-inl.h:65
                                    simdjson_inline value() noexcept=default
                                    Create a new invalid value.
                                    -
                                    simdjson_inline simdjson_result< json_type > type() noexcept
                                    Get the type of this JSON value.
                                    Definition: value-inl.h:153
                                    -
                                    simdjson_inline simdjson_result< double > get_double_in_string() noexcept
                                    Cast this JSON value (inside string) to a double.
                                    Definition: value-inl.h:42
                                    -
                                    simdjson_inline simdjson_result< raw_json_string > get_raw_json_string() noexcept
                                    Cast this JSON value to a raw_json_string.
                                    Definition: value-inl.h:30
                                    -
                                    simdjson_inline simdjson_result< value > find_field_unordered(std::string_view key) noexcept
                                    Look up a field by name on an object, without regard to key order.
                                    Definition: value-inl.h:139
                                    -
                                    simdjson_inline simdjson_result< value > at(size_t index) noexcept
                                    Get the value at the given index in the array.
                                    Definition: value-inl.h:127
                                    -
                                    simdjson_inline simdjson_result< uint64_t > get_uint64() noexcept
                                    Cast this JSON value to an unsigned integer.
                                    Definition: value-inl.h:45
                                    +
                                    simdjson_inline simdjson_result< json_type > type() noexcept
                                    Get the type of this JSON value.
                                    Definition: value-inl.h:167
                                    +
                                    simdjson_inline simdjson_result< double > get_double_in_string() noexcept
                                    Cast this JSON value (inside string) to a double.
                                    Definition: value-inl.h:56
                                    +
                                    simdjson_inline simdjson_result< raw_json_string > get_raw_json_string() noexcept
                                    Cast this JSON value to a raw_json_string.
                                    Definition: value-inl.h:44
                                    +
                                    simdjson_inline simdjson_result< value > find_field_unordered(std::string_view key) noexcept
                                    Look up a field by name on an object, without regard to key order.
                                    Definition: value-inl.h:153
                                    +
                                    simdjson_inline simdjson_result< value > at(size_t index) noexcept
                                    Get the value at the given index in the array.
                                    Definition: value-inl.h:141
                                    +
                                    simdjson_inline simdjson_result< uint64_t > get_uint64() noexcept
                                    Cast this JSON value to an unsigned integer.
                                    Definition: value-inl.h:59
                                    simdjson_inline void skip() noexcept
                                    Skip this value, allowing iteration to continue.
                                    -
                                    @ object
                                    A JSON object ( { "a": 1, "b" 2, ... } )
                                    - -
                                    We want to support argument-dependent lookup (ADL).
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    error_code
                                    All possible errors returned by simdjson.
                                    Definition: error.h:17
                                    - -
                                    A type representing a JSON number.
                                    Definition: json_type.h:24
                                    - - - - - - + +
                                    A type representing a JSON number.
                                    Definition: json_type.h:32
                                    + + + + + +
                                    The result of a simdjson operation that could fail.
                                    Definition: error.h:205
                                    -
                                    simdjson_inline error_code error() const noexcept
                                    The error.
                                    Definition: error-inl.h:132
                                    -
                                    simdjson_warn_unused simdjson_inline error_code get(T &value) &&noexcept
                                    Move the value to the provided variable.
                                    Definition: error-inl.h:127
                                    +
                                    simdjson_inline error_code error() const noexcept
                                    The error.
                                    Definition: error-inl.h:131
                                    +
                                    simdjson_warn_unused simdjson_inline error_code get(T &value) &&noexcept
                                    Move the value to the provided variable.
                                    Definition: error-inl.h:126
                                    simdjson_inline T & value() &noexcept(false)
                                    Get the result value.
                                    diff --git a/value__iterator-inl_8h_source.html b/value__iterator-inl_8h_source.html index 13c0f720d..a0032f516 100644 --- a/value__iterator-inl_8h_source.html +++ b/value__iterator-inl_8h_source.html @@ -91,1039 +91,1054 @@ $(document).ready(function(){initNavTree('value__iterator-inl_8h_source.html',''
                                    value_iterator-inl.h
                                    -
                                    1 namespace simdjson {
                                    -
                                    2 namespace SIMDJSON_IMPLEMENTATION {
                                    -
                                    3 namespace ondemand {
                                    -
                                    4 
                                    -
                                    5 simdjson_inline value_iterator::value_iterator(
                                    -
                                    6  json_iterator *json_iter,
                                    -
                                    7  depth_t depth,
                                    -
                                    8  token_position start_position
                                    -
                                    9 ) noexcept : _json_iter{json_iter}, _depth{depth}, _start_position{start_position}
                                    -
                                    10 {
                                    -
                                    11 }
                                    -
                                    12 
                                    -
                                    13 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::start_object() noexcept {
                                    -
                                    14  SIMDJSON_TRY( start_container('{', "Not an object", "object") );
                                    -
                                    15  return started_object();
                                    -
                                    16 }
                                    +
                                    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H
                                    +
                                    2 
                                    +
                                    3 #ifndef SIMDJSON_AMALGAMATED
                                    +
                                    4 #define SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H
                                    +
                                    5 #include "simdjson/generic/ondemand/base.h"
                                    +
                                    6 #include "simdjson/generic/atomparsing.h"
                                    +
                                    7 #include "simdjson/generic/numberparsing.h"
                                    +
                                    8 #include "simdjson/generic/ondemand/json_iterator.h"
                                    +
                                    9 #include "simdjson/generic/ondemand/json_type-inl.h"
                                    +
                                    10 #include "simdjson/generic/ondemand/raw_json_string-inl.h"
                                    +
                                    11 #include "simdjson/generic/ondemand/value_iterator.h"
                                    +
                                    12 #endif // SIMDJSON_AMALGAMATED
                                    +
                                    13 
                                    +
                                    14 namespace simdjson {
                                    +
                                    15 namespace SIMDJSON_IMPLEMENTATION {
                                    +
                                    16 namespace ondemand {
                                    17 
                                    -
                                    18 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::start_root_object() noexcept {
                                    -
                                    19  SIMDJSON_TRY( start_container('{', "Not an object", "object") );
                                    -
                                    20  return started_root_object();
                                    -
                                    21 }
                                    -
                                    22 
                                    -
                                    23 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::started_object() noexcept {
                                    -
                                    24  assert_at_container_start();
                                    -
                                    25 #if SIMDJSON_DEVELOPMENT_CHECKS
                                    -
                                    26  _json_iter->set_start_position(_depth, start_position());
                                    -
                                    27 #endif
                                    -
                                    28  if (*_json_iter->peek() == '}') {
                                    -
                                    29  logger::log_value(*_json_iter, "empty object");
                                    -
                                    30  _json_iter->return_current_and_advance();
                                    -
                                    31  end_container();
                                    -
                                    32  return false;
                                    -
                                    33  }
                                    -
                                    34  return true;
                                    -
                                    35 }
                                    -
                                    36 
                                    -
                                    37 simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_object() noexcept {
                                    -
                                    38  // When in streaming mode, we cannot expect peek_last() to be the last structural element of the
                                    -
                                    39  // current document. It only works in the normal mode where we have indexed a single document.
                                    -
                                    40  // Note that adding a check for 'streaming' is not expensive since we only have at most
                                    -
                                    41  // one root element.
                                    -
                                    42  if ( ! _json_iter->streaming() ) {
                                    -
                                    43  // The following lines do not fully protect against garbage content within the
                                    -
                                    44  // object: e.g., `{"a":2} foo }`. Users concerned with garbage content should
                                    -
                                    45  // call `at_end()` on the document instance at the end of the processing to
                                    -
                                    46  // ensure that the processing has finished at the end.
                                    -
                                    47  //
                                    -
                                    48  if (*_json_iter->peek_last() != '}') {
                                    -
                                    49  _json_iter->abandon();
                                    -
                                    50  return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing } at end");
                                    -
                                    51  }
                                    -
                                    52  // If the last character is } *and* the first gibberish character is also '}'
                                    -
                                    53  // then on-demand could accidentally go over. So we need additional checks.
                                    -
                                    54  // https://github.com/simdjson/simdjson/issues/1834
                                    -
                                    55  // Checking that the document is balanced requires a full scan which is potentially
                                    -
                                    56  // expensive, but it only happens in edge cases where the first padding character is
                                    -
                                    57  // a closing bracket.
                                    -
                                    58  if ((*_json_iter->peek(_json_iter->end_position()) == '}') && (!_json_iter->balanced())) {
                                    -
                                    59  _json_iter->abandon();
                                    -
                                    60  // The exact error would require more work. It will typically be an unclosed object.
                                    -
                                    61  return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced");
                                    -
                                    62  }
                                    -
                                    63  }
                                    -
                                    64  return SUCCESS;
                                    -
                                    65 }
                                    -
                                    66 
                                    -
                                    67 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::started_root_object() noexcept {
                                    -
                                    68  auto error = check_root_object();
                                    -
                                    69  if(error) { return error; }
                                    -
                                    70  return started_object();
                                    -
                                    71 }
                                    -
                                    72 
                                    -
                                    73 simdjson_warn_unused simdjson_inline error_code value_iterator::end_container() noexcept {
                                    -
                                    74 #if SIMDJSON_CHECK_EOF
                                    -
                                    75  if (depth() > 1 && at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing parent ] or }"); }
                                    -
                                    76  // if (depth() <= 1 && !at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing [ or { at start"); }
                                    -
                                    77 #endif // SIMDJSON_CHECK_EOF
                                    -
                                    78  _json_iter->ascend_to(depth()-1);
                                    -
                                    79  return SUCCESS;
                                    -
                                    80 }
                                    -
                                    81 
                                    -
                                    82 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::has_next_field() noexcept {
                                    -
                                    83  assert_at_next();
                                    -
                                    84 
                                    -
                                    85  // It's illegal to call this unless there are more tokens: anything that ends in } or ] is
                                    -
                                    86  // obligated to verify there are more tokens if they are not the top level.
                                    -
                                    87  switch (*_json_iter->return_current_and_advance()) {
                                    -
                                    88  case '}':
                                    -
                                    89  logger::log_end_value(*_json_iter, "object");
                                    -
                                    90  SIMDJSON_TRY( end_container() );
                                    -
                                    91  return false;
                                    -
                                    92  case ',':
                                    -
                                    93  return true;
                                    -
                                    94  default:
                                    -
                                    95  return report_error(TAPE_ERROR, "Missing comma between object fields");
                                    -
                                    96  }
                                    -
                                    97 }
                                    -
                                    98 
                                    -
                                    99 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::find_field_raw(const std::string_view key) noexcept {
                                    -
                                    100  error_code error;
                                    -
                                    101  bool has_value;
                                    -
                                    102  //
                                    -
                                    103  // Initially, the object can be in one of a few different places:
                                    -
                                    104  //
                                    -
                                    105  // 1. The start of the object, at the first field:
                                    -
                                    106  //
                                    -
                                    107  // ```
                                    -
                                    108  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    -
                                    109  // ^ (depth 2, index 1)
                                    -
                                    110  // ```
                                    -
                                    111  if (at_first_field()) {
                                    -
                                    112  has_value = true;
                                    -
                                    113 
                                    -
                                    114  //
                                    -
                                    115  // 2. When a previous search did not yield a value or the object is empty:
                                    -
                                    116  //
                                    -
                                    117  // ```
                                    -
                                    118  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    -
                                    119  // ^ (depth 0)
                                    -
                                    120  // { }
                                    -
                                    121  // ^ (depth 0, index 2)
                                    -
                                    122  // ```
                                    -
                                    123  //
                                    -
                                    124  } else if (!is_open()) {
                                    -
                                    125 #if SIMDJSON_DEVELOPMENT_CHECKS
                                    -
                                    126  // If we're past the end of the object, we're being iterated out of order.
                                    -
                                    127  // Note: this isn't perfect detection. It's possible the user is inside some other object; if so,
                                    -
                                    128  // this object iterator will blithely scan that object for fields.
                                    -
                                    129  if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; }
                                    -
                                    130 #endif
                                    -
                                    131  return false;
                                    -
                                    132 
                                    -
                                    133  // 3. When a previous search found a field or an iterator yielded a value:
                                    -
                                    134  //
                                    +
                                    18 simdjson_inline value_iterator::value_iterator(
                                    +
                                    19  json_iterator *json_iter,
                                    +
                                    20  depth_t depth,
                                    +
                                    21  token_position start_position
                                    +
                                    22 ) noexcept : _json_iter{json_iter}, _depth{depth}, _start_position{start_position}
                                    +
                                    23 {
                                    +
                                    24 }
                                    +
                                    25 
                                    +
                                    26 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::start_object() noexcept {
                                    +
                                    27  SIMDJSON_TRY( start_container('{', "Not an object", "object") );
                                    +
                                    28  return started_object();
                                    +
                                    29 }
                                    +
                                    30 
                                    +
                                    31 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::start_root_object() noexcept {
                                    +
                                    32  SIMDJSON_TRY( start_container('{', "Not an object", "object") );
                                    +
                                    33  return started_root_object();
                                    +
                                    34 }
                                    +
                                    35 
                                    +
                                    36 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::started_object() noexcept {
                                    +
                                    37  assert_at_container_start();
                                    +
                                    38 #if SIMDJSON_DEVELOPMENT_CHECKS
                                    +
                                    39  _json_iter->set_start_position(_depth, start_position());
                                    +
                                    40 #endif
                                    +
                                    41  if (*_json_iter->peek() == '}') {
                                    +
                                    42  logger::log_value(*_json_iter, "empty object");
                                    +
                                    43  _json_iter->return_current_and_advance();
                                    +
                                    44  end_container();
                                    +
                                    45  return false;
                                    +
                                    46  }
                                    +
                                    47  return true;
                                    +
                                    48 }
                                    +
                                    49 
                                    +
                                    50 simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_object() noexcept {
                                    +
                                    51  // When in streaming mode, we cannot expect peek_last() to be the last structural element of the
                                    +
                                    52  // current document. It only works in the normal mode where we have indexed a single document.
                                    +
                                    53  // Note that adding a check for 'streaming' is not expensive since we only have at most
                                    +
                                    54  // one root element.
                                    +
                                    55  if ( ! _json_iter->streaming() ) {
                                    +
                                    56  // The following lines do not fully protect against garbage content within the
                                    +
                                    57  // object: e.g., `{"a":2} foo }`. Users concerned with garbage content should
                                    +
                                    58  // call `at_end()` on the document instance at the end of the processing to
                                    +
                                    59  // ensure that the processing has finished at the end.
                                    +
                                    60  //
                                    +
                                    61  if (*_json_iter->peek_last() != '}') {
                                    +
                                    62  _json_iter->abandon();
                                    +
                                    63  return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing } at end");
                                    +
                                    64  }
                                    +
                                    65  // If the last character is } *and* the first gibberish character is also '}'
                                    +
                                    66  // then on-demand could accidentally go over. So we need additional checks.
                                    +
                                    67  // https://github.com/simdjson/simdjson/issues/1834
                                    +
                                    68  // Checking that the document is balanced requires a full scan which is potentially
                                    +
                                    69  // expensive, but it only happens in edge cases where the first padding character is
                                    +
                                    70  // a closing bracket.
                                    +
                                    71  if ((*_json_iter->peek(_json_iter->end_position()) == '}') && (!_json_iter->balanced())) {
                                    +
                                    72  _json_iter->abandon();
                                    +
                                    73  // The exact error would require more work. It will typically be an unclosed object.
                                    +
                                    74  return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced");
                                    +
                                    75  }
                                    +
                                    76  }
                                    +
                                    77  return SUCCESS;
                                    +
                                    78 }
                                    +
                                    79 
                                    +
                                    80 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::started_root_object() noexcept {
                                    +
                                    81  auto error = check_root_object();
                                    +
                                    82  if(error) { return error; }
                                    +
                                    83  return started_object();
                                    +
                                    84 }
                                    +
                                    85 
                                    +
                                    86 simdjson_warn_unused simdjson_inline error_code value_iterator::end_container() noexcept {
                                    +
                                    87 #if SIMDJSON_CHECK_EOF
                                    +
                                    88  if (depth() > 1 && at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing parent ] or }"); }
                                    +
                                    89  // if (depth() <= 1 && !at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing [ or { at start"); }
                                    +
                                    90 #endif // SIMDJSON_CHECK_EOF
                                    +
                                    91  _json_iter->ascend_to(depth()-1);
                                    +
                                    92  return SUCCESS;
                                    +
                                    93 }
                                    +
                                    94 
                                    +
                                    95 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::has_next_field() noexcept {
                                    +
                                    96  assert_at_next();
                                    +
                                    97 
                                    +
                                    98  // It's illegal to call this unless there are more tokens: anything that ends in } or ] is
                                    +
                                    99  // obligated to verify there are more tokens if they are not the top level.
                                    +
                                    100  switch (*_json_iter->return_current_and_advance()) {
                                    +
                                    101  case '}':
                                    +
                                    102  logger::log_end_value(*_json_iter, "object");
                                    +
                                    103  SIMDJSON_TRY( end_container() );
                                    +
                                    104  return false;
                                    +
                                    105  case ',':
                                    +
                                    106  return true;
                                    +
                                    107  default:
                                    +
                                    108  return report_error(TAPE_ERROR, "Missing comma between object fields");
                                    +
                                    109  }
                                    +
                                    110 }
                                    +
                                    111 
                                    +
                                    112 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::find_field_raw(const std::string_view key) noexcept {
                                    +
                                    113  error_code error;
                                    +
                                    114  bool has_value;
                                    +
                                    115  //
                                    +
                                    116  // Initially, the object can be in one of a few different places:
                                    +
                                    117  //
                                    +
                                    118  // 1. The start of the object, at the first field:
                                    +
                                    119  //
                                    +
                                    120  // ```
                                    +
                                    121  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    +
                                    122  // ^ (depth 2, index 1)
                                    +
                                    123  // ```
                                    +
                                    124  if (at_first_field()) {
                                    +
                                    125  has_value = true;
                                    +
                                    126 
                                    +
                                    127  //
                                    +
                                    128  // 2. When a previous search did not yield a value or the object is empty:
                                    +
                                    129  //
                                    +
                                    130  // ```
                                    +
                                    131  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    +
                                    132  // ^ (depth 0)
                                    +
                                    133  // { }
                                    +
                                    134  // ^ (depth 0, index 2)
                                    135  // ```
                                    -
                                    136  // // When a field was not fully consumed (or not even touched at all)
                                    -
                                    137  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    -
                                    138  // ^ (depth 2)
                                    -
                                    139  // // When a field was fully consumed
                                    -
                                    140  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    -
                                    141  // ^ (depth 1)
                                    -
                                    142  // // When the last field was fully consumed
                                    -
                                    143  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    -
                                    144  // ^ (depth 1)
                                    -
                                    145  // ```
                                    -
                                    146  //
                                    -
                                    147  } else {
                                    -
                                    148  if ((error = skip_child() )) { abandon(); return error; }
                                    -
                                    149  if ((error = has_next_field().get(has_value) )) { abandon(); return error; }
                                    -
                                    150 #if SIMDJSON_DEVELOPMENT_CHECKS
                                    -
                                    151  if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; }
                                    -
                                    152 #endif
                                    -
                                    153  }
                                    -
                                    154  while (has_value) {
                                    -
                                    155  // Get the key and colon, stopping at the value.
                                    -
                                    156  raw_json_string actual_key;
                                    -
                                    157  // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes
                                    -
                                    158  // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2.
                                    -
                                    159  // field_key() advances the pointer and checks that '"' is found (corresponding to a key).
                                    -
                                    160  // The depth is left unchanged by field_key().
                                    -
                                    161  if ((error = field_key().get(actual_key) )) { abandon(); return error; };
                                    -
                                    162  // field_value() will advance and check that we find a ':' separating the
                                    -
                                    163  // key and the value. It will also increment the depth by one.
                                    -
                                    164  if ((error = field_value() )) { abandon(); return error; }
                                    -
                                    165  // If it matches, stop and return
                                    -
                                    166  // We could do it this way if we wanted to allow arbitrary
                                    -
                                    167  // key content (including escaped quotes).
                                    -
                                    168  //if (actual_key.unsafe_is_equal(max_key_length, key)) {
                                    -
                                    169  // Instead we do the following which may trigger buffer overruns if the
                                    -
                                    170  // user provides an adversarial key (containing a well placed unescaped quote
                                    -
                                    171  // character and being longer than the number of bytes remaining in the JSON
                                    -
                                    172  // input).
                                    -
                                    173  if (actual_key.unsafe_is_equal(key)) {
                                    -
                                    174  logger::log_event(*this, "match", key, -2);
                                    -
                                    175  // If we return here, then we return while pointing at the ':' that we just checked.
                                    -
                                    176  return true;
                                    -
                                    177  }
                                    -
                                    178 
                                    -
                                    179  // No match: skip the value and see if , or } is next
                                    -
                                    180  logger::log_event(*this, "no match", key, -2);
                                    -
                                    181  // The call to skip_child is meant to skip over the value corresponding to the key.
                                    -
                                    182  // After skip_child(), we are right before the next comma (',') or the final brace ('}').
                                    -
                                    183  SIMDJSON_TRY( skip_child() ); // Skip the value entirely
                                    -
                                    184  // The has_next_field() advances the pointer and check that either ',' or '}' is found.
                                    -
                                    185  // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found,
                                    -
                                    186  // then we are in error and we abort.
                                    -
                                    187  if ((error = has_next_field().get(has_value) )) { abandon(); return error; }
                                    -
                                    188  }
                                    -
                                    189 
                                    -
                                    190  // If the loop ended, we're out of fields to look at.
                                    -
                                    191  return false;
                                    -
                                    192 }
                                    -
                                    193 
                                    -
                                    194 SIMDJSON_PUSH_DISABLE_WARNINGS
                                    -
                                    195 SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING
                                    -
                                    196 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::find_field_unordered_raw(const std::string_view key) noexcept {
                                    -
                                    204  error_code error;
                                    -
                                    205  bool has_value;
                                    +
                                    136  //
                                    +
                                    137  } else if (!is_open()) {
                                    +
                                    138 #if SIMDJSON_DEVELOPMENT_CHECKS
                                    +
                                    139  // If we're past the end of the object, we're being iterated out of order.
                                    +
                                    140  // Note: this isn't perfect detection. It's possible the user is inside some other object; if so,
                                    +
                                    141  // this object iterator will blithely scan that object for fields.
                                    +
                                    142  if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; }
                                    +
                                    143 #endif
                                    +
                                    144  return false;
                                    +
                                    145 
                                    +
                                    146  // 3. When a previous search found a field or an iterator yielded a value:
                                    +
                                    147  //
                                    +
                                    148  // ```
                                    +
                                    149  // // When a field was not fully consumed (or not even touched at all)
                                    +
                                    150  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    +
                                    151  // ^ (depth 2)
                                    +
                                    152  // // When a field was fully consumed
                                    +
                                    153  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    +
                                    154  // ^ (depth 1)
                                    +
                                    155  // // When the last field was fully consumed
                                    +
                                    156  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    +
                                    157  // ^ (depth 1)
                                    +
                                    158  // ```
                                    +
                                    159  //
                                    +
                                    160  } else {
                                    +
                                    161  if ((error = skip_child() )) { abandon(); return error; }
                                    +
                                    162  if ((error = has_next_field().get(has_value) )) { abandon(); return error; }
                                    +
                                    163 #if SIMDJSON_DEVELOPMENT_CHECKS
                                    +
                                    164  if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; }
                                    +
                                    165 #endif
                                    +
                                    166  }
                                    +
                                    167  while (has_value) {
                                    +
                                    168  // Get the key and colon, stopping at the value.
                                    +
                                    169  raw_json_string actual_key;
                                    +
                                    170  // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes
                                    +
                                    171  // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2.
                                    +
                                    172  // field_key() advances the pointer and checks that '"' is found (corresponding to a key).
                                    +
                                    173  // The depth is left unchanged by field_key().
                                    +
                                    174  if ((error = field_key().get(actual_key) )) { abandon(); return error; };
                                    +
                                    175  // field_value() will advance and check that we find a ':' separating the
                                    +
                                    176  // key and the value. It will also increment the depth by one.
                                    +
                                    177  if ((error = field_value() )) { abandon(); return error; }
                                    +
                                    178  // If it matches, stop and return
                                    +
                                    179  // We could do it this way if we wanted to allow arbitrary
                                    +
                                    180  // key content (including escaped quotes).
                                    +
                                    181  //if (actual_key.unsafe_is_equal(max_key_length, key)) {
                                    +
                                    182  // Instead we do the following which may trigger buffer overruns if the
                                    +
                                    183  // user provides an adversarial key (containing a well placed unescaped quote
                                    +
                                    184  // character and being longer than the number of bytes remaining in the JSON
                                    +
                                    185  // input).
                                    +
                                    186  if (actual_key.unsafe_is_equal(key)) {
                                    +
                                    187  logger::log_event(*this, "match", key, -2);
                                    +
                                    188  // If we return here, then we return while pointing at the ':' that we just checked.
                                    +
                                    189  return true;
                                    +
                                    190  }
                                    +
                                    191 
                                    +
                                    192  // No match: skip the value and see if , or } is next
                                    +
                                    193  logger::log_event(*this, "no match", key, -2);
                                    +
                                    194  // The call to skip_child is meant to skip over the value corresponding to the key.
                                    +
                                    195  // After skip_child(), we are right before the next comma (',') or the final brace ('}').
                                    +
                                    196  SIMDJSON_TRY( skip_child() ); // Skip the value entirely
                                    +
                                    197  // The has_next_field() advances the pointer and check that either ',' or '}' is found.
                                    +
                                    198  // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found,
                                    +
                                    199  // then we are in error and we abort.
                                    +
                                    200  if ((error = has_next_field().get(has_value) )) { abandon(); return error; }
                                    +
                                    201  }
                                    +
                                    202 
                                    +
                                    203  // If the loop ended, we're out of fields to look at.
                                    +
                                    204  return false;
                                    +
                                    205 }
                                    206 
                                    -
                                    207  // First, we scan from that point to the end.
                                    -
                                    208  // If we don't find a match, we may loop back around, and scan from the beginning to that point.
                                    -
                                    209  token_position search_start = _json_iter->position();
                                    -
                                    210 
                                    -
                                    211  // We want to know whether we need to go back to the beginning.
                                    -
                                    212  bool at_first = at_first_field();
                                    -
                                    214  // Initially, the object can be in one of a few different places:
                                    -
                                    215  //
                                    -
                                    216  // 1. At the first key:
                                    -
                                    217  //
                                    -
                                    218  // ```
                                    -
                                    219  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    -
                                    220  // ^ (depth 2, index 1)
                                    -
                                    221  // ```
                                    -
                                    222  //
                                    -
                                    223  if (at_first) {
                                    -
                                    224  has_value = true;
                                    -
                                    225 
                                    -
                                    226  // 2. When a previous search did not yield a value or the object is empty:
                                    -
                                    227  //
                                    -
                                    228  // ```
                                    -
                                    229  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    -
                                    230  // ^ (depth 0)
                                    -
                                    231  // { }
                                    -
                                    232  // ^ (depth 0, index 2)
                                    -
                                    233  // ```
                                    -
                                    234  //
                                    -
                                    235  } else if (!is_open()) {
                                    -
                                    236 
                                    -
                                    237 #if SIMDJSON_DEVELOPMENT_CHECKS
                                    -
                                    238  // If we're past the end of the object, we're being iterated out of order.
                                    -
                                    239  // Note: this isn't perfect detection. It's possible the user is inside some other object; if so,
                                    -
                                    240  // this object iterator will blithely scan that object for fields.
                                    -
                                    241  if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; }
                                    -
                                    242 #endif
                                    -
                                    243  SIMDJSON_TRY(reset_object().get(has_value));
                                    -
                                    244  at_first = true;
                                    -
                                    245  // 3. When a previous search found a field or an iterator yielded a value:
                                    -
                                    246  //
                                    -
                                    247  // ```
                                    -
                                    248  // // When a field was not fully consumed (or not even touched at all)
                                    -
                                    249  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    -
                                    250  // ^ (depth 2)
                                    -
                                    251  // // When a field was fully consumed
                                    -
                                    252  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    -
                                    253  // ^ (depth 1)
                                    -
                                    254  // // When the last field was fully consumed
                                    -
                                    255  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    -
                                    256  // ^ (depth 1)
                                    -
                                    257  // ```
                                    -
                                    258  //
                                    -
                                    259  } else {
                                    -
                                    260  // If someone queried a key but they not did access the value, then we are left pointing
                                    -
                                    261  // at the ':' and we need to move forward through the value... If the value was
                                    -
                                    262  // processed then skip_child() does not move the iterator (but may adjust the depth).
                                    -
                                    263  if ((error = skip_child() )) { abandon(); return error; }
                                    -
                                    264  search_start = _json_iter->position();
                                    -
                                    265  if ((error = has_next_field().get(has_value) )) { abandon(); return error; }
                                    -
                                    266 #if SIMDJSON_DEVELOPMENT_CHECKS
                                    -
                                    267  if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; }
                                    -
                                    268 #endif
                                    -
                                    269  }
                                    -
                                    270 
                                    -
                                    271  // After initial processing, we will be in one of two states:
                                    -
                                    272  //
                                    -
                                    273  // ```
                                    -
                                    274  // // At the beginning of a field
                                    -
                                    275  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    -
                                    276  // ^ (depth 1)
                                    -
                                    277  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    -
                                    278  // ^ (depth 1)
                                    -
                                    279  // // At the end of the object
                                    -
                                    280  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    -
                                    281  // ^ (depth 0)
                                    -
                                    282  // ```
                                    -
                                    283  //
                                    -
                                    284  // Next, we find a match starting from the current position.
                                    -
                                    285  while (has_value) {
                                    -
                                    286  SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field
                                    -
                                    287 
                                    -
                                    288  // Get the key and colon, stopping at the value.
                                    -
                                    289  raw_json_string actual_key;
                                    -
                                    290  // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes
                                    -
                                    291  // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2.
                                    -
                                    292  // field_key() advances the pointer and checks that '"' is found (corresponding to a key).
                                    -
                                    293  // The depth is left unchanged by field_key().
                                    -
                                    294  if ((error = field_key().get(actual_key) )) { abandon(); return error; };
                                    -
                                    295  // field_value() will advance and check that we find a ':' separating the
                                    -
                                    296  // key and the value. It will also increment the depth by one.
                                    -
                                    297  if ((error = field_value() )) { abandon(); return error; }
                                    -
                                    298 
                                    -
                                    299  // If it matches, stop and return
                                    -
                                    300  // We could do it this way if we wanted to allow arbitrary
                                    -
                                    301  // key content (including escaped quotes).
                                    -
                                    302  // if (actual_key.unsafe_is_equal(max_key_length, key)) {
                                    -
                                    303  // Instead we do the following which may trigger buffer overruns if the
                                    -
                                    304  // user provides an adversarial key (containing a well placed unescaped quote
                                    -
                                    305  // character and being longer than the number of bytes remaining in the JSON
                                    -
                                    306  // input).
                                    -
                                    307  if (actual_key.unsafe_is_equal(key)) {
                                    -
                                    308  logger::log_event(*this, "match", key, -2);
                                    -
                                    309  // If we return here, then we return while pointing at the ':' that we just checked.
                                    -
                                    310  return true;
                                    -
                                    311  }
                                    -
                                    312 
                                    -
                                    313  // No match: skip the value and see if , or } is next
                                    -
                                    314  logger::log_event(*this, "no match", key, -2);
                                    -
                                    315  // The call to skip_child is meant to skip over the value corresponding to the key.
                                    -
                                    316  // After skip_child(), we are right before the next comma (',') or the final brace ('}').
                                    -
                                    317  SIMDJSON_TRY( skip_child() );
                                    -
                                    318  // The has_next_field() advances the pointer and check that either ',' or '}' is found.
                                    -
                                    319  // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found,
                                    -
                                    320  // then we are in error and we abort.
                                    -
                                    321  if ((error = has_next_field().get(has_value) )) { abandon(); return error; }
                                    -
                                    322  }
                                    -
                                    323  // Performance note: it maybe wasteful to rewind to the beginning when there might be
                                    -
                                    324  // no other query following. Indeed, it would require reskipping the whole object.
                                    -
                                    325  // Instead, you can just stay where you are. If there is a new query, there is always time
                                    -
                                    326  // to rewind.
                                    -
                                    327  if(at_first) { return false; }
                                    -
                                    328 
                                    -
                                    329  // If we reach the end without finding a match, search the rest of the fields starting at the
                                    -
                                    330  // beginning of the object.
                                    -
                                    331  // (We have already run through the object before, so we've already validated its structure. We
                                    -
                                    332  // don't check errors in this bit.)
                                    -
                                    333  SIMDJSON_TRY(reset_object().get(has_value));
                                    -
                                    334  while (true) {
                                    -
                                    335  SIMDJSON_ASSUME(has_value); // we should reach search_start before ever reaching the end of the object
                                    -
                                    336  SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field
                                    -
                                    337 
                                    -
                                    338  // Get the key and colon, stopping at the value.
                                    -
                                    339  raw_json_string actual_key;
                                    -
                                    340  // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes
                                    -
                                    341  // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2.
                                    -
                                    342  // field_key() advances the pointer and checks that '"' is found (corresponding to a key).
                                    -
                                    343  // The depth is left unchanged by field_key().
                                    -
                                    344  error = field_key().get(actual_key); SIMDJSON_ASSUME(!error);
                                    -
                                    345  // field_value() will advance and check that we find a ':' separating the
                                    -
                                    346  // key and the value. It will also increment the depth by one.
                                    -
                                    347  error = field_value(); SIMDJSON_ASSUME(!error);
                                    -
                                    348 
                                    -
                                    349  // If it matches, stop and return
                                    -
                                    350  // We could do it this way if we wanted to allow arbitrary
                                    -
                                    351  // key content (including escaped quotes).
                                    -
                                    352  // if (actual_key.unsafe_is_equal(max_key_length, key)) {
                                    -
                                    353  // Instead we do the following which may trigger buffer overruns if the
                                    -
                                    354  // user provides an adversarial key (containing a well placed unescaped quote
                                    -
                                    355  // character and being longer than the number of bytes remaining in the JSON
                                    -
                                    356  // input).
                                    -
                                    357  if (actual_key.unsafe_is_equal(key)) {
                                    -
                                    358  logger::log_event(*this, "match", key, -2);
                                    -
                                    359  // If we return here, then we return while pointing at the ':' that we just checked.
                                    -
                                    360  return true;
                                    -
                                    361  }
                                    -
                                    362 
                                    -
                                    363  // No match: skip the value and see if , or } is next
                                    -
                                    364  logger::log_event(*this, "no match", key, -2);
                                    -
                                    365  // The call to skip_child is meant to skip over the value corresponding to the key.
                                    -
                                    366  // After skip_child(), we are right before the next comma (',') or the final brace ('}').
                                    -
                                    367  SIMDJSON_TRY( skip_child() );
                                    -
                                    368  // If we reached the end of the key-value pair we started from, then we know
                                    -
                                    369  // that the key is not there so we return false. We are either right before
                                    -
                                    370  // the next comma or the final brace.
                                    -
                                    371  if(_json_iter->position() == search_start) { return false; }
                                    -
                                    372  // The has_next_field() advances the pointer and check that either ',' or '}' is found.
                                    -
                                    373  // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found,
                                    -
                                    374  // then we are in error and we abort.
                                    -
                                    375  error = has_next_field().get(has_value); SIMDJSON_ASSUME(!error);
                                    -
                                    376  // If we make the mistake of exiting here, then we could be left pointing at a key
                                    -
                                    377  // in the middle of an object. That's not an allowable state.
                                    -
                                    378  }
                                    -
                                    379  // If the loop ended, we're out of fields to look at. The program should
                                    -
                                    380  // never reach this point.
                                    -
                                    381  return false;
                                    -
                                    382 }
                                    -
                                    383 SIMDJSON_POP_DISABLE_WARNINGS
                                    -
                                    384 
                                    -
                                    385 simdjson_warn_unused simdjson_inline simdjson_result<raw_json_string> value_iterator::field_key() noexcept {
                                    -
                                    386  assert_at_next();
                                    -
                                    387 
                                    -
                                    388  const uint8_t *key = _json_iter->return_current_and_advance();
                                    -
                                    389  if (*(key++) != '"') { return report_error(TAPE_ERROR, "Object key is not a string"); }
                                    -
                                    390  return raw_json_string(key);
                                    -
                                    391 }
                                    -
                                    392 
                                    -
                                    393 simdjson_warn_unused simdjson_inline error_code value_iterator::field_value() noexcept {
                                    -
                                    394  assert_at_next();
                                    -
                                    395 
                                    -
                                    396  if (*_json_iter->return_current_and_advance() != ':') { return report_error(TAPE_ERROR, "Missing colon in object field"); }
                                    -
                                    397  _json_iter->descend_to(depth()+1);
                                    -
                                    398  return SUCCESS;
                                    -
                                    399 }
                                    +
                                    207 SIMDJSON_PUSH_DISABLE_WARNINGS
                                    +
                                    208 SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING
                                    +
                                    209 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::find_field_unordered_raw(const std::string_view key) noexcept {
                                    +
                                    217  error_code error;
                                    +
                                    218  bool has_value;
                                    +
                                    219 
                                    +
                                    220  // First, we scan from that point to the end.
                                    +
                                    221  // If we don't find a match, we may loop back around, and scan from the beginning to that point.
                                    +
                                    222  token_position search_start = _json_iter->position();
                                    +
                                    223 
                                    +
                                    224  // We want to know whether we need to go back to the beginning.
                                    +
                                    225  bool at_first = at_first_field();
                                    +
                                    227  // Initially, the object can be in one of a few different places:
                                    +
                                    228  //
                                    +
                                    229  // 1. At the first key:
                                    +
                                    230  //
                                    +
                                    231  // ```
                                    +
                                    232  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    +
                                    233  // ^ (depth 2, index 1)
                                    +
                                    234  // ```
                                    +
                                    235  //
                                    +
                                    236  if (at_first) {
                                    +
                                    237  has_value = true;
                                    +
                                    238 
                                    +
                                    239  // 2. When a previous search did not yield a value or the object is empty:
                                    +
                                    240  //
                                    +
                                    241  // ```
                                    +
                                    242  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    +
                                    243  // ^ (depth 0)
                                    +
                                    244  // { }
                                    +
                                    245  // ^ (depth 0, index 2)
                                    +
                                    246  // ```
                                    +
                                    247  //
                                    +
                                    248  } else if (!is_open()) {
                                    +
                                    249 
                                    +
                                    250 #if SIMDJSON_DEVELOPMENT_CHECKS
                                    +
                                    251  // If we're past the end of the object, we're being iterated out of order.
                                    +
                                    252  // Note: this isn't perfect detection. It's possible the user is inside some other object; if so,
                                    +
                                    253  // this object iterator will blithely scan that object for fields.
                                    +
                                    254  if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; }
                                    +
                                    255 #endif
                                    +
                                    256  SIMDJSON_TRY(reset_object().get(has_value));
                                    +
                                    257  at_first = true;
                                    +
                                    258  // 3. When a previous search found a field or an iterator yielded a value:
                                    +
                                    259  //
                                    +
                                    260  // ```
                                    +
                                    261  // // When a field was not fully consumed (or not even touched at all)
                                    +
                                    262  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    +
                                    263  // ^ (depth 2)
                                    +
                                    264  // // When a field was fully consumed
                                    +
                                    265  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    +
                                    266  // ^ (depth 1)
                                    +
                                    267  // // When the last field was fully consumed
                                    +
                                    268  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    +
                                    269  // ^ (depth 1)
                                    +
                                    270  // ```
                                    +
                                    271  //
                                    +
                                    272  } else {
                                    +
                                    273  // If someone queried a key but they not did access the value, then we are left pointing
                                    +
                                    274  // at the ':' and we need to move forward through the value... If the value was
                                    +
                                    275  // processed then skip_child() does not move the iterator (but may adjust the depth).
                                    +
                                    276  if ((error = skip_child() )) { abandon(); return error; }
                                    +
                                    277  search_start = _json_iter->position();
                                    +
                                    278  if ((error = has_next_field().get(has_value) )) { abandon(); return error; }
                                    +
                                    279 #if SIMDJSON_DEVELOPMENT_CHECKS
                                    +
                                    280  if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; }
                                    +
                                    281 #endif
                                    +
                                    282  }
                                    +
                                    283 
                                    +
                                    284  // After initial processing, we will be in one of two states:
                                    +
                                    285  //
                                    +
                                    286  // ```
                                    +
                                    287  // // At the beginning of a field
                                    +
                                    288  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    +
                                    289  // ^ (depth 1)
                                    +
                                    290  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    +
                                    291  // ^ (depth 1)
                                    +
                                    292  // // At the end of the object
                                    +
                                    293  // { "a": [ 1, 2 ], "b": [ 3, 4 ] }
                                    +
                                    294  // ^ (depth 0)
                                    +
                                    295  // ```
                                    +
                                    296  //
                                    +
                                    297  // Next, we find a match starting from the current position.
                                    +
                                    298  while (has_value) {
                                    +
                                    299  SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field
                                    +
                                    300 
                                    +
                                    301  // Get the key and colon, stopping at the value.
                                    +
                                    302  raw_json_string actual_key;
                                    +
                                    303  // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes
                                    +
                                    304  // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2.
                                    +
                                    305  // field_key() advances the pointer and checks that '"' is found (corresponding to a key).
                                    +
                                    306  // The depth is left unchanged by field_key().
                                    +
                                    307  if ((error = field_key().get(actual_key) )) { abandon(); return error; };
                                    +
                                    308  // field_value() will advance and check that we find a ':' separating the
                                    +
                                    309  // key and the value. It will also increment the depth by one.
                                    +
                                    310  if ((error = field_value() )) { abandon(); return error; }
                                    +
                                    311 
                                    +
                                    312  // If it matches, stop and return
                                    +
                                    313  // We could do it this way if we wanted to allow arbitrary
                                    +
                                    314  // key content (including escaped quotes).
                                    +
                                    315  // if (actual_key.unsafe_is_equal(max_key_length, key)) {
                                    +
                                    316  // Instead we do the following which may trigger buffer overruns if the
                                    +
                                    317  // user provides an adversarial key (containing a well placed unescaped quote
                                    +
                                    318  // character and being longer than the number of bytes remaining in the JSON
                                    +
                                    319  // input).
                                    +
                                    320  if (actual_key.unsafe_is_equal(key)) {
                                    +
                                    321  logger::log_event(*this, "match", key, -2);
                                    +
                                    322  // If we return here, then we return while pointing at the ':' that we just checked.
                                    +
                                    323  return true;
                                    +
                                    324  }
                                    +
                                    325 
                                    +
                                    326  // No match: skip the value and see if , or } is next
                                    +
                                    327  logger::log_event(*this, "no match", key, -2);
                                    +
                                    328  // The call to skip_child is meant to skip over the value corresponding to the key.
                                    +
                                    329  // After skip_child(), we are right before the next comma (',') or the final brace ('}').
                                    +
                                    330  SIMDJSON_TRY( skip_child() );
                                    +
                                    331  // The has_next_field() advances the pointer and check that either ',' or '}' is found.
                                    +
                                    332  // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found,
                                    +
                                    333  // then we are in error and we abort.
                                    +
                                    334  if ((error = has_next_field().get(has_value) )) { abandon(); return error; }
                                    +
                                    335  }
                                    +
                                    336  // Performance note: it maybe wasteful to rewind to the beginning when there might be
                                    +
                                    337  // no other query following. Indeed, it would require reskipping the whole object.
                                    +
                                    338  // Instead, you can just stay where you are. If there is a new query, there is always time
                                    +
                                    339  // to rewind.
                                    +
                                    340  if(at_first) { return false; }
                                    +
                                    341 
                                    +
                                    342  // If we reach the end without finding a match, search the rest of the fields starting at the
                                    +
                                    343  // beginning of the object.
                                    +
                                    344  // (We have already run through the object before, so we've already validated its structure. We
                                    +
                                    345  // don't check errors in this bit.)
                                    +
                                    346  SIMDJSON_TRY(reset_object().get(has_value));
                                    +
                                    347  while (true) {
                                    +
                                    348  SIMDJSON_ASSUME(has_value); // we should reach search_start before ever reaching the end of the object
                                    +
                                    349  SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field
                                    +
                                    350 
                                    +
                                    351  // Get the key and colon, stopping at the value.
                                    +
                                    352  raw_json_string actual_key;
                                    +
                                    353  // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes
                                    +
                                    354  // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2.
                                    +
                                    355  // field_key() advances the pointer and checks that '"' is found (corresponding to a key).
                                    +
                                    356  // The depth is left unchanged by field_key().
                                    +
                                    357  error = field_key().get(actual_key); SIMDJSON_ASSUME(!error);
                                    +
                                    358  // field_value() will advance and check that we find a ':' separating the
                                    +
                                    359  // key and the value. It will also increment the depth by one.
                                    +
                                    360  error = field_value(); SIMDJSON_ASSUME(!error);
                                    +
                                    361 
                                    +
                                    362  // If it matches, stop and return
                                    +
                                    363  // We could do it this way if we wanted to allow arbitrary
                                    +
                                    364  // key content (including escaped quotes).
                                    +
                                    365  // if (actual_key.unsafe_is_equal(max_key_length, key)) {
                                    +
                                    366  // Instead we do the following which may trigger buffer overruns if the
                                    +
                                    367  // user provides an adversarial key (containing a well placed unescaped quote
                                    +
                                    368  // character and being longer than the number of bytes remaining in the JSON
                                    +
                                    369  // input).
                                    +
                                    370  if (actual_key.unsafe_is_equal(key)) {
                                    +
                                    371  logger::log_event(*this, "match", key, -2);
                                    +
                                    372  // If we return here, then we return while pointing at the ':' that we just checked.
                                    +
                                    373  return true;
                                    +
                                    374  }
                                    +
                                    375 
                                    +
                                    376  // No match: skip the value and see if , or } is next
                                    +
                                    377  logger::log_event(*this, "no match", key, -2);
                                    +
                                    378  // The call to skip_child is meant to skip over the value corresponding to the key.
                                    +
                                    379  // After skip_child(), we are right before the next comma (',') or the final brace ('}').
                                    +
                                    380  SIMDJSON_TRY( skip_child() );
                                    +
                                    381  // If we reached the end of the key-value pair we started from, then we know
                                    +
                                    382  // that the key is not there so we return false. We are either right before
                                    +
                                    383  // the next comma or the final brace.
                                    +
                                    384  if(_json_iter->position() == search_start) { return false; }
                                    +
                                    385  // The has_next_field() advances the pointer and check that either ',' or '}' is found.
                                    +
                                    386  // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found,
                                    +
                                    387  // then we are in error and we abort.
                                    +
                                    388  error = has_next_field().get(has_value); SIMDJSON_ASSUME(!error);
                                    +
                                    389  // If we make the mistake of exiting here, then we could be left pointing at a key
                                    +
                                    390  // in the middle of an object. That's not an allowable state.
                                    +
                                    391  }
                                    +
                                    392  // If the loop ended, we're out of fields to look at. The program should
                                    +
                                    393  // never reach this point.
                                    +
                                    394  return false;
                                    +
                                    395 }
                                    +
                                    396 SIMDJSON_POP_DISABLE_WARNINGS
                                    +
                                    397 
                                    +
                                    398 simdjson_warn_unused simdjson_inline simdjson_result<raw_json_string> value_iterator::field_key() noexcept {
                                    +
                                    399  assert_at_next();
                                    400 
                                    -
                                    401 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::start_array() noexcept {
                                    -
                                    402  SIMDJSON_TRY( start_container('[', "Not an array", "array") );
                                    -
                                    403  return started_array();
                                    +
                                    401  const uint8_t *key = _json_iter->return_current_and_advance();
                                    +
                                    402  if (*(key++) != '"') { return report_error(TAPE_ERROR, "Object key is not a string"); }
                                    +
                                    403  return raw_json_string(key);
                                    404 }
                                    405 
                                    -
                                    406 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::start_root_array() noexcept {
                                    -
                                    407  SIMDJSON_TRY( start_container('[', "Not an array", "array") );
                                    -
                                    408  return started_root_array();
                                    -
                                    409 }
                                    -
                                    410 
                                    -
                                    411 inline std::string value_iterator::to_string() const noexcept {
                                    -
                                    412  auto answer = std::string("value_iterator [ depth : ") + std::to_string(_depth) + std::string(", ");
                                    -
                                    413  if(_json_iter != nullptr) { answer += _json_iter->to_string(); }
                                    -
                                    414  answer += std::string(" ]");
                                    -
                                    415  return answer;
                                    -
                                    416 }
                                    -
                                    417 
                                    -
                                    418 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::started_array() noexcept {
                                    -
                                    419  assert_at_container_start();
                                    -
                                    420  if (*_json_iter->peek() == ']') {
                                    -
                                    421  logger::log_value(*_json_iter, "empty array");
                                    -
                                    422  _json_iter->return_current_and_advance();
                                    -
                                    423  SIMDJSON_TRY( end_container() );
                                    -
                                    424  return false;
                                    -
                                    425  }
                                    -
                                    426  _json_iter->descend_to(depth()+1);
                                    -
                                    427 #if SIMDJSON_DEVELOPMENT_CHECKS
                                    -
                                    428  _json_iter->set_start_position(_depth, start_position());
                                    -
                                    429 #endif
                                    -
                                    430  return true;
                                    -
                                    431 }
                                    -
                                    432 
                                    -
                                    433 simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_array() noexcept {
                                    -
                                    434  // When in streaming mode, we cannot expect peek_last() to be the last structural element of the
                                    -
                                    435  // current document. It only works in the normal mode where we have indexed a single document.
                                    -
                                    436  // Note that adding a check for 'streaming' is not expensive since we only have at most
                                    -
                                    437  // one root element.
                                    -
                                    438  if ( ! _json_iter->streaming() ) {
                                    -
                                    439  // The following lines do not fully protect against garbage content within the
                                    -
                                    440  // array: e.g., `[1, 2] foo]`. Users concerned with garbage content should
                                    -
                                    441  // also call `at_end()` on the document instance at the end of the processing to
                                    -
                                    442  // ensure that the processing has finished at the end.
                                    -
                                    443  //
                                    -
                                    444  if (*_json_iter->peek_last() != ']') {
                                    -
                                    445  _json_iter->abandon();
                                    -
                                    446  return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing ] at end");
                                    -
                                    447  }
                                    -
                                    448  // If the last character is ] *and* the first gibberish character is also ']'
                                    -
                                    449  // then on-demand could accidentally go over. So we need additional checks.
                                    -
                                    450  // https://github.com/simdjson/simdjson/issues/1834
                                    -
                                    451  // Checking that the document is balanced requires a full scan which is potentially
                                    -
                                    452  // expensive, but it only happens in edge cases where the first padding character is
                                    -
                                    453  // a closing bracket.
                                    -
                                    454  if ((*_json_iter->peek(_json_iter->end_position()) == ']') && (!_json_iter->balanced())) {
                                    -
                                    455  _json_iter->abandon();
                                    -
                                    456  // The exact error would require more work. It will typically be an unclosed array.
                                    -
                                    457  return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced");
                                    -
                                    458  }
                                    -
                                    459  }
                                    -
                                    460  return SUCCESS;
                                    -
                                    461 }
                                    -
                                    462 
                                    -
                                    463 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::started_root_array() noexcept {
                                    -
                                    464  auto error = check_root_array();
                                    -
                                    465  if (error) { return error; }
                                    -
                                    466  return started_array();
                                    -
                                    467 }
                                    -
                                    468 
                                    -
                                    469 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::has_next_element() noexcept {
                                    -
                                    470  assert_at_next();
                                    -
                                    471 
                                    -
                                    472  logger::log_event(*this, "has_next_element");
                                    -
                                    473  switch (*_json_iter->return_current_and_advance()) {
                                    -
                                    474  case ']':
                                    -
                                    475  logger::log_end_value(*_json_iter, "array");
                                    -
                                    476  SIMDJSON_TRY( end_container() );
                                    -
                                    477  return false;
                                    -
                                    478  case ',':
                                    -
                                    479  _json_iter->descend_to(depth()+1);
                                    -
                                    480  return true;
                                    -
                                    481  default:
                                    -
                                    482  return report_error(TAPE_ERROR, "Missing comma between array elements");
                                    -
                                    483  }
                                    -
                                    484 }
                                    -
                                    485 
                                    -
                                    486 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::parse_bool(const uint8_t *json) const noexcept {
                                    -
                                    487  auto not_true = atomparsing::str4ncmp(json, "true");
                                    -
                                    488  auto not_false = atomparsing::str4ncmp(json, "fals") | (json[4] ^ 'e');
                                    -
                                    489  bool error = (not_true && not_false) || jsoncharutils::is_not_structural_or_whitespace(json[not_true ? 5 : 4]);
                                    -
                                    490  if (error) { return incorrect_type_error("Not a boolean"); }
                                    -
                                    491  return simdjson_result<bool>(!not_true);
                                    -
                                    492 }
                                    -
                                    493 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::parse_null(const uint8_t *json) const noexcept {
                                    -
                                    494  bool is_null_string = !atomparsing::str4ncmp(json, "null") && jsoncharutils::is_structural_or_whitespace(json[4]);
                                    -
                                    495  // if we start with 'n', we must be a null
                                    -
                                    496  if(!is_null_string && json[0]=='n') { return incorrect_type_error("Not a null but starts with n"); }
                                    -
                                    497  return is_null_string;
                                    -
                                    498 }
                                    -
                                    499 
                                    -
                                    500 simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> value_iterator::get_string(bool allow_replacement) noexcept {
                                    -
                                    501  return get_raw_json_string().unescape(json_iter(), allow_replacement);
                                    -
                                    502 }
                                    -
                                    503 simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> value_iterator::get_wobbly_string() noexcept {
                                    -
                                    504  return get_raw_json_string().unescape_wobbly(json_iter());
                                    +
                                    406 simdjson_warn_unused simdjson_inline error_code value_iterator::field_value() noexcept {
                                    +
                                    407  assert_at_next();
                                    +
                                    408 
                                    +
                                    409  if (*_json_iter->return_current_and_advance() != ':') { return report_error(TAPE_ERROR, "Missing colon in object field"); }
                                    +
                                    410  _json_iter->descend_to(depth()+1);
                                    +
                                    411  return SUCCESS;
                                    +
                                    412 }
                                    +
                                    413 
                                    +
                                    414 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::start_array() noexcept {
                                    +
                                    415  SIMDJSON_TRY( start_container('[', "Not an array", "array") );
                                    +
                                    416  return started_array();
                                    +
                                    417 }
                                    +
                                    418 
                                    +
                                    419 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::start_root_array() noexcept {
                                    +
                                    420  SIMDJSON_TRY( start_container('[', "Not an array", "array") );
                                    +
                                    421  return started_root_array();
                                    +
                                    422 }
                                    +
                                    423 
                                    +
                                    424 inline std::string value_iterator::to_string() const noexcept {
                                    +
                                    425  auto answer = std::string("value_iterator [ depth : ") + std::to_string(_depth) + std::string(", ");
                                    +
                                    426  if(_json_iter != nullptr) { answer += _json_iter->to_string(); }
                                    +
                                    427  answer += std::string(" ]");
                                    +
                                    428  return answer;
                                    +
                                    429 }
                                    +
                                    430 
                                    +
                                    431 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::started_array() noexcept {
                                    +
                                    432  assert_at_container_start();
                                    +
                                    433  if (*_json_iter->peek() == ']') {
                                    +
                                    434  logger::log_value(*_json_iter, "empty array");
                                    +
                                    435  _json_iter->return_current_and_advance();
                                    +
                                    436  SIMDJSON_TRY( end_container() );
                                    +
                                    437  return false;
                                    +
                                    438  }
                                    +
                                    439  _json_iter->descend_to(depth()+1);
                                    +
                                    440 #if SIMDJSON_DEVELOPMENT_CHECKS
                                    +
                                    441  _json_iter->set_start_position(_depth, start_position());
                                    +
                                    442 #endif
                                    +
                                    443  return true;
                                    +
                                    444 }
                                    +
                                    445 
                                    +
                                    446 simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_array() noexcept {
                                    +
                                    447  // When in streaming mode, we cannot expect peek_last() to be the last structural element of the
                                    +
                                    448  // current document. It only works in the normal mode where we have indexed a single document.
                                    +
                                    449  // Note that adding a check for 'streaming' is not expensive since we only have at most
                                    +
                                    450  // one root element.
                                    +
                                    451  if ( ! _json_iter->streaming() ) {
                                    +
                                    452  // The following lines do not fully protect against garbage content within the
                                    +
                                    453  // array: e.g., `[1, 2] foo]`. Users concerned with garbage content should
                                    +
                                    454  // also call `at_end()` on the document instance at the end of the processing to
                                    +
                                    455  // ensure that the processing has finished at the end.
                                    +
                                    456  //
                                    +
                                    457  if (*_json_iter->peek_last() != ']') {
                                    +
                                    458  _json_iter->abandon();
                                    +
                                    459  return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing ] at end");
                                    +
                                    460  }
                                    +
                                    461  // If the last character is ] *and* the first gibberish character is also ']'
                                    +
                                    462  // then on-demand could accidentally go over. So we need additional checks.
                                    +
                                    463  // https://github.com/simdjson/simdjson/issues/1834
                                    +
                                    464  // Checking that the document is balanced requires a full scan which is potentially
                                    +
                                    465  // expensive, but it only happens in edge cases where the first padding character is
                                    +
                                    466  // a closing bracket.
                                    +
                                    467  if ((*_json_iter->peek(_json_iter->end_position()) == ']') && (!_json_iter->balanced())) {
                                    +
                                    468  _json_iter->abandon();
                                    +
                                    469  // The exact error would require more work. It will typically be an unclosed array.
                                    +
                                    470  return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced");
                                    +
                                    471  }
                                    +
                                    472  }
                                    +
                                    473  return SUCCESS;
                                    +
                                    474 }
                                    +
                                    475 
                                    +
                                    476 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::started_root_array() noexcept {
                                    +
                                    477  auto error = check_root_array();
                                    +
                                    478  if (error) { return error; }
                                    +
                                    479  return started_array();
                                    +
                                    480 }
                                    +
                                    481 
                                    +
                                    482 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::has_next_element() noexcept {
                                    +
                                    483  assert_at_next();
                                    +
                                    484 
                                    +
                                    485  logger::log_event(*this, "has_next_element");
                                    +
                                    486  switch (*_json_iter->return_current_and_advance()) {
                                    +
                                    487  case ']':
                                    +
                                    488  logger::log_end_value(*_json_iter, "array");
                                    +
                                    489  SIMDJSON_TRY( end_container() );
                                    +
                                    490  return false;
                                    +
                                    491  case ',':
                                    +
                                    492  _json_iter->descend_to(depth()+1);
                                    +
                                    493  return true;
                                    +
                                    494  default:
                                    +
                                    495  return report_error(TAPE_ERROR, "Missing comma between array elements");
                                    +
                                    496  }
                                    +
                                    497 }
                                    +
                                    498 
                                    +
                                    499 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::parse_bool(const uint8_t *json) const noexcept {
                                    +
                                    500  auto not_true = atomparsing::str4ncmp(json, "true");
                                    +
                                    501  auto not_false = atomparsing::str4ncmp(json, "fals") | (json[4] ^ 'e');
                                    +
                                    502  bool error = (not_true && not_false) || jsoncharutils::is_not_structural_or_whitespace(json[not_true ? 5 : 4]);
                                    +
                                    503  if (error) { return incorrect_type_error("Not a boolean"); }
                                    +
                                    504  return simdjson_result<bool>(!not_true);
                                    505 }
                                    -
                                    506 simdjson_warn_unused simdjson_inline simdjson_result<raw_json_string> value_iterator::get_raw_json_string() noexcept {
                                    -
                                    507  auto json = peek_scalar("string");
                                    -
                                    508  if (*json != '"') { return incorrect_type_error("Not a string"); }
                                    -
                                    509  advance_scalar("string");
                                    -
                                    510  return raw_json_string(json+1);
                                    +
                                    506 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::parse_null(const uint8_t *json) const noexcept {
                                    +
                                    507  bool is_null_string = !atomparsing::str4ncmp(json, "null") && jsoncharutils::is_structural_or_whitespace(json[4]);
                                    +
                                    508  // if we start with 'n', we must be a null
                                    +
                                    509  if(!is_null_string && json[0]=='n') { return incorrect_type_error("Not a null but starts with n"); }
                                    +
                                    510  return is_null_string;
                                    511 }
                                    -
                                    512 simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> value_iterator::get_uint64() noexcept {
                                    -
                                    513  auto result = numberparsing::parse_unsigned(peek_non_root_scalar("uint64"));
                                    -
                                    514  if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); }
                                    -
                                    515  return result;
                                    -
                                    516 }
                                    -
                                    517 simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> value_iterator::get_uint64_in_string() noexcept {
                                    -
                                    518  auto result = numberparsing::parse_unsigned_in_string(peek_non_root_scalar("uint64"));
                                    -
                                    519  if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); }
                                    -
                                    520  return result;
                                    -
                                    521 }
                                    -
                                    522 simdjson_warn_unused simdjson_inline simdjson_result<int64_t> value_iterator::get_int64() noexcept {
                                    -
                                    523  auto result = numberparsing::parse_integer(peek_non_root_scalar("int64"));
                                    -
                                    524  if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); }
                                    -
                                    525  return result;
                                    -
                                    526 }
                                    -
                                    527 simdjson_warn_unused simdjson_inline simdjson_result<int64_t> value_iterator::get_int64_in_string() noexcept {
                                    -
                                    528  auto result = numberparsing::parse_integer_in_string(peek_non_root_scalar("int64"));
                                    -
                                    529  if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); }
                                    -
                                    530  return result;
                                    -
                                    531 }
                                    -
                                    532 simdjson_warn_unused simdjson_inline simdjson_result<double> value_iterator::get_double() noexcept {
                                    -
                                    533  auto result = numberparsing::parse_double(peek_non_root_scalar("double"));
                                    -
                                    534  if(result.error() == SUCCESS) { advance_non_root_scalar("double"); }
                                    -
                                    535  return result;
                                    -
                                    536 }
                                    -
                                    537 simdjson_warn_unused simdjson_inline simdjson_result<double> value_iterator::get_double_in_string() noexcept {
                                    -
                                    538  auto result = numberparsing::parse_double_in_string(peek_non_root_scalar("double"));
                                    -
                                    539  if(result.error() == SUCCESS) { advance_non_root_scalar("double"); }
                                    -
                                    540  return result;
                                    -
                                    541 }
                                    -
                                    542 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::get_bool() noexcept {
                                    -
                                    543  auto result = parse_bool(peek_non_root_scalar("bool"));
                                    -
                                    544  if(result.error() == SUCCESS) { advance_non_root_scalar("bool"); }
                                    -
                                    545  return result;
                                    -
                                    546 }
                                    -
                                    547 simdjson_inline simdjson_result<bool> value_iterator::is_null() noexcept {
                                    -
                                    548  bool is_null_value;
                                    -
                                    549  SIMDJSON_TRY(parse_null(peek_non_root_scalar("null")).get(is_null_value));
                                    -
                                    550  if(is_null_value) { advance_non_root_scalar("null"); }
                                    -
                                    551  return is_null_value;
                                    -
                                    552 }
                                    -
                                    553 simdjson_inline bool value_iterator::is_negative() noexcept {
                                    -
                                    554  return numberparsing::is_negative(peek_non_root_scalar("numbersign"));
                                    -
                                    555 }
                                    -
                                    556 simdjson_inline bool value_iterator::is_root_negative() noexcept {
                                    -
                                    557  return numberparsing::is_negative(peek_root_scalar("numbersign"));
                                    -
                                    558 }
                                    -
                                    559 simdjson_inline simdjson_result<bool> value_iterator::is_integer() noexcept {
                                    -
                                    560  return numberparsing::is_integer(peek_non_root_scalar("integer"));
                                    -
                                    561 }
                                    -
                                    562 simdjson_inline simdjson_result<number_type> value_iterator::get_number_type() noexcept {
                                    -
                                    563  return numberparsing::get_number_type(peek_non_root_scalar("integer"));
                                    -
                                    564 }
                                    -
                                    565 simdjson_inline simdjson_result<number> value_iterator::get_number() noexcept {
                                    -
                                    566  number num;
                                    -
                                    567  error_code error = numberparsing::parse_number(peek_non_root_scalar("number"), num);
                                    -
                                    568  if(error) { return error; }
                                    -
                                    569  return num;
                                    -
                                    570 }
                                    -
                                    571 
                                    -
                                    572 simdjson_inline simdjson_result<bool> value_iterator::is_root_integer(bool check_trailing) noexcept {
                                    -
                                    573  auto max_len = peek_start_length();
                                    -
                                    574  auto json = peek_root_scalar("is_root_integer");
                                    -
                                    575  uint8_t tmpbuf[20+1]; // <20 digits> is the longest possible unsigned integer
                                    -
                                    576  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) {
                                    -
                                    577  return false; // if there are more than 20 characters, it cannot be represented as an integer.
                                    -
                                    578  }
                                    -
                                    579  auto answer = numberparsing::is_integer(tmpbuf);
                                    -
                                    580  // If the parsing was a success, we must still check that it is
                                    -
                                    581  // a single scalar. Note that we parse first because of cases like '[]' where
                                    -
                                    582  // getting TRAILING_CONTENT is wrong.
                                    -
                                    583  if(check_trailing && (answer.error() == SUCCESS) && (!_json_iter->is_single_token())) { return TRAILING_CONTENT; }
                                    -
                                    584  return answer;
                                    -
                                    585 }
                                    -
                                    586 
                                    -
                                    587 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::numberparsing::number_type> value_iterator::get_root_number_type(bool check_trailing) noexcept {
                                    -
                                    588  auto max_len = peek_start_length();
                                    -
                                    589  auto json = peek_root_scalar("number");
                                    -
                                    590  // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/,
                                    -
                                    591  // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest
                                    -
                                    592  // number: -0.<fraction>e-308.
                                    -
                                    593  uint8_t tmpbuf[1074+8+1];
                                    -
                                    594  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) {
                                    -
                                    595  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters");
                                    -
                                    596  return NUMBER_ERROR;
                                    -
                                    597  }
                                    -
                                    598  auto answer = numberparsing::get_number_type(tmpbuf);
                                    -
                                    599  if (check_trailing && (answer.error() == SUCCESS) && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    -
                                    600  return answer;
                                    -
                                    601 }
                                    -
                                    602 simdjson_inline simdjson_result<number> value_iterator::get_root_number(bool check_trailing) noexcept {
                                    -
                                    603  auto max_len = peek_start_length();
                                    -
                                    604  auto json = peek_root_scalar("number");
                                    -
                                    605  // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/,
                                    -
                                    606  // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest
                                    -
                                    607  // number: -0.<fraction>e-308.
                                    -
                                    608  uint8_t tmpbuf[1074+8+1];
                                    -
                                    609  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) {
                                    -
                                    610  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters");
                                    -
                                    611  return NUMBER_ERROR;
                                    -
                                    612  }
                                    -
                                    613  number num;
                                    -
                                    614  error_code error = numberparsing::parse_number(tmpbuf, num);
                                    -
                                    615  if(error) { return error; }
                                    -
                                    616  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    -
                                    617  advance_root_scalar("number");
                                    -
                                    618  return num;
                                    -
                                    619 }
                                    -
                                    620 simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> value_iterator::get_root_string(bool check_trailing, bool allow_replacement) noexcept {
                                    -
                                    621  return get_root_raw_json_string(check_trailing).unescape(json_iter(), allow_replacement);
                                    -
                                    622 }
                                    -
                                    623 simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> value_iterator::get_root_wobbly_string(bool check_trailing) noexcept {
                                    -
                                    624  return get_root_raw_json_string(check_trailing).unescape_wobbly(json_iter());
                                    -
                                    625 }
                                    -
                                    626 simdjson_warn_unused simdjson_inline simdjson_result<raw_json_string> value_iterator::get_root_raw_json_string(bool check_trailing) noexcept {
                                    -
                                    627  auto json = peek_scalar("string");
                                    -
                                    628  if (*json != '"') { return incorrect_type_error("Not a string"); }
                                    +
                                    512 
                                    +
                                    513 simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> value_iterator::get_string(bool allow_replacement) noexcept {
                                    +
                                    514  return get_raw_json_string().unescape(json_iter(), allow_replacement);
                                    +
                                    515 }
                                    +
                                    516 simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> value_iterator::get_wobbly_string() noexcept {
                                    +
                                    517  return get_raw_json_string().unescape_wobbly(json_iter());
                                    +
                                    518 }
                                    +
                                    519 simdjson_warn_unused simdjson_inline simdjson_result<raw_json_string> value_iterator::get_raw_json_string() noexcept {
                                    +
                                    520  auto json = peek_scalar("string");
                                    +
                                    521  if (*json != '"') { return incorrect_type_error("Not a string"); }
                                    +
                                    522  advance_scalar("string");
                                    +
                                    523  return raw_json_string(json+1);
                                    +
                                    524 }
                                    +
                                    525 simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> value_iterator::get_uint64() noexcept {
                                    +
                                    526  auto result = numberparsing::parse_unsigned(peek_non_root_scalar("uint64"));
                                    +
                                    527  if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); }
                                    +
                                    528  return result;
                                    +
                                    529 }
                                    +
                                    530 simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> value_iterator::get_uint64_in_string() noexcept {
                                    +
                                    531  auto result = numberparsing::parse_unsigned_in_string(peek_non_root_scalar("uint64"));
                                    +
                                    532  if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); }
                                    +
                                    533  return result;
                                    +
                                    534 }
                                    +
                                    535 simdjson_warn_unused simdjson_inline simdjson_result<int64_t> value_iterator::get_int64() noexcept {
                                    +
                                    536  auto result = numberparsing::parse_integer(peek_non_root_scalar("int64"));
                                    +
                                    537  if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); }
                                    +
                                    538  return result;
                                    +
                                    539 }
                                    +
                                    540 simdjson_warn_unused simdjson_inline simdjson_result<int64_t> value_iterator::get_int64_in_string() noexcept {
                                    +
                                    541  auto result = numberparsing::parse_integer_in_string(peek_non_root_scalar("int64"));
                                    +
                                    542  if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); }
                                    +
                                    543  return result;
                                    +
                                    544 }
                                    +
                                    545 simdjson_warn_unused simdjson_inline simdjson_result<double> value_iterator::get_double() noexcept {
                                    +
                                    546  auto result = numberparsing::parse_double(peek_non_root_scalar("double"));
                                    +
                                    547  if(result.error() == SUCCESS) { advance_non_root_scalar("double"); }
                                    +
                                    548  return result;
                                    +
                                    549 }
                                    +
                                    550 simdjson_warn_unused simdjson_inline simdjson_result<double> value_iterator::get_double_in_string() noexcept {
                                    +
                                    551  auto result = numberparsing::parse_double_in_string(peek_non_root_scalar("double"));
                                    +
                                    552  if(result.error() == SUCCESS) { advance_non_root_scalar("double"); }
                                    +
                                    553  return result;
                                    +
                                    554 }
                                    +
                                    555 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::get_bool() noexcept {
                                    +
                                    556  auto result = parse_bool(peek_non_root_scalar("bool"));
                                    +
                                    557  if(result.error() == SUCCESS) { advance_non_root_scalar("bool"); }
                                    +
                                    558  return result;
                                    +
                                    559 }
                                    +
                                    560 simdjson_inline simdjson_result<bool> value_iterator::is_null() noexcept {
                                    +
                                    561  bool is_null_value;
                                    +
                                    562  SIMDJSON_TRY(parse_null(peek_non_root_scalar("null")).get(is_null_value));
                                    +
                                    563  if(is_null_value) { advance_non_root_scalar("null"); }
                                    +
                                    564  return is_null_value;
                                    +
                                    565 }
                                    +
                                    566 simdjson_inline bool value_iterator::is_negative() noexcept {
                                    +
                                    567  return numberparsing::is_negative(peek_non_root_scalar("numbersign"));
                                    +
                                    568 }
                                    +
                                    569 simdjson_inline bool value_iterator::is_root_negative() noexcept {
                                    +
                                    570  return numberparsing::is_negative(peek_root_scalar("numbersign"));
                                    +
                                    571 }
                                    +
                                    572 simdjson_inline simdjson_result<bool> value_iterator::is_integer() noexcept {
                                    +
                                    573  return numberparsing::is_integer(peek_non_root_scalar("integer"));
                                    +
                                    574 }
                                    +
                                    575 simdjson_inline simdjson_result<number_type> value_iterator::get_number_type() noexcept {
                                    +
                                    576  return numberparsing::get_number_type(peek_non_root_scalar("integer"));
                                    +
                                    577 }
                                    +
                                    578 simdjson_inline simdjson_result<number> value_iterator::get_number() noexcept {
                                    +
                                    579  number num;
                                    +
                                    580  error_code error = numberparsing::parse_number(peek_non_root_scalar("number"), num);
                                    +
                                    581  if(error) { return error; }
                                    +
                                    582  return num;
                                    +
                                    583 }
                                    +
                                    584 
                                    +
                                    585 simdjson_inline simdjson_result<bool> value_iterator::is_root_integer(bool check_trailing) noexcept {
                                    +
                                    586  auto max_len = peek_start_length();
                                    +
                                    587  auto json = peek_root_scalar("is_root_integer");
                                    +
                                    588  uint8_t tmpbuf[20+1]; // <20 digits> is the longest possible unsigned integer
                                    +
                                    589  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) {
                                    +
                                    590  return false; // if there are more than 20 characters, it cannot be represented as an integer.
                                    +
                                    591  }
                                    +
                                    592  auto answer = numberparsing::is_integer(tmpbuf);
                                    +
                                    593  // If the parsing was a success, we must still check that it is
                                    +
                                    594  // a single scalar. Note that we parse first because of cases like '[]' where
                                    +
                                    595  // getting TRAILING_CONTENT is wrong.
                                    +
                                    596  if(check_trailing && (answer.error() == SUCCESS) && (!_json_iter->is_single_token())) { return TRAILING_CONTENT; }
                                    +
                                    597  return answer;
                                    +
                                    598 }
                                    +
                                    599 
                                    +
                                    600 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::number_type> value_iterator::get_root_number_type(bool check_trailing) noexcept {
                                    +
                                    601  auto max_len = peek_start_length();
                                    +
                                    602  auto json = peek_root_scalar("number");
                                    +
                                    603  // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/,
                                    +
                                    604  // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest
                                    +
                                    605  // number: -0.<fraction>e-308.
                                    +
                                    606  uint8_t tmpbuf[1074+8+1];
                                    +
                                    607  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) {
                                    +
                                    608  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters");
                                    +
                                    609  return NUMBER_ERROR;
                                    +
                                    610  }
                                    +
                                    611  auto answer = numberparsing::get_number_type(tmpbuf);
                                    +
                                    612  if (check_trailing && (answer.error() == SUCCESS) && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    +
                                    613  return answer;
                                    +
                                    614 }
                                    +
                                    615 simdjson_inline simdjson_result<number> value_iterator::get_root_number(bool check_trailing) noexcept {
                                    +
                                    616  auto max_len = peek_start_length();
                                    +
                                    617  auto json = peek_root_scalar("number");
                                    +
                                    618  // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/,
                                    +
                                    619  // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest
                                    +
                                    620  // number: -0.<fraction>e-308.
                                    +
                                    621  uint8_t tmpbuf[1074+8+1];
                                    +
                                    622  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) {
                                    +
                                    623  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters");
                                    +
                                    624  return NUMBER_ERROR;
                                    +
                                    625  }
                                    +
                                    626  number num;
                                    +
                                    627  error_code error = numberparsing::parse_number(tmpbuf, num);
                                    +
                                    628  if(error) { return error; }
                                    629  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    -
                                    630  advance_scalar("string");
                                    -
                                    631  return raw_json_string(json+1);
                                    +
                                    630  advance_root_scalar("number");
                                    +
                                    631  return num;
                                    632 }
                                    -
                                    633 simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> value_iterator::get_root_uint64(bool check_trailing) noexcept {
                                    -
                                    634  auto max_len = peek_start_length();
                                    -
                                    635  auto json = peek_root_scalar("uint64");
                                    -
                                    636  uint8_t tmpbuf[20+1]; // <20 digits> is the longest possible unsigned integer
                                    -
                                    637  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) {
                                    -
                                    638  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters");
                                    -
                                    639  return NUMBER_ERROR;
                                    -
                                    640  }
                                    -
                                    641  auto result = numberparsing::parse_unsigned(tmpbuf);
                                    -
                                    642  if(result.error() == SUCCESS) {
                                    -
                                    643  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    -
                                    644  advance_root_scalar("uint64");
                                    -
                                    645  }
                                    -
                                    646  return result;
                                    -
                                    647 }
                                    -
                                    648 simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> value_iterator::get_root_uint64_in_string(bool check_trailing) noexcept {
                                    -
                                    649  auto max_len = peek_start_length();
                                    -
                                    650  auto json = peek_root_scalar("uint64");
                                    -
                                    651  uint8_t tmpbuf[20+1]; // <20 digits> is the longest possible unsigned integer
                                    -
                                    652  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) {
                                    -
                                    653  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters");
                                    -
                                    654  return NUMBER_ERROR;
                                    -
                                    655  }
                                    -
                                    656  auto result = numberparsing::parse_unsigned_in_string(tmpbuf);
                                    -
                                    657  if(result.error() == SUCCESS) {
                                    -
                                    658  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    -
                                    659  advance_root_scalar("uint64");
                                    -
                                    660  }
                                    -
                                    661  return result;
                                    -
                                    662 }
                                    -
                                    663 simdjson_warn_unused simdjson_inline simdjson_result<int64_t> value_iterator::get_root_int64(bool check_trailing) noexcept {
                                    -
                                    664  auto max_len = peek_start_length();
                                    -
                                    665  auto json = peek_root_scalar("int64");
                                    -
                                    666  uint8_t tmpbuf[20+1]; // -<19 digits> is the longest possible integer
                                    -
                                    667  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) {
                                    -
                                    668  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters");
                                    -
                                    669  return NUMBER_ERROR;
                                    -
                                    670  }
                                    -
                                    671 
                                    -
                                    672  auto result = numberparsing::parse_integer(tmpbuf);
                                    -
                                    673  if(result.error() == SUCCESS) {
                                    -
                                    674  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    -
                                    675  advance_root_scalar("int64");
                                    -
                                    676  }
                                    -
                                    677  return result;
                                    -
                                    678 }
                                    -
                                    679 simdjson_warn_unused simdjson_inline simdjson_result<int64_t> value_iterator::get_root_int64_in_string(bool check_trailing) noexcept {
                                    -
                                    680  auto max_len = peek_start_length();
                                    -
                                    681  auto json = peek_root_scalar("int64");
                                    -
                                    682  uint8_t tmpbuf[20+1]; // -<19 digits> is the longest possible integer
                                    -
                                    683  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) {
                                    -
                                    684  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters");
                                    -
                                    685  return NUMBER_ERROR;
                                    -
                                    686  }
                                    -
                                    687 
                                    -
                                    688  auto result = numberparsing::parse_integer_in_string(tmpbuf);
                                    -
                                    689  if(result.error() == SUCCESS) {
                                    -
                                    690  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    -
                                    691  advance_root_scalar("int64");
                                    -
                                    692  }
                                    -
                                    693  return result;
                                    -
                                    694 }
                                    -
                                    695 simdjson_warn_unused simdjson_inline simdjson_result<double> value_iterator::get_root_double(bool check_trailing) noexcept {
                                    -
                                    696  auto max_len = peek_start_length();
                                    -
                                    697  auto json = peek_root_scalar("double");
                                    -
                                    698  // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/,
                                    -
                                    699  // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest
                                    -
                                    700  // number: -0.<fraction>e-308.
                                    -
                                    701  uint8_t tmpbuf[1074+8+1];
                                    -
                                    702  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) {
                                    -
                                    703  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters");
                                    -
                                    704  return NUMBER_ERROR;
                                    +
                                    633 simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> value_iterator::get_root_string(bool check_trailing, bool allow_replacement) noexcept {
                                    +
                                    634  return get_root_raw_json_string(check_trailing).unescape(json_iter(), allow_replacement);
                                    +
                                    635 }
                                    +
                                    636 simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> value_iterator::get_root_wobbly_string(bool check_trailing) noexcept {
                                    +
                                    637  return get_root_raw_json_string(check_trailing).unescape_wobbly(json_iter());
                                    +
                                    638 }
                                    +
                                    639 simdjson_warn_unused simdjson_inline simdjson_result<raw_json_string> value_iterator::get_root_raw_json_string(bool check_trailing) noexcept {
                                    +
                                    640  auto json = peek_scalar("string");
                                    +
                                    641  if (*json != '"') { return incorrect_type_error("Not a string"); }
                                    +
                                    642  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    +
                                    643  advance_scalar("string");
                                    +
                                    644  return raw_json_string(json+1);
                                    +
                                    645 }
                                    +
                                    646 simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> value_iterator::get_root_uint64(bool check_trailing) noexcept {
                                    +
                                    647  auto max_len = peek_start_length();
                                    +
                                    648  auto json = peek_root_scalar("uint64");
                                    +
                                    649  uint8_t tmpbuf[20+1]; // <20 digits> is the longest possible unsigned integer
                                    +
                                    650  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) {
                                    +
                                    651  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters");
                                    +
                                    652  return NUMBER_ERROR;
                                    +
                                    653  }
                                    +
                                    654  auto result = numberparsing::parse_unsigned(tmpbuf);
                                    +
                                    655  if(result.error() == SUCCESS) {
                                    +
                                    656  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    +
                                    657  advance_root_scalar("uint64");
                                    +
                                    658  }
                                    +
                                    659  return result;
                                    +
                                    660 }
                                    +
                                    661 simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> value_iterator::get_root_uint64_in_string(bool check_trailing) noexcept {
                                    +
                                    662  auto max_len = peek_start_length();
                                    +
                                    663  auto json = peek_root_scalar("uint64");
                                    +
                                    664  uint8_t tmpbuf[20+1]; // <20 digits> is the longest possible unsigned integer
                                    +
                                    665  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) {
                                    +
                                    666  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters");
                                    +
                                    667  return NUMBER_ERROR;
                                    +
                                    668  }
                                    +
                                    669  auto result = numberparsing::parse_unsigned_in_string(tmpbuf);
                                    +
                                    670  if(result.error() == SUCCESS) {
                                    +
                                    671  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    +
                                    672  advance_root_scalar("uint64");
                                    +
                                    673  }
                                    +
                                    674  return result;
                                    +
                                    675 }
                                    +
                                    676 simdjson_warn_unused simdjson_inline simdjson_result<int64_t> value_iterator::get_root_int64(bool check_trailing) noexcept {
                                    +
                                    677  auto max_len = peek_start_length();
                                    +
                                    678  auto json = peek_root_scalar("int64");
                                    +
                                    679  uint8_t tmpbuf[20+1]; // -<19 digits> is the longest possible integer
                                    +
                                    680  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) {
                                    +
                                    681  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters");
                                    +
                                    682  return NUMBER_ERROR;
                                    +
                                    683  }
                                    +
                                    684 
                                    +
                                    685  auto result = numberparsing::parse_integer(tmpbuf);
                                    +
                                    686  if(result.error() == SUCCESS) {
                                    +
                                    687  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    +
                                    688  advance_root_scalar("int64");
                                    +
                                    689  }
                                    +
                                    690  return result;
                                    +
                                    691 }
                                    +
                                    692 simdjson_warn_unused simdjson_inline simdjson_result<int64_t> value_iterator::get_root_int64_in_string(bool check_trailing) noexcept {
                                    +
                                    693  auto max_len = peek_start_length();
                                    +
                                    694  auto json = peek_root_scalar("int64");
                                    +
                                    695  uint8_t tmpbuf[20+1]; // -<19 digits> is the longest possible integer
                                    +
                                    696  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) {
                                    +
                                    697  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters");
                                    +
                                    698  return NUMBER_ERROR;
                                    +
                                    699  }
                                    +
                                    700 
                                    +
                                    701  auto result = numberparsing::parse_integer_in_string(tmpbuf);
                                    +
                                    702  if(result.error() == SUCCESS) {
                                    +
                                    703  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    +
                                    704  advance_root_scalar("int64");
                                    705  }
                                    -
                                    706  auto result = numberparsing::parse_double(tmpbuf);
                                    -
                                    707  if(result.error() == SUCCESS) {
                                    -
                                    708  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    -
                                    709  advance_root_scalar("double");
                                    -
                                    710  }
                                    -
                                    711  return result;
                                    -
                                    712 }
                                    -
                                    713 
                                    -
                                    714 simdjson_warn_unused simdjson_inline simdjson_result<double> value_iterator::get_root_double_in_string(bool check_trailing) noexcept {
                                    -
                                    715  auto max_len = peek_start_length();
                                    -
                                    716  auto json = peek_root_scalar("double");
                                    -
                                    717  // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/,
                                    -
                                    718  // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest
                                    -
                                    719  // number: -0.<fraction>e-308.
                                    -
                                    720  uint8_t tmpbuf[1074+8+1];
                                    -
                                    721  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) {
                                    -
                                    722  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters");
                                    -
                                    723  return NUMBER_ERROR;
                                    -
                                    724  }
                                    -
                                    725  auto result = numberparsing::parse_double_in_string(tmpbuf);
                                    -
                                    726  if(result.error() == SUCCESS) {
                                    -
                                    727  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    -
                                    728  advance_root_scalar("double");
                                    -
                                    729  }
                                    -
                                    730  return result;
                                    -
                                    731 }
                                    -
                                    732 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::get_root_bool(bool check_trailing) noexcept {
                                    -
                                    733  auto max_len = peek_start_length();
                                    -
                                    734  auto json = peek_root_scalar("bool");
                                    -
                                    735  uint8_t tmpbuf[5+1];
                                    -
                                    736  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 5+1)) { return incorrect_type_error("Not a boolean"); }
                                    -
                                    737  auto result = parse_bool(tmpbuf);
                                    -
                                    738  if(result.error() == SUCCESS) {
                                    -
                                    739  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    -
                                    740  advance_root_scalar("bool");
                                    -
                                    741  }
                                    -
                                    742  return result;
                                    -
                                    743 }
                                    -
                                    744 simdjson_inline simdjson_result<bool> value_iterator::is_root_null(bool check_trailing) noexcept {
                                    -
                                    745  auto max_len = peek_start_length();
                                    -
                                    746  auto json = peek_root_scalar("null");
                                    -
                                    747  bool result = (max_len >= 4 && !atomparsing::str4ncmp(json, "null") &&
                                    -
                                    748  (max_len == 4 || jsoncharutils::is_structural_or_whitespace(json[4])));
                                    -
                                    749  if(result) { // we have something that looks like a null.
                                    -
                                    750  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    -
                                    751  advance_root_scalar("null");
                                    -
                                    752  }
                                    -
                                    753  return result;
                                    -
                                    754 }
                                    -
                                    755 
                                    -
                                    756 simdjson_warn_unused simdjson_inline error_code value_iterator::skip_child() noexcept {
                                    -
                                    757  SIMDJSON_ASSUME( _json_iter->token._position > _start_position );
                                    -
                                    758  SIMDJSON_ASSUME( _json_iter->_depth >= _depth );
                                    -
                                    759 
                                    -
                                    760  return _json_iter->skip_child(depth());
                                    -
                                    761 }
                                    -
                                    762 
                                    -
                                    763 simdjson_inline value_iterator value_iterator::child() const noexcept {
                                    -
                                    764  assert_at_child();
                                    -
                                    765  return { _json_iter, depth()+1, _json_iter->token.position() };
                                    -
                                    766 }
                                    -
                                    767 
                                    -
                                    768 // GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller
                                    -
                                    769 // relating depth and iterator depth, which is a desired effect. It does not happen if is_open is
                                    -
                                    770 // marked non-inline.
                                    -
                                    771 SIMDJSON_PUSH_DISABLE_WARNINGS
                                    -
                                    772 SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING
                                    -
                                    773 simdjson_inline bool value_iterator::is_open() const noexcept {
                                    -
                                    774  return _json_iter->depth() >= depth();
                                    -
                                    775 }
                                    -
                                    776 SIMDJSON_POP_DISABLE_WARNINGS
                                    -
                                    777 
                                    -
                                    778 simdjson_inline bool value_iterator::at_end() const noexcept {
                                    -
                                    779  return _json_iter->at_end();
                                    -
                                    780 }
                                    -
                                    781 
                                    -
                                    782 simdjson_inline bool value_iterator::at_start() const noexcept {
                                    -
                                    783  return _json_iter->token.position() == start_position();
                                    -
                                    784 }
                                    -
                                    785 
                                    -
                                    786 simdjson_inline bool value_iterator::at_first_field() const noexcept {
                                    -
                                    787  SIMDJSON_ASSUME( _json_iter->token._position > _start_position );
                                    -
                                    788  return _json_iter->token.position() == start_position() + 1;
                                    -
                                    789 }
                                    +
                                    706  return result;
                                    +
                                    707 }
                                    +
                                    708 simdjson_warn_unused simdjson_inline simdjson_result<double> value_iterator::get_root_double(bool check_trailing) noexcept {
                                    +
                                    709  auto max_len = peek_start_length();
                                    +
                                    710  auto json = peek_root_scalar("double");
                                    +
                                    711  // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/,
                                    +
                                    712  // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest
                                    +
                                    713  // number: -0.<fraction>e-308.
                                    +
                                    714  uint8_t tmpbuf[1074+8+1];
                                    +
                                    715  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) {
                                    +
                                    716  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters");
                                    +
                                    717  return NUMBER_ERROR;
                                    +
                                    718  }
                                    +
                                    719  auto result = numberparsing::parse_double(tmpbuf);
                                    +
                                    720  if(result.error() == SUCCESS) {
                                    +
                                    721  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    +
                                    722  advance_root_scalar("double");
                                    +
                                    723  }
                                    +
                                    724  return result;
                                    +
                                    725 }
                                    +
                                    726 
                                    +
                                    727 simdjson_warn_unused simdjson_inline simdjson_result<double> value_iterator::get_root_double_in_string(bool check_trailing) noexcept {
                                    +
                                    728  auto max_len = peek_start_length();
                                    +
                                    729  auto json = peek_root_scalar("double");
                                    +
                                    730  // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/,
                                    +
                                    731  // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest
                                    +
                                    732  // number: -0.<fraction>e-308.
                                    +
                                    733  uint8_t tmpbuf[1074+8+1];
                                    +
                                    734  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) {
                                    +
                                    735  logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters");
                                    +
                                    736  return NUMBER_ERROR;
                                    +
                                    737  }
                                    +
                                    738  auto result = numberparsing::parse_double_in_string(tmpbuf);
                                    +
                                    739  if(result.error() == SUCCESS) {
                                    +
                                    740  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    +
                                    741  advance_root_scalar("double");
                                    +
                                    742  }
                                    +
                                    743  return result;
                                    +
                                    744 }
                                    +
                                    745 simdjson_warn_unused simdjson_inline simdjson_result<bool> value_iterator::get_root_bool(bool check_trailing) noexcept {
                                    +
                                    746  auto max_len = peek_start_length();
                                    +
                                    747  auto json = peek_root_scalar("bool");
                                    +
                                    748  uint8_t tmpbuf[5+1];
                                    +
                                    749  if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 5+1)) { return incorrect_type_error("Not a boolean"); }
                                    +
                                    750  auto result = parse_bool(tmpbuf);
                                    +
                                    751  if(result.error() == SUCCESS) {
                                    +
                                    752  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    +
                                    753  advance_root_scalar("bool");
                                    +
                                    754  }
                                    +
                                    755  return result;
                                    +
                                    756 }
                                    +
                                    757 simdjson_inline simdjson_result<bool> value_iterator::is_root_null(bool check_trailing) noexcept {
                                    +
                                    758  auto max_len = peek_start_length();
                                    +
                                    759  auto json = peek_root_scalar("null");
                                    +
                                    760  bool result = (max_len >= 4 && !atomparsing::str4ncmp(json, "null") &&
                                    +
                                    761  (max_len == 4 || jsoncharutils::is_structural_or_whitespace(json[4])));
                                    +
                                    762  if(result) { // we have something that looks like a null.
                                    +
                                    763  if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; }
                                    +
                                    764  advance_root_scalar("null");
                                    +
                                    765  }
                                    +
                                    766  return result;
                                    +
                                    767 }
                                    +
                                    768 
                                    +
                                    769 simdjson_warn_unused simdjson_inline error_code value_iterator::skip_child() noexcept {
                                    +
                                    770  SIMDJSON_ASSUME( _json_iter->token._position > _start_position );
                                    +
                                    771  SIMDJSON_ASSUME( _json_iter->_depth >= _depth );
                                    +
                                    772 
                                    +
                                    773  return _json_iter->skip_child(depth());
                                    +
                                    774 }
                                    +
                                    775 
                                    +
                                    776 simdjson_inline value_iterator value_iterator::child() const noexcept {
                                    +
                                    777  assert_at_child();
                                    +
                                    778  return { _json_iter, depth()+1, _json_iter->token.position() };
                                    +
                                    779 }
                                    +
                                    780 
                                    +
                                    781 // GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller
                                    +
                                    782 // relating depth and iterator depth, which is a desired effect. It does not happen if is_open is
                                    +
                                    783 // marked non-inline.
                                    +
                                    784 SIMDJSON_PUSH_DISABLE_WARNINGS
                                    +
                                    785 SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING
                                    +
                                    786 simdjson_inline bool value_iterator::is_open() const noexcept {
                                    +
                                    787  return _json_iter->depth() >= depth();
                                    +
                                    788 }
                                    +
                                    789 SIMDJSON_POP_DISABLE_WARNINGS
                                    790 
                                    -
                                    791 simdjson_inline void value_iterator::abandon() noexcept {
                                    -
                                    792  _json_iter->abandon();
                                    +
                                    791 simdjson_inline bool value_iterator::at_end() const noexcept {
                                    +
                                    792  return _json_iter->at_end();
                                    793 }
                                    794 
                                    -
                                    795 simdjson_warn_unused simdjson_inline depth_t value_iterator::depth() const noexcept {
                                    -
                                    796  return _depth;
                                    +
                                    795 simdjson_inline bool value_iterator::at_start() const noexcept {
                                    +
                                    796  return _json_iter->token.position() == start_position();
                                    797 }
                                    -
                                    798 simdjson_warn_unused simdjson_inline error_code value_iterator::error() const noexcept {
                                    -
                                    799  return _json_iter->error;
                                    -
                                    800 }
                                    -
                                    801 simdjson_warn_unused simdjson_inline uint8_t *&value_iterator::string_buf_loc() noexcept {
                                    -
                                    802  return _json_iter->string_buf_loc();
                                    -
                                    803 }
                                    -
                                    804 simdjson_warn_unused simdjson_inline const json_iterator &value_iterator::json_iter() const noexcept {
                                    -
                                    805  return *_json_iter;
                                    +
                                    798 
                                    +
                                    799 simdjson_inline bool value_iterator::at_first_field() const noexcept {
                                    +
                                    800  SIMDJSON_ASSUME( _json_iter->token._position > _start_position );
                                    +
                                    801  return _json_iter->token.position() == start_position() + 1;
                                    +
                                    802 }
                                    +
                                    803 
                                    +
                                    804 simdjson_inline void value_iterator::abandon() noexcept {
                                    +
                                    805  _json_iter->abandon();
                                    806 }
                                    -
                                    807 simdjson_warn_unused simdjson_inline json_iterator &value_iterator::json_iter() noexcept {
                                    -
                                    808  return *_json_iter;
                                    -
                                    809 }
                                    -
                                    810 
                                    -
                                    811 simdjson_inline const uint8_t *value_iterator::peek_start() const noexcept {
                                    -
                                    812  return _json_iter->peek(start_position());
                                    +
                                    807 
                                    +
                                    808 simdjson_warn_unused simdjson_inline depth_t value_iterator::depth() const noexcept {
                                    +
                                    809  return _depth;
                                    +
                                    810 }
                                    +
                                    811 simdjson_warn_unused simdjson_inline error_code value_iterator::error() const noexcept {
                                    +
                                    812  return _json_iter->error;
                                    813 }
                                    -
                                    814 simdjson_inline uint32_t value_iterator::peek_start_length() const noexcept {
                                    -
                                    815  return _json_iter->peek_length(start_position());
                                    +
                                    814 simdjson_warn_unused simdjson_inline uint8_t *&value_iterator::string_buf_loc() noexcept {
                                    +
                                    815  return _json_iter->string_buf_loc();
                                    816 }
                                    -
                                    817 
                                    -
                                    818 simdjson_inline const uint8_t *value_iterator::peek_scalar(const char *type) noexcept {
                                    -
                                    819  logger::log_value(*_json_iter, start_position(), depth(), type);
                                    -
                                    820  // If we're not at the position anymore, we don't want to advance the cursor.
                                    -
                                    821  if (!is_at_start()) { return peek_start(); }
                                    -
                                    822 
                                    -
                                    823  // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value.
                                    -
                                    824  assert_at_start();
                                    -
                                    825  return _json_iter->peek();
                                    +
                                    817 simdjson_warn_unused simdjson_inline const json_iterator &value_iterator::json_iter() const noexcept {
                                    +
                                    818  return *_json_iter;
                                    +
                                    819 }
                                    +
                                    820 simdjson_warn_unused simdjson_inline json_iterator &value_iterator::json_iter() noexcept {
                                    +
                                    821  return *_json_iter;
                                    +
                                    822 }
                                    +
                                    823 
                                    +
                                    824 simdjson_inline const uint8_t *value_iterator::peek_start() const noexcept {
                                    +
                                    825  return _json_iter->peek(start_position());
                                    826 }
                                    -
                                    827 
                                    -
                                    828 simdjson_inline void value_iterator::advance_scalar(const char *type) noexcept {
                                    -
                                    829  logger::log_value(*_json_iter, start_position(), depth(), type);
                                    -
                                    830  // If we're not at the position anymore, we don't want to advance the cursor.
                                    -
                                    831  if (!is_at_start()) { return; }
                                    -
                                    832 
                                    -
                                    833  // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value.
                                    -
                                    834  assert_at_start();
                                    -
                                    835  _json_iter->return_current_and_advance();
                                    -
                                    836  _json_iter->ascend_to(depth()-1);
                                    -
                                    837 }
                                    -
                                    838 
                                    -
                                    839 simdjson_inline error_code value_iterator::start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept {
                                    -
                                    840  logger::log_start_value(*_json_iter, start_position(), depth(), type);
                                    -
                                    841  // If we're not at the position anymore, we don't want to advance the cursor.
                                    -
                                    842  const uint8_t *json;
                                    -
                                    843  if (!is_at_start()) {
                                    -
                                    844 #if SIMDJSON_DEVELOPMENT_CHECKS
                                    -
                                    845  if (!is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; }
                                    -
                                    846 #endif
                                    -
                                    847  json = peek_start();
                                    -
                                    848  if (*json != start_char) { return incorrect_type_error(incorrect_type_message); }
                                    -
                                    849  } else {
                                    -
                                    850  assert_at_start();
                                    -
                                    856  json = _json_iter->peek();
                                    -
                                    857  if (*json != start_char) { return incorrect_type_error(incorrect_type_message); }
                                    -
                                    858  _json_iter->return_current_and_advance();
                                    -
                                    859  }
                                    -
                                    860 
                                    -
                                    861 
                                    -
                                    862  return SUCCESS;
                                    -
                                    863 }
                                    -
                                    864 
                                    -
                                    865 
                                    -
                                    866 simdjson_inline const uint8_t *value_iterator::peek_root_scalar(const char *type) noexcept {
                                    -
                                    867  logger::log_value(*_json_iter, start_position(), depth(), type);
                                    -
                                    868  if (!is_at_start()) { return peek_start(); }
                                    -
                                    869 
                                    -
                                    870  assert_at_root();
                                    -
                                    871  return _json_iter->peek();
                                    -
                                    872 }
                                    -
                                    873 simdjson_inline const uint8_t *value_iterator::peek_non_root_scalar(const char *type) noexcept {
                                    -
                                    874  logger::log_value(*_json_iter, start_position(), depth(), type);
                                    -
                                    875  if (!is_at_start()) { return peek_start(); }
                                    -
                                    876 
                                    -
                                    877  assert_at_non_root_start();
                                    -
                                    878  return _json_iter->peek();
                                    -
                                    879 }
                                    -
                                    880 
                                    -
                                    881 simdjson_inline void value_iterator::advance_root_scalar(const char *type) noexcept {
                                    -
                                    882  logger::log_value(*_json_iter, start_position(), depth(), type);
                                    -
                                    883  if (!is_at_start()) { return; }
                                    -
                                    884 
                                    -
                                    885  assert_at_root();
                                    -
                                    886  _json_iter->return_current_and_advance();
                                    -
                                    887  _json_iter->ascend_to(depth()-1);
                                    -
                                    888 }
                                    -
                                    889 simdjson_inline void value_iterator::advance_non_root_scalar(const char *type) noexcept {
                                    -
                                    890  logger::log_value(*_json_iter, start_position(), depth(), type);
                                    -
                                    891  if (!is_at_start()) { return; }
                                    -
                                    892 
                                    -
                                    893  assert_at_non_root_start();
                                    -
                                    894  _json_iter->return_current_and_advance();
                                    -
                                    895  _json_iter->ascend_to(depth()-1);
                                    -
                                    896 }
                                    +
                                    827 simdjson_inline uint32_t value_iterator::peek_start_length() const noexcept {
                                    +
                                    828  return _json_iter->peek_length(start_position());
                                    +
                                    829 }
                                    +
                                    830 
                                    +
                                    831 simdjson_inline const uint8_t *value_iterator::peek_scalar(const char *type) noexcept {
                                    +
                                    832  logger::log_value(*_json_iter, start_position(), depth(), type);
                                    +
                                    833  // If we're not at the position anymore, we don't want to advance the cursor.
                                    +
                                    834  if (!is_at_start()) { return peek_start(); }
                                    +
                                    835 
                                    +
                                    836  // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value.
                                    +
                                    837  assert_at_start();
                                    +
                                    838  return _json_iter->peek();
                                    +
                                    839 }
                                    +
                                    840 
                                    +
                                    841 simdjson_inline void value_iterator::advance_scalar(const char *type) noexcept {
                                    +
                                    842  logger::log_value(*_json_iter, start_position(), depth(), type);
                                    +
                                    843  // If we're not at the position anymore, we don't want to advance the cursor.
                                    +
                                    844  if (!is_at_start()) { return; }
                                    +
                                    845 
                                    +
                                    846  // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value.
                                    +
                                    847  assert_at_start();
                                    +
                                    848  _json_iter->return_current_and_advance();
                                    +
                                    849  _json_iter->ascend_to(depth()-1);
                                    +
                                    850 }
                                    +
                                    851 
                                    +
                                    852 simdjson_inline error_code value_iterator::start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept {
                                    +
                                    853  logger::log_start_value(*_json_iter, start_position(), depth(), type);
                                    +
                                    854  // If we're not at the position anymore, we don't want to advance the cursor.
                                    +
                                    855  const uint8_t *json;
                                    +
                                    856  if (!is_at_start()) {
                                    +
                                    857 #if SIMDJSON_DEVELOPMENT_CHECKS
                                    +
                                    858  if (!is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; }
                                    +
                                    859 #endif
                                    +
                                    860  json = peek_start();
                                    +
                                    861  if (*json != start_char) { return incorrect_type_error(incorrect_type_message); }
                                    +
                                    862  } else {
                                    +
                                    863  assert_at_start();
                                    +
                                    869  json = _json_iter->peek();
                                    +
                                    870  if (*json != start_char) { return incorrect_type_error(incorrect_type_message); }
                                    +
                                    871  _json_iter->return_current_and_advance();
                                    +
                                    872  }
                                    +
                                    873 
                                    +
                                    874 
                                    +
                                    875  return SUCCESS;
                                    +
                                    876 }
                                    +
                                    877 
                                    +
                                    878 
                                    +
                                    879 simdjson_inline const uint8_t *value_iterator::peek_root_scalar(const char *type) noexcept {
                                    +
                                    880  logger::log_value(*_json_iter, start_position(), depth(), type);
                                    +
                                    881  if (!is_at_start()) { return peek_start(); }
                                    +
                                    882 
                                    +
                                    883  assert_at_root();
                                    +
                                    884  return _json_iter->peek();
                                    +
                                    885 }
                                    +
                                    886 simdjson_inline const uint8_t *value_iterator::peek_non_root_scalar(const char *type) noexcept {
                                    +
                                    887  logger::log_value(*_json_iter, start_position(), depth(), type);
                                    +
                                    888  if (!is_at_start()) { return peek_start(); }
                                    +
                                    889 
                                    +
                                    890  assert_at_non_root_start();
                                    +
                                    891  return _json_iter->peek();
                                    +
                                    892 }
                                    +
                                    893 
                                    +
                                    894 simdjson_inline void value_iterator::advance_root_scalar(const char *type) noexcept {
                                    +
                                    895  logger::log_value(*_json_iter, start_position(), depth(), type);
                                    +
                                    896  if (!is_at_start()) { return; }
                                    897 
                                    -
                                    898 simdjson_inline error_code value_iterator::incorrect_type_error(const char *message) const noexcept {
                                    -
                                    899  logger::log_error(*_json_iter, start_position(), depth(), message);
                                    -
                                    900  return INCORRECT_TYPE;
                                    +
                                    898  assert_at_root();
                                    +
                                    899  _json_iter->return_current_and_advance();
                                    +
                                    900  _json_iter->ascend_to(depth()-1);
                                    901 }
                                    -
                                    902 
                                    -
                                    903 simdjson_inline bool value_iterator::is_at_start() const noexcept {
                                    -
                                    904  return position() == start_position();
                                    -
                                    905 }
                                    -
                                    906 
                                    -
                                    907 simdjson_inline bool value_iterator::is_at_key() const noexcept {
                                    -
                                    908  // Keys are at the same depth as the object.
                                    -
                                    909  // Note here that we could be safer and check that we are within an object,
                                    -
                                    910  // but we do not.
                                    -
                                    911  return _depth == _json_iter->_depth && *_json_iter->peek() == '"';
                                    -
                                    912 }
                                    -
                                    913 
                                    -
                                    914 simdjson_inline bool value_iterator::is_at_iterator_start() const noexcept {
                                    -
                                    915  // We can legitimately be either at the first value ([1]), or after the array if it's empty ([]).
                                    -
                                    916  auto delta = position() - start_position();
                                    -
                                    917  return delta == 1 || delta == 2;
                                    +
                                    902 simdjson_inline void value_iterator::advance_non_root_scalar(const char *type) noexcept {
                                    +
                                    903  logger::log_value(*_json_iter, start_position(), depth(), type);
                                    +
                                    904  if (!is_at_start()) { return; }
                                    +
                                    905 
                                    +
                                    906  assert_at_non_root_start();
                                    +
                                    907  _json_iter->return_current_and_advance();
                                    +
                                    908  _json_iter->ascend_to(depth()-1);
                                    +
                                    909 }
                                    +
                                    910 
                                    +
                                    911 simdjson_inline error_code value_iterator::incorrect_type_error(const char *message) const noexcept {
                                    +
                                    912  logger::log_error(*_json_iter, start_position(), depth(), message);
                                    +
                                    913  return INCORRECT_TYPE;
                                    +
                                    914 }
                                    +
                                    915 
                                    +
                                    916 simdjson_inline bool value_iterator::is_at_start() const noexcept {
                                    +
                                    917  return position() == start_position();
                                    918 }
                                    919 
                                    -
                                    920 inline void value_iterator::assert_at_start() const noexcept {
                                    -
                                    921  SIMDJSON_ASSUME( _json_iter->token._position == _start_position );
                                    -
                                    922  SIMDJSON_ASSUME( _json_iter->_depth == _depth );
                                    -
                                    923  SIMDJSON_ASSUME( _depth > 0 );
                                    -
                                    924 }
                                    -
                                    925 
                                    -
                                    926 inline void value_iterator::assert_at_container_start() const noexcept {
                                    -
                                    927  SIMDJSON_ASSUME( _json_iter->token._position == _start_position + 1 );
                                    -
                                    928  SIMDJSON_ASSUME( _json_iter->_depth == _depth );
                                    -
                                    929  SIMDJSON_ASSUME( _depth > 0 );
                                    -
                                    930 }
                                    -
                                    931 
                                    -
                                    932 inline void value_iterator::assert_at_next() const noexcept {
                                    -
                                    933  SIMDJSON_ASSUME( _json_iter->token._position > _start_position );
                                    -
                                    934  SIMDJSON_ASSUME( _json_iter->_depth == _depth );
                                    -
                                    935  SIMDJSON_ASSUME( _depth > 0 );
                                    -
                                    936 }
                                    -
                                    937 
                                    -
                                    938 simdjson_inline void value_iterator::move_at_start() noexcept {
                                    -
                                    939  _json_iter->_depth = _depth;
                                    -
                                    940  _json_iter->token.set_position(_start_position);
                                    -
                                    941 }
                                    -
                                    942 
                                    -
                                    943 simdjson_inline void value_iterator::move_at_container_start() noexcept {
                                    -
                                    944  _json_iter->_depth = _depth;
                                    -
                                    945  _json_iter->token.set_position(_start_position + 1);
                                    -
                                    946 }
                                    -
                                    947 
                                    -
                                    948 simdjson_inline simdjson_result<bool> value_iterator::reset_array() noexcept {
                                    -
                                    949  if(error()) { return error(); }
                                    -
                                    950  move_at_container_start();
                                    -
                                    951  return started_array();
                                    -
                                    952 }
                                    -
                                    953 
                                    -
                                    954 simdjson_inline simdjson_result<bool> value_iterator::reset_object() noexcept {
                                    -
                                    955  if(error()) { return error(); }
                                    -
                                    956  move_at_container_start();
                                    -
                                    957  return started_object();
                                    -
                                    958 }
                                    -
                                    959 
                                    -
                                    960 inline void value_iterator::assert_at_child() const noexcept {
                                    -
                                    961  SIMDJSON_ASSUME( _json_iter->token._position > _start_position );
                                    -
                                    962  SIMDJSON_ASSUME( _json_iter->_depth == _depth + 1 );
                                    -
                                    963  SIMDJSON_ASSUME( _depth > 0 );
                                    -
                                    964 }
                                    -
                                    965 
                                    -
                                    966 inline void value_iterator::assert_at_root() const noexcept {
                                    -
                                    967  assert_at_start();
                                    -
                                    968  SIMDJSON_ASSUME( _depth == 1 );
                                    -
                                    969 }
                                    -
                                    970 
                                    -
                                    971 inline void value_iterator::assert_at_non_root_start() const noexcept {
                                    -
                                    972  assert_at_start();
                                    -
                                    973  SIMDJSON_ASSUME( _depth > 1 );
                                    -
                                    974 }
                                    -
                                    975 
                                    -
                                    976 inline void value_iterator::assert_is_valid() const noexcept {
                                    -
                                    977  SIMDJSON_ASSUME( _json_iter != nullptr );
                                    -
                                    978 }
                                    -
                                    979 
                                    -
                                    980 simdjson_inline bool value_iterator::is_valid() const noexcept {
                                    -
                                    981  return _json_iter != nullptr;
                                    +
                                    920 simdjson_inline bool value_iterator::is_at_key() const noexcept {
                                    +
                                    921  // Keys are at the same depth as the object.
                                    +
                                    922  // Note here that we could be safer and check that we are within an object,
                                    +
                                    923  // but we do not.
                                    +
                                    924  return _depth == _json_iter->_depth && *_json_iter->peek() == '"';
                                    +
                                    925 }
                                    +
                                    926 
                                    +
                                    927 simdjson_inline bool value_iterator::is_at_iterator_start() const noexcept {
                                    +
                                    928  // We can legitimately be either at the first value ([1]), or after the array if it's empty ([]).
                                    +
                                    929  auto delta = position() - start_position();
                                    +
                                    930  return delta == 1 || delta == 2;
                                    +
                                    931 }
                                    +
                                    932 
                                    +
                                    933 inline void value_iterator::assert_at_start() const noexcept {
                                    +
                                    934  SIMDJSON_ASSUME( _json_iter->token._position == _start_position );
                                    +
                                    935  SIMDJSON_ASSUME( _json_iter->_depth == _depth );
                                    +
                                    936  SIMDJSON_ASSUME( _depth > 0 );
                                    +
                                    937 }
                                    +
                                    938 
                                    +
                                    939 inline void value_iterator::assert_at_container_start() const noexcept {
                                    +
                                    940  SIMDJSON_ASSUME( _json_iter->token._position == _start_position + 1 );
                                    +
                                    941  SIMDJSON_ASSUME( _json_iter->_depth == _depth );
                                    +
                                    942  SIMDJSON_ASSUME( _depth > 0 );
                                    +
                                    943 }
                                    +
                                    944 
                                    +
                                    945 inline void value_iterator::assert_at_next() const noexcept {
                                    +
                                    946  SIMDJSON_ASSUME( _json_iter->token._position > _start_position );
                                    +
                                    947  SIMDJSON_ASSUME( _json_iter->_depth == _depth );
                                    +
                                    948  SIMDJSON_ASSUME( _depth > 0 );
                                    +
                                    949 }
                                    +
                                    950 
                                    +
                                    951 simdjson_inline void value_iterator::move_at_start() noexcept {
                                    +
                                    952  _json_iter->_depth = _depth;
                                    +
                                    953  _json_iter->token.set_position(_start_position);
                                    +
                                    954 }
                                    +
                                    955 
                                    +
                                    956 simdjson_inline void value_iterator::move_at_container_start() noexcept {
                                    +
                                    957  _json_iter->_depth = _depth;
                                    +
                                    958  _json_iter->token.set_position(_start_position + 1);
                                    +
                                    959 }
                                    +
                                    960 
                                    +
                                    961 simdjson_inline simdjson_result<bool> value_iterator::reset_array() noexcept {
                                    +
                                    962  if(error()) { return error(); }
                                    +
                                    963  move_at_container_start();
                                    +
                                    964  return started_array();
                                    +
                                    965 }
                                    +
                                    966 
                                    +
                                    967 simdjson_inline simdjson_result<bool> value_iterator::reset_object() noexcept {
                                    +
                                    968  if(error()) { return error(); }
                                    +
                                    969  move_at_container_start();
                                    +
                                    970  return started_object();
                                    +
                                    971 }
                                    +
                                    972 
                                    +
                                    973 inline void value_iterator::assert_at_child() const noexcept {
                                    +
                                    974  SIMDJSON_ASSUME( _json_iter->token._position > _start_position );
                                    +
                                    975  SIMDJSON_ASSUME( _json_iter->_depth == _depth + 1 );
                                    +
                                    976  SIMDJSON_ASSUME( _depth > 0 );
                                    +
                                    977 }
                                    +
                                    978 
                                    +
                                    979 inline void value_iterator::assert_at_root() const noexcept {
                                    +
                                    980  assert_at_start();
                                    +
                                    981  SIMDJSON_ASSUME( _depth == 1 );
                                    982 }
                                    983 
                                    -
                                    984 simdjson_inline simdjson_result<json_type> value_iterator::type() const noexcept {
                                    -
                                    985  switch (*peek_start()) {
                                    -
                                    986  case '{':
                                    -
                                    987  return json_type::object;
                                    -
                                    988  case '[':
                                    -
                                    989  return json_type::array;
                                    -
                                    990  case '"':
                                    -
                                    991  return json_type::string;
                                    -
                                    992  case 'n':
                                    -
                                    993  return json_type::null;
                                    -
                                    994  case 't': case 'f':
                                    -
                                    995  return json_type::boolean;
                                    -
                                    996  case '-':
                                    -
                                    997  case '0': case '1': case '2': case '3': case '4':
                                    -
                                    998  case '5': case '6': case '7': case '8': case '9':
                                    -
                                    999  return json_type::number;
                                    -
                                    1000  default:
                                    -
                                    1001  return TAPE_ERROR;
                                    -
                                    1002  }
                                    -
                                    1003 }
                                    -
                                    1004 
                                    -
                                    1005 simdjson_inline token_position value_iterator::start_position() const noexcept {
                                    -
                                    1006  return _start_position;
                                    -
                                    1007 }
                                    -
                                    1008 
                                    -
                                    1009 simdjson_inline token_position value_iterator::position() const noexcept {
                                    -
                                    1010  return _json_iter->position();
                                    -
                                    1011 }
                                    -
                                    1012 
                                    -
                                    1013 simdjson_inline token_position value_iterator::end_position() const noexcept {
                                    -
                                    1014  return _json_iter->end_position();
                                    -
                                    1015 }
                                    -
                                    1016 
                                    -
                                    1017 simdjson_inline token_position value_iterator::last_position() const noexcept {
                                    -
                                    1018  return _json_iter->last_position();
                                    -
                                    1019 }
                                    -
                                    1020 
                                    -
                                    1021 simdjson_inline error_code value_iterator::report_error(error_code error, const char *message) noexcept {
                                    -
                                    1022  return _json_iter->report_error(error, message);
                                    -
                                    1023 }
                                    -
                                    1024 
                                    -
                                    1025 } // namespace ondemand
                                    -
                                    1026 } // namespace SIMDJSON_IMPLEMENTATION
                                    -
                                    1027 } // namespace simdjson
                                    -
                                    1028 
                                    -
                                    1029 namespace simdjson {
                                    -
                                    1030 
                                    -
                                    1031 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::value_iterator &&value) noexcept
                                    -
                                    1032  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator>(value)) {}
                                    -
                                    1033 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator>::simdjson_result(error_code error) noexcept
                                    -
                                    1034  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator>(error) {}
                                    -
                                    1035 
                                    -
                                    1036 } // namespace simdjson
                                    -
                                    A string escaped per JSON rules, terminated with quote (").
                                    -
                                    simdjson_inline bool unsafe_is_equal(size_t length, std::string_view target) const noexcept
                                    This compares the current instance to the std::string_view target: returns true if they are byte-by-b...
                                    +
                                    984 inline void value_iterator::assert_at_non_root_start() const noexcept {
                                    +
                                    985  assert_at_start();
                                    +
                                    986  SIMDJSON_ASSUME( _depth > 1 );
                                    +
                                    987 }
                                    +
                                    988 
                                    +
                                    989 inline void value_iterator::assert_is_valid() const noexcept {
                                    +
                                    990  SIMDJSON_ASSUME( _json_iter != nullptr );
                                    +
                                    991 }
                                    +
                                    992 
                                    +
                                    993 simdjson_inline bool value_iterator::is_valid() const noexcept {
                                    +
                                    994  return _json_iter != nullptr;
                                    +
                                    995 }
                                    +
                                    996 
                                    +
                                    997 simdjson_inline simdjson_result<json_type> value_iterator::type() const noexcept {
                                    +
                                    998  switch (*peek_start()) {
                                    +
                                    999  case '{':
                                    +
                                    1000  return json_type::object;
                                    +
                                    1001  case '[':
                                    +
                                    1002  return json_type::array;
                                    +
                                    1003  case '"':
                                    +
                                    1004  return json_type::string;
                                    +
                                    1005  case 'n':
                                    +
                                    1006  return json_type::null;
                                    +
                                    1007  case 't': case 'f':
                                    +
                                    1008  return json_type::boolean;
                                    +
                                    1009  case '-':
                                    +
                                    1010  case '0': case '1': case '2': case '3': case '4':
                                    +
                                    1011  case '5': case '6': case '7': case '8': case '9':
                                    +
                                    1012  return json_type::number;
                                    +
                                    1013  default:
                                    +
                                    1014  return TAPE_ERROR;
                                    +
                                    1015  }
                                    +
                                    1016 }
                                    +
                                    1017 
                                    +
                                    1018 simdjson_inline token_position value_iterator::start_position() const noexcept {
                                    +
                                    1019  return _start_position;
                                    +
                                    1020 }
                                    +
                                    1021 
                                    +
                                    1022 simdjson_inline token_position value_iterator::position() const noexcept {
                                    +
                                    1023  return _json_iter->position();
                                    +
                                    1024 }
                                    +
                                    1025 
                                    +
                                    1026 simdjson_inline token_position value_iterator::end_position() const noexcept {
                                    +
                                    1027  return _json_iter->end_position();
                                    +
                                    1028 }
                                    +
                                    1029 
                                    +
                                    1030 simdjson_inline token_position value_iterator::last_position() const noexcept {
                                    +
                                    1031  return _json_iter->last_position();
                                    +
                                    1032 }
                                    +
                                    1033 
                                    +
                                    1034 simdjson_inline error_code value_iterator::report_error(error_code error, const char *message) noexcept {
                                    +
                                    1035  return _json_iter->report_error(error, message);
                                    +
                                    1036 }
                                    +
                                    1037 
                                    +
                                    1038 } // namespace ondemand
                                    +
                                    1039 } // namespace SIMDJSON_IMPLEMENTATION
                                    +
                                    1040 } // namespace simdjson
                                    +
                                    1041 
                                    +
                                    1042 namespace simdjson {
                                    +
                                    1043 
                                    +
                                    1044 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator>::simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::value_iterator &&value) noexcept
                                    +
                                    1045  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator>(std::forward<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator>(value)) {}
                                    +
                                    1046 simdjson_inline simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator>::simdjson_result(error_code error) noexcept
                                    +
                                    1047  : implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator>(error) {}
                                    +
                                    1048 
                                    +
                                    1049 } // namespace simdjson
                                    +
                                    1050 
                                    +
                                    1051 #endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H
                                    +
                                    A string escaped per JSON rules, terminated with quote (").
                                    +
                                    simdjson_inline bool unsafe_is_equal(size_t length, std::string_view target) const noexcept
                                    This compares the current instance to the std::string_view target: returns true if they are byte-by-b...
                                    @ object
                                    A JSON object ( { "a": 1, "b" 2, ... } )
                                    @ number
                                    A JSON number ( 1 or -2.3 or 4.5e6 ...)
                                    @ string
                                    A JSON string ( "a" or "hello world\n" ...)
                                    -
                                    int32_t depth_t
                                    Represents the depth of a JSON value (number of nested arrays/objects).
                                    Definition: ondemand.h:11
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    +
                                    int32_t depth_t
                                    Represents the depth of a JSON value (number of nested arrays/objects).
                                    Definition: base.h:18
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    error_code
                                    All possible errors returned by simdjson.
                                    Definition: error.h:17
                                    @ INCORRECT_TYPE
                                    JSON element has a different type than user expected.
                                    Definition: error.h:34
                                    @ OUT_OF_ORDER_ITERATION
                                    tried to iterate an array or object out of order
                                    Definition: error.h:43
                                    diff --git a/value__iterator_8h_source.html b/value__iterator_8h_source.html index 7071f726b..90b47461f 100644 --- a/value__iterator_8h_source.html +++ b/value__iterator_8h_source.html @@ -91,199 +91,200 @@ $(document).ready(function(){initNavTree('value__iterator_8h_source.html',''); i
                                    value_iterator.h
                                    -
                                    1 namespace simdjson {
                                    -
                                    2 namespace SIMDJSON_IMPLEMENTATION {
                                    -
                                    3 namespace ondemand {
                                    -
                                    4 
                                    -
                                    5 class document;
                                    -
                                    6 class object;
                                    -
                                    7 class array;
                                    -
                                    8 class value;
                                    -
                                    9 class raw_json_string;
                                    -
                                    10 class parser;
                                    -
                                    11 
                                    -
                                    20 class value_iterator {
                                    -
                                    21 protected:
                                    -
                                    23  json_iterator *_json_iter{};
                                    -
                                    25  depth_t _depth{};
                                    -
                                    29  token_position _start_position{};
                                    -
                                    30 
                                    -
                                    31 public:
                                    -
                                    32  simdjson_inline value_iterator() noexcept = default;
                                    -
                                    33 
                                    -
                                    37  simdjson_inline void start_document() noexcept;
                                    -
                                    38 
                                    -
                                    44  simdjson_warn_unused simdjson_inline error_code skip_child() noexcept;
                                    -
                                    45 
                                    -
                                    49  simdjson_inline bool at_end() const noexcept;
                                    -
                                    50 
                                    -
                                    54  simdjson_inline bool at_start() const noexcept;
                                    -
                                    55 
                                    -
                                    59  simdjson_inline bool is_open() const noexcept;
                                    -
                                    60 
                                    -
                                    64  simdjson_inline bool at_first_field() const noexcept;
                                    -
                                    65 
                                    -
                                    69  simdjson_inline void abandon() noexcept;
                                    -
                                    70 
                                    -
                                    74  simdjson_inline value_iterator child_value() const noexcept;
                                    -
                                    75 
                                    -
                                    79  simdjson_inline int32_t depth() const noexcept;
                                    -
                                    80 
                                    -
                                    86  simdjson_inline simdjson_result<json_type> type() const noexcept;
                                    -
                                    87 
                                    -
                                    103  simdjson_warn_unused simdjson_inline simdjson_result<bool> start_object() noexcept;
                                    -
                                    111  simdjson_warn_unused simdjson_inline simdjson_result<bool> start_root_object() noexcept;
                                    -
                                    119  simdjson_warn_unused simdjson_inline error_code check_root_object() noexcept;
                                    -
                                    129  simdjson_warn_unused simdjson_inline simdjson_result<bool> started_object() noexcept;
                                    -
                                    139  simdjson_warn_unused simdjson_inline simdjson_result<bool> started_root_object() noexcept;
                                    -
                                    140 
                                    -
                                    151  simdjson_warn_unused simdjson_inline simdjson_result<bool> has_next_field() noexcept;
                                    -
                                    152 
                                    -
                                    156  simdjson_warn_unused simdjson_inline simdjson_result<raw_json_string> field_key() noexcept;
                                    -
                                    157 
                                    -
                                    161  simdjson_warn_unused simdjson_inline error_code field_value() noexcept;
                                    -
                                    162 
                                    -
                                    179  simdjson_warn_unused simdjson_inline error_code find_field(const std::string_view key) noexcept;
                                    -
                                    180 
                                    -
                                    198  simdjson_warn_unused simdjson_inline simdjson_result<bool> find_field_raw(const std::string_view key) noexcept;
                                    -
                                    199 
                                    -
                                    218  simdjson_warn_unused simdjson_inline simdjson_result<bool> find_field_unordered_raw(const std::string_view key) noexcept;
                                    -
                                    219 
                                    -
                                    235  simdjson_warn_unused simdjson_inline simdjson_result<bool> start_array() noexcept;
                                    -
                                    243  simdjson_warn_unused simdjson_inline simdjson_result<bool> start_root_array() noexcept;
                                    -
                                    251  simdjson_warn_unused simdjson_inline error_code check_root_array() noexcept;
                                    -
                                    261  simdjson_warn_unused simdjson_inline simdjson_result<bool> started_array() noexcept;
                                    -
                                    271  simdjson_warn_unused simdjson_inline simdjson_result<bool> started_root_array() noexcept;
                                    -
                                    272 
                                    -
                                    282  simdjson_warn_unused simdjson_inline simdjson_result<bool> has_next_element() noexcept;
                                    -
                                    283 
                                    -
                                    287  simdjson_warn_unused simdjson_inline value_iterator child() const noexcept;
                                    -
                                    288 
                                    -
                                    297  simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> get_string(bool allow_replacement) noexcept;
                                    -
                                    298  simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> get_wobbly_string() noexcept;
                                    -
                                    299  simdjson_warn_unused simdjson_inline simdjson_result<raw_json_string> get_raw_json_string() noexcept;
                                    -
                                    300  simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> get_uint64() noexcept;
                                    -
                                    301  simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> get_uint64_in_string() noexcept;
                                    -
                                    302  simdjson_warn_unused simdjson_inline simdjson_result<int64_t> get_int64() noexcept;
                                    -
                                    303  simdjson_warn_unused simdjson_inline simdjson_result<int64_t> get_int64_in_string() noexcept;
                                    -
                                    304  simdjson_warn_unused simdjson_inline simdjson_result<double> get_double() noexcept;
                                    -
                                    305  simdjson_warn_unused simdjson_inline simdjson_result<double> get_double_in_string() noexcept;
                                    -
                                    306  simdjson_warn_unused simdjson_inline simdjson_result<bool> get_bool() noexcept;
                                    -
                                    307  simdjson_warn_unused simdjson_inline simdjson_result<bool> is_null() noexcept;
                                    -
                                    308  simdjson_warn_unused simdjson_inline bool is_negative() noexcept;
                                    -
                                    309  simdjson_warn_unused simdjson_inline simdjson_result<bool> is_integer() noexcept;
                                    -
                                    310  simdjson_warn_unused simdjson_inline simdjson_result<number_type> get_number_type() noexcept;
                                    -
                                    311  simdjson_warn_unused simdjson_inline simdjson_result<number> get_number() noexcept;
                                    -
                                    312 
                                    -
                                    313  simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> get_root_string(bool check_trailing, bool allow_replacement) noexcept;
                                    -
                                    314  simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> get_root_wobbly_string(bool check_trailing) noexcept;
                                    -
                                    315  simdjson_warn_unused simdjson_inline simdjson_result<raw_json_string> get_root_raw_json_string(bool check_trailing) noexcept;
                                    -
                                    316  simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> get_root_uint64(bool check_trailing) noexcept;
                                    -
                                    317  simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> get_root_uint64_in_string(bool check_trailing) noexcept;
                                    -
                                    318  simdjson_warn_unused simdjson_inline simdjson_result<int64_t> get_root_int64(bool check_trailing) noexcept;
                                    -
                                    319  simdjson_warn_unused simdjson_inline simdjson_result<int64_t> get_root_int64_in_string(bool check_trailing) noexcept;
                                    -
                                    320  simdjson_warn_unused simdjson_inline simdjson_result<double> get_root_double(bool check_trailing) noexcept;
                                    -
                                    321  simdjson_warn_unused simdjson_inline simdjson_result<double> get_root_double_in_string(bool check_trailing) noexcept;
                                    -
                                    322  simdjson_warn_unused simdjson_inline simdjson_result<bool> get_root_bool(bool check_trailing) noexcept;
                                    -
                                    323  simdjson_warn_unused simdjson_inline bool is_root_negative() noexcept;
                                    -
                                    324  simdjson_warn_unused simdjson_inline simdjson_result<bool> is_root_integer(bool check_trailing) noexcept;
                                    -
                                    325  simdjson_warn_unused simdjson_inline simdjson_result<number_type> get_root_number_type(bool check_trailing) noexcept;
                                    -
                                    326  simdjson_warn_unused simdjson_inline simdjson_result<number> get_root_number(bool check_trailing) noexcept;
                                    -
                                    327  simdjson_warn_unused simdjson_inline simdjson_result<bool> is_root_null(bool check_trailing) noexcept;
                                    -
                                    328 
                                    -
                                    329  simdjson_inline error_code error() const noexcept;
                                    -
                                    330  simdjson_inline uint8_t *&string_buf_loc() noexcept;
                                    -
                                    331  simdjson_inline const json_iterator &json_iter() const noexcept;
                                    -
                                    332  simdjson_inline json_iterator &json_iter() noexcept;
                                    -
                                    333 
                                    -
                                    334  simdjson_inline void assert_is_valid() const noexcept;
                                    -
                                    335  simdjson_inline bool is_valid() const noexcept;
                                    -
                                    336 
                                    -
                                    338 protected:
                                    -
                                    343  simdjson_inline simdjson_result<bool> reset_array() noexcept;
                                    -
                                    348  simdjson_inline simdjson_result<bool> reset_object() noexcept;
                                    -
                                    356  simdjson_inline void move_at_start() noexcept;
                                    -
                                    357 
                                    -
                                    364  simdjson_inline void move_at_container_start() noexcept;
                                    -
                                    365  /* Useful for debugging and logging purposes. */
                                    -
                                    366  inline std::string to_string() const noexcept;
                                    -
                                    367  simdjson_inline value_iterator(json_iterator *json_iter, depth_t depth, token_position start_index) noexcept;
                                    -
                                    368 
                                    -
                                    369  simdjson_inline simdjson_result<bool> parse_null(const uint8_t *json) const noexcept;
                                    -
                                    370  simdjson_inline simdjson_result<bool> parse_bool(const uint8_t *json) const noexcept;
                                    -
                                    371  simdjson_inline const uint8_t *peek_start() const noexcept;
                                    -
                                    372  simdjson_inline uint32_t peek_start_length() const noexcept;
                                    -
                                    373 
                                    -
                                    403  simdjson_inline void advance_scalar(const char *type) noexcept;
                                    -
                                    404  simdjson_inline void advance_root_scalar(const char *type) noexcept;
                                    -
                                    405  simdjson_inline void advance_non_root_scalar(const char *type) noexcept;
                                    -
                                    406 
                                    -
                                    407  simdjson_inline const uint8_t *peek_scalar(const char *type) noexcept;
                                    -
                                    408  simdjson_inline const uint8_t *peek_root_scalar(const char *type) noexcept;
                                    -
                                    409  simdjson_inline const uint8_t *peek_non_root_scalar(const char *type) noexcept;
                                    -
                                    410 
                                    +
                                    1 #ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H
                                    +
                                    2 
                                    +
                                    3 #ifndef SIMDJSON_AMALGAMATED
                                    +
                                    4 #define SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H
                                    +
                                    5 #include "simdjson/generic/ondemand/base.h"
                                    +
                                    6 #include "simdjson/generic/implementation_simdjson_result_base.h"
                                    +
                                    7 #endif // SIMDJSON_AMALGAMATED
                                    +
                                    8 
                                    +
                                    9 namespace simdjson {
                                    +
                                    10 namespace SIMDJSON_IMPLEMENTATION {
                                    +
                                    11 namespace ondemand {
                                    +
                                    12 
                                    +
                                    21 class value_iterator {
                                    +
                                    22 protected:
                                    +
                                    24  json_iterator *_json_iter{};
                                    +
                                    26  depth_t _depth{};
                                    +
                                    30  token_position _start_position{};
                                    +
                                    31 
                                    +
                                    32 public:
                                    +
                                    33  simdjson_inline value_iterator() noexcept = default;
                                    +
                                    34 
                                    +
                                    38  simdjson_inline void start_document() noexcept;
                                    +
                                    39 
                                    +
                                    45  simdjson_warn_unused simdjson_inline error_code skip_child() noexcept;
                                    +
                                    46 
                                    +
                                    50  simdjson_inline bool at_end() const noexcept;
                                    +
                                    51 
                                    +
                                    55  simdjson_inline bool at_start() const noexcept;
                                    +
                                    56 
                                    +
                                    60  simdjson_inline bool is_open() const noexcept;
                                    +
                                    61 
                                    +
                                    65  simdjson_inline bool at_first_field() const noexcept;
                                    +
                                    66 
                                    +
                                    70  simdjson_inline void abandon() noexcept;
                                    +
                                    71 
                                    +
                                    75  simdjson_inline value_iterator child_value() const noexcept;
                                    +
                                    76 
                                    +
                                    80  simdjson_inline int32_t depth() const noexcept;
                                    +
                                    81 
                                    +
                                    87  simdjson_inline simdjson_result<json_type> type() const noexcept;
                                    +
                                    88 
                                    +
                                    104  simdjson_warn_unused simdjson_inline simdjson_result<bool> start_object() noexcept;
                                    +
                                    112  simdjson_warn_unused simdjson_inline simdjson_result<bool> start_root_object() noexcept;
                                    +
                                    120  simdjson_warn_unused simdjson_inline error_code check_root_object() noexcept;
                                    +
                                    130  simdjson_warn_unused simdjson_inline simdjson_result<bool> started_object() noexcept;
                                    +
                                    140  simdjson_warn_unused simdjson_inline simdjson_result<bool> started_root_object() noexcept;
                                    +
                                    141 
                                    +
                                    152  simdjson_warn_unused simdjson_inline simdjson_result<bool> has_next_field() noexcept;
                                    +
                                    153 
                                    +
                                    157  simdjson_warn_unused simdjson_inline simdjson_result<raw_json_string> field_key() noexcept;
                                    +
                                    158 
                                    +
                                    162  simdjson_warn_unused simdjson_inline error_code field_value() noexcept;
                                    +
                                    163 
                                    +
                                    180  simdjson_warn_unused simdjson_inline error_code find_field(const std::string_view key) noexcept;
                                    +
                                    181 
                                    +
                                    199  simdjson_warn_unused simdjson_inline simdjson_result<bool> find_field_raw(const std::string_view key) noexcept;
                                    +
                                    200 
                                    +
                                    219  simdjson_warn_unused simdjson_inline simdjson_result<bool> find_field_unordered_raw(const std::string_view key) noexcept;
                                    +
                                    220 
                                    +
                                    236  simdjson_warn_unused simdjson_inline simdjson_result<bool> start_array() noexcept;
                                    +
                                    244  simdjson_warn_unused simdjson_inline simdjson_result<bool> start_root_array() noexcept;
                                    +
                                    252  simdjson_warn_unused simdjson_inline error_code check_root_array() noexcept;
                                    +
                                    262  simdjson_warn_unused simdjson_inline simdjson_result<bool> started_array() noexcept;
                                    +
                                    272  simdjson_warn_unused simdjson_inline simdjson_result<bool> started_root_array() noexcept;
                                    +
                                    273 
                                    +
                                    283  simdjson_warn_unused simdjson_inline simdjson_result<bool> has_next_element() noexcept;
                                    +
                                    284 
                                    +
                                    288  simdjson_warn_unused simdjson_inline value_iterator child() const noexcept;
                                    +
                                    289 
                                    +
                                    298  simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> get_string(bool allow_replacement) noexcept;
                                    +
                                    299  simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> get_wobbly_string() noexcept;
                                    +
                                    300  simdjson_warn_unused simdjson_inline simdjson_result<raw_json_string> get_raw_json_string() noexcept;
                                    +
                                    301  simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> get_uint64() noexcept;
                                    +
                                    302  simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> get_uint64_in_string() noexcept;
                                    +
                                    303  simdjson_warn_unused simdjson_inline simdjson_result<int64_t> get_int64() noexcept;
                                    +
                                    304  simdjson_warn_unused simdjson_inline simdjson_result<int64_t> get_int64_in_string() noexcept;
                                    +
                                    305  simdjson_warn_unused simdjson_inline simdjson_result<double> get_double() noexcept;
                                    +
                                    306  simdjson_warn_unused simdjson_inline simdjson_result<double> get_double_in_string() noexcept;
                                    +
                                    307  simdjson_warn_unused simdjson_inline simdjson_result<bool> get_bool() noexcept;
                                    +
                                    308  simdjson_warn_unused simdjson_inline simdjson_result<bool> is_null() noexcept;
                                    +
                                    309  simdjson_warn_unused simdjson_inline bool is_negative() noexcept;
                                    +
                                    310  simdjson_warn_unused simdjson_inline simdjson_result<bool> is_integer() noexcept;
                                    +
                                    311  simdjson_warn_unused simdjson_inline simdjson_result<number_type> get_number_type() noexcept;
                                    +
                                    312  simdjson_warn_unused simdjson_inline simdjson_result<number> get_number() noexcept;
                                    +
                                    313 
                                    +
                                    314  simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> get_root_string(bool check_trailing, bool allow_replacement) noexcept;
                                    +
                                    315  simdjson_warn_unused simdjson_inline simdjson_result<std::string_view> get_root_wobbly_string(bool check_trailing) noexcept;
                                    +
                                    316  simdjson_warn_unused simdjson_inline simdjson_result<raw_json_string> get_root_raw_json_string(bool check_trailing) noexcept;
                                    +
                                    317  simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> get_root_uint64(bool check_trailing) noexcept;
                                    +
                                    318  simdjson_warn_unused simdjson_inline simdjson_result<uint64_t> get_root_uint64_in_string(bool check_trailing) noexcept;
                                    +
                                    319  simdjson_warn_unused simdjson_inline simdjson_result<int64_t> get_root_int64(bool check_trailing) noexcept;
                                    +
                                    320  simdjson_warn_unused simdjson_inline simdjson_result<int64_t> get_root_int64_in_string(bool check_trailing) noexcept;
                                    +
                                    321  simdjson_warn_unused simdjson_inline simdjson_result<double> get_root_double(bool check_trailing) noexcept;
                                    +
                                    322  simdjson_warn_unused simdjson_inline simdjson_result<double> get_root_double_in_string(bool check_trailing) noexcept;
                                    +
                                    323  simdjson_warn_unused simdjson_inline simdjson_result<bool> get_root_bool(bool check_trailing) noexcept;
                                    +
                                    324  simdjson_warn_unused simdjson_inline bool is_root_negative() noexcept;
                                    +
                                    325  simdjson_warn_unused simdjson_inline simdjson_result<bool> is_root_integer(bool check_trailing) noexcept;
                                    +
                                    326  simdjson_warn_unused simdjson_inline simdjson_result<number_type> get_root_number_type(bool check_trailing) noexcept;
                                    +
                                    327  simdjson_warn_unused simdjson_inline simdjson_result<number> get_root_number(bool check_trailing) noexcept;
                                    +
                                    328  simdjson_warn_unused simdjson_inline simdjson_result<bool> is_root_null(bool check_trailing) noexcept;
                                    +
                                    329 
                                    +
                                    330  simdjson_inline error_code error() const noexcept;
                                    +
                                    331  simdjson_inline uint8_t *&string_buf_loc() noexcept;
                                    +
                                    332  simdjson_inline const json_iterator &json_iter() const noexcept;
                                    +
                                    333  simdjson_inline json_iterator &json_iter() noexcept;
                                    +
                                    334 
                                    +
                                    335  simdjson_inline void assert_is_valid() const noexcept;
                                    +
                                    336  simdjson_inline bool is_valid() const noexcept;
                                    +
                                    337 
                                    +
                                    339 protected:
                                    +
                                    344  simdjson_inline simdjson_result<bool> reset_array() noexcept;
                                    +
                                    349  simdjson_inline simdjson_result<bool> reset_object() noexcept;
                                    +
                                    357  simdjson_inline void move_at_start() noexcept;
                                    +
                                    358 
                                    +
                                    365  simdjson_inline void move_at_container_start() noexcept;
                                    +
                                    366  /* Useful for debugging and logging purposes. */
                                    +
                                    367  inline std::string to_string() const noexcept;
                                    +
                                    368  simdjson_inline value_iterator(json_iterator *json_iter, depth_t depth, token_position start_index) noexcept;
                                    +
                                    369 
                                    +
                                    370  simdjson_inline simdjson_result<bool> parse_null(const uint8_t *json) const noexcept;
                                    +
                                    371  simdjson_inline simdjson_result<bool> parse_bool(const uint8_t *json) const noexcept;
                                    +
                                    372  simdjson_inline const uint8_t *peek_start() const noexcept;
                                    +
                                    373  simdjson_inline uint32_t peek_start_length() const noexcept;
                                    +
                                    374 
                                    +
                                    404  simdjson_inline void advance_scalar(const char *type) noexcept;
                                    +
                                    405  simdjson_inline void advance_root_scalar(const char *type) noexcept;
                                    +
                                    406  simdjson_inline void advance_non_root_scalar(const char *type) noexcept;
                                    +
                                    407 
                                    +
                                    408  simdjson_inline const uint8_t *peek_scalar(const char *type) noexcept;
                                    +
                                    409  simdjson_inline const uint8_t *peek_root_scalar(const char *type) noexcept;
                                    +
                                    410  simdjson_inline const uint8_t *peek_non_root_scalar(const char *type) noexcept;
                                    411 
                                    -
                                    412  simdjson_inline error_code start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept;
                                    -
                                    413  simdjson_inline error_code end_container() noexcept;
                                    -
                                    414 
                                    -
                                    421  simdjson_inline simdjson_result<const uint8_t *> advance_to_value() noexcept;
                                    -
                                    422 
                                    -
                                    423  simdjson_inline error_code incorrect_type_error(const char *message) const noexcept;
                                    -
                                    424  simdjson_inline error_code error_unless_more_tokens(uint32_t tokens=1) const noexcept;
                                    -
                                    425 
                                    -
                                    426  simdjson_inline bool is_at_start() const noexcept;
                                    -
                                    433  simdjson_inline bool is_at_iterator_start() const noexcept;
                                    -
                                    434 
                                    -
                                    442  simdjson_inline bool is_at_key() const noexcept;
                                    -
                                    443 
                                    -
                                    444  inline void assert_at_start() const noexcept;
                                    -
                                    445  inline void assert_at_container_start() const noexcept;
                                    -
                                    446  inline void assert_at_root() const noexcept;
                                    -
                                    447  inline void assert_at_child() const noexcept;
                                    -
                                    448  inline void assert_at_next() const noexcept;
                                    -
                                    449  inline void assert_at_non_root_start() const noexcept;
                                    -
                                    450 
                                    -
                                    452  simdjson_inline token_position start_position() const noexcept;
                                    -
                                    453 
                                    -
                                    455  simdjson_inline token_position position() const noexcept;
                                    -
                                    457  simdjson_inline token_position last_position() const noexcept;
                                    -
                                    459  simdjson_inline token_position end_position() const noexcept;
                                    -
                                    461  simdjson_inline error_code report_error(error_code error, const char *message) noexcept;
                                    -
                                    462 
                                    -
                                    463  friend class document;
                                    -
                                    464  friend class object;
                                    -
                                    465  friend class array;
                                    -
                                    466  friend class value;
                                    -
                                    467 }; // value_iterator
                                    -
                                    468 
                                    -
                                    469 } // namespace ondemand
                                    -
                                    470 } // namespace SIMDJSON_IMPLEMENTATION
                                    -
                                    471 } // namespace simdjson
                                    -
                                    472 
                                    -
                                    473 namespace simdjson {
                                    -
                                    474 
                                    -
                                    475 template<>
                                    -
                                    476 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator> {
                                    -
                                    477 public:
                                    -
                                    478  simdjson_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::value_iterator &&value) noexcept;
                                    -
                                    479  simdjson_inline simdjson_result(error_code error) noexcept;
                                    -
                                    480  simdjson_inline simdjson_result() noexcept = default;
                                    -
                                    481 };
                                    -
                                    482 
                                    -
                                    483 } // namespace simdjson
                                    - - -
                                    A string escaped per JSON rules, terminated with quote (").
                                    -
                                    An ephemeral JSON value returned during iteration.
                                    Definition: value.h:17
                                    -
                                    json_type
                                    The type of a JSON value.
                                    Definition: json_type.h:7
                                    -
                                    @ object
                                    A JSON object ( { "a": 1, "b" 2, ... } )
                                    - -
                                    int32_t depth_t
                                    Represents the depth of a JSON value (number of nested arrays/objects).
                                    Definition: ondemand.h:11
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    +
                                    412 
                                    +
                                    413  simdjson_inline error_code start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept;
                                    +
                                    414  simdjson_inline error_code end_container() noexcept;
                                    +
                                    415 
                                    +
                                    422  simdjson_inline simdjson_result<const uint8_t *> advance_to_value() noexcept;
                                    +
                                    423 
                                    +
                                    424  simdjson_inline error_code incorrect_type_error(const char *message) const noexcept;
                                    +
                                    425  simdjson_inline error_code error_unless_more_tokens(uint32_t tokens=1) const noexcept;
                                    +
                                    426 
                                    +
                                    427  simdjson_inline bool is_at_start() const noexcept;
                                    +
                                    434  simdjson_inline bool is_at_iterator_start() const noexcept;
                                    +
                                    435 
                                    +
                                    443  simdjson_inline bool is_at_key() const noexcept;
                                    +
                                    444 
                                    +
                                    445  inline void assert_at_start() const noexcept;
                                    +
                                    446  inline void assert_at_container_start() const noexcept;
                                    +
                                    447  inline void assert_at_root() const noexcept;
                                    +
                                    448  inline void assert_at_child() const noexcept;
                                    +
                                    449  inline void assert_at_next() const noexcept;
                                    +
                                    450  inline void assert_at_non_root_start() const noexcept;
                                    +
                                    451 
                                    +
                                    453  simdjson_inline token_position start_position() const noexcept;
                                    +
                                    454 
                                    +
                                    456  simdjson_inline token_position position() const noexcept;
                                    +
                                    458  simdjson_inline token_position last_position() const noexcept;
                                    +
                                    460  simdjson_inline token_position end_position() const noexcept;
                                    +
                                    462  simdjson_inline error_code report_error(error_code error, const char *message) noexcept;
                                    +
                                    463 
                                    +
                                    464  friend class document;
                                    +
                                    465  friend class object;
                                    +
                                    466  friend class array;
                                    +
                                    467  friend class value;
                                    +
                                    468 }; // value_iterator
                                    +
                                    469 
                                    +
                                    470 } // namespace ondemand
                                    +
                                    471 } // namespace SIMDJSON_IMPLEMENTATION
                                    +
                                    472 } // namespace simdjson
                                    +
                                    473 
                                    +
                                    474 namespace simdjson {
                                    +
                                    475 
                                    +
                                    476 template<>
                                    +
                                    477 struct simdjson_result<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator> : public SIMDJSON_IMPLEMENTATION::implementation_simdjson_result_base<SIMDJSON_IMPLEMENTATION::ondemand::value_iterator> {
                                    +
                                    478 public:
                                    +
                                    479  simdjson_inline simdjson_result(SIMDJSON_IMPLEMENTATION::ondemand::value_iterator &&value) noexcept;
                                    +
                                    480  simdjson_inline simdjson_result(error_code error) noexcept;
                                    +
                                    481  simdjson_inline simdjson_result() noexcept = default;
                                    +
                                    482 };
                                    +
                                    483 
                                    +
                                    484 } // namespace simdjson
                                    +
                                    485 
                                    +
                                    486 #endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H
                                    + + +
                                    A string escaped per JSON rules, terminated with quote (").
                                    +
                                    An ephemeral JSON value returned during iteration.
                                    Definition: value.h:18
                                    +
                                    json_type
                                    The type of a JSON value.
                                    Definition: json_type.h:17
                                    +
                                    int32_t depth_t
                                    Represents the depth of a JSON value (number of nested arrays/objects).
                                    Definition: base.h:18
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    error_code
                                    All possible errors returned by simdjson.
                                    Definition: error.h:17
                                    -
                                    std::string to_string(T x)
                                    Converts JSON to a string.
                                    - -
                                    A type representing a JSON number.
                                    Definition: json_type.h:24
                                    +
                                    std::string to_string(T x)
                                    Converts JSON to a string.
                                    + +
                                    A type representing a JSON number.
                                    Definition: json_type.h:32
                                    The result of a simdjson operation that could fail.
                                    Definition: error.h:205
                                    diff --git a/westmere_2numberparsing_8h_source.html b/westmere_2base_8h_source.html similarity index 65% rename from westmere_2numberparsing_8h_source.html rename to westmere_2base_8h_source.html index 0dd699380..49a8d73b0 100644 --- a/westmere_2numberparsing_8h_source.html +++ b/westmere_2base_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/westmere/numberparsing.h Source File +simdjson: include/simdjson/westmere/base.h Source File @@ -68,7 +68,7 @@ $(function() {
                                    @@ -88,50 +88,47 @@ $(document).ready(function(){initNavTree('westmere_2numberparsing_8h_source.html
                                    -
                                    numberparsing.h
                                    +
                                    base.h
                                    -
                                    1 #ifndef SIMDJSON_WESTMERE_NUMBERPARSING_H
                                    -
                                    2 #define SIMDJSON_WESTMERE_NUMBERPARSING_H
                                    +
                                    1 #ifndef SIMDJSON_WESTMERE_BASE_H
                                    +
                                    2 #define SIMDJSON_WESTMERE_BASE_H
                                    3 
                                    -
                                    4 namespace simdjson {
                                    -
                                    5 namespace SIMDJSON_IMPLEMENTATION {
                                    -
                                    6 namespace numberparsing {
                                    +
                                    4 #ifndef SIMDJSON_AMALGAMATED
                                    +
                                    5 #include "simdjson/base.h"
                                    +
                                    6 #endif // SIMDJSON_AMALGAMATED
                                    7 
                                    -
                                    9 static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) {
                                    -
                                    10  // this actually computes *16* values so we are being wasteful.
                                    -
                                    11  const __m128i ascii0 = _mm_set1_epi8('0');
                                    -
                                    12  const __m128i mul_1_10 =
                                    -
                                    13  _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1);
                                    -
                                    14  const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1);
                                    -
                                    15  const __m128i mul_1_10000 =
                                    -
                                    16  _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1);
                                    -
                                    17  const __m128i input = _mm_sub_epi8(
                                    -
                                    18  _mm_loadu_si128(reinterpret_cast<const __m128i *>(chars)), ascii0);
                                    -
                                    19  const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10);
                                    -
                                    20  const __m128i t2 = _mm_madd_epi16(t1, mul_1_100);
                                    -
                                    21  const __m128i t3 = _mm_packus_epi32(t2, t2);
                                    -
                                    22  const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000);
                                    -
                                    23  return _mm_cvtsi128_si32(
                                    -
                                    24  t4); // only captures the sum of the first 8 digits, drop the rest
                                    -
                                    25 }
                                    +
                                    8 // The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE
                                    +
                                    9 namespace simdjson {
                                    +
                                    13 namespace westmere {
                                    +
                                    14 
                                    +
                                    15 class implementation;
                                    +
                                    16 
                                    +
                                    17 namespace {
                                    +
                                    18 namespace simd {
                                    +
                                    19 template <typename T> struct simd8;
                                    +
                                    20 template <typename T> struct simd8x64;
                                    +
                                    21 } // namespace simd
                                    +
                                    22 } // unnamed namespace
                                    +
                                    23 
                                    +
                                    24 } // namespace westmere
                                    +
                                    25 } // namespace simdjson
                                    26 
                                    -
                                    27 } // namespace numberparsing
                                    -
                                    28 } // namespace SIMDJSON_IMPLEMENTATION
                                    -
                                    29 } // namespace simdjson
                                    -
                                    30 
                                    -
                                    31 #define SIMDJSON_SWAR_NUMBER_PARSING 1
                                    -
                                    32 
                                    -
                                    33 #include "simdjson/generic/numberparsing.h"
                                    -
                                    34 
                                    -
                                    35 #endif // SIMDJSON_WESTMERE_NUMBERPARSING_H
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    +
                                    27 #ifndef SIMDJSON_AMALGAMATED
                                    +
                                    28 // If we're editing one of the files in this directory, begin the implementation!
                                    +
                                    29 #ifndef SIMDJSON_IMPLEMENTATION
                                    +
                                    30 #include "simdjson/westmere/begin.h"
                                    +
                                    31 #endif
                                    +
                                    32 #endif // SIMDJSON_AMALGAMATED
                                    +
                                    33 
                                    +
                                    34 #endif // SIMDJSON_WESTMERE_BASE_H
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    diff --git a/westmere_2begin_8h_source.html b/westmere_2begin_8h_source.html index 83677bf7a..745d18e3b 100644 --- a/westmere_2begin_8h_source.html +++ b/westmere_2begin_8h_source.html @@ -92,7 +92,18 @@ $(document).ready(function(){initNavTree('westmere_2begin_8h_source.html',''); i
                                    1 #define SIMDJSON_IMPLEMENTATION westmere
                                    -
                                    2 SIMDJSON_TARGET_WESTMERE
                                    +
                                    2 #include "simdjson/westmere/base.h"
                                    +
                                    3 #include "simdjson/westmere/intrinsics.h"
                                    +
                                    4 
                                    +
                                    5 #if !SIMDJSON_CAN_ALWAYS_RUN_WESTMERE
                                    +
                                    6 SIMDJSON_TARGET_REGION("sse4.2,pclmul,popcnt")
                                    +
                                    7 #endif
                                    +
                                    8 
                                    +
                                    9 #include "simdjson/westmere/bitmanipulation.h"
                                    +
                                    10 #include "simdjson/westmere/bitmask.h"
                                    +
                                    11 #include "simdjson/westmere/numberparsing_defs.h"
                                    +
                                    12 #include "simdjson/westmere/simd.h"
                                    +
                                    13 #include "simdjson/westmere/stringparsing_defs.h"
                                    diff --git a/westmere_2bitmanipulation_8h_source.html b/westmere_2bitmanipulation_8h_source.html index 21cc367ec..28750b46d 100644 --- a/westmere_2bitmanipulation_8h_source.html +++ b/westmere_2bitmanipulation_8h_source.html @@ -94,78 +94,80 @@ $(document).ready(function(){initNavTree('westmere_2bitmanipulation_8h_source.ht
                                    1 #ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H
                                    2 #define SIMDJSON_WESTMERE_BITMANIPULATION_H
                                    3 
                                    -
                                    4 namespace simdjson {
                                    -
                                    5 namespace SIMDJSON_IMPLEMENTATION {
                                    -
                                    6 namespace {
                                    -
                                    7 
                                    -
                                    8 // We sometimes call trailing_zero on inputs that are zero,
                                    -
                                    9 // but the algorithms do not end up using the returned value.
                                    -
                                    10 // Sadly, sanitizers are not smart enough to figure it out.
                                    -
                                    11 SIMDJSON_NO_SANITIZE_UNDEFINED
                                    -
                                    12 // This function can be used safely even if not all bytes have been
                                    -
                                    13 // initialized.
                                    -
                                    14 // See issue https://github.com/simdjson/simdjson/issues/1965
                                    -
                                    15 SIMDJSON_NO_SANITIZE_MEMORY
                                    -
                                    16 simdjson_inline int trailing_zeroes(uint64_t input_num) {
                                    -
                                    17 #if SIMDJSON_REGULAR_VISUAL_STUDIO
                                    -
                                    18  unsigned long ret;
                                    -
                                    19  // Search the mask data from least significant bit (LSB)
                                    -
                                    20  // to the most significant bit (MSB) for a set bit (1).
                                    -
                                    21  _BitScanForward64(&ret, input_num);
                                    -
                                    22  return (int)ret;
                                    -
                                    23 #else // SIMDJSON_REGULAR_VISUAL_STUDIO
                                    -
                                    24  return __builtin_ctzll(input_num);
                                    -
                                    25 #endif // SIMDJSON_REGULAR_VISUAL_STUDIO
                                    -
                                    26 }
                                    -
                                    27 
                                    -
                                    28 /* result might be undefined when input_num is zero */
                                    -
                                    29 simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) {
                                    -
                                    30  return input_num & (input_num-1);
                                    -
                                    31 }
                                    -
                                    32 
                                    -
                                    33 /* result might be undefined when input_num is zero */
                                    -
                                    34 simdjson_inline int leading_zeroes(uint64_t input_num) {
                                    -
                                    35 #if SIMDJSON_REGULAR_VISUAL_STUDIO
                                    -
                                    36  unsigned long leading_zero = 0;
                                    -
                                    37  // Search the mask data from most significant bit (MSB)
                                    -
                                    38  // to least significant bit (LSB) for a set bit (1).
                                    -
                                    39  if (_BitScanReverse64(&leading_zero, input_num))
                                    -
                                    40  return (int)(63 - leading_zero);
                                    -
                                    41  else
                                    -
                                    42  return 64;
                                    -
                                    43 #else
                                    -
                                    44  return __builtin_clzll(input_num);
                                    -
                                    45 #endif// SIMDJSON_REGULAR_VISUAL_STUDIO
                                    -
                                    46 }
                                    -
                                    47 
                                    -
                                    48 #if SIMDJSON_REGULAR_VISUAL_STUDIO
                                    -
                                    49 simdjson_inline unsigned __int64 count_ones(uint64_t input_num) {
                                    -
                                    50  // note: we do not support legacy 32-bit Windows
                                    -
                                    51  return __popcnt64(input_num);// Visual Studio wants two underscores
                                    -
                                    52 }
                                    -
                                    53 #else
                                    -
                                    54 simdjson_inline long long int count_ones(uint64_t input_num) {
                                    -
                                    55  return _popcnt64(input_num);
                                    -
                                    56 }
                                    -
                                    57 #endif
                                    -
                                    58 
                                    -
                                    59 simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2,
                                    -
                                    60  uint64_t *result) {
                                    -
                                    61 #if SIMDJSON_REGULAR_VISUAL_STUDIO
                                    -
                                    62  return _addcarry_u64(0, value1, value2,
                                    -
                                    63  reinterpret_cast<unsigned __int64 *>(result));
                                    -
                                    64 #else
                                    -
                                    65  return __builtin_uaddll_overflow(value1, value2,
                                    -
                                    66  reinterpret_cast<unsigned long long *>(result));
                                    -
                                    67 #endif
                                    -
                                    68 }
                                    -
                                    69 
                                    -
                                    70 } // unnamed namespace
                                    -
                                    71 } // namespace SIMDJSON_IMPLEMENTATION
                                    -
                                    72 } // namespace simdjson
                                    -
                                    73 
                                    -
                                    74 #endif // SIMDJSON_WESTMERE_BITMANIPULATION_H
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    +
                                    4 #include "simdjson/westmere/base.h"
                                    +
                                    5 
                                    +
                                    6 namespace simdjson {
                                    +
                                    7 namespace SIMDJSON_IMPLEMENTATION {
                                    +
                                    8 namespace {
                                    +
                                    9 
                                    +
                                    10 // We sometimes call trailing_zero on inputs that are zero,
                                    +
                                    11 // but the algorithms do not end up using the returned value.
                                    +
                                    12 // Sadly, sanitizers are not smart enough to figure it out.
                                    +
                                    13 SIMDJSON_NO_SANITIZE_UNDEFINED
                                    +
                                    14 // This function can be used safely even if not all bytes have been
                                    +
                                    15 // initialized.
                                    +
                                    16 // See issue https://github.com/simdjson/simdjson/issues/1965
                                    +
                                    17 SIMDJSON_NO_SANITIZE_MEMORY
                                    +
                                    18 simdjson_inline int trailing_zeroes(uint64_t input_num) {
                                    +
                                    19 #if SIMDJSON_REGULAR_VISUAL_STUDIO
                                    +
                                    20  unsigned long ret;
                                    +
                                    21  // Search the mask data from least significant bit (LSB)
                                    +
                                    22  // to the most significant bit (MSB) for a set bit (1).
                                    +
                                    23  _BitScanForward64(&ret, input_num);
                                    +
                                    24  return (int)ret;
                                    +
                                    25 #else // SIMDJSON_REGULAR_VISUAL_STUDIO
                                    +
                                    26  return __builtin_ctzll(input_num);
                                    +
                                    27 #endif // SIMDJSON_REGULAR_VISUAL_STUDIO
                                    +
                                    28 }
                                    +
                                    29 
                                    +
                                    30 /* result might be undefined when input_num is zero */
                                    +
                                    31 simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) {
                                    +
                                    32  return input_num & (input_num-1);
                                    +
                                    33 }
                                    +
                                    34 
                                    +
                                    35 /* result might be undefined when input_num is zero */
                                    +
                                    36 simdjson_inline int leading_zeroes(uint64_t input_num) {
                                    +
                                    37 #if SIMDJSON_REGULAR_VISUAL_STUDIO
                                    +
                                    38  unsigned long leading_zero = 0;
                                    +
                                    39  // Search the mask data from most significant bit (MSB)
                                    +
                                    40  // to least significant bit (LSB) for a set bit (1).
                                    +
                                    41  if (_BitScanReverse64(&leading_zero, input_num))
                                    +
                                    42  return (int)(63 - leading_zero);
                                    +
                                    43  else
                                    +
                                    44  return 64;
                                    +
                                    45 #else
                                    +
                                    46  return __builtin_clzll(input_num);
                                    +
                                    47 #endif// SIMDJSON_REGULAR_VISUAL_STUDIO
                                    +
                                    48 }
                                    +
                                    49 
                                    +
                                    50 #if SIMDJSON_REGULAR_VISUAL_STUDIO
                                    +
                                    51 simdjson_inline unsigned __int64 count_ones(uint64_t input_num) {
                                    +
                                    52  // note: we do not support legacy 32-bit Windows
                                    +
                                    53  return __popcnt64(input_num);// Visual Studio wants two underscores
                                    +
                                    54 }
                                    +
                                    55 #else
                                    +
                                    56 simdjson_inline long long int count_ones(uint64_t input_num) {
                                    +
                                    57  return _popcnt64(input_num);
                                    +
                                    58 }
                                    +
                                    59 #endif
                                    +
                                    60 
                                    +
                                    61 simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2,
                                    +
                                    62  uint64_t *result) {
                                    +
                                    63 #if SIMDJSON_REGULAR_VISUAL_STUDIO
                                    +
                                    64  return _addcarry_u64(0, value1, value2,
                                    +
                                    65  reinterpret_cast<unsigned __int64 *>(result));
                                    +
                                    66 #else
                                    +
                                    67  return __builtin_uaddll_overflow(value1, value2,
                                    +
                                    68  reinterpret_cast<unsigned long long *>(result));
                                    +
                                    69 #endif
                                    +
                                    70 }
                                    +
                                    71 
                                    +
                                    72 } // unnamed namespace
                                    +
                                    73 } // namespace SIMDJSON_IMPLEMENTATION
                                    +
                                    74 } // namespace simdjson
                                    +
                                    75 
                                    +
                                    76 #endif // SIMDJSON_WESTMERE_BITMANIPULATION_H
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    diff --git a/westmere_2bitmask_8h_source.html b/westmere_2bitmask_8h_source.html index 71adb19ff..90ac3f661 100644 --- a/westmere_2bitmask_8h_source.html +++ b/westmere_2bitmask_8h_source.html @@ -94,29 +94,31 @@ $(document).ready(function(){initNavTree('westmere_2bitmask_8h_source.html','');
                                    1 #ifndef SIMDJSON_WESTMERE_BITMASK_H
                                    2 #define SIMDJSON_WESTMERE_BITMASK_H
                                    3 
                                    -
                                    4 namespace simdjson {
                                    -
                                    5 namespace SIMDJSON_IMPLEMENTATION {
                                    -
                                    6 namespace {
                                    -
                                    7 
                                    -
                                    8 //
                                    -
                                    9 // Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered.
                                    +
                                    4 #include "simdjson/westmere/base.h"
                                    +
                                    5 
                                    +
                                    6 namespace simdjson {
                                    +
                                    7 namespace SIMDJSON_IMPLEMENTATION {
                                    +
                                    8 namespace {
                                    +
                                    9 
                                    10 //
                                    -
                                    11 // For example, prefix_xor(00100100) == 00011100
                                    +
                                    11 // Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered.
                                    12 //
                                    -
                                    13 simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) {
                                    -
                                    14  // There should be no such thing with a processing supporting avx2
                                    -
                                    15  // but not clmul.
                                    -
                                    16  __m128i all_ones = _mm_set1_epi8('\xFF');
                                    -
                                    17  __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0);
                                    -
                                    18  return _mm_cvtsi128_si64(result);
                                    -
                                    19 }
                                    -
                                    20 
                                    -
                                    21 } // unnamed namespace
                                    -
                                    22 } // namespace SIMDJSON_IMPLEMENTATION
                                    -
                                    23 } // namespace simdjson
                                    -
                                    24 
                                    -
                                    25 #endif // SIMDJSON_WESTMERE_BITMASK_H
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    +
                                    13 // For example, prefix_xor(00100100) == 00011100
                                    +
                                    14 //
                                    +
                                    15 simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) {
                                    +
                                    16  // There should be no such thing with a processing supporting avx2
                                    +
                                    17  // but not clmul.
                                    +
                                    18  __m128i all_ones = _mm_set1_epi8('\xFF');
                                    +
                                    19  __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0);
                                    +
                                    20  return _mm_cvtsi128_si64(result);
                                    +
                                    21 }
                                    +
                                    22 
                                    +
                                    23 } // unnamed namespace
                                    +
                                    24 } // namespace SIMDJSON_IMPLEMENTATION
                                    +
                                    25 } // namespace simdjson
                                    +
                                    26 
                                    +
                                    27 #endif // SIMDJSON_WESTMERE_BITMASK_H
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    diff --git a/westmere_2end_8h_source.html b/westmere_2end_8h_source.html index f385af599..644ed342d 100644 --- a/westmere_2end_8h_source.html +++ b/westmere_2end_8h_source.html @@ -91,8 +91,13 @@ $(document).ready(function(){initNavTree('westmere_2end_8h_source.html',''); ini
                                    end.h
                                    -
                                    1 SIMDJSON_UNTARGET_WESTMERE
                                    -
                                    2 #undef SIMDJSON_IMPLEMENTATION
                                    +
                                    1 #include "simdjson/westmere/base.h"
                                    +
                                    2 
                                    +
                                    3 #if !SIMDJSON_CAN_ALWAYS_RUN_WESTMERE
                                    +
                                    4 SIMDJSON_UNTARGET_REGION
                                    +
                                    5 #endif
                                    +
                                    6 
                                    +
                                    7 #undef SIMDJSON_IMPLEMENTATION
                                    diff --git a/westmere_2implementation_8h_source.html b/westmere_2implementation_8h_source.html index 8dc4e7507..3ad9fa02a 100644 --- a/westmere_2implementation_8h_source.html +++ b/westmere_2implementation_8h_source.html @@ -94,38 +94,35 @@ $(document).ready(function(){initNavTree('westmere_2implementation_8h_source.htm
                                    1 #ifndef SIMDJSON_WESTMERE_IMPLEMENTATION_H
                                    2 #define SIMDJSON_WESTMERE_IMPLEMENTATION_H
                                    3 
                                    -
                                    4 #include "simdjson/implementation.h"
                                    -
                                    5 
                                    -
                                    6 // The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE
                                    -
                                    7 namespace simdjson {
                                    -
                                    8 namespace westmere {
                                    -
                                    9 
                                    -
                                    10 namespace {
                                    -
                                    11 using namespace simdjson;
                                    -
                                    12 using namespace simdjson::dom;
                                    -
                                    13 }
                                    -
                                    14 
                                    -
                                    18 class implementation final : public simdjson::implementation {
                                    -
                                    19 public:
                                    -
                                    20  simdjson_inline implementation() : simdjson::implementation("westmere", "Intel/AMD SSE4.2", internal::instruction_set::SSE42 | internal::instruction_set::PCLMULQDQ) {}
                                    -
                                    21  simdjson_warn_unused error_code create_dom_parser_implementation(
                                    -
                                    22  size_t capacity,
                                    -
                                    23  size_t max_length,
                                    -
                                    24  std::unique_ptr<internal::dom_parser_implementation>& dst
                                    -
                                    25  ) const noexcept final;
                                    -
                                    26  simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final;
                                    -
                                    27  simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final;
                                    -
                                    28 };
                                    +
                                    4 #include "simdjson/base.h"
                                    +
                                    5 #include "simdjson/implementation.h"
                                    +
                                    6 #include "simdjson/internal/instruction_set.h"
                                    +
                                    7 
                                    +
                                    8 // The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE
                                    +
                                    9 namespace simdjson {
                                    +
                                    10 namespace westmere {
                                    +
                                    11 
                                    +
                                    15 class implementation final : public simdjson::implementation {
                                    +
                                    16 public:
                                    +
                                    17  simdjson_inline implementation() : simdjson::implementation("westmere", "Intel/AMD SSE4.2", internal::instruction_set::SSE42 | internal::instruction_set::PCLMULQDQ) {}
                                    +
                                    18  simdjson_warn_unused error_code create_dom_parser_implementation(
                                    +
                                    19  size_t capacity,
                                    +
                                    20  size_t max_length,
                                    +
                                    21  std::unique_ptr<internal::dom_parser_implementation>& dst
                                    +
                                    22  ) const noexcept final;
                                    +
                                    23  simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final;
                                    +
                                    24  simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final;
                                    +
                                    25 };
                                    +
                                    26 
                                    +
                                    27 } // namespace westmere
                                    +
                                    28 } // namespace simdjson
                                    29 
                                    -
                                    30 } // namespace westmere
                                    -
                                    31 } // namespace simdjson
                                    -
                                    32 
                                    -
                                    33 #endif // SIMDJSON_WESTMERE_IMPLEMENTATION_H
                                    -
                                    An implementation of simdjson for a particular CPU architecture.
                                    -
                                    virtual simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept=0
                                    Validate the UTF-8 string.
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    +
                                    30 #endif // SIMDJSON_WESTMERE_IMPLEMENTATION_H
                                    +
                                    An implementation of simdjson for a particular CPU architecture.
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    +
                                    simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) noexcept
                                    Validate the UTF-8 string.
                                    error_code
                                    All possible errors returned by simdjson.
                                    Definition: error.h:17
                                    -
                                    std::string minify(T x)
                                    Minifies a JSON element or document, printing the smallest possible valid JSON.
                                    +
                                    std::string minify(T x)
                                    Minifies a JSON element or document, printing the smallest possible valid JSON.
                                    diff --git a/westmere_2intrinsics_8h_source.html b/westmere_2intrinsics_8h_source.html index 25cfaecb3..7d1b58d64 100644 --- a/westmere_2intrinsics_8h_source.html +++ b/westmere_2intrinsics_8h_source.html @@ -94,23 +94,25 @@ $(document).ready(function(){initNavTree('westmere_2intrinsics_8h_source.html','
                                    1 #ifndef SIMDJSON_WESTMERE_INTRINSICS_H
                                    2 #define SIMDJSON_WESTMERE_INTRINSICS_H
                                    3 
                                    -
                                    4 #if SIMDJSON_VISUAL_STUDIO
                                    -
                                    5 // under clang within visual studio, this will include <x86intrin.h>
                                    -
                                    6 #include <intrin.h> // visual studio or clang
                                    -
                                    7 #else
                                    -
                                    8 #include <x86intrin.h> // elsewhere
                                    -
                                    9 #endif // SIMDJSON_VISUAL_STUDIO
                                    -
                                    10 
                                    -
                                    11 
                                    -
                                    12 #if SIMDJSON_CLANG_VISUAL_STUDIO
                                    -
                                    21 #include <smmintrin.h> // for _mm_alignr_epi8
                                    -
                                    22 #include <wmmintrin.h> // for _mm_clmulepi64_si128
                                    -
                                    23 #endif
                                    -
                                    24 
                                    -
                                    25 static_assert(sizeof(__m128i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for westmere");
                                    +
                                    4 #include "simdjson/westmere/base.h"
                                    +
                                    5 
                                    +
                                    6 #if SIMDJSON_VISUAL_STUDIO
                                    +
                                    7 // under clang within visual studio, this will include <x86intrin.h>
                                    +
                                    8 #include <intrin.h> // visual studio or clang
                                    +
                                    9 #else
                                    +
                                    10 #include <x86intrin.h> // elsewhere
                                    +
                                    11 #endif // SIMDJSON_VISUAL_STUDIO
                                    +
                                    12 
                                    +
                                    13 
                                    +
                                    14 #if SIMDJSON_CLANG_VISUAL_STUDIO
                                    +
                                    23 #include <smmintrin.h> // for _mm_alignr_epi8
                                    +
                                    24 #include <wmmintrin.h> // for _mm_clmulepi64_si128
                                    +
                                    25 #endif
                                    26 
                                    -
                                    27 #endif // SIMDJSON_WESTMERE_INTRINSICS_H
                                    -
                                    constexpr size_t SIMDJSON_PADDING
                                    The amount of padding needed in a buffer to parse JSON.
                                    Definition: common_defs.h:45
                                    +
                                    27 static_assert(sizeof(__m128i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for westmere");
                                    +
                                    28 
                                    +
                                    29 #endif // SIMDJSON_WESTMERE_INTRINSICS_H
                                    +
                                    constexpr size_t SIMDJSON_PADDING
                                    The amount of padding needed in a buffer to parse JSON.
                                    Definition: base.h:30
                                    diff --git a/westmere_2numberparsing__defs_8h_source.html b/westmere_2numberparsing__defs_8h_source.html new file mode 100644 index 000000000..1d799174c --- /dev/null +++ b/westmere_2numberparsing__defs_8h_source.html @@ -0,0 +1,162 @@ + + + + + + + +simdjson: include/simdjson/westmere/numberparsing_defs.h Source File + + + + + + + + + + + + + + + + +
                                    +
                                    + + + + + + + +
                                    +
                                    simdjson +  3.2.1 +
                                    +
                                    Ridiculously Fast JSON
                                    +
                                    +
                                    + + + + + + + +
                                    +
                                    + +
                                    +
                                    +
                                    + +
                                    + +
                                    +
                                    + + +
                                    + +
                                    + +
                                    +
                                    +
                                    numberparsing_defs.h
                                    +
                                    +
                                    +
                                    1 #ifndef SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H
                                    +
                                    2 #define SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H
                                    +
                                    3 
                                    +
                                    4 #include "simdjson/westmere/base.h"
                                    +
                                    5 #include "simdjson/westmere/intrinsics.h"
                                    +
                                    6 
                                    +
                                    7 #ifndef SIMDJSON_AMALGAMATED
                                    +
                                    8 #include "simdjson/internal/numberparsing_tables.h"
                                    +
                                    9 #endif // SIMDJSON_AMALGAMATED
                                    +
                                    10 
                                    +
                                    11 namespace simdjson {
                                    +
                                    12 namespace SIMDJSON_IMPLEMENTATION {
                                    +
                                    13 namespace numberparsing {
                                    +
                                    14 
                                    +
                                    16 static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) {
                                    +
                                    17  // this actually computes *16* values so we are being wasteful.
                                    +
                                    18  const __m128i ascii0 = _mm_set1_epi8('0');
                                    +
                                    19  const __m128i mul_1_10 =
                                    +
                                    20  _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1);
                                    +
                                    21  const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1);
                                    +
                                    22  const __m128i mul_1_10000 =
                                    +
                                    23  _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1);
                                    +
                                    24  const __m128i input = _mm_sub_epi8(
                                    +
                                    25  _mm_loadu_si128(reinterpret_cast<const __m128i *>(chars)), ascii0);
                                    +
                                    26  const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10);
                                    +
                                    27  const __m128i t2 = _mm_madd_epi16(t1, mul_1_100);
                                    +
                                    28  const __m128i t3 = _mm_packus_epi32(t2, t2);
                                    +
                                    29  const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000);
                                    +
                                    30  return _mm_cvtsi128_si32(
                                    +
                                    31  t4); // only captures the sum of the first 8 digits, drop the rest
                                    +
                                    32 }
                                    +
                                    33 
                                    +
                                    35 simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) {
                                    +
                                    36  internal::value128 answer;
                                    +
                                    37 #if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
                                    +
                                    38 #ifdef _M_ARM64
                                    +
                                    39  // ARM64 has native support for 64-bit multiplications, no need to emultate
                                    +
                                    40  answer.high = __umulh(value1, value2);
                                    +
                                    41  answer.low = value1 * value2;
                                    +
                                    42 #else
                                    +
                                    43  answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64
                                    +
                                    44 #endif // _M_ARM64
                                    +
                                    45 #else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS
                                    +
                                    46  __uint128_t r = (static_cast<__uint128_t>(value1)) * value2;
                                    +
                                    47  answer.low = uint64_t(r);
                                    +
                                    48  answer.high = uint64_t(r >> 64);
                                    +
                                    49 #endif
                                    +
                                    50  return answer;
                                    +
                                    51 }
                                    +
                                    52 
                                    +
                                    53 } // namespace numberparsing
                                    +
                                    54 } // namespace SIMDJSON_IMPLEMENTATION
                                    +
                                    55 } // namespace simdjson
                                    +
                                    56 
                                    +
                                    57 #define SIMDJSON_SWAR_NUMBER_PARSING 1
                                    +
                                    58 
                                    +
                                    59 #endif // SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    +
                                    +
                                    + + + + diff --git a/westmere_2ondemand_8h_source.html b/westmere_2ondemand_8h_source.html new file mode 100644 index 000000000..690d4b747 --- /dev/null +++ b/westmere_2ondemand_8h_source.html @@ -0,0 +1,112 @@ + + + + + + + +simdjson: include/simdjson/westmere/ondemand.h Source File + + + + + + + + + + + + + + + + +
                                    +
                                    + + + + + + + +
                                    +
                                    simdjson +  3.2.1 +
                                    +
                                    Ridiculously Fast JSON
                                    +
                                    +
                                    + + + + + + + +
                                    +
                                    + +
                                    +
                                    +
                                    + +
                                    + +
                                    +
                                    + + +
                                    + +
                                    + +
                                    +
                                    +
                                    ondemand.h
                                    +
                                    +
                                    +
                                    1 #ifndef SIMDJSON_WESTMERE_ONDEMAND_H
                                    +
                                    2 #define SIMDJSON_WESTMERE_ONDEMAND_H
                                    +
                                    3 
                                    +
                                    4 #include "simdjson/westmere/begin.h"
                                    +
                                    5 #include "simdjson/generic/ondemand/amalgamated.h"
                                    +
                                    6 #include "simdjson/westmere/end.h"
                                    +
                                    7 
                                    +
                                    8 #endif // SIMDJSON_WESTMERE_IMPLEMENTATION_H
                                    +
                                    +
                                    + + + + diff --git a/westmere_2simd_8h_source.html b/westmere_2simd_8h_source.html index 53ee9bb0d..84cfa3bfc 100644 --- a/westmere_2simd_8h_source.html +++ b/westmere_2simd_8h_source.html @@ -94,343 +94,344 @@ $(document).ready(function(){initNavTree('westmere_2simd_8h_source.html',''); in
                                    1 #ifndef SIMDJSON_WESTMERE_SIMD_H
                                    2 #define SIMDJSON_WESTMERE_SIMD_H
                                    3 
                                    -
                                    4 #include "simdjson/internal/simdprune_tables.h"
                                    -
                                    5 
                                    -
                                    6 namespace simdjson {
                                    -
                                    7 namespace SIMDJSON_IMPLEMENTATION {
                                    -
                                    8 namespace {
                                    -
                                    9 namespace simd {
                                    +
                                    4 #include "simdjson/westmere/base.h"
                                    +
                                    5 #include "simdjson/westmere/bitmanipulation.h"
                                    +
                                    6 
                                    +
                                    7 #ifndef SIMDJSON_AMALGAMATED
                                    +
                                    8 #include "simdjson/internal/simdprune_tables.h"
                                    +
                                    9 #endif // SIMDJSON_AMALGAMATED
                                    10 
                                    -
                                    11  template<typename Child>
                                    -
                                    12  struct base {
                                    -
                                    13  __m128i value;
                                    -
                                    14 
                                    -
                                    15  // Zero constructor
                                    -
                                    16  simdjson_inline base() : value{__m128i()} {}
                                    -
                                    17 
                                    -
                                    18  // Conversion from SIMD register
                                    -
                                    19  simdjson_inline base(const __m128i _value) : value(_value) {}
                                    -
                                    20 
                                    -
                                    21  // Conversion to SIMD register
                                    -
                                    22  simdjson_inline operator const __m128i&() const { return this->value; }
                                    -
                                    23  simdjson_inline operator __m128i&() { return this->value; }
                                    -
                                    24 
                                    -
                                    25  // Bit operations
                                    -
                                    26  simdjson_inline Child operator|(const Child other) const { return _mm_or_si128(*this, other); }
                                    -
                                    27  simdjson_inline Child operator&(const Child other) const { return _mm_and_si128(*this, other); }
                                    -
                                    28  simdjson_inline Child operator^(const Child other) const { return _mm_xor_si128(*this, other); }
                                    -
                                    29  simdjson_inline Child bit_andnot(const Child other) const { return _mm_andnot_si128(other, *this); }
                                    -
                                    30  simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast | other; return *this_cast; }
                                    -
                                    31  simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast & other; return *this_cast; }
                                    -
                                    32  simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast ^ other; return *this_cast; }
                                    -
                                    33  };
                                    -
                                    34 
                                    -
                                    35  // Forward-declared so they can be used by splat and friends.
                                    -
                                    36  template<typename T>
                                    -
                                    37  struct simd8;
                                    -
                                    38 
                                    -
                                    39  template<typename T, typename Mask=simd8<bool>>
                                    -
                                    40  struct base8: base<simd8<T>> {
                                    -
                                    41  typedef uint16_t bitmask_t;
                                    -
                                    42  typedef uint32_t bitmask2_t;
                                    -
                                    43 
                                    -
                                    44  simdjson_inline base8() : base<simd8<T>>() {}
                                    -
                                    45  simdjson_inline base8(const __m128i _value) : base<simd8<T>>(_value) {}
                                    -
                                    46 
                                    -
                                    47  friend simdjson_inline Mask operator==(const simd8<T> lhs, const simd8<T> rhs) { return _mm_cmpeq_epi8(lhs, rhs); }
                                    -
                                    48 
                                    -
                                    49  static const int SIZE = sizeof(base<simd8<T>>::value);
                                    -
                                    50 
                                    -
                                    51  template<int N=1>
                                    -
                                    52  simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
                                    -
                                    53  return _mm_alignr_epi8(*this, prev_chunk, 16 - N);
                                    -
                                    54  }
                                    -
                                    55  };
                                    -
                                    56 
                                    -
                                    57  // SIMD byte mask type (returned by things like eq and gt)
                                    -
                                    58  template<>
                                    -
                                    59  struct simd8<bool>: base8<bool> {
                                    -
                                    60  static simdjson_inline simd8<bool> splat(bool _value) { return _mm_set1_epi8(uint8_t(-(!!_value))); }
                                    -
                                    61 
                                    -
                                    62  simdjson_inline simd8<bool>() : base8() {}
                                    -
                                    63  simdjson_inline simd8<bool>(const __m128i _value) : base8<bool>(_value) {}
                                    -
                                    64  // Splat constructor
                                    -
                                    65  simdjson_inline simd8<bool>(bool _value) : base8<bool>(splat(_value)) {}
                                    -
                                    66 
                                    -
                                    67  simdjson_inline int to_bitmask() const { return _mm_movemask_epi8(*this); }
                                    -
                                    68  simdjson_inline bool any() const { return !_mm_testz_si128(*this, *this); }
                                    -
                                    69  simdjson_inline simd8<bool> operator~() const { return *this ^ true; }
                                    -
                                    70  };
                                    -
                                    71 
                                    -
                                    72  template<typename T>
                                    -
                                    73  struct base8_numeric: base8<T> {
                                    -
                                    74  static simdjson_inline simd8<T> splat(T _value) { return _mm_set1_epi8(_value); }
                                    -
                                    75  static simdjson_inline simd8<T> zero() { return _mm_setzero_si128(); }
                                    -
                                    76  static simdjson_inline simd8<T> load(const T values[16]) {
                                    -
                                    77  return _mm_loadu_si128(reinterpret_cast<const __m128i *>(values));
                                    -
                                    78  }
                                    -
                                    79  // Repeat 16 values as many times as necessary (usually for lookup tables)
                                    -
                                    80  static simdjson_inline simd8<T> repeat_16(
                                    -
                                    81  T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7,
                                    -
                                    82  T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15
                                    -
                                    83  ) {
                                    -
                                    84  return simd8<T>(
                                    -
                                    85  v0, v1, v2, v3, v4, v5, v6, v7,
                                    -
                                    86  v8, v9, v10,v11,v12,v13,v14,v15
                                    -
                                    87  );
                                    -
                                    88  }
                                    -
                                    89 
                                    -
                                    90  simdjson_inline base8_numeric() : base8<T>() {}
                                    -
                                    91  simdjson_inline base8_numeric(const __m128i _value) : base8<T>(_value) {}
                                    -
                                    92 
                                    -
                                    93  // Store to array
                                    -
                                    94  simdjson_inline void store(T dst[16]) const { return _mm_storeu_si128(reinterpret_cast<__m128i *>(dst), *this); }
                                    -
                                    95 
                                    -
                                    96  // Override to distinguish from bool version
                                    -
                                    97  simdjson_inline simd8<T> operator~() const { return *this ^ 0xFFu; }
                                    -
                                    98 
                                    -
                                    99  // Addition/subtraction are the same for signed and unsigned
                                    -
                                    100  simdjson_inline simd8<T> operator+(const simd8<T> other) const { return _mm_add_epi8(*this, other); }
                                    -
                                    101  simdjson_inline simd8<T> operator-(const simd8<T> other) const { return _mm_sub_epi8(*this, other); }
                                    -
                                    102  simdjson_inline simd8<T>& operator+=(const simd8<T> other) { *this = *this + other; return *static_cast<simd8<T>*>(this); }
                                    -
                                    103  simdjson_inline simd8<T>& operator-=(const simd8<T> other) { *this = *this - other; return *static_cast<simd8<T>*>(this); }
                                    -
                                    104 
                                    -
                                    105  // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values)
                                    -
                                    106  template<typename L>
                                    -
                                    107  simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
                                    -
                                    108  return _mm_shuffle_epi8(lookup_table, *this);
                                    -
                                    109  }
                                    -
                                    110 
                                    -
                                    111  // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset).
                                    -
                                    112  // Passing a 0 value for mask would be equivalent to writing out every byte to output.
                                    -
                                    113  // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes
                                    -
                                    114  // get written.
                                    -
                                    115  // Design consideration: it seems like a function with the
                                    -
                                    116  // signature simd8<L> compress(uint32_t mask) would be
                                    -
                                    117  // sensible, but the AVX ISA makes this kind of approach difficult.
                                    -
                                    118  template<typename L>
                                    -
                                    119  simdjson_inline void compress(uint16_t mask, L * output) const {
                                    -
                                    120  using internal::thintable_epi8;
                                    -
                                    121  using internal::BitsSetTable256mul2;
                                    -
                                    122  using internal::pshufb_combine_table;
                                    -
                                    123  // this particular implementation was inspired by work done by @animetosho
                                    -
                                    124  // we do it in two steps, first 8 bytes and then second 8 bytes
                                    -
                                    125  uint8_t mask1 = uint8_t(mask); // least significant 8 bits
                                    -
                                    126  uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits
                                    -
                                    127  // next line just loads the 64-bit values thintable_epi8[mask1] and
                                    -
                                    128  // thintable_epi8[mask2] into a 128-bit register, using only
                                    -
                                    129  // two instructions on most compilers.
                                    -
                                    130  __m128i shufmask = _mm_set_epi64x(thintable_epi8[mask2], thintable_epi8[mask1]);
                                    -
                                    131  // we increment by 0x08 the second half of the mask
                                    -
                                    132  shufmask =
                                    -
                                    133  _mm_add_epi8(shufmask, _mm_set_epi32(0x08080808, 0x08080808, 0, 0));
                                    -
                                    134  // this is the version "nearly pruned"
                                    -
                                    135  __m128i pruned = _mm_shuffle_epi8(*this, shufmask);
                                    -
                                    136  // we still need to put the two halves together.
                                    -
                                    137  // we compute the popcount of the first half:
                                    -
                                    138  int pop1 = BitsSetTable256mul2[mask1];
                                    -
                                    139  // then load the corresponding mask, what it does is to write
                                    -
                                    140  // only the first pop1 bytes from the first 8 bytes, and then
                                    -
                                    141  // it fills in with the bytes from the second 8 bytes + some filling
                                    -
                                    142  // at the end.
                                    -
                                    143  __m128i compactmask =
                                    -
                                    144  _mm_loadu_si128(reinterpret_cast<const __m128i *>(pshufb_combine_table + pop1 * 8));
                                    -
                                    145  __m128i answer = _mm_shuffle_epi8(pruned, compactmask);
                                    -
                                    146  _mm_storeu_si128(reinterpret_cast<__m128i *>(output), answer);
                                    -
                                    147  }
                                    -
                                    148 
                                    -
                                    149  template<typename L>
                                    -
                                    150  simdjson_inline simd8<L> lookup_16(
                                    -
                                    151  L replace0, L replace1, L replace2, L replace3,
                                    -
                                    152  L replace4, L replace5, L replace6, L replace7,
                                    -
                                    153  L replace8, L replace9, L replace10, L replace11,
                                    -
                                    154  L replace12, L replace13, L replace14, L replace15) const {
                                    -
                                    155  return lookup_16(simd8<L>::repeat_16(
                                    -
                                    156  replace0, replace1, replace2, replace3,
                                    -
                                    157  replace4, replace5, replace6, replace7,
                                    -
                                    158  replace8, replace9, replace10, replace11,
                                    -
                                    159  replace12, replace13, replace14, replace15
                                    -
                                    160  ));
                                    -
                                    161  }
                                    -
                                    162  };
                                    -
                                    163 
                                    -
                                    164  // Signed bytes
                                    -
                                    165  template<>
                                    -
                                    166  struct simd8<int8_t> : base8_numeric<int8_t> {
                                    -
                                    167  simdjson_inline simd8() : base8_numeric<int8_t>() {}
                                    -
                                    168  simdjson_inline simd8(const __m128i _value) : base8_numeric<int8_t>(_value) {}
                                    -
                                    169  // Splat constructor
                                    -
                                    170  simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {}
                                    -
                                    171  // Array constructor
                                    -
                                    172  simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {}
                                    -
                                    173  // Member-by-member initialization
                                    -
                                    174  simdjson_inline simd8(
                                    -
                                    175  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
                                    -
                                    176  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15
                                    -
                                    177  ) : simd8(_mm_setr_epi8(
                                    -
                                    178  v0, v1, v2, v3, v4, v5, v6, v7,
                                    -
                                    179  v8, v9, v10,v11,v12,v13,v14,v15
                                    -
                                    180  )) {}
                                    -
                                    181  // Repeat 16 values as many times as necessary (usually for lookup tables)
                                    -
                                    182  simdjson_inline static simd8<int8_t> repeat_16(
                                    -
                                    183  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
                                    -
                                    184  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15
                                    -
                                    185  ) {
                                    -
                                    186  return simd8<int8_t>(
                                    -
                                    187  v0, v1, v2, v3, v4, v5, v6, v7,
                                    -
                                    188  v8, v9, v10,v11,v12,v13,v14,v15
                                    -
                                    189  );
                                    -
                                    190  }
                                    -
                                    191 
                                    -
                                    192  // Order-sensitive comparisons
                                    -
                                    193  simdjson_inline simd8<int8_t> max_val(const simd8<int8_t> other) const { return _mm_max_epi8(*this, other); }
                                    -
                                    194  simdjson_inline simd8<int8_t> min_val(const simd8<int8_t> other) const { return _mm_min_epi8(*this, other); }
                                    -
                                    195  simdjson_inline simd8<bool> operator>(const simd8<int8_t> other) const { return _mm_cmpgt_epi8(*this, other); }
                                    -
                                    196  simdjson_inline simd8<bool> operator<(const simd8<int8_t> other) const { return _mm_cmpgt_epi8(other, *this); }
                                    -
                                    197  };
                                    -
                                    198 
                                    -
                                    199  // Unsigned bytes
                                    -
                                    200  template<>
                                    -
                                    201  struct simd8<uint8_t>: base8_numeric<uint8_t> {
                                    -
                                    202  simdjson_inline simd8() : base8_numeric<uint8_t>() {}
                                    -
                                    203  simdjson_inline simd8(const __m128i _value) : base8_numeric<uint8_t>(_value) {}
                                    -
                                    204  // Splat constructor
                                    -
                                    205  simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
                                    -
                                    206  // Array constructor
                                    -
                                    207  simdjson_inline simd8(const uint8_t* values) : simd8(load(values)) {}
                                    -
                                    208  // Member-by-member initialization
                                    -
                                    209  simdjson_inline simd8(
                                    -
                                    210  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
                                    -
                                    211  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15
                                    -
                                    212  ) : simd8(_mm_setr_epi8(
                                    -
                                    213  v0, v1, v2, v3, v4, v5, v6, v7,
                                    -
                                    214  v8, v9, v10,v11,v12,v13,v14,v15
                                    -
                                    215  )) {}
                                    -
                                    216  // Repeat 16 values as many times as necessary (usually for lookup tables)
                                    -
                                    217  simdjson_inline static simd8<uint8_t> repeat_16(
                                    -
                                    218  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
                                    -
                                    219  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15
                                    -
                                    220  ) {
                                    -
                                    221  return simd8<uint8_t>(
                                    -
                                    222  v0, v1, v2, v3, v4, v5, v6, v7,
                                    -
                                    223  v8, v9, v10,v11,v12,v13,v14,v15
                                    -
                                    224  );
                                    -
                                    225  }
                                    -
                                    226 
                                    -
                                    227  // Saturated math
                                    -
                                    228  simdjson_inline simd8<uint8_t> saturating_add(const simd8<uint8_t> other) const { return _mm_adds_epu8(*this, other); }
                                    -
                                    229  simdjson_inline simd8<uint8_t> saturating_sub(const simd8<uint8_t> other) const { return _mm_subs_epu8(*this, other); }
                                    -
                                    230 
                                    -
                                    231  // Order-specific operations
                                    -
                                    232  simdjson_inline simd8<uint8_t> max_val(const simd8<uint8_t> other) const { return _mm_max_epu8(*this, other); }
                                    -
                                    233  simdjson_inline simd8<uint8_t> min_val(const simd8<uint8_t> other) const { return _mm_min_epu8(*this, other); }
                                    -
                                    234  // Same as >, but only guarantees true is nonzero (< guarantees true = -1)
                                    -
                                    235  simdjson_inline simd8<uint8_t> gt_bits(const simd8<uint8_t> other) const { return this->saturating_sub(other); }
                                    -
                                    236  // Same as <, but only guarantees true is nonzero (< guarantees true = -1)
                                    -
                                    237  simdjson_inline simd8<uint8_t> lt_bits(const simd8<uint8_t> other) const { return other.saturating_sub(*this); }
                                    -
                                    238  simdjson_inline simd8<bool> operator<=(const simd8<uint8_t> other) const { return other.max_val(*this) == other; }
                                    -
                                    239  simdjson_inline simd8<bool> operator>=(const simd8<uint8_t> other) const { return other.min_val(*this) == other; }
                                    -
                                    240  simdjson_inline simd8<bool> operator>(const simd8<uint8_t> other) const { return this->gt_bits(other).any_bits_set(); }
                                    -
                                    241  simdjson_inline simd8<bool> operator<(const simd8<uint8_t> other) const { return this->gt_bits(other).any_bits_set(); }
                                    -
                                    242 
                                    -
                                    243  // Bit-specific operations
                                    -
                                    244  simdjson_inline simd8<bool> bits_not_set() const { return *this == uint8_t(0); }
                                    -
                                    245  simdjson_inline simd8<bool> bits_not_set(simd8<uint8_t> bits) const { return (*this & bits).bits_not_set(); }
                                    -
                                    246  simdjson_inline simd8<bool> any_bits_set() const { return ~this->bits_not_set(); }
                                    -
                                    247  simdjson_inline simd8<bool> any_bits_set(simd8<uint8_t> bits) const { return ~this->bits_not_set(bits); }
                                    -
                                    248  simdjson_inline bool is_ascii() const { return _mm_movemask_epi8(*this) == 0; }
                                    -
                                    249  simdjson_inline bool bits_not_set_anywhere() const { return _mm_testz_si128(*this, *this); }
                                    -
                                    250  simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); }
                                    -
                                    251  simdjson_inline bool bits_not_set_anywhere(simd8<uint8_t> bits) const { return _mm_testz_si128(*this, bits); }
                                    -
                                    252  simdjson_inline bool any_bits_set_anywhere(simd8<uint8_t> bits) const { return !bits_not_set_anywhere(bits); }
                                    -
                                    253  template<int N>
                                    -
                                    254  simdjson_inline simd8<uint8_t> shr() const { return simd8<uint8_t>(_mm_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); }
                                    -
                                    255  template<int N>
                                    -
                                    256  simdjson_inline simd8<uint8_t> shl() const { return simd8<uint8_t>(_mm_slli_epi16(*this, N)) & uint8_t(0xFFu << N); }
                                    -
                                    257  // Get one of the bits and make a bitmask out of it.
                                    -
                                    258  // e.g. value.get_bit<7>() gets the high bit
                                    -
                                    259  template<int N>
                                    -
                                    260  simdjson_inline int get_bit() const { return _mm_movemask_epi8(_mm_slli_epi16(*this, 7-N)); }
                                    -
                                    261  };
                                    -
                                    262 
                                    -
                                    263  template<typename T>
                                    -
                                    264  struct simd8x64 {
                                    -
                                    265  static constexpr int NUM_CHUNKS = 64 / sizeof(simd8<T>);
                                    -
                                    266  static_assert(NUM_CHUNKS == 4, "Westmere kernel should use four registers per 64-byte block.");
                                    -
                                    267  const simd8<T> chunks[NUM_CHUNKS];
                                    -
                                    268 
                                    -
                                    269  simd8x64(const simd8x64<T>& o) = delete; // no copy allowed
                                    -
                                    270  simd8x64<T>& operator=(const simd8<T>& other) = delete; // no assignment allowed
                                    -
                                    271  simd8x64() = delete; // no default constructor allowed
                                    -
                                    272 
                                    -
                                    273  simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1, const simd8<T> chunk2, const simd8<T> chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {}
                                    -
                                    274  simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8<T>::load(ptr), simd8<T>::load(ptr+16), simd8<T>::load(ptr+32), simd8<T>::load(ptr+48)} {}
                                    -
                                    275 
                                    -
                                    276  simdjson_inline void store(T ptr[64]) const {
                                    -
                                    277  this->chunks[0].store(ptr+sizeof(simd8<T>)*0);
                                    -
                                    278  this->chunks[1].store(ptr+sizeof(simd8<T>)*1);
                                    -
                                    279  this->chunks[2].store(ptr+sizeof(simd8<T>)*2);
                                    -
                                    280  this->chunks[3].store(ptr+sizeof(simd8<T>)*3);
                                    -
                                    281  }
                                    -
                                    282 
                                    -
                                    283  simdjson_inline simd8<T> reduce_or() const {
                                    -
                                    284  return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]);
                                    -
                                    285  }
                                    -
                                    286 
                                    -
                                    287  simdjson_inline uint64_t compress(uint64_t mask, T * output) const {
                                    -
                                    288  this->chunks[0].compress(uint16_t(mask), output);
                                    -
                                    289  this->chunks[1].compress(uint16_t(mask >> 16), output + 16 - count_ones(mask & 0xFFFF));
                                    -
                                    290  this->chunks[2].compress(uint16_t(mask >> 32), output + 32 - count_ones(mask & 0xFFFFFFFF));
                                    -
                                    291  this->chunks[3].compress(uint16_t(mask >> 48), output + 48 - count_ones(mask & 0xFFFFFFFFFFFF));
                                    -
                                    292  return 64 - count_ones(mask);
                                    -
                                    293  }
                                    -
                                    294 
                                    -
                                    295  simdjson_inline uint64_t to_bitmask() const {
                                    -
                                    296  uint64_t r0 = uint32_t(this->chunks[0].to_bitmask() );
                                    -
                                    297  uint64_t r1 = this->chunks[1].to_bitmask() ;
                                    -
                                    298  uint64_t r2 = this->chunks[2].to_bitmask() ;
                                    -
                                    299  uint64_t r3 = this->chunks[3].to_bitmask() ;
                                    -
                                    300  return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48);
                                    -
                                    301  }
                                    -
                                    302 
                                    -
                                    303  simdjson_inline uint64_t eq(const T m) const {
                                    -
                                    304  const simd8<T> mask = simd8<T>::splat(m);
                                    -
                                    305  return simd8x64<bool>(
                                    -
                                    306  this->chunks[0] == mask,
                                    -
                                    307  this->chunks[1] == mask,
                                    -
                                    308  this->chunks[2] == mask,
                                    -
                                    309  this->chunks[3] == mask
                                    -
                                    310  ).to_bitmask();
                                    -
                                    311  }
                                    -
                                    312 
                                    -
                                    313  simdjson_inline uint64_t eq(const simd8x64<uint8_t> &other) const {
                                    -
                                    314  return simd8x64<bool>(
                                    -
                                    315  this->chunks[0] == other.chunks[0],
                                    -
                                    316  this->chunks[1] == other.chunks[1],
                                    -
                                    317  this->chunks[2] == other.chunks[2],
                                    -
                                    318  this->chunks[3] == other.chunks[3]
                                    -
                                    319  ).to_bitmask();
                                    -
                                    320  }
                                    -
                                    321 
                                    -
                                    322  simdjson_inline uint64_t lteq(const T m) const {
                                    -
                                    323  const simd8<T> mask = simd8<T>::splat(m);
                                    -
                                    324  return simd8x64<bool>(
                                    -
                                    325  this->chunks[0] <= mask,
                                    -
                                    326  this->chunks[1] <= mask,
                                    -
                                    327  this->chunks[2] <= mask,
                                    -
                                    328  this->chunks[3] <= mask
                                    -
                                    329  ).to_bitmask();
                                    -
                                    330  }
                                    -
                                    331  }; // struct simd8x64<T>
                                    -
                                    332 
                                    -
                                    333 } // namespace simd
                                    -
                                    334 } // unnamed namespace
                                    -
                                    335 } // namespace SIMDJSON_IMPLEMENTATION
                                    -
                                    336 } // namespace simdjson
                                    -
                                    337 
                                    -
                                    338 #endif // SIMDJSON_WESTMERE_SIMD_INPUT_H
                                    -
                                    simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
                                    Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    +
                                    11 namespace simdjson {
                                    +
                                    12 namespace SIMDJSON_IMPLEMENTATION {
                                    +
                                    13 namespace {
                                    +
                                    14 namespace simd {
                                    +
                                    15 
                                    +
                                    16  template<typename Child>
                                    +
                                    17  struct base {
                                    +
                                    18  __m128i value;
                                    +
                                    19 
                                    +
                                    20  // Zero constructor
                                    +
                                    21  simdjson_inline base() : value{__m128i()} {}
                                    +
                                    22 
                                    +
                                    23  // Conversion from SIMD register
                                    +
                                    24  simdjson_inline base(const __m128i _value) : value(_value) {}
                                    +
                                    25 
                                    +
                                    26  // Conversion to SIMD register
                                    +
                                    27  simdjson_inline operator const __m128i&() const { return this->value; }
                                    +
                                    28  simdjson_inline operator __m128i&() { return this->value; }
                                    +
                                    29 
                                    +
                                    30  // Bit operations
                                    +
                                    31  simdjson_inline Child operator|(const Child other) const { return _mm_or_si128(*this, other); }
                                    +
                                    32  simdjson_inline Child operator&(const Child other) const { return _mm_and_si128(*this, other); }
                                    +
                                    33  simdjson_inline Child operator^(const Child other) const { return _mm_xor_si128(*this, other); }
                                    +
                                    34  simdjson_inline Child bit_andnot(const Child other) const { return _mm_andnot_si128(other, *this); }
                                    +
                                    35  simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast | other; return *this_cast; }
                                    +
                                    36  simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast & other; return *this_cast; }
                                    +
                                    37  simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast<Child*>(this); *this_cast = *this_cast ^ other; return *this_cast; }
                                    +
                                    38  };
                                    +
                                    39 
                                    +
                                    40  template<typename T, typename Mask=simd8<bool>>
                                    +
                                    41  struct base8: base<simd8<T>> {
                                    +
                                    42  typedef uint16_t bitmask_t;
                                    +
                                    43  typedef uint32_t bitmask2_t;
                                    +
                                    44 
                                    +
                                    45  simdjson_inline base8() : base<simd8<T>>() {}
                                    +
                                    46  simdjson_inline base8(const __m128i _value) : base<simd8<T>>(_value) {}
                                    +
                                    47 
                                    +
                                    48  friend simdjson_inline Mask operator==(const simd8<T> lhs, const simd8<T> rhs) { return _mm_cmpeq_epi8(lhs, rhs); }
                                    +
                                    49 
                                    +
                                    50  static const int SIZE = sizeof(base<simd8<T>>::value);
                                    +
                                    51 
                                    +
                                    52  template<int N=1>
                                    +
                                    53  simdjson_inline simd8<T> prev(const simd8<T> prev_chunk) const {
                                    +
                                    54  return _mm_alignr_epi8(*this, prev_chunk, 16 - N);
                                    +
                                    55  }
                                    +
                                    56  };
                                    +
                                    57 
                                    +
                                    58  // SIMD byte mask type (returned by things like eq and gt)
                                    +
                                    59  template<>
                                    +
                                    60  struct simd8<bool>: base8<bool> {
                                    +
                                    61  static simdjson_inline simd8<bool> splat(bool _value) { return _mm_set1_epi8(uint8_t(-(!!_value))); }
                                    +
                                    62 
                                    +
                                    63  simdjson_inline simd8<bool>() : base8() {}
                                    +
                                    64  simdjson_inline simd8<bool>(const __m128i _value) : base8<bool>(_value) {}
                                    +
                                    65  // Splat constructor
                                    +
                                    66  simdjson_inline simd8<bool>(bool _value) : base8<bool>(splat(_value)) {}
                                    +
                                    67 
                                    +
                                    68  simdjson_inline int to_bitmask() const { return _mm_movemask_epi8(*this); }
                                    +
                                    69  simdjson_inline bool any() const { return !_mm_testz_si128(*this, *this); }
                                    +
                                    70  simdjson_inline simd8<bool> operator~() const { return *this ^ true; }
                                    +
                                    71  };
                                    +
                                    72 
                                    +
                                    73  template<typename T>
                                    +
                                    74  struct base8_numeric: base8<T> {
                                    +
                                    75  static simdjson_inline simd8<T> splat(T _value) { return _mm_set1_epi8(_value); }
                                    +
                                    76  static simdjson_inline simd8<T> zero() { return _mm_setzero_si128(); }
                                    +
                                    77  static simdjson_inline simd8<T> load(const T values[16]) {
                                    +
                                    78  return _mm_loadu_si128(reinterpret_cast<const __m128i *>(values));
                                    +
                                    79  }
                                    +
                                    80  // Repeat 16 values as many times as necessary (usually for lookup tables)
                                    +
                                    81  static simdjson_inline simd8<T> repeat_16(
                                    +
                                    82  T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7,
                                    +
                                    83  T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15
                                    +
                                    84  ) {
                                    +
                                    85  return simd8<T>(
                                    +
                                    86  v0, v1, v2, v3, v4, v5, v6, v7,
                                    +
                                    87  v8, v9, v10,v11,v12,v13,v14,v15
                                    +
                                    88  );
                                    +
                                    89  }
                                    +
                                    90 
                                    +
                                    91  simdjson_inline base8_numeric() : base8<T>() {}
                                    +
                                    92  simdjson_inline base8_numeric(const __m128i _value) : base8<T>(_value) {}
                                    +
                                    93 
                                    +
                                    94  // Store to array
                                    +
                                    95  simdjson_inline void store(T dst[16]) const { return _mm_storeu_si128(reinterpret_cast<__m128i *>(dst), *this); }
                                    +
                                    96 
                                    +
                                    97  // Override to distinguish from bool version
                                    +
                                    98  simdjson_inline simd8<T> operator~() const { return *this ^ 0xFFu; }
                                    +
                                    99 
                                    +
                                    100  // Addition/subtraction are the same for signed and unsigned
                                    +
                                    101  simdjson_inline simd8<T> operator+(const simd8<T> other) const { return _mm_add_epi8(*this, other); }
                                    +
                                    102  simdjson_inline simd8<T> operator-(const simd8<T> other) const { return _mm_sub_epi8(*this, other); }
                                    +
                                    103  simdjson_inline simd8<T>& operator+=(const simd8<T> other) { *this = *this + other; return *static_cast<simd8<T>*>(this); }
                                    +
                                    104  simdjson_inline simd8<T>& operator-=(const simd8<T> other) { *this = *this - other; return *static_cast<simd8<T>*>(this); }
                                    +
                                    105 
                                    +
                                    106  // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values)
                                    +
                                    107  template<typename L>
                                    +
                                    108  simdjson_inline simd8<L> lookup_16(simd8<L> lookup_table) const {
                                    +
                                    109  return _mm_shuffle_epi8(lookup_table, *this);
                                    +
                                    110  }
                                    +
                                    111 
                                    +
                                    112  // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset).
                                    +
                                    113  // Passing a 0 value for mask would be equivalent to writing out every byte to output.
                                    +
                                    114  // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes
                                    +
                                    115  // get written.
                                    +
                                    116  // Design consideration: it seems like a function with the
                                    +
                                    117  // signature simd8<L> compress(uint32_t mask) would be
                                    +
                                    118  // sensible, but the AVX ISA makes this kind of approach difficult.
                                    +
                                    119  template<typename L>
                                    +
                                    120  simdjson_inline void compress(uint16_t mask, L * output) const {
                                    +
                                    121  using internal::thintable_epi8;
                                    +
                                    122  using internal::BitsSetTable256mul2;
                                    +
                                    123  using internal::pshufb_combine_table;
                                    +
                                    124  // this particular implementation was inspired by work done by @animetosho
                                    +
                                    125  // we do it in two steps, first 8 bytes and then second 8 bytes
                                    +
                                    126  uint8_t mask1 = uint8_t(mask); // least significant 8 bits
                                    +
                                    127  uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits
                                    +
                                    128  // next line just loads the 64-bit values thintable_epi8[mask1] and
                                    +
                                    129  // thintable_epi8[mask2] into a 128-bit register, using only
                                    +
                                    130  // two instructions on most compilers.
                                    +
                                    131  __m128i shufmask = _mm_set_epi64x(thintable_epi8[mask2], thintable_epi8[mask1]);
                                    +
                                    132  // we increment by 0x08 the second half of the mask
                                    +
                                    133  shufmask =
                                    +
                                    134  _mm_add_epi8(shufmask, _mm_set_epi32(0x08080808, 0x08080808, 0, 0));
                                    +
                                    135  // this is the version "nearly pruned"
                                    +
                                    136  __m128i pruned = _mm_shuffle_epi8(*this, shufmask);
                                    +
                                    137  // we still need to put the two halves together.
                                    +
                                    138  // we compute the popcount of the first half:
                                    +
                                    139  int pop1 = BitsSetTable256mul2[mask1];
                                    +
                                    140  // then load the corresponding mask, what it does is to write
                                    +
                                    141  // only the first pop1 bytes from the first 8 bytes, and then
                                    +
                                    142  // it fills in with the bytes from the second 8 bytes + some filling
                                    +
                                    143  // at the end.
                                    +
                                    144  __m128i compactmask =
                                    +
                                    145  _mm_loadu_si128(reinterpret_cast<const __m128i *>(pshufb_combine_table + pop1 * 8));
                                    +
                                    146  __m128i answer = _mm_shuffle_epi8(pruned, compactmask);
                                    +
                                    147  _mm_storeu_si128(reinterpret_cast<__m128i *>(output), answer);
                                    +
                                    148  }
                                    +
                                    149 
                                    +
                                    150  template<typename L>
                                    +
                                    151  simdjson_inline simd8<L> lookup_16(
                                    +
                                    152  L replace0, L replace1, L replace2, L replace3,
                                    +
                                    153  L replace4, L replace5, L replace6, L replace7,
                                    +
                                    154  L replace8, L replace9, L replace10, L replace11,
                                    +
                                    155  L replace12, L replace13, L replace14, L replace15) const {
                                    +
                                    156  return lookup_16(simd8<L>::repeat_16(
                                    +
                                    157  replace0, replace1, replace2, replace3,
                                    +
                                    158  replace4, replace5, replace6, replace7,
                                    +
                                    159  replace8, replace9, replace10, replace11,
                                    +
                                    160  replace12, replace13, replace14, replace15
                                    +
                                    161  ));
                                    +
                                    162  }
                                    +
                                    163  };
                                    +
                                    164 
                                    +
                                    165  // Signed bytes
                                    +
                                    166  template<>
                                    +
                                    167  struct simd8<int8_t> : base8_numeric<int8_t> {
                                    +
                                    168  simdjson_inline simd8() : base8_numeric<int8_t>() {}
                                    +
                                    169  simdjson_inline simd8(const __m128i _value) : base8_numeric<int8_t>(_value) {}
                                    +
                                    170  // Splat constructor
                                    +
                                    171  simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {}
                                    +
                                    172  // Array constructor
                                    +
                                    173  simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {}
                                    +
                                    174  // Member-by-member initialization
                                    +
                                    175  simdjson_inline simd8(
                                    +
                                    176  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
                                    +
                                    177  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15
                                    +
                                    178  ) : simd8(_mm_setr_epi8(
                                    +
                                    179  v0, v1, v2, v3, v4, v5, v6, v7,
                                    +
                                    180  v8, v9, v10,v11,v12,v13,v14,v15
                                    +
                                    181  )) {}
                                    +
                                    182  // Repeat 16 values as many times as necessary (usually for lookup tables)
                                    +
                                    183  simdjson_inline static simd8<int8_t> repeat_16(
                                    +
                                    184  int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7,
                                    +
                                    185  int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15
                                    +
                                    186  ) {
                                    +
                                    187  return simd8<int8_t>(
                                    +
                                    188  v0, v1, v2, v3, v4, v5, v6, v7,
                                    +
                                    189  v8, v9, v10,v11,v12,v13,v14,v15
                                    +
                                    190  );
                                    +
                                    191  }
                                    +
                                    192 
                                    +
                                    193  // Order-sensitive comparisons
                                    +
                                    194  simdjson_inline simd8<int8_t> max_val(const simd8<int8_t> other) const { return _mm_max_epi8(*this, other); }
                                    +
                                    195  simdjson_inline simd8<int8_t> min_val(const simd8<int8_t> other) const { return _mm_min_epi8(*this, other); }
                                    +
                                    196  simdjson_inline simd8<bool> operator>(const simd8<int8_t> other) const { return _mm_cmpgt_epi8(*this, other); }
                                    +
                                    197  simdjson_inline simd8<bool> operator<(const simd8<int8_t> other) const { return _mm_cmpgt_epi8(other, *this); }
                                    +
                                    198  };
                                    +
                                    199 
                                    +
                                    200  // Unsigned bytes
                                    +
                                    201  template<>
                                    +
                                    202  struct simd8<uint8_t>: base8_numeric<uint8_t> {
                                    +
                                    203  simdjson_inline simd8() : base8_numeric<uint8_t>() {}
                                    +
                                    204  simdjson_inline simd8(const __m128i _value) : base8_numeric<uint8_t>(_value) {}
                                    +
                                    205  // Splat constructor
                                    +
                                    206  simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {}
                                    +
                                    207  // Array constructor
                                    +
                                    208  simdjson_inline simd8(const uint8_t* values) : simd8(load(values)) {}
                                    +
                                    209  // Member-by-member initialization
                                    +
                                    210  simdjson_inline simd8(
                                    +
                                    211  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
                                    +
                                    212  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15
                                    +
                                    213  ) : simd8(_mm_setr_epi8(
                                    +
                                    214  v0, v1, v2, v3, v4, v5, v6, v7,
                                    +
                                    215  v8, v9, v10,v11,v12,v13,v14,v15
                                    +
                                    216  )) {}
                                    +
                                    217  // Repeat 16 values as many times as necessary (usually for lookup tables)
                                    +
                                    218  simdjson_inline static simd8<uint8_t> repeat_16(
                                    +
                                    219  uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7,
                                    +
                                    220  uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15
                                    +
                                    221  ) {
                                    +
                                    222  return simd8<uint8_t>(
                                    +
                                    223  v0, v1, v2, v3, v4, v5, v6, v7,
                                    +
                                    224  v8, v9, v10,v11,v12,v13,v14,v15
                                    +
                                    225  );
                                    +
                                    226  }
                                    +
                                    227 
                                    +
                                    228  // Saturated math
                                    +
                                    229  simdjson_inline simd8<uint8_t> saturating_add(const simd8<uint8_t> other) const { return _mm_adds_epu8(*this, other); }
                                    +
                                    230  simdjson_inline simd8<uint8_t> saturating_sub(const simd8<uint8_t> other) const { return _mm_subs_epu8(*this, other); }
                                    +
                                    231 
                                    +
                                    232  // Order-specific operations
                                    +
                                    233  simdjson_inline simd8<uint8_t> max_val(const simd8<uint8_t> other) const { return _mm_max_epu8(*this, other); }
                                    +
                                    234  simdjson_inline simd8<uint8_t> min_val(const simd8<uint8_t> other) const { return _mm_min_epu8(*this, other); }
                                    +
                                    235  // Same as >, but only guarantees true is nonzero (< guarantees true = -1)
                                    +
                                    236  simdjson_inline simd8<uint8_t> gt_bits(const simd8<uint8_t> other) const { return this->saturating_sub(other); }
                                    +
                                    237  // Same as <, but only guarantees true is nonzero (< guarantees true = -1)
                                    +
                                    238  simdjson_inline simd8<uint8_t> lt_bits(const simd8<uint8_t> other) const { return other.saturating_sub(*this); }
                                    +
                                    239  simdjson_inline simd8<bool> operator<=(const simd8<uint8_t> other) const { return other.max_val(*this) == other; }
                                    +
                                    240  simdjson_inline simd8<bool> operator>=(const simd8<uint8_t> other) const { return other.min_val(*this) == other; }
                                    +
                                    241  simdjson_inline simd8<bool> operator>(const simd8<uint8_t> other) const { return this->gt_bits(other).any_bits_set(); }
                                    +
                                    242  simdjson_inline simd8<bool> operator<(const simd8<uint8_t> other) const { return this->gt_bits(other).any_bits_set(); }
                                    +
                                    243 
                                    +
                                    244  // Bit-specific operations
                                    +
                                    245  simdjson_inline simd8<bool> bits_not_set() const { return *this == uint8_t(0); }
                                    +
                                    246  simdjson_inline simd8<bool> bits_not_set(simd8<uint8_t> bits) const { return (*this & bits).bits_not_set(); }
                                    +
                                    247  simdjson_inline simd8<bool> any_bits_set() const { return ~this->bits_not_set(); }
                                    +
                                    248  simdjson_inline simd8<bool> any_bits_set(simd8<uint8_t> bits) const { return ~this->bits_not_set(bits); }
                                    +
                                    249  simdjson_inline bool is_ascii() const { return _mm_movemask_epi8(*this) == 0; }
                                    +
                                    250  simdjson_inline bool bits_not_set_anywhere() const { return _mm_testz_si128(*this, *this); }
                                    +
                                    251  simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); }
                                    +
                                    252  simdjson_inline bool bits_not_set_anywhere(simd8<uint8_t> bits) const { return _mm_testz_si128(*this, bits); }
                                    +
                                    253  simdjson_inline bool any_bits_set_anywhere(simd8<uint8_t> bits) const { return !bits_not_set_anywhere(bits); }
                                    +
                                    254  template<int N>
                                    +
                                    255  simdjson_inline simd8<uint8_t> shr() const { return simd8<uint8_t>(_mm_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); }
                                    +
                                    256  template<int N>
                                    +
                                    257  simdjson_inline simd8<uint8_t> shl() const { return simd8<uint8_t>(_mm_slli_epi16(*this, N)) & uint8_t(0xFFu << N); }
                                    +
                                    258  // Get one of the bits and make a bitmask out of it.
                                    +
                                    259  // e.g. value.get_bit<7>() gets the high bit
                                    +
                                    260  template<int N>
                                    +
                                    261  simdjson_inline int get_bit() const { return _mm_movemask_epi8(_mm_slli_epi16(*this, 7-N)); }
                                    +
                                    262  };
                                    +
                                    263 
                                    +
                                    264  template<typename T>
                                    +
                                    265  struct simd8x64 {
                                    +
                                    266  static constexpr int NUM_CHUNKS = 64 / sizeof(simd8<T>);
                                    +
                                    267  static_assert(NUM_CHUNKS == 4, "Westmere kernel should use four registers per 64-byte block.");
                                    +
                                    268  const simd8<T> chunks[NUM_CHUNKS];
                                    +
                                    269 
                                    +
                                    270  simd8x64(const simd8x64<T>& o) = delete; // no copy allowed
                                    +
                                    271  simd8x64<T>& operator=(const simd8<T>& other) = delete; // no assignment allowed
                                    +
                                    272  simd8x64() = delete; // no default constructor allowed
                                    +
                                    273 
                                    +
                                    274  simdjson_inline simd8x64(const simd8<T> chunk0, const simd8<T> chunk1, const simd8<T> chunk2, const simd8<T> chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {}
                                    +
                                    275  simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8<T>::load(ptr), simd8<T>::load(ptr+16), simd8<T>::load(ptr+32), simd8<T>::load(ptr+48)} {}
                                    +
                                    276 
                                    +
                                    277  simdjson_inline void store(T ptr[64]) const {
                                    +
                                    278  this->chunks[0].store(ptr+sizeof(simd8<T>)*0);
                                    +
                                    279  this->chunks[1].store(ptr+sizeof(simd8<T>)*1);
                                    +
                                    280  this->chunks[2].store(ptr+sizeof(simd8<T>)*2);
                                    +
                                    281  this->chunks[3].store(ptr+sizeof(simd8<T>)*3);
                                    +
                                    282  }
                                    +
                                    283 
                                    +
                                    284  simdjson_inline simd8<T> reduce_or() const {
                                    +
                                    285  return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]);
                                    +
                                    286  }
                                    +
                                    287 
                                    +
                                    288  simdjson_inline uint64_t compress(uint64_t mask, T * output) const {
                                    +
                                    289  this->chunks[0].compress(uint16_t(mask), output);
                                    +
                                    290  this->chunks[1].compress(uint16_t(mask >> 16), output + 16 - count_ones(mask & 0xFFFF));
                                    +
                                    291  this->chunks[2].compress(uint16_t(mask >> 32), output + 32 - count_ones(mask & 0xFFFFFFFF));
                                    +
                                    292  this->chunks[3].compress(uint16_t(mask >> 48), output + 48 - count_ones(mask & 0xFFFFFFFFFFFF));
                                    +
                                    293  return 64 - count_ones(mask);
                                    +
                                    294  }
                                    +
                                    295 
                                    +
                                    296  simdjson_inline uint64_t to_bitmask() const {
                                    +
                                    297  uint64_t r0 = uint32_t(this->chunks[0].to_bitmask() );
                                    +
                                    298  uint64_t r1 = this->chunks[1].to_bitmask() ;
                                    +
                                    299  uint64_t r2 = this->chunks[2].to_bitmask() ;
                                    +
                                    300  uint64_t r3 = this->chunks[3].to_bitmask() ;
                                    +
                                    301  return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48);
                                    +
                                    302  }
                                    +
                                    303 
                                    +
                                    304  simdjson_inline uint64_t eq(const T m) const {
                                    +
                                    305  const simd8<T> mask = simd8<T>::splat(m);
                                    +
                                    306  return simd8x64<bool>(
                                    +
                                    307  this->chunks[0] == mask,
                                    +
                                    308  this->chunks[1] == mask,
                                    +
                                    309  this->chunks[2] == mask,
                                    +
                                    310  this->chunks[3] == mask
                                    +
                                    311  ).to_bitmask();
                                    +
                                    312  }
                                    +
                                    313 
                                    +
                                    314  simdjson_inline uint64_t eq(const simd8x64<uint8_t> &other) const {
                                    +
                                    315  return simd8x64<bool>(
                                    +
                                    316  this->chunks[0] == other.chunks[0],
                                    +
                                    317  this->chunks[1] == other.chunks[1],
                                    +
                                    318  this->chunks[2] == other.chunks[2],
                                    +
                                    319  this->chunks[3] == other.chunks[3]
                                    +
                                    320  ).to_bitmask();
                                    +
                                    321  }
                                    +
                                    322 
                                    +
                                    323  simdjson_inline uint64_t lteq(const T m) const {
                                    +
                                    324  const simd8<T> mask = simd8<T>::splat(m);
                                    +
                                    325  return simd8x64<bool>(
                                    +
                                    326  this->chunks[0] <= mask,
                                    +
                                    327  this->chunks[1] <= mask,
                                    +
                                    328  this->chunks[2] <= mask,
                                    +
                                    329  this->chunks[3] <= mask
                                    +
                                    330  ).to_bitmask();
                                    +
                                    331  }
                                    +
                                    332  }; // struct simd8x64<T>
                                    +
                                    333 
                                    +
                                    334 } // namespace simd
                                    +
                                    335 } // unnamed namespace
                                    +
                                    336 } // namespace SIMDJSON_IMPLEMENTATION
                                    +
                                    337 } // namespace simdjson
                                    +
                                    338 
                                    +
                                    339 #endif // SIMDJSON_WESTMERE_SIMD_INPUT_H
                                    +
                                    simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept
                                    Comparisons between raw_json_string and std::string_view instances are potentially unsafe: the user i...
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    diff --git a/westmere_2stringparsing_8h_source.html b/westmere_2stringparsing__defs_8h_source.html similarity index 74% rename from westmere_2stringparsing_8h_source.html rename to westmere_2stringparsing__defs_8h_source.html index 7ba072e4f..6d2c79f61 100644 --- a/westmere_2stringparsing_8h_source.html +++ b/westmere_2stringparsing__defs_8h_source.html @@ -5,7 +5,7 @@ -simdjson: include/simdjson/westmere/stringparsing.h Source File +simdjson: include/simdjson/westmere/stringparsing_defs.h Source File @@ -68,7 +68,7 @@ $(function() {
                                    @@ -88,61 +88,64 @@ $(document).ready(function(){initNavTree('westmere_2stringparsing_8h_source.html
                                    -
                                    stringparsing.h
                                    +
                                    stringparsing_defs.h
                                    -
                                    1 #ifndef SIMDJSON_WESTMERE_STRINGPARSING_H
                                    -
                                    2 #define SIMDJSON_WESTMERE_STRINGPARSING_H
                                    +
                                    1 #ifndef SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H
                                    +
                                    2 #define SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H
                                    3 
                                    -
                                    4 namespace simdjson {
                                    -
                                    5 namespace SIMDJSON_IMPLEMENTATION {
                                    -
                                    6 namespace {
                                    -
                                    7 
                                    -
                                    8 using namespace simd;
                                    -
                                    9 
                                    -
                                    10 // Holds backslashes and quotes locations.
                                    -
                                    11 struct backslash_and_quote {
                                    -
                                    12 public:
                                    -
                                    13  static constexpr uint32_t BYTES_PROCESSED = 32;
                                    -
                                    14  simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst);
                                    -
                                    15 
                                    -
                                    16  simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; }
                                    -
                                    17  simdjson_inline bool has_backslash() { return bs_bits != 0; }
                                    -
                                    18  simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); }
                                    -
                                    19  simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); }
                                    -
                                    20 
                                    -
                                    21  uint32_t bs_bits;
                                    -
                                    22  uint32_t quote_bits;
                                    -
                                    23 }; // struct backslash_and_quote
                                    -
                                    24 
                                    -
                                    25 simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) {
                                    -
                                    26  // this can read up to 31 bytes beyond the buffer size, but we require
                                    -
                                    27  // SIMDJSON_PADDING of padding
                                    -
                                    28  static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes");
                                    -
                                    29  simd8<uint8_t> v0(src);
                                    -
                                    30  simd8<uint8_t> v1(src + 16);
                                    -
                                    31  v0.store(dst);
                                    -
                                    32  v1.store(dst + 16);
                                    -
                                    33  uint64_t bs_and_quote = simd8x64<bool>(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask();
                                    -
                                    34  return {
                                    -
                                    35  uint32_t(bs_and_quote), // bs_bits
                                    -
                                    36  uint32_t(bs_and_quote >> 32) // quote_bits
                                    -
                                    37  };
                                    -
                                    38 }
                                    -
                                    39 
                                    -
                                    40 } // unnamed namespace
                                    -
                                    41 } // namespace SIMDJSON_IMPLEMENTATION
                                    -
                                    42 } // namespace simdjson
                                    -
                                    43 
                                    -
                                    44 #endif // SIMDJSON_WESTMERE_STRINGPARSING_H
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    -
                                    constexpr size_t SIMDJSON_PADDING
                                    The amount of padding needed in a buffer to parse JSON.
                                    Definition: common_defs.h:45
                                    +
                                    4 #include "simdjson/westmere/bitmanipulation.h"
                                    +
                                    5 #include "simdjson/westmere/simd.h"
                                    +
                                    6 
                                    +
                                    7 namespace simdjson {
                                    +
                                    8 namespace SIMDJSON_IMPLEMENTATION {
                                    +
                                    9 namespace {
                                    +
                                    10 
                                    +
                                    11 using namespace simd;
                                    +
                                    12 
                                    +
                                    13 // Holds backslashes and quotes locations.
                                    +
                                    14 struct backslash_and_quote {
                                    +
                                    15 public:
                                    +
                                    16  static constexpr uint32_t BYTES_PROCESSED = 32;
                                    +
                                    17  simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst);
                                    +
                                    18 
                                    +
                                    19  simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; }
                                    +
                                    20  simdjson_inline bool has_backslash() { return bs_bits != 0; }
                                    +
                                    21  simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); }
                                    +
                                    22  simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); }
                                    +
                                    23 
                                    +
                                    24  uint32_t bs_bits;
                                    +
                                    25  uint32_t quote_bits;
                                    +
                                    26 }; // struct backslash_and_quote
                                    +
                                    27 
                                    +
                                    28 simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) {
                                    +
                                    29  // this can read up to 31 bytes beyond the buffer size, but we require
                                    +
                                    30  // SIMDJSON_PADDING of padding
                                    +
                                    31  static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes");
                                    +
                                    32  simd8<uint8_t> v0(src);
                                    +
                                    33  simd8<uint8_t> v1(src + 16);
                                    +
                                    34  v0.store(dst);
                                    +
                                    35  v1.store(dst + 16);
                                    +
                                    36  uint64_t bs_and_quote = simd8x64<bool>(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask();
                                    +
                                    37  return {
                                    +
                                    38  uint32_t(bs_and_quote), // bs_bits
                                    +
                                    39  uint32_t(bs_and_quote >> 32) // quote_bits
                                    +
                                    40  };
                                    +
                                    41 }
                                    +
                                    42 
                                    +
                                    43 } // unnamed namespace
                                    +
                                    44 } // namespace SIMDJSON_IMPLEMENTATION
                                    +
                                    45 } // namespace simdjson
                                    +
                                    46 
                                    +
                                    47 #endif // SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H
                                    +
                                    The top level simdjson namespace, containing everything the library provides.
                                    Definition: base.h:8
                                    +
                                    constexpr size_t SIMDJSON_PADDING
                                    The amount of padding needed in a buffer to parse JSON.
                                    Definition: base.h:30
                                    diff --git a/westmere_8h_source.html b/westmere_8h_source.html index 91bed48c7..2a4aec5cf 100644 --- a/westmere_8h_source.html +++ b/westmere_8h_source.html @@ -94,49 +94,11 @@ $(document).ready(function(){initNavTree('westmere_8h_source.html',''); initResi
                                    1 #ifndef SIMDJSON_WESTMERE_H
                                    2 #define SIMDJSON_WESTMERE_H
                                    3 
                                    - -
                                    5 
                                    -
                                    6 #if SIMDJSON_IMPLEMENTATION_WESTMERE
                                    +
                                    4 #include "simdjson/westmere/begin.h"
                                    +
                                    5 #include "simdjson/generic/amalgamated.h"
                                    +
                                    6 #include "simdjson/westmere/end.h"
                                    7 
                                    -
                                    8 #if SIMDJSON_CAN_ALWAYS_RUN_WESTMERE
                                    -
                                    9 #define SIMDJSON_TARGET_WESTMERE
                                    -
                                    10 #define SIMDJSON_UNTARGET_WESTMERE
                                    -
                                    11 #else
                                    -
                                    12 #define SIMDJSON_TARGET_WESTMERE SIMDJSON_TARGET_REGION("sse4.2,pclmul,popcnt")
                                    -
                                    13 #define SIMDJSON_UNTARGET_WESTMERE SIMDJSON_UNTARGET_REGION
                                    -
                                    14 #endif
                                    -
                                    15 
                                    -
                                    16 namespace simdjson {
                                    -
                                    20 namespace westmere {
                                    -
                                    21 } // namespace westmere
                                    -
                                    22 } // namespace simdjson
                                    -
                                    23 
                                    -
                                    24 //
                                    -
                                    25 // These two need to be included outside SIMDJSON_TARGET_WESTMERE
                                    -
                                    26 //
                                    -
                                    27 #include "simdjson/westmere/implementation.h"
                                    -
                                    28 #include "simdjson/westmere/intrinsics.h"
                                    -
                                    29 
                                    -
                                    30 //
                                    -
                                    31 // The rest need to be inside the region
                                    -
                                    32 //
                                    -
                                    33 #include "simdjson/westmere/begin.h"
                                    -
                                    34 
                                    -
                                    35 // Declarations
                                    -
                                    36 #include "simdjson/generic/dom_parser_implementation.h"
                                    -
                                    37 #include "simdjson/westmere/bitmanipulation.h"
                                    -
                                    38 #include "simdjson/westmere/bitmask.h"
                                    -
                                    39 #include "simdjson/westmere/simd.h"
                                    -
                                    40 #include "simdjson/generic/jsoncharutils.h"
                                    -
                                    41 #include "simdjson/generic/atomparsing.h"
                                    -
                                    42 #include "simdjson/westmere/stringparsing.h"
                                    -
                                    43 #include "simdjson/westmere/numberparsing.h"
                                    -
                                    44 #include "simdjson/westmere/end.h"
                                    -
                                    45 
                                    -
                                    46 #endif // SIMDJSON_IMPLEMENTATION_WESTMERE
                                    -
                                    47 #endif // SIMDJSON_WESTMERE_COMMON_H
                                    -
                                    Includes common stuff needed for implementations.
                                    -
                                    We want to support argument-dependent lookup (ADL).
                                    +
                                    8 #endif // SIMDJSON_WESTMERE_H